diff --git a/confluent_client/bin/nodediscover b/confluent_client/bin/nodediscover index 257b0fcb..947ca914 100755 --- a/confluent_client/bin/nodediscover +++ b/confluent_client/bin/nodediscover @@ -263,7 +263,11 @@ def list_matching_macs(options, session, node=None, checknode=True): return [options.mac.replace(':', '-')] else: path += 'by-mac/' - return [x['item']['href'] for x in session.read(path)] + ret = [] + for x in session.read(path): + if 'item' in x and 'href' in x['item']: + ret.append(x['item', 'href']) + return ret def assign_discovery(options, session, needid=True): abort = False diff --git a/confluent_server/bin/confluentdbutil b/confluent_server/bin/confluentdbutil index 884a1b8f..be35e5aa 100755 --- a/confluent_server/bin/confluentdbutil +++ b/confluent_server/bin/confluentdbutil @@ -74,7 +74,7 @@ if args[0] == 'restore': for targdir in os.walk('/etc/confluent'): os.chown(targdir[0], owner, group) for f in targdir[2]: - os.chown(os.patht.join(targdir[0], f), owner, group) + os.chown(os.path.join(targdir[0], f), owner, group) except Exception as e: print(str(e)) sys.exit(1) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index ff1350cd..461ce8bb 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -814,10 +814,10 @@ def get_smm_neighbor_fingerprints(smmaddr, cv): neighs = wc.grab_json_response('/scripts/neighdata.json') if not neighs: return - for idx in (4, 5): - if 'sha256' not in neighs[idx]: + for neigh in neighs: + if 'sha256' not in neigh: continue - yield 'sha256$' + b64tohex(neighs[idx]['sha256']) + yield 'sha256$' + b64tohex(neigh['sha256']) def get_nodename(cfg, handler, info):