mirror of
https://github.com/xcat2/confluent.git
synced 2026-07-03 14:32:14 +00:00
async fixes for nodeconfig and netutil
This commit is contained in:
@@ -263,7 +263,7 @@ async def main():
|
||||
options.restoredefault))
|
||||
sys.exit(1)
|
||||
if setmode:
|
||||
session.stop_if_noderange_over(noderange, options.maxnodes)
|
||||
await session.stop_if_noderange_over(noderange, options.maxnodes)
|
||||
if options.exclude:
|
||||
sys.stderr.write('Cannot use exclude and assign at the same time\n')
|
||||
sys.exit(1)
|
||||
@@ -287,7 +287,7 @@ async def main():
|
||||
# well, we want to expand things..
|
||||
# check ipv4, if requested change method to static
|
||||
for path in updatebypath:
|
||||
for fr in session.update('/noderange/{0}/{1}'.format(noderange, path),
|
||||
async for fr in session.update('/noderange/{0}/{1}'.format(noderange, path),
|
||||
updatebypath[path]):
|
||||
rcode |= client.printerror(fr)
|
||||
for node in fr.get('databynode', []):
|
||||
|
||||
@@ -728,7 +728,7 @@ async def get_nic_config(configmanager, node, ip=None, mac=None, ifidx=None,
|
||||
cfgdata['ipv{}_gateway'.format(nver)] = socket.inet_ntop(fam, candgwn)
|
||||
return noneify(cfgdata)
|
||||
if ip is not None:
|
||||
for prefixinfo in await get_prefix_len_for_ip(ip):
|
||||
async for prefixinfo in get_prefix_len_for_ip(ip):
|
||||
fam, prefix = prefixinfo
|
||||
ip = ip.split('/', 1)[0]
|
||||
if fam == socket.AF_INET:
|
||||
|
||||
Reference in New Issue
Block a user