Skip to content

Commit

Permalink
Adds node_type check and renames node-specific class
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalDierich committed Oct 1, 2020
1 parent 9d6ad1b commit 49487ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion teatime/plugins/eth1/account_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from teatime.reporting import Issue, Severity


class AccountImport(Plugin):
class GethAccountImport(Plugin):
"""Detect whether it's possible to import an account on the node.
Severity: Medium
Expand Down
8 changes: 7 additions & 1 deletion teatime/plugins/eth1/rpc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""This module contains plugins for controlling the HTTP RPC server status."""
from teatime.plugins import Context, Plugin
from teatime.plugins import Context, NodeType, Plugin
from teatime.reporting import Issue, Severity


Expand All @@ -15,6 +15,9 @@ class GethStartRPC(Plugin):
INTRUSIVE = True

def _check(self, context: Context) -> None:
if context.node_type != NodeType.GETH:
return

payload = self.get_rpc_json(context.target, method="admin_startRPC")
context.report.add_issue(
Issue(
Expand All @@ -40,6 +43,9 @@ class GethStopRPC(Plugin):
INTRUSIVE = True

def _check(self, context: Context) -> None:
if context.node_type != NodeType.GETH:
return

payload = self.get_rpc_json(context.target, method="admin_stopRPC")
context.report.add_issue(
Issue(
Expand Down

0 comments on commit 49487ff

Please sign in to comment.