From 534b584b72daeb4209e8627f2f78d8a3a9e1e9db Mon Sep 17 00:00:00 2001 From: anjali Date: Sat, 3 Jul 2021 00:18:19 +0530 Subject: [PATCH] removing changes --- py-json/LANforge/LFUtils.py | 11 ++++------- py-json/mac_vlan_profile.py | 1 - py-json/realm.py | 4 ++-- py-json/station_profile.py | 5 ++--- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/py-json/LANforge/LFUtils.py b/py-json/LANforge/LFUtils.py index a1f6d615..464c1e21 100644 --- a/py-json/LANforge/LFUtils.py +++ b/py-json/LANforge/LFUtils.py @@ -270,7 +270,7 @@ def portNameSeries(prefix_="sta", start_id_=0, end_id_=1, padding_number_=10000, return port_name_series(prefix=prefix_, start_id=start_id_, end_id=end_id_, padding_number=padding_number_, radio=radio) -def port_name_series(prefix="sta", start_id=0, end_id=1, padding_number=10000, radio=None, resource=None): +def port_name_series(prefix="sta", start_id=0, end_id=1, padding_number=10000, radio=None): """ This produces a named series similar to "sta000, sta001, sta002...sta0(end_id)" the padding_number is added to the start and end numbers and the resulting sum @@ -285,7 +285,7 @@ def port_name_series(prefix="sta", start_id=0, end_id=1, padding_number=10000, r eid = None if radio is not None: - eid = name_to_eid(radio, resource=resource) + eid = name_to_eid(radio) name_list = [] for i in range((padding_number + start_id), (padding_number + end_id + 1)): @@ -549,11 +549,8 @@ def waitUntilPortsAppear(base_url="http://localhost:8080", port_list=(), debug=F """ return wait_until_ports_appear(base_url, port_list, debug=debug) -def name_to_eid(input, non_port=False, resource=None): - if resource is None: - rv = [1, 1, "", ""] - else: - rv = [1, resource, "", ""] +def name_to_eid(input, non_port=False): + rv = [1, 1, "", ""] info = [] if (input is None) or (input == ""): raise ValueError("name_to_eid wants eid like 1.1.sta0 but given[%s]" % input) diff --git a/py-json/mac_vlan_profile.py b/py-json/mac_vlan_profile.py index ebc23549..edfbdc82 100644 --- a/py-json/mac_vlan_profile.py +++ b/py-json/mac_vlan_profile.py @@ -136,7 +136,6 @@ class MACVLANProfile(LFCliBase): set_port.set_port_current_flags) self.set_port_data["interest"] = self.add_named_flags(self.desired_set_port_interest_flags, set_port.set_port_interest_flags) - self.set_port_data["resource"] = self.resource set_port_r = LFRequest.LFRequest(self.lfclient_url + "/cli-json/set_port") for i in range(len(self.desired_macvlans)): diff --git a/py-json/realm.py b/py-json/realm.py index 11e1eb22..02f825b3 100755 --- a/py-json/realm.py +++ b/py-json/realm.py @@ -582,12 +582,12 @@ class Realm(LFCliBase): return matched_map - def name_to_eid(self, eid, debug=False, non_port=False, resource=None): + def name_to_eid(self, eid, debug=False, non_port=False): if debug: self.logg(level="debug", mesg="name_to_eid: "+str(eid)) if (type(eid) is list) or (type(eid) is tuple): return eid - return LFUtils.name_to_eid(eid, non_port=non_port, resource=resource) + return LFUtils.name_to_eid(eid, non_port=non_port) def wait_for_ip(self, station_list=None, ipv4=True, ipv6=False, timeout_sec=360, debug=False): if not (ipv4 or ipv6): diff --git a/py-json/station_profile.py b/py-json/station_profile.py index e3fae52b..e3046779 100644 --- a/py-json/station_profile.py +++ b/py-json/station_profile.py @@ -373,11 +373,10 @@ class StationProfile: suppress_related_commands_=True, use_radius=False, hs20_enable=False, - sleep_time=0.02, - resource=None): + sleep_time=0.02): if (radio is None) or (radio == ""): raise ValueError("station_profile.create: will not create stations without radio") - radio_eid = self.local_realm.name_to_eid(radio, resource=resource) + radio_eid = self.local_realm.name_to_eid(radio) radio_shelf = radio_eid[0] radio_resource = radio_eid[1] radio_port = radio_eid[2]