mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 19:10:10 +00:00
Extend rescan to cover remote switches
This commit is contained in:
parent
327a45ef33
commit
7e02987a8c
@ -1446,13 +1446,14 @@ def _periodic_recheck(configmanager):
|
||||
def rescan():
|
||||
_map_unique_ids()
|
||||
global scanner
|
||||
mycfm = cfm.ConfigManager(None)
|
||||
myname = collective.get_myname()
|
||||
if scanner:
|
||||
return
|
||||
else:
|
||||
scanner = eventlet.spawn(blocking_scan)
|
||||
for remagent in get_subscriptions():
|
||||
affluent.
|
||||
|
||||
affluent.renotify_my(remagent, mycfm, myname)
|
||||
|
||||
|
||||
def blocking_scan():
|
||||
|
@ -58,7 +58,8 @@ def renotify_me(node, configmanager, myname):
|
||||
creds = configmanager.get_node_attributes(
|
||||
node, ['secret.hardwaremanagementuser', 'secret.hardwaremanagementpassword'], decrypt=True)
|
||||
wc = WebClient(node, configmanager, creds)
|
||||
wc.wc.grab_json_response('/affluent/cert_authorities/{0}'.format(myname), cacert)
|
||||
res, status = wc.wc.grab_json_response_with_status('/affluent/systems/renotify', {'subscriber': myname})
|
||||
|
||||
|
||||
def subscribe_discovery(node, configmanager, myname):
|
||||
creds = configmanager.get_node_attributes(
|
||||
|
Loading…
Reference in New Issue
Block a user