|
|
@ -50,8 +50,7 @@ from .data import (
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
AWS_ENDPOINTS = {
|
|
|
|
AWS_ENDPOINTS = {
|
|
|
|
'us-east-1': 'https://14blg63h2i.execute-api.us-east-1.amazonaws.com',
|
|
|
|
'us-east-1': 'https://ansible-core-ci.testing.ansible.com',
|
|
|
|
'us-east-2': 'https://g5xynwbk96.execute-api.us-east-2.amazonaws.com',
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -87,8 +86,6 @@ class AnsibleCoreCI:
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.name = '%s-%s' % (self.platform, self.version)
|
|
|
|
self.name = '%s-%s' % (self.platform, self.version)
|
|
|
|
|
|
|
|
|
|
|
|
self.resource = 'jobs'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Assign each supported platform to one provider.
|
|
|
|
# Assign each supported platform to one provider.
|
|
|
|
# This is used to determine the provider from the platform when no provider is specified.
|
|
|
|
# This is used to determine the provider from the platform when no provider is specified.
|
|
|
|
providers = dict(
|
|
|
|
providers = dict(
|
|
|
@ -157,10 +154,8 @@ class AnsibleCoreCI:
|
|
|
|
self.path = os.path.expanduser('~/.ansible/test/instances/%s-%s-%s' % (self.name, self.provider, self.stage))
|
|
|
|
self.path = os.path.expanduser('~/.ansible/test/instances/%s-%s-%s' % (self.name, self.provider, self.stage))
|
|
|
|
|
|
|
|
|
|
|
|
if self.provider in ('aws', 'azure', 'ibmps', 'ibmvpc'):
|
|
|
|
if self.provider in ('aws', 'azure', 'ibmps', 'ibmvpc'):
|
|
|
|
if self.provider != 'aws':
|
|
|
|
|
|
|
|
self.resource = self.provider
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if args.remote_aws_region:
|
|
|
|
if args.remote_aws_region:
|
|
|
|
|
|
|
|
display.warning('The --remote-aws-region option is obsolete and will be removed in a future version of ansible-test.')
|
|
|
|
# permit command-line override of region selection
|
|
|
|
# permit command-line override of region selection
|
|
|
|
region = args.remote_aws_region
|
|
|
|
region = args.remote_aws_region
|
|
|
|
# use a dedicated CI key when overriding the region selection
|
|
|
|
# use a dedicated CI key when overriding the region selection
|
|
|
@ -169,7 +164,12 @@ class AnsibleCoreCI:
|
|
|
|
region = 'us-east-1'
|
|
|
|
region = 'us-east-1'
|
|
|
|
|
|
|
|
|
|
|
|
self.path = "%s-%s" % (self.path, region)
|
|
|
|
self.path = "%s-%s" % (self.path, region)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.args.remote_endpoint:
|
|
|
|
|
|
|
|
self.endpoints = (self.args.remote_endpoint,)
|
|
|
|
|
|
|
|
else:
|
|
|
|
self.endpoints = (AWS_ENDPOINTS[region],)
|
|
|
|
self.endpoints = (AWS_ENDPOINTS[region],)
|
|
|
|
|
|
|
|
|
|
|
|
self.ssh_key = SshKey(args)
|
|
|
|
self.ssh_key = SshKey(args)
|
|
|
|
|
|
|
|
|
|
|
|
if self.platform == 'windows':
|
|
|
|
if self.platform == 'windows':
|
|
|
@ -183,6 +183,9 @@ class AnsibleCoreCI:
|
|
|
|
# 90 seconds
|
|
|
|
# 90 seconds
|
|
|
|
self.retries = 7
|
|
|
|
self.retries = 7
|
|
|
|
elif self.provider == 'parallels':
|
|
|
|
elif self.provider == 'parallels':
|
|
|
|
|
|
|
|
if self.args.remote_endpoint:
|
|
|
|
|
|
|
|
self.endpoints = (self.args.remote_endpoint,)
|
|
|
|
|
|
|
|
else:
|
|
|
|
self.endpoints = self._get_parallels_endpoints()
|
|
|
|
self.endpoints = self._get_parallels_endpoints()
|
|
|
|
self.max_threshold = 6
|
|
|
|
self.max_threshold = 6
|
|
|
|
|
|
|
|
|
|
|
@ -236,7 +239,7 @@ class AnsibleCoreCI:
|
|
|
|
sleep = 3
|
|
|
|
sleep = 3
|
|
|
|
|
|
|
|
|
|
|
|
for _iteration in range(1, 10):
|
|
|
|
for _iteration in range(1, 10):
|
|
|
|
response = client.get('https://s3.amazonaws.com/ansible-ci-files/ansible-test/parallels-endpoints.txt')
|
|
|
|
response = client.get('https://ansible-ci-files.s3.amazonaws.com/ansible-test/parallels-endpoints.txt')
|
|
|
|
|
|
|
|
|
|
|
|
if response.status_code == 200:
|
|
|
|
if response.status_code == 200:
|
|
|
|
endpoints = tuple(response.response.splitlines())
|
|
|
|
endpoints = tuple(response.response.splitlines())
|
|
|
@ -370,7 +373,7 @@ class AnsibleCoreCI:
|
|
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
@property
|
|
|
|
def _uri(self):
|
|
|
|
def _uri(self):
|
|
|
|
return '%s/%s/%s/%s' % (self.endpoint, self.stage, self.resource, self.instance_id)
|
|
|
|
return '%s/%s/%s/%s' % (self.endpoint, self.stage, self.provider, self.instance_id)
|
|
|
|
|
|
|
|
|
|
|
|
def _start(self, auth):
|
|
|
|
def _start(self, auth):
|
|
|
|
"""Start instance."""
|
|
|
|
"""Start instance."""
|
|
|
|