adjust availability zone hostname argument
diff --git a/planetstack/openstack/driver.py b/planetstack/openstack/driver.py
index 59847e4..d467dc1 100644
--- a/planetstack/openstack/driver.py
+++ b/planetstack/openstack/driver.py
@@ -411,7 +411,7 @@
hints = {}
availability_zone = None
if hostname:
- availability_zone = 'nova:%s' % hostname
+ availability_zone = 'nova:%s' % hostname.split('.')[0]
server = self.shell.nova.servers.create(
name=name,
key_name = key_name,
@@ -422,6 +422,7 @@
scheduler_hints=hints,
availability_zone=availability_zone,
nics=nics,
+ networks=nics,
meta=metadata)
return server