fix name of parameter passed to create sliver
diff --git a/planetstack/openstack/driver.py b/planetstack/openstack/driver.py
index a6addba..41a653d 100644
--- a/planetstack/openstack/driver.py
+++ b/planetstack/openstack/driver.py
@@ -358,7 +358,7 @@
return (subnet_id, subnet)
- def spawn_instance(self, name, key_name=None, hostname=None, image_id=None, security_group=None, pubkeys=[], networks=None):
+ def spawn_instance(self, name, key_name=None, hostname=None, image_id=None, security_group=None, pubkeys=[], nics=None):
flavor_name = self.config.nova_default_flavor
flavor = self.shell.nova.flavors.find(name=flavor_name)
#if not image:
@@ -383,7 +383,7 @@
files=files,
scheduler_hints=hints,
availability_zone=availability_zone,
- networks=networks)
+ nics=nics)
return server
def destroy_instance(self, id):
diff --git a/planetstack/openstack/manager.py b/planetstack/openstack/manager.py
index 6838aea..e96e9f8 100644
--- a/planetstack/openstack/manager.py
+++ b/planetstack/openstack/manager.py
@@ -309,7 +309,7 @@
networks = []
for network_id in network_ids:
- networks.append({"uuid": network_id})
+ networks.append({"net-id": network_id})
return networks
@@ -318,9 +318,10 @@
if not sliver.instance_id:
if (sliver.slice.name == "smbaker-slice-8") or (sliver.slice.name.startswith("smbaker-slice-net")):
# only inflict this pain on myself, for now...
- requested_networks = self.get_requested_networks(sliver.slice)
+ nics = self.get_requested_networks(sliver.slice)
else:
- requested_networks = None
+ nics = None
+ file("/tmp/scott-manager","a").write("slice: %s\nreq: %s\n" % (str(sliver.slice.name), str(nics)))
slice_memberships = SliceMembership.objects.filter(slice=sliver.slice)
pubkeys = [sm.user.public_key for sm in slice_memberships if sm.user.public_key]
pubkeys.append(sliver.creator.public_key)
@@ -329,7 +330,7 @@
image_id = sliver.image.image_id,
hostname = sliver.node.name,
pubkeys = pubkeys,
- networks = requested_networks )
+ nics = nics )
sliver.instance_id = instance.id
sliver.instance_name = getattr(instance, 'OS-EXT-SRV-ATTR:instance_name')