add module param to Network & sub-classes
add module param to Network and sub-classes of Network, so that ansible 1.5.1 changes to LinuxNetwork apply to all Network classes.
This commit is contained in:
parent
65c4e388eb
commit
3494d67f30
1 changed files with 6 additions and 6 deletions
12
system/setup
12
system/setup
|
@ -1415,7 +1415,8 @@ class Network(Facts):
|
|||
subclass = sc
|
||||
return super(cls, subclass).__new__(subclass, *arguments, **keyword)
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
Facts.__init__(self)
|
||||
|
||||
def populate(self):
|
||||
|
@ -1432,11 +1433,10 @@ class LinuxNetwork(Network):
|
|||
platform = 'Linux'
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
Network.__init__(self)
|
||||
Network.__init__(self, module)
|
||||
|
||||
def populate(self):
|
||||
ip_path = module.get_bin_path('ip')
|
||||
ip_path = self.module.get_bin_path('ip')
|
||||
if ip_path is None:
|
||||
return self.facts
|
||||
default_ipv4, default_ipv6 = self.get_default_interfaces(ip_path)
|
||||
|
@ -1652,8 +1652,8 @@ class GenericBsdIfconfigNetwork(Network):
|
|||
"""
|
||||
platform = 'Generic_BSD_Ifconfig'
|
||||
|
||||
def __init__(self):
|
||||
Network.__init__(self)
|
||||
def __init__(self, module):
|
||||
Network.__init__(self, module)
|
||||
|
||||
def populate(self):
|
||||
|
||||
|
|
Loading…
Reference in a new issue