TODO: Separate IPv4 and IPv6

reviewable/pr18780/r1
Chris Gardner 12 years ago
parent d5bb7188f0
commit 3cf243ec3e

@ -1403,22 +1403,6 @@ class DarwinNetwork(GenericBsdIfconfigNetwork, Network):
current_if['media_options'] = self.get_options(words[3]) current_if['media_options'] = self.get_options(words[3])
class SunOSNetwork(GenericBsdIfconfigNetwork, Network):
"""
This is the SunOS Network Class.
It uses the GenericBsdIfconfigNetwork unchanged
"""
platform = 'SunOS'
# Solaris displays single digit octets in MAC addresses e.g. 0:1:2:d:e:f
# Add leading zero to each octet where needed.
def parse_ether_line(self, words, current_if, ips):
macaddress = ''
for octet in words[1].split(':'):
octet = ('0' + octet)[-2:None]
macaddress += (octet + ':')
current_if['macaddress'] = macaddress[0:-1]
class FreeBSDNetwork(GenericBsdIfconfigNetwork, Network): class FreeBSDNetwork(GenericBsdIfconfigNetwork, Network):
""" """
This is the FreeBSD Network Class. This is the FreeBSD Network Class.
@ -1437,6 +1421,29 @@ class OpenBSDNetwork(GenericBsdIfconfigNetwork, Network):
def parse_lladdr_line(self, words, current_if, ips): def parse_lladdr_line(self, words, current_if, ips):
current_if['macaddress'] = words[1] current_if['macaddress'] = words[1]
class SunOSNetwork(GenericBsdIfconfigNetwork, Network):
"""
This is the SunOS Network Class.
It uses the GenericBsdIfconfigNetwork unchanged
"""
platform = 'SunOS'
# TODO:
# Solaris 10 duplicates entries with 'ifconfig -a' so IPv6 clobbers IPv4.
# Override get_interfaces_info() and run it twice for IPv4 and IPv6 like
# in get_default_interfaces().
# Need to push FLAGS inside ipv4[] and ipv6[] facts as they may differ.
# Possibly others too (e.g. mtu).
# Solaris displays single digit octets in MAC addresses e.g. 0:1:2:d:e:f
# Add leading zero to each octet where needed.
def parse_ether_line(self, words, current_if, ips):
macaddress = ''
for octet in words[1].split(':'):
octet = ('0' + octet)[-2:None]
macaddress += (octet + ':')
current_if['macaddress'] = macaddress[0:-1]
class Virtual(Facts): class Virtual(Facts):
""" """
This is a generic Virtual subclass of Facts. This should be further This is a generic Virtual subclass of Facts. This should be further

Loading…
Cancel
Save