mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-29 00:31:09 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b7d042f2d | |||
| 99f533b4cb | |||
| 9828ea5898 | |||
| 7bdf7afb80 | |||
| cd20a69eb6 |
@@ -1020,9 +1020,13 @@ def eval_node(cfg, handler, info, nodename, manual=False):
|
||||
if nl:
|
||||
# The candidate nodename is the head of a chain, we must
|
||||
# validate the smm certificate by the switch
|
||||
macmap.get_node_fingerprint(nodename, cfg)
|
||||
util.handler.cert_matches(fprint, handler.https_cert)
|
||||
return
|
||||
fprints = macmap.get_node_fingerprints(nodename, cfg)
|
||||
for fprint in fprints:
|
||||
if util.cert_matches(fprint[0], handler.https_cert):
|
||||
if not discover_node(cfg, handler, info,
|
||||
nodename, manual):
|
||||
pending_nodes[nodename] = info
|
||||
return
|
||||
if (info.get('maccount', False) and
|
||||
not handler.discoverable_by_switch(info['maccount'])):
|
||||
errorstr = 'The detected node {0} was detected using switch, ' \
|
||||
|
||||
@@ -16,6 +16,7 @@ import confluent.discovery.handlers.generic as generic
|
||||
import confluent.exceptions as exc
|
||||
import confluent.netutil as netutil
|
||||
import confluent.util as util
|
||||
import eventlet
|
||||
import eventlet.support.greendns
|
||||
import json
|
||||
try:
|
||||
@@ -85,7 +86,24 @@ class NodeHandler(generic.NodeHandler):
|
||||
'username': self.DEFAULT_USER
|
||||
}
|
||||
if authmode == 2:
|
||||
rsp, status = wc.grab_json_response_with_status('/api/reset-pass', passchange)
|
||||
passchange = {
|
||||
'Password': self.targpass,
|
||||
}
|
||||
rwc = webclient.SecureHTTPConnection(
|
||||
self.ipaddr, 443,
|
||||
verifycallback=self.validate_cert)
|
||||
rwc.set_basic_credentials(authdata['username'],
|
||||
authdata['password'])
|
||||
rwc.set_header('If-Match', '*')
|
||||
rwc.set_header('Content-Type', 'application/json')
|
||||
rsp, status = rwc.grab_json_response_with_status(
|
||||
'/redfish/v1/AccountService/Accounts/1',
|
||||
passchange, method='PATCH')
|
||||
if status >= 200 and status < 300:
|
||||
authdata['password'] = self.targpass
|
||||
eventlet.sleep(10)
|
||||
else:
|
||||
raise Exception("Redfish may not have been ready yet")
|
||||
else:
|
||||
rsp, status = wc.grab_json_response_with_status('/api/reset-pass', urlencode(passchange))
|
||||
authdata['password'] = self.targpass
|
||||
|
||||
@@ -199,6 +199,7 @@ def _extract_neighbor_data_affluent(switch, user, password, cfm, lldpdata):
|
||||
'port': record['localport'],
|
||||
'peerid': peerid,
|
||||
}
|
||||
_extract_extended_desc(portdata, portdata['peerdescription'], True)
|
||||
_neighbypeerid[peerid] = portdata
|
||||
lldpdata[localport] = portdata
|
||||
neighdata[switch] = lldpdata
|
||||
|
||||
Reference in New Issue
Block a user