X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fopenstack%2Fosaggregate.py;fp=sfa%2Fopenstack%2Fosaggregate.py;h=8a48fe237190c993c355752d619256d8e210632e;hb=35d60c3780adbd8d5a490be39289935231acd4c7;hp=4506fe9d6809a6417bda775b1840d568731aa84b;hpb=242002fedb442a214397b93b774dbbfbd7c7c5bb;p=sfa.git diff --git a/sfa/openstack/osaggregate.py b/sfa/openstack/osaggregate.py index 4506fe9d..8a48fe23 100644 --- a/sfa/openstack/osaggregate.py +++ b/sfa/openstack/osaggregate.py @@ -201,9 +201,10 @@ class OSAggregate: def instance_to_sliver(self, instance, xrn=None): if xrn: - xrn = Xrn(xrn=slice_xrn, type='slice', id=instance.id).get_urn() + sliver_hrn = '%s.%s' % (self.driver.hrn, instance.id) + sliver_id = Xrn(sliver_hrn, type='sliver').urn - sliver = Sliver({'sliver_id': xrn.get_urn(), + sliver = Sliver({'sliver_id': sliver_id, 'name': instance.name, 'type': instance.name, 'cpus': str(instance.vcpus), @@ -212,7 +213,7 @@ class OSAggregate: return sliver def instance_to_geni_sliver(self, instance, sliver_allocations = {}): - sliver_hrn = '%s.%s' % (root_hrn, instance.id) + sliver_hrn = '%s.%s' % (self.driver.hrn, instance.id) sliver_id = Xrn(sliver_hrn, type='sliver').urn # set sliver allocation and operational status