mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 02:38:03 +00:00 
			
		
		
		
	The DHCP flag was in the wrong order in the script. It has to be before the request is sent.
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
This commit is contained in:
		| @@ -127,17 +127,17 @@ class MACVLANProfile(LFCliBase): | ||||
|             self.ip_list = LFUtils.gen_ip_series(ip_addr=self.first_ip_addr, netmask=self.netmask, | ||||
|                                                  num_ips=self.num_macvlans) | ||||
|  | ||||
|         if self.dhcp: | ||||
|             print("Using DHCP") | ||||
|             self.desired_set_port_current_flags.append("use_dhcp") | ||||
|             self.desired_set_port_interest_flags.append("dhcp") | ||||
|  | ||||
|         self.set_port_data["current_flags"] = self.add_named_flags(self.desired_set_port_current_flags, | ||||
|                                                                    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) | ||||
|         set_port_r = LFRequest.LFRequest(self.lfclient_url + "/cli-json/set_port") | ||||
|  | ||||
|         if self.dhcp: | ||||
|             print("Using DHCP") | ||||
|             self.desired_set_port_current_flags.append("use_dhcp") | ||||
|             self.desired_set_port_interest_flags.append("dhcp") | ||||
|  | ||||
|         for i in range(len(self.desired_macvlans)): | ||||
|             data = { | ||||
|                 "shelf": self.shelf, | ||||
| @@ -145,6 +145,7 @@ class MACVLANProfile(LFCliBase): | ||||
|                 "mac": "xx:xx:xx:*:*:xx", | ||||
|                 "port": self.local_realm.name_to_eid(self.macvlan_parent)[2], | ||||
|                 "index": int(self.desired_macvlans[i][self.desired_macvlans[i].index('#') + 1:]), | ||||
|                 #"dhcp": self.dhcp, | ||||
|                 "flags": None | ||||
|             } | ||||
|             if admin_down: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Matthew Stidham
					Matthew Stidham