Skip to content

Commit 628ff02

Browse files
committed
Assumptions about keys in create_blueprint fall through when using subnets
1 parent 09e92d5 commit 628ff02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stackdio/client/blueprint.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def create_blueprint(self, blueprint, provider="ec2"):
3333
if isinstance(host["size"], basestring):
3434
host["size"] = self.get_instance_id(host["size"], provider)
3535

36-
if isinstance(host["zone"], basestring):
36+
# zone isn't required if you provide a subnet_id
37+
if 'zone' in host and isinstance(host["zone"], basestring):
3738
host["zone"] = self.get_zone_id(host["zone"], provider)
3839

3940
if isinstance(host["cloud_profile"], basestring):

0 commit comments

Comments
 (0)