git://git.onelab.eu
/
plstackapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b09cedb
)
specify instance host using availability_zone arg instead of scheduler_hints
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Tue, 16 Apr 2013 01:47:45 +0000
(21:47 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Tue, 16 Apr 2013 01:47:45 +0000
(21:47 -0400)
plstackapi/openstack/driver.py
patch
|
blob
|
history
diff --git
a/plstackapi/openstack/driver.py
b/plstackapi/openstack/driver.py
index
67b5280
..
c56dcde
100644
(file)
--- a/
plstackapi/openstack/driver.py
+++ b/
plstackapi/openstack/driver.py
@@
-194,10
+194,9
@@
class OpenStackDriver:
files = {'/root/.ssh/authorized_keys': authorized_keys}
hints = {}
files = {'/root/.ssh/authorized_keys': authorized_keys}
hints = {}
+ availability_zone = None
if hostname:
if hostname:
- #hints['force_hosts']= hostname
- #hints['availability-zone'] = 'nova:%s' % hostname
- pass
+ availability_zone = 'nova:%s' % hostname
server = self.shell.nova.servers.create(
name=name,
key_name = key_name,
server = self.shell.nova.servers.create(
name=name,
key_name = key_name,
@@
-205,7
+204,8
@@
class OpenStackDriver:
image=image_id,
security_group = security_group,
files=files,
image=image_id,
security_group = security_group,
files=files,
- scheduler_hints=hints)
+ scheduler_hints=hints,
+ availability_zone=availability_zone)
return server
def destroy_instance(self, id):
return server
def destroy_instance(self, id):