Add variable for net group (network).

master3.3
Mike Hiretsky 13 years ago
parent 2e4b14d4a9
commit 78c3cb98a3

@ -121,6 +121,7 @@ class fillVars(object, glob_attr):
mapInterface = {}
mapInterface["ip"] = ipaddr
mapInterface["cidr"] = str(ip.maskToCidr(mask)) if mask else ""
mapInterface["network"] = ip.getIpNet(ipaddr,mask=mask)
mapInterface["dhcp"] = "on" if dhcp else "off"
mapInterface["mac"] = mac
mapInterface["name"] = "{vendor} {name}".format(**pciInfo)
@ -1102,6 +1103,10 @@ class fillVars(object, glob_attr):
"""Current mask"""
return self.getAttributeFromHash('os_install_net_hash','cidr')
def get_os_install_net_network(self):
"""Current network"""
return self.getAttributeFromHash('os_install_net_hash','network')
def get_os_install_net_mac(self):
"""Current mac"""
return self.getAttributeFromHash('os_install_net_hash','mac')

@ -278,6 +278,9 @@ class Data:
# ip for all network interfaces
os_install_net_ip = {}
# network for ip
os_install_net_network = {}
# ip cidr
os_install_net_cidr = {}

Loading…
Cancel
Save