Cam & Ed | Fix endpoint/host/port config for ec2 connection
This commit is contained in:
parent
e62357739a
commit
11f9afe4fc
@ -133,16 +133,12 @@ class EC2Driver(driver.ComputeDriver):
|
||||
self.creds = get_nova_creds()
|
||||
self.nova = client.Client(**self.creds)
|
||||
|
||||
# To connect to EC2
|
||||
# self.ec2_conn = ec2.connect_to_region(
|
||||
# aws_region, aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key)
|
||||
|
||||
moto_region = RegionInfo(name=aws_region, endpoint=aws_endpoint)
|
||||
region = RegionInfo(name=aws_region, endpoint=aws_endpoint)
|
||||
self.ec2_conn = ec2.EC2Connection(aws_access_key_id=aws_access_key_id,
|
||||
aws_secret_access_key=aws_secret_access_key,
|
||||
host=host,
|
||||
port=port,
|
||||
region = moto_region,
|
||||
region=region,
|
||||
is_secure=secure)
|
||||
|
||||
self.cloudwatch_conn = ec2.cloudwatch.connect_to_region(
|
||||
|
@ -16,9 +16,13 @@
|
||||
# to connect to the AWS Public cloud.
|
||||
from collections import defaultdict
|
||||
|
||||
aws_region = "us-east-1"
|
||||
aws_access_key_id = "AKIAIZJDDRNNJUWZ3LXA"
|
||||
aws_secret_access_key = "FMld6m8kok9jpxBkORST5xfbZSod7mVm9ChDgttS"
|
||||
aws_region = 'us-east-1'
|
||||
aws_endpoint = 'ec2.us-east-1.amazonaws.com'
|
||||
aws_access_key_id = 'AKIAIZJDDRNNJUWZ3LXA'
|
||||
aws_secret_access_key = 'FMld6m8kok9jpxBkORST5xfbZSod7mVm9ChDgttS'
|
||||
port = 443
|
||||
host = str(port) + ":" + aws_endpoint
|
||||
secure = True
|
||||
|
||||
#Adding a Red Hat Linux image below
|
||||
aws_ami = "ami-785bae10"
|
||||
@ -39,4 +43,4 @@ keypair_map = {}
|
||||
|
||||
VCPUS = 100
|
||||
MEMORY_IN_MBS = 88192
|
||||
DISK_IN_GB = 1028
|
||||
DISK_IN_GB = 1028
|
||||
|
@ -17,11 +17,11 @@
|
||||
from collections import defaultdict
|
||||
|
||||
aws_region = "moto_region"
|
||||
aws_endpoint = "localhost:1234"
|
||||
aws_endpoint = "localhost"
|
||||
aws_access_key_id = 'the_key'
|
||||
aws_secret_access_key = 'the_secret'
|
||||
host = '0.0.0.0'
|
||||
port = '1234'
|
||||
port = 1234
|
||||
host = str(port) + ":" + aws_endpoint
|
||||
secure = False
|
||||
|
||||
#Adding a Red Hat Linux image below
|
||||
|
Loading…
x
Reference in New Issue
Block a user