- client_id = sliver['client_id']
- component_id = sliver['component_id']
- component_name = sliver['component_name']
- slice_name = slice_hrn.replace('.','-')
- component_short_name = component_name.split('.')[0]
- # self.driver.hrn
- sliver_hrn = '%s.%s-%s' % (self.driver.hrn, slice_name, component_short_name)
- sliver_id = Xrn(sliver_hrn, type='sliver').urn
- record = SliverAllocation(sliver_id=sliver_id,
- client_id=client_id,
- component_id=component_id,
- slice_urn = slice_urn,
- allocation_state='geni_allocated')
-
- record.sync()
-
-
+ client_id = sliver['client_id']
+ component_id = sliver['component_id']
+ component_name = sliver['component_name']
+ slice_name = slice_hrn.replace('.', '-')
+ component_short_name = component_name.split('.')[0]
+ # self.driver.hrn
+ sliver_hrn = '%s.%s-%s' % (self.driver.hrn,
+ slice_name, component_short_name)
+ sliver_id = Xrn(sliver_hrn, type='sliver').urn
+ record = SliverAllocation(sliver_id=sliver_id,
+ client_id=client_id,
+ component_id=component_id,
+ slice_urn=slice_urn,
+ allocation_state='geni_allocated')
+
+ record.sync(self.driver.api.dbsession())
+