diff --git a/confluent_client/bin/nodediscover b/confluent_client/bin/nodediscover index 8a6e5877..84daa06d 100755 --- a/confluent_client/bin/nodediscover +++ b/confluent_client/bin/nodediscover @@ -34,6 +34,7 @@ defcolumns = ['Node', 'Model', 'Serial', 'UUID', 'Mac Address', 'Type', columnmapping = { 'Node': 'nodename', 'Model': 'modelnumber', + 'Model Name': 'modelname', 'Serial': 'serialnumber', 'UUID': 'uuid', 'Type': 'types', diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index 4375a875..34fc39e4 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -252,6 +252,8 @@ def send_discovery_datum(info): yield msg.KeyValueData({'lowest_u': info['u']}) if 'hostname' in info: yield msg.KeyValueData({'hostname': info['hostname']}) + if 'modelname' in info: + yield msg.KeyValueData({'modelname': info['modelname']}) def _info_matches(info, criteria): diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index 8b868c8a..626d3b11 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -63,6 +63,14 @@ class NodeHandler(immhandler.NodeHandler): # This is not adequate for being satisfied return bool(info.get('attributes', {})) + def scan(self): + c = webclient.SecureHTTPConnection(self.ipaddr, 443, + verifycallback=self.validate_cert) + i = c.grab_json_response('/api/providers/logoninfo') + modelname = i.get('items', [{}])[0].get('machine_name', None) + if modelname: + self.info['modelname'] = modelname + def preconfig(self, possiblenode): self.tmpnodename = possiblenode ff = self.info.get('attributes', {}).get('enclosure-form-factor', '')