Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
88115f4a
Commit
88115f4a
authored
May 30, 2013
by
Chris Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Separate IPv4 and IPv6
parent
6809b562
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
library/system/setup
+23
-16
No files found.
library/system/setup
View file @
88115f4a
...
...
@@ -1403,22 +1403,6 @@ class DarwinNetwork(GenericBsdIfconfigNetwork, Network):
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
):
"""
This is the FreeBSD Network Class.
...
...
@@ -1437,6 +1421,29 @@ class OpenBSDNetwork(GenericBsdIfconfigNetwork, Network):
def
parse_lladdr_line
(
self
,
words
,
current_if
,
ips
):
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
):
"""
This is a generic Virtual subclass of Facts. This should be further
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment