diff --git a/py-json/qvlan_profile.py b/py-json/qvlan_profile.py index 6b41a45d..f1a22033 100644 --- a/py-json/qvlan_profile.py +++ b/py-json/qvlan_profile.py @@ -19,7 +19,6 @@ class QVLANProfile(LFCliBase): local_realm, qvlan_parent="eth1", num_qvlans=1, - admin_down=False, dhcp=False, debug_=False): super().__init__(lfclient_host, lfclient_port, debug_) @@ -116,11 +115,11 @@ class QVLANProfile(LFCliBase): else: raise ValueError("Unknown param name: " + param_name) - def create(self, admin_down=False, debug=False, sleep_time=1): + def create(self, sleep_time=1): print("Creating qvlans...") req_url = "/cli-json/add_vlan" - if not self.dhcp and self.first_ip_addr is not None and self.netmask is not None and self.gateway is not None: + if not self.dhcp and self.first_ip_addr and self.netmask and self.gateway: self.desired_set_port_interest_flags.append("ip_address") self.desired_set_port_interest_flags.append("ip_Mask") self.desired_set_port_interest_flags.append("ip_gateway") @@ -146,8 +145,7 @@ class QVLANProfile(LFCliBase): "vid": i + 1 } self.created_qvlans.append("%s.%s.%s#%d" % (self.shelf, self.resource, - self.qvlan_parent, int( - self.desired_qvlans[i][self.desired_qvlans[i].index('#') + 1:]))) + self.qvlan_parent, int(self.desired_qvlans[i][self.desired_qvlans[i].index('#') + 1:]))) self.local_realm.json_post(req_url, data) time.sleep(sleep_time)