summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKashyap Kopparam <kashyapk@thoughtworks.com>2014-12-15 17:44:54 +0530
committerKashyap Kopparam <kashyapk@thoughtworks.com>2014-12-15 17:46:54 +0530
commit65b0482af3af80e34c00c327f54487d492933b25 (patch)
tree45a08cc7f101e595c11db241edf68c47ddafa5cf
parent42c6144b4d5f049dae1226edf7c6c16c4cb49f94 (diff)
Removed placement and added subnet_id to run_instances. Added
the subnet id of the subnet in the default VPC. Change-Id: Iec923d7929209bd9329290731c8d37047f1a4ab2
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Kashyap Kopparam <kashyapk@thoughtworks.com> Workflow+1: Kashyap Kopparam <kashyapk@thoughtworks.com> Submitted-by: Jenkins Submitted-at: Mon, 15 Dec 2014 12:18:15 +0000 Reviewed-on: https://review.openstack.org/141778 Project: stackforge/ec2-driver Branch: refs/heads/master
-rw-r--r--ec2driver.py2
-rw-r--r--ec2driver_standard_config.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/ec2driver.py b/ec2driver.py
index b1a563e..2dea338 100644
--- a/ec2driver.py
+++ b/ec2driver.py
@@ -242,7 +242,7 @@ class EC2Driver(driver.ComputeDriver):
242 if user_data: 242 if user_data:
243 user_data = base64.b64decode(user_data) 243 user_data = base64.b64decode(user_data)
244 244
245 reservation = self.ec2_conn.run_instances(aws_ami, instance_type=flavor_type, placement="us-east-1d", 245 reservation = self.ec2_conn.run_instances(aws_ami, instance_type=flavor_type, subnet_id=ec2_subnet_id,
246 user_data=user_data) 246 user_data=user_data)
247 ec2_instance = reservation.instances 247 ec2_instance = reservation.instances
248 248
diff --git a/ec2driver_standard_config.py b/ec2driver_standard_config.py
index 0fd3a19..000c811 100644
--- a/ec2driver_standard_config.py
+++ b/ec2driver_standard_config.py
@@ -25,6 +25,7 @@ secure = True
25aws_ami = "ami-785bae10" 25aws_ami = "ami-785bae10"
26#aws_ami = "ami-864d84ee" 26#aws_ami = "ami-864d84ee"
27instance_type = "t2.micro" 27instance_type = "t2.micro"
28ec2_subnet_id = "subnet-e713cdbe"
28 29
29# Mapping OpenStack's flavor IDs(which seems to be randomly assigned) to EC2's flavor names 30# Mapping OpenStack's flavor IDs(which seems to be randomly assigned) to EC2's flavor names
30flavor_map = {2: 't2.micro', 5: 't2.small', 1: 't2.medium', 3: 'c3.xlarge', 4: 'c3.2xlarge'} 31flavor_map = {2: 't2.micro', 5: 't2.small', 1: 't2.medium', 3: 'c3.xlarge', 4: 'c3.2xlarge'}