diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-28 18:14:32 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-03-28 18:14:32 +0200 |
commit | 92d2849f76c3395f9a51ab79a5726e1df5348ba8 (patch) | |
tree | a6edcfde2679f0377c6d34e16f292ffd5a2391a7 /rumba/testbeds/jfed.py | |
parent | 28556357ef43a549d18bf9a38d3c81b16f0ccbe6 (diff) | |
download | rumba-92d2849f76c3395f9a51ab79a5726e1df5348ba8.tar.gz rumba-92d2849f76c3395f9a51ab79a5726e1df5348ba8.zip |
Fix pylint warnings and errors
This fixes several warnings and errors as reported by pylint.
Diffstat (limited to 'rumba/testbeds/jfed.py')
-rw-r--r-- | rumba/testbeds/jfed.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/rumba/testbeds/jfed.py b/rumba/testbeds/jfed.py index 4a36d4a..e606846 100644 --- a/rumba/testbeds/jfed.py +++ b/rumba/testbeds/jfed.py @@ -25,9 +25,9 @@ import xml.dom.minidom as xml import rumba.model as mod class Testbed(mod.Testbed): - def __init__(self, exp_name, username, cert_file, jfed_jar, exp_hours = "2", - proj_name = "ARCFIRE", authority = "wall2.ilabt.iminds.be"): - passwd = getpass.getpass(prompt = "Password for certificate file: ") + def __init__(self, exp_name, username, cert_file, jfed_jar, exp_hours="2", + proj_name="ARCFIRE", authority="wall2.ilabt.iminds.be"): + passwd = getpass.getpass(prompt="Password for certificate file: ") mod.Testbed.__init__(self, exp_name, username, passwd, proj_name) self.authority = "urn:publicid:IDN+" + authority + "+authority+cm" self.auth_name = authority @@ -35,10 +35,10 @@ class Testbed(mod.Testbed): self.jfed_jar = jfed_jar self.exp_hours = exp_hours self.if_id = dict() - - def create_rspec(self, experiment): self.rspec = self.exp_name + ".rspec" + self.manifest = self.exp_name + ".rrspec" + def create_rspec(self, experiment): impl = xml.getDOMImplementation() doc = impl.createDocument(None, "rspec", None) @@ -80,7 +80,7 @@ class Testbed(mod.Testbed): node.ifs = 0 for ipcp in node.ipcps: - if type(ipcp) is mod.ShimEthIPCP: + if isinstance(ipcp, mod.ShimEthIPCP): el3 = doc.createElement("interface") self.if_id[ipcp] = node.name + ":if" + str(node.ifs) el3.setAttribute("client_id", self.if_id[ipcp]) @@ -88,7 +88,7 @@ class Testbed(mod.Testbed): el.appendChild(el3) for dif in experiment.dif_ordering: - if type(dif) is mod.ShimEthDIF: + if isinstance(dif, mod.ShimEthDIF): el = doc.createElement("link") top_el.appendChild(el) el.setAttribute("client_id", dif.name) @@ -108,7 +108,6 @@ class Testbed(mod.Testbed): def create_experiment(self, experiment): self.create_rspec(experiment) - self.manifest = self.exp_name + ".rrspec" for node in experiment.nodes: auth_name_r = self.auth_name.replace(".", "-") @@ -140,7 +139,7 @@ class Testbed(mod.Testbed): for intf in intfs: i_name = intf.getAttribute("client_id") for ipcp in node_n.ipcps: - if type(ipcp) is mod.ShimEthIPCP: + if isinstance(ipcp, mod.ShimEthIPCP): if self.if_id[ipcp] == i_name: comp_id = intf.getAttribute("component_id") comp_arr = comp_id.split(":") |