mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 04:32:11 +00:00
Fix nodediscover CLI for subscribe/unsubscribe
This commit is contained in:
parent
7561b68b57
commit
1e78f11c2b
@ -53,9 +53,14 @@ columnmapping = {
|
||||
def subscribe_discovery(options, session, subscribe):
|
||||
keyn = 'subscribe' if subscribe else 'unsubscribe'
|
||||
payload = {keyn: options.node}
|
||||
for rsp in session.update('/discovery/subscription', payload):
|
||||
if 'status' in rsp:
|
||||
print(rsp['status'])
|
||||
if subscribe:
|
||||
for rsp in session.update('/discovery/subscriptions/{0}'.format(options.node), payload):
|
||||
if 'status' in rsp:
|
||||
print(rsp['status'])
|
||||
else:
|
||||
for rsp in session.delete('/discovery/subscriptions/{0}'.format(options.node)):
|
||||
if 'status' in rsp:
|
||||
print(rsp['status'])
|
||||
|
||||
def print_disco(options, session, currmac, outhandler, columns):
|
||||
procinfo = {}
|
||||
|
@ -518,7 +518,7 @@ def handle_read_api_request(pathcomponents):
|
||||
dirlist = [msg.ChildCollection(x + '/') for x in sorted(list(subcats))]
|
||||
dirlist.append(msg.ChildCollection('rescan'))
|
||||
dirlist.append(msg.ChildCollection('autosense'))
|
||||
dirlist.append(msg.ChildCollection('subscription'))
|
||||
dirlist.append(msg.ChildCollection('subscriptions/'))
|
||||
return dirlist
|
||||
if not coll:
|
||||
return show_info(queryparms['by-mac'])
|
||||
|
Loading…
Reference in New Issue
Block a user