Merge "Remove api-timeout and provider.image-type" into feature/zuulv3
This commit is contained in:
commit
f27f47285e
@ -186,7 +186,6 @@ providers:
|
||||
- name: devstack
|
||||
region-name: '$REGION_NAME'
|
||||
cloud: devstack
|
||||
api-timeout: 60
|
||||
# Long boot timeout to deal with potentially nested virt.
|
||||
boot-timeout: 600
|
||||
launch-timeout: 900
|
||||
|
@ -289,20 +289,6 @@ Example::
|
||||
More information about the contents of `clouds.yaml` can be found in
|
||||
`the os-client-config documentation <http://docs.openstack.org/developer/os-client-config/>`_.
|
||||
|
||||
**compatablity**
|
||||
|
||||
For backwards compatibility reasons, you can also include
|
||||
portions of the cloud configuration directly in ``nodepool.yaml``. Not all
|
||||
of the options settable via ``clouds.yaml`` are available.
|
||||
|
||||
``image-type``
|
||||
Specifies the image type supported by this provider. The disk images built
|
||||
by diskimage-builder will output an image for each ``image-type`` specified
|
||||
by a provider using that particular diskimage.
|
||||
|
||||
By default, ``image-type`` is set to the value returned from
|
||||
``os-client-config`` and can be omitted in most cases.
|
||||
|
||||
**required**
|
||||
|
||||
``name``
|
||||
@ -331,10 +317,6 @@ Example::
|
||||
|
||||
Default 3.
|
||||
|
||||
``api-timeout`` (compatability)
|
||||
Timeout for the OpenStack API calls client in seconds. Prefer setting
|
||||
this in `clouds.yaml`
|
||||
|
||||
``region-name``
|
||||
|
||||
``hostname-format``
|
||||
|
@ -66,10 +66,8 @@ class ConfigValidator:
|
||||
'region-name': str,
|
||||
'cloud': str,
|
||||
'max-concurrency': int,
|
||||
'image-type': str,
|
||||
'ipv6-preferred': bool,
|
||||
'boot-timeout': int,
|
||||
'api-timeout': int,
|
||||
'launch-timeout': int,
|
||||
'launch-retries': int,
|
||||
'rate': float,
|
||||
|
@ -43,7 +43,6 @@ class Provider(ConfigValue):
|
||||
other.pools != self.pools or
|
||||
other.image_type != self.image_type or
|
||||
other.rate != self.rate or
|
||||
other.api_timeout != self.api_timeout or
|
||||
other.boot_timeout != self.boot_timeout or
|
||||
other.launch_timeout != self.launch_timeout or
|
||||
other.ipv6_preferred != self.ipv6_preferred or
|
||||
@ -219,7 +218,6 @@ def loadConfig(config_path):
|
||||
p.region_name = provider.get('region-name')
|
||||
p.max_concurrency = provider.get('max-concurrency', -1)
|
||||
p.rate = provider.get('rate', 1.0)
|
||||
p.api_timeout = provider.get('api-timeout')
|
||||
p.boot_timeout = provider.get('boot-timeout', 60)
|
||||
p.launch_timeout = provider.get('launch-timeout', 3600)
|
||||
p.launch_retries = provider.get('launch-retries', 3)
|
||||
@ -233,8 +231,7 @@ def loadConfig(config_path):
|
||||
'image-name-format',
|
||||
'{image_name}-{timestamp}'
|
||||
)
|
||||
p.image_type = provider.get(
|
||||
'image-type', p.cloud_config.config['image_format'])
|
||||
p.image_type = p.cloud_config.config['image_format']
|
||||
p.diskimages = {}
|
||||
for image in provider.get('diskimages', []):
|
||||
i = ProviderDiskImage()
|
||||
@ -306,7 +303,7 @@ def loadSecureConfig(config, secure_config_path):
|
||||
|
||||
def _cloudKwargsFromProvider(provider):
|
||||
cloud_kwargs = {}
|
||||
for arg in ['region-name', 'api-timeout', 'cloud']:
|
||||
for arg in ['region-name', 'cloud']:
|
||||
if arg in provider:
|
||||
cloud_kwargs[arg] = provider[arg]
|
||||
|
||||
@ -315,6 +312,6 @@ def _cloudKwargsFromProvider(provider):
|
||||
|
||||
def _get_one_cloud(cloud_config, cloud_kwargs):
|
||||
'''This is a function to allow for overriding it in tests.'''
|
||||
if cloud_kwargs.get('cloud') == 'fake':
|
||||
if cloud_kwargs.get('cloud', '').startswith('fake'):
|
||||
return fakeprovider.fake_get_one_cloud(cloud_config, cloud_kwargs)
|
||||
return cloud_config.get_one_cloud(**cloud_kwargs)
|
||||
|
@ -65,8 +65,6 @@ class Dummy(object):
|
||||
|
||||
def fake_get_one_cloud(cloud_config, cloud_kwargs):
|
||||
cloud_kwargs['validate'] = False
|
||||
if 'image_format' not in cloud_kwargs:
|
||||
cloud_kwargs['image_format'] = 'qcow2'
|
||||
return cloud_config.get_one_cloud(**cloud_kwargs)
|
||||
|
||||
|
||||
|
8
nodepool/tests/fixtures/clouds.yaml
vendored
8
nodepool/tests/fixtures/clouds.yaml
vendored
@ -5,3 +5,11 @@ clouds:
|
||||
password: 'fake'
|
||||
project_id: 'fake'
|
||||
auth_url: 'fake'
|
||||
|
||||
fake-vhd:
|
||||
auth:
|
||||
username: 'fake'
|
||||
password: 'fake'
|
||||
project_id: 'fake'
|
||||
auth_url: 'fake'
|
||||
image_format: 'vhd'
|
1
nodepool/tests/fixtures/node_cmd.yaml
vendored
1
nodepool/tests/fixtures/node_cmd.yaml
vendored
@ -36,6 +36,7 @@ providers:
|
||||
name-filter: 'fake'
|
||||
|
||||
- name: fake-provider2
|
||||
cloud: fake
|
||||
rate: 0.0001
|
||||
diskimages:
|
||||
- name: fake-image2
|
||||
|
3
nodepool/tests/fixtures/node_vhd.yaml
vendored
3
nodepool/tests/fixtures/node_vhd.yaml
vendored
@ -16,9 +16,8 @@ labels:
|
||||
|
||||
providers:
|
||||
- name: fake-provider
|
||||
cloud: fake
|
||||
cloud: fake-vhd
|
||||
region-name: fake-region
|
||||
image-type: vhd
|
||||
rate: 0.0001
|
||||
diskimages:
|
||||
- name: fake-image
|
||||
|
@ -16,9 +16,8 @@ labels:
|
||||
|
||||
providers:
|
||||
- name: fake-provider1
|
||||
cloud: fake
|
||||
cloud: fake-vhd
|
||||
region-name: fake-region
|
||||
image-type: vhd
|
||||
rate: 0.0001
|
||||
diskimages:
|
||||
- name: fake-image
|
||||
@ -33,7 +32,6 @@ providers:
|
||||
- name: fake-provider2
|
||||
cloud: fake
|
||||
region-name: fake-region
|
||||
image-type: qcow2
|
||||
rate: 0.0001
|
||||
diskimages:
|
||||
- name: fake-image
|
||||
|
Loading…
x
Reference in New Issue
Block a user