diff options
author | jan.hradil <jan.hradil@pantheon.tech> | 2017-04-27 14:47:16 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2017-05-02 06:24:18 +0000 |
commit | 44cafa8a265cfb1144638430079ef4dbf2501d72 (patch) | |
tree | a1eaea31c31578107c9cd11946772c259344010b /resources/libraries/python/honeycomb | |
parent | 41212b4103c2f1b746d8b2101328e49e8697ef6c (diff) |
csit-validate-pylint-master/3731 for build 3731
pylint repairs
deleted duplicated method from HcPersistence.py
Change-Id: I426e6c15957c995ea10bd11ae2deac75b1cab922
Signed-off-by: jan.hradil <jan.hradil@pantheon.tech>
Diffstat (limited to 'resources/libraries/python/honeycomb')
4 files changed, 8 insertions, 26 deletions
diff --git a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py index d57f93913f..dc248589f9 100644 --- a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py +++ b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py @@ -1531,10 +1531,10 @@ class InterfaceKeywords(object): interface = interface.replace("/", "%2F") data = { - "interface-policer:policer": { - "ip4-table": table_name - } + "interface-policer:policer": { + "ip4-table": table_name } + } path = "/interface/" + interface + "/interface-policer:policer" status_code, resp = HcUtil.\ @@ -1725,7 +1725,7 @@ class InterfaceKeywords(object): for src_interface in src_interfaces: src_interface["iface-ref"] = Topology.\ convert_interface_reference( - node, src_interface["iface-ref"], "name") + node, src_interface["iface-ref"], "name") data = { "span": { "mirrored-interfaces": { diff --git a/resources/libraries/python/honeycomb/HcPersistence.py b/resources/libraries/python/honeycomb/HcPersistence.py index dae84bdf22..e1b827f9c9 100644 --- a/resources/libraries/python/honeycomb/HcPersistence.py +++ b/resources/libraries/python/honeycomb/HcPersistence.py @@ -100,9 +100,7 @@ class HcPersistence(object): ssh = SSH() ssh.connect(node) for command in commands: - (_, stdout, _) = ssh.exec_command_sudo(command) - logger.info(stdout) - + (_, _, _) = ssh.exec_command_sudo(command) @staticmethod def configure_persistence(node, state): @@ -142,19 +140,3 @@ class HcPersistence(object): if ret_code != 0: raise HoneycombError("Failed to modify configuration on " "node {0}, {1}".format(node, stderr)) - - @staticmethod - def log_persisted_configuration(node): - """Read contents of Honeycomb persistence files and print to Robot log. - - :param node: Honeycomb node. - :type node: dict - """ - - command = "cat /var/lib/honeycomb/persist/{0}/data.json" - - ssh = SSH() - ssh.connect(node) - - ssh.exec_command_sudo(command.format("config")) - ssh.exec_command_sudo(command.format("context")) diff --git a/resources/libraries/python/honeycomb/HoneycombSetup.py b/resources/libraries/python/honeycomb/HoneycombSetup.py index 871ade6887..551d44b5ae 100644 --- a/resources/libraries/python/honeycomb/HoneycombSetup.py +++ b/resources/libraries/python/honeycomb/HoneycombSetup.py @@ -400,7 +400,7 @@ class HoneycombSetup(object): Const.REMOTE_HC_DIR, artifact_id, version) cmd = "sudo mkdir -p {0}; " \ "sudo cp /usr/share/java/{1} {0}/{2}-{3}.jar".format( - directory, item, artifact_id, version) + directory, item, artifact_id, version) (ret_code, _, stderr) = ssh.exec_command(cmd) if ret_code != 0: diff --git a/resources/libraries/python/honeycomb/proxyARP.py b/resources/libraries/python/honeycomb/proxyARP.py index c9d9040943..9696bf4238 100644 --- a/resources/libraries/python/honeycomb/proxyARP.py +++ b/resources/libraries/python/honeycomb/proxyARP.py @@ -122,11 +122,11 @@ class ProxyARPKeywords(object): path = "/interface/{0}/proxy-arp".format(interface) if state == "disable": - status_code, resp = HcUtil.delete_honeycomb_data( + status_code, _ = HcUtil.delete_honeycomb_data( node, "config_vpp_interfaces", path) elif state == "enable": data = {"proxy-arp": {}} - status_code, resp = HcUtil.put_honeycomb_data( + status_code, _ = HcUtil.put_honeycomb_data( node, "config_vpp_interfaces", data, path) else: raise ValueError("State argument has to be enable or disable.") |