From 3bc732ba1b5d64dc2e98e18099844b2f27bdffd4 Mon Sep 17 00:00:00 2001 From: Matthew Stidham Date: Fri, 17 Dec 2021 13:04:29 -0800 Subject: [PATCH] station_profile: Enable use of dhcp ipv6 flag Signed-off-by: Matthew Stidham --- py-json/station_profile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/py-json/station_profile.py b/py-json/station_profile.py index 7588682c..ccfa41aa 100644 --- a/py-json/station_profile.py +++ b/py-json/station_profile.py @@ -44,6 +44,7 @@ class StationProfile: resource=1, shelf=1, dhcp=True, + ipv6=False, debug_=False, use_ht160=False): self.debug = debug_ @@ -55,6 +56,7 @@ class StationProfile: self.resource = resource self.shelf = shelf self.dhcp = dhcp + self.ipv6 = ipv6 self.security = security self.local_realm = local_realm self.use_ht160 = use_ht160 @@ -79,8 +81,12 @@ class StationProfile: self.desired_set_port_current_flags = ["if_down"] self.desired_set_port_interest_flags = ["current_flags", "ifdown"] if self.dhcp: - self.desired_set_port_current_flags.append("use_dhcp") - self.desired_set_port_interest_flags.append("dhcp") + if self.ipv6: + self.desired_set_port_current_flags.append("use_dhcpv6") + self.desired_set_port_interest_flags.append("dhcpv6") + else: + self.desired_set_port_current_flags.append("use_dhcp") + self.desired_set_port_interest_flags.append("dhcp") self.set_port_data = { "shelf": 1,