- # resolve component hostnames
- nodes = self.shell.GetNodes(self.auth, {}, ['hostname', 'site_id'])
-
- # resolve site login_bases
- site_ids = [node['site_id'] for node in nodes]
- sites = self.shell.GetSites(self.auth, site_ids, ['site_id', 'login_base'])
- site_dict = {}
- for site in sites:
- site_dict[site['site_id']] = site['login_base']
-
- # filter nodes according to policy
- # convert plc names to geni hrn
- nodedict = {}
- for node in nodes:
- node_hrn = self.hostname_to_hrn(site_dict[node['site_id']], node['hostname'])
- # apply policy.
- # Do not allow nodes found in blacklist, only allow nodes found in whitelist
- if self.policy['whitelist'] and node_hrn not in self.polciy['whitelist']:
- continue
- if self.policy['blacklist'] and node_hrn in self.policy['blacklist']:
- continue
- nodedict[node_hrn] = node['hostname']
+ # extract nodespecs from rspec to get dns names
+ hostnames = []
+ nodespecs = rspec.getDictsByTagName('NodeSpec')
+ for nodespec in nodespecs:
+ if nodespec.has_key('name') and nodespec['name']:
+ hostnames.append(nodespec['name'])