Quick fix for modify_vap.py to see the shelf and resource;

TODO make sure to check code in vap_profile.py for duplicate;
name_to_eid should be handled by vap_profile.
This commit is contained in:
erinnerim
2022-06-07 14:17:33 -07:00
committed by shivam
parent b149935922
commit e6dcee47b5
2 changed files with 8 additions and 2 deletions

View File

@@ -290,7 +290,7 @@ class VAPProfile(LFCliBase):
self.add_vap_data["flags"] = self.add_named_flags(self.desired_add_vap_flags, add_vap.add_vap_flags)
self.add_vap_data["flags_mask"] = self.add_named_flags(self.desired_add_vap_flags_mask, add_vap.add_vap_flags)
self.add_vap_data["radio"] = radio
# TODO: add_vap_data should not hold shelf and resource; duplicate
self.add_vap_data["resource"] = resource
self.set_port_data["current_flags"] = self.add_named_flags(self.desired_set_port_current_flags,
set_port.set_port_current_flags)

View File

@@ -16,6 +16,7 @@ sys.path.append(os.path.join(os.path.abspath(__file__ + "../../../")))
lfcli_base = importlib.import_module("py-json.LANforge.lfcli_base")
LFCliBase = lfcli_base.LFCliBase
LFUtils = importlib.import_module("py-json.LANforge.LFUtils")
realm = importlib.import_module("py-json.realm")
Realm = realm.Realm
@@ -55,7 +56,12 @@ class ModifyVAP(Realm):
self.debug = _debug_on
self.dhcp = _dhcp
self.vap_profile = self.new_vap_profile()
self.vap_profile.vap_name = self.vap_list
shelf, resource, port, *nil = LFUtils.name_to_eid(self.vap_list)
self.vap_profile.resource = resource
self.vap_profile.shelf = shelf
self.vap_profile.add_vap_data["resource"] = resource
self.vap_profile.add_vap_data["shelf"] = shelf
self.vap_profile.vap_name = port
self.vap_profile.ssid = self.ssid
self.vap_profile.security = self.security
self.vap_profile.ssid_pass = self.password