def __init__(self, driver):
self.driver = driver
- def instance_to_sliver(instance, slice_xrn=None):
+ def instance_to_sliver(self, instance, slice_xrn=None):
sliver_id = None
if slice_xrn:
xrn = OSXrn(slice_xrn, 'slice')
def get_slice_nodes(self, slice_xrn):
name = OSXrn(xrn = slice_xrn).name
- instances = self.driver.instance_get_all_by_project(name)
+ instances = self.driver.shell.instance_get_all_by_project(name)
rspec_nodes = []
for instance in instances:
rspec_node = Node()
def get_aggregate_nodes(self):
- zones = self.driver.zone_get_all()
+ zones = self.driver.shell.zone_get_all()
if not zones:
zones = ['cloud']
else:
rspec_node['exclusive'] = 'false'
rspec_node['hardware_types'] = [HardwareType({'name': 'plos-pc'}),
HardwareType({'name': 'pc'})]
- instances = self.driver.instance_type_get_all().values()
+ instances = self.driver.shell.instance_type_get_all().values()
slivers = [self.instance_to_sliver(inst) for inst in instances]
rspec_node['slivers'] = slivers
rspec_nodes.append(rspec_node)