from sfa.util.sfatime import datetime_to_epoch
def hostname_to_hrn(root_auth,login_base,hostname):
from sfa.util.sfatime import datetime_to_epoch
def hostname_to_hrn(root_auth,login_base,hostname):
# assumes that sites, interfaces and tags have already been prepared.
#site = sites_dict[node['site_id']]
# assumes that sites, interfaces and tags have already been prepared.
#site = sites_dict[node['site_id']]
- if node['posx'] and node['posy']:
- location = Location({'longitude':node['posx'], 'latitude': node['posy']})
- rspec_node['location'] = location
+ try:
+ if node['posx'] and node['posy']:
+ location = Location({'longitude':node['posx'], 'latitude': node['posy']})
+ rspec_node['location'] = location
+ except KeyError:
+ pass