diff --git a/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet index 371c1e45..9b2041fb 100644 --- a/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet +++ b/confluent_osdeploy/esxi7/profiles/hypervisor/scripts/makeksnet @@ -1,7 +1,7 @@ #!/usr/bin/python import re import subprocess -import yaml +import json uplinkmatch = re.compile('^\s*Uplinks:\s*(.*)') nodename = None for inf in open('/etc/confluent/confluent.info', 'r').read().split('\n'): @@ -34,8 +34,8 @@ for info in vswinfo.split('\n'): if upinfo: vmnic = upinfo.group(1) try: - with open('/tmp/confluentident/cnflnt.yml') as identin: - identcfg = yaml.safe_load(identin) + with open('/tmp/confluentident/cnflnt.jsn') as identin: + identcfg = json.load(identin) ncfg = identcfg['net_cfgs'][0] cfg['ipv4_method'] = ncfg['ipv4_method'] cfg['ipv4_address'] = ncfg['ipv4_address'].split('/')[0] @@ -52,4 +52,4 @@ if cfg['ipv4_method'] == 'static': netline += ' --gateway={0}'.format(cfg['ipv4_gateway']) if cfg['nameservers']: netline += ' --nameserver={0}'.format(cfg['nameservers']) -print(netline) \ No newline at end of file +print(netline)