Break out py27 job templates
To allow non-py27 supporting repos to use shade job templates, this breaks out the py27 and py3 jobs into separate templates. Relevant repos can then continue to use the existing template names without picking up the unsupported job runtimes they no longer need. Change-Id: Ia211e31723ede592f19a8df6c18e45699ca25788 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
e7c7f29ae9
commit
439ecbb9b0
37
.zuul.yaml
37
.zuul.yaml
@ -11,7 +11,9 @@
|
|||||||
required-projects:
|
required-projects:
|
||||||
- openstack/shade
|
- openstack/shade
|
||||||
- openstack/keystoneauth
|
- openstack/keystoneauth
|
||||||
- openstack/openstacksdk
|
# stable/train is needed for py27 support
|
||||||
|
- name: openstack/openstacksdk
|
||||||
|
override-checkout: stable/train
|
||||||
- openstack/os-client-config
|
- openstack/os-client-config
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
@ -31,14 +33,21 @@
|
|||||||
- openstack/os-client-config
|
- openstack/os-client-config
|
||||||
|
|
||||||
- project-template:
|
- project-template:
|
||||||
name: shade-tox-tips
|
name: shade-tox-tips-py27
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- shade-tox-py27-tips
|
- shade-tox-py27-tips
|
||||||
- shade-tox-py35-tips
|
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- shade-tox-py27-tips
|
- shade-tox-py27-tips
|
||||||
|
|
||||||
|
- project-template:
|
||||||
|
name: shade-tox-tips
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- shade-tox-py35-tips
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
- shade-tox-py35-tips
|
- shade-tox-py35-tips
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
@ -113,6 +122,7 @@
|
|||||||
description: |
|
description: |
|
||||||
Run shade functional tests against a master devstack
|
Run shade functional tests against a master devstack
|
||||||
vars:
|
vars:
|
||||||
|
python_version: 2.7
|
||||||
devstack_localrc:
|
devstack_localrc:
|
||||||
Q_SERVICE_PLUGIN_CLASSES: qos
|
Q_SERVICE_PLUGIN_CLASSES: qos
|
||||||
Q_ML2_PLUGIN_EXT_DRIVERS: qos,port_security
|
Q_ML2_PLUGIN_EXT_DRIVERS: qos,port_security
|
||||||
@ -137,15 +147,21 @@
|
|||||||
- name: openstack/openstacksdk
|
- name: openstack/openstacksdk
|
||||||
- name: openstack/os-client-config
|
- name: openstack/os-client-config
|
||||||
vars:
|
vars:
|
||||||
|
python_version: 2.7
|
||||||
tox_install_siblings: true
|
tox_install_siblings: true
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: shade-functional-devstack-tips-python3
|
name: shade-functional-devstack-tips-python3
|
||||||
parent: shade-functional-devstack-tips
|
parent: shade-functional-devstack
|
||||||
description: |
|
description: |
|
||||||
Run shade functional tests with tips of library dependencies using
|
Run shade functional tests with tips of library dependencies using
|
||||||
python3 against a master devstack.
|
python3 against a master devstack.
|
||||||
|
required-projects:
|
||||||
|
- name: openstack/keystoneauth
|
||||||
|
- name: openstack/openstacksdk
|
||||||
|
- name: openstack/os-client-config
|
||||||
vars:
|
vars:
|
||||||
|
tox_install_siblings: true
|
||||||
tox_environment:
|
tox_environment:
|
||||||
SHADE_TOX_PYTHON: python3
|
SHADE_TOX_PYTHON: python3
|
||||||
|
|
||||||
@ -204,14 +220,21 @@
|
|||||||
tox_install_siblings: true
|
tox_install_siblings: true
|
||||||
|
|
||||||
- project-template:
|
- project-template:
|
||||||
name: shade-functional-tips
|
name: shade-functional-tips-py27
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- shade-functional-devstack-tips
|
- shade-functional-devstack-tips
|
||||||
- shade-functional-devstack-tips-python3
|
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- shade-functional-devstack-tips
|
- shade-functional-devstack-tips
|
||||||
|
|
||||||
|
- project-template:
|
||||||
|
name: shade-functional-tips
|
||||||
|
check:
|
||||||
|
jobs:
|
||||||
|
- shade-functional-devstack-tips-python3
|
||||||
|
gate:
|
||||||
|
jobs:
|
||||||
- shade-functional-devstack-tips-python3
|
- shade-functional-devstack-tips-python3
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -224,7 +247,9 @@
|
|||||||
- publish-to-pypi
|
- publish-to-pypi
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
- shade-functional-tips
|
- shade-functional-tips
|
||||||
|
- shade-functional-tips-py27
|
||||||
- shade-tox-tips
|
- shade-tox-tips
|
||||||
|
- shade-tox-tips-py27
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- bifrost-integration-tinyipa:
|
- bifrost-integration-tinyipa:
|
||||||
|
@ -28,6 +28,8 @@ def _construct_yaml_str(self, node):
|
|||||||
# Override the default string handling function
|
# Override the default string handling function
|
||||||
# to always return unicode objects
|
# to always return unicode objects
|
||||||
return self.construct_scalar(node)
|
return self.construct_scalar(node)
|
||||||
|
|
||||||
|
|
||||||
yaml_loader.add_constructor(u'tag:yaml.org,2002:str', _construct_yaml_str)
|
yaml_loader.add_constructor(u'tag:yaml.org,2002:str', _construct_yaml_str)
|
||||||
# Unquoted dates like 2013-05-23 in yaml files get loaded as objects of type
|
# Unquoted dates like 2013-05-23 in yaml files get loaded as objects of type
|
||||||
# datetime.data which causes problems in API layer when being processed by
|
# datetime.data which causes problems in API layer when being processed by
|
||||||
|
@ -619,7 +619,7 @@ def parse_range(value):
|
|||||||
if value is None:
|
if value is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
range_exp = re.match('(<|>|<=|>=){0,1}(\d+)$', value)
|
range_exp = re.match(r'(<|>|<=|>=){0,1}(\d+)$', value)
|
||||||
if range_exp is None:
|
if range_exp is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ class OpenStackCloudBadRequest(OpenStackCloudHTTPError):
|
|||||||
class OpenStackCloudURINotFound(OpenStackCloudHTTPError):
|
class OpenStackCloudURINotFound(OpenStackCloudHTTPError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Backwards compat
|
# Backwards compat
|
||||||
OpenStackCloudResourceNotFound = OpenStackCloudURINotFound
|
OpenStackCloudResourceNotFound = OpenStackCloudURINotFound
|
||||||
|
|
||||||
|
@ -395,10 +395,10 @@ def _get_supplemental_addresses(cloud, server):
|
|||||||
server['status'] == 'ACTIVE'):
|
server['status'] == 'ACTIVE'):
|
||||||
for port in cloud.search_ports(
|
for port in cloud.search_ports(
|
||||||
filters=dict(device_id=server['id'])):
|
filters=dict(device_id=server['id'])):
|
||||||
for fip in cloud.search_floating_ips(
|
|
||||||
filters=dict(port_id=port['id'])):
|
|
||||||
# This SHOULD return one and only one FIP - but doing
|
# This SHOULD return one and only one FIP - but doing
|
||||||
# it as a search/list lets the logic work regardless
|
# it as a search/list lets the logic work regardless
|
||||||
|
for fip in cloud.search_floating_ips(
|
||||||
|
filters=dict(port_id=port['id'])):
|
||||||
if fip['fixed_ip_address'] not in fixed_ip_mapping:
|
if fip['fixed_ip_address'] not in fixed_ip_mapping:
|
||||||
log = _log.setup_logging('shade')
|
log = _log.setup_logging('shade')
|
||||||
log.debug(
|
log.debug(
|
||||||
|
@ -9305,7 +9305,7 @@ class OpenStackCloud(
|
|||||||
"before setting provide state"):
|
"before setting provide state"):
|
||||||
machine = self.get_machine(machine['uuid'])
|
machine = self.get_machine(machine['uuid'])
|
||||||
if (machine['reservation'] is None and
|
if (machine['reservation'] is None and
|
||||||
machine['provision_state'] is not 'enroll'):
|
machine['provision_state'] != 'enroll'):
|
||||||
# NOTE(TheJulia): In this case, the node has
|
# NOTE(TheJulia): In this case, the node has
|
||||||
# has moved on from the previous state and is
|
# has moved on from the previous state and is
|
||||||
# likely not being verified, as no lock is
|
# likely not being verified, as no lock is
|
||||||
|
@ -33,7 +33,7 @@ ORCHESTRATION_ENDPOINT = 'https://orchestration.example.com/v1/{p}'.format(
|
|||||||
p=PROJECT_ID)
|
p=PROJECT_ID)
|
||||||
NO_MD5 = '93b885adfe0da089cdf634904fd59f71'
|
NO_MD5 = '93b885adfe0da089cdf634904fd59f71'
|
||||||
NO_SHA256 = '6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d'
|
NO_SHA256 = '6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d'
|
||||||
FAKE_PUBLIC_KEY = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkF3MX59OrlBs3dH5CU7lNmvpbrgZxSpyGjlnE8Flkirnc/Up22lpjznoxqeoTAwTW034k7Dz6aYIrZGmQwe2TkE084yqvlj45Dkyoj95fW/sZacm0cZNuL69EObEGHdprfGJQajrpz22NQoCD8TFB8Wv+8om9NH9Le6s+WPe98WC77KLw8qgfQsbIey+JawPWl4O67ZdL5xrypuRjfIPWjgy/VH85IXg/Z/GONZ2nxHgSShMkwqSFECAC5L3PHB+0+/12M/iikdatFSVGjpuHvkLOs3oe7m6HlOfluSJ85BzLWBbvva93qkGmLg4ZAc8rPh2O+YIsBUHNLLMM/oQp Generated-by-Nova\n" # flake8: noqa
|
FAKE_PUBLIC_KEY = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkF3MX59OrlBs3dH5CU7lNmvpbrgZxSpyGjlnE8Flkirnc/Up22lpjznoxqeoTAwTW034k7Dz6aYIrZGmQwe2TkE084yqvlj45Dkyoj95fW/sZacm0cZNuL69EObEGHdprfGJQajrpz22NQoCD8TFB8Wv+8om9NH9Le6s+WPe98WC77KLw8qgfQsbIey+JawPWl4O67ZdL5xrypuRjfIPWjgy/VH85IXg/Z/GONZ2nxHgSShMkwqSFECAC5L3PHB+0+/12M/iikdatFSVGjpuHvkLOs3oe7m6HlOfluSJ85BzLWBbvva93qkGmLg4ZAc8rPh2O+YIsBUHNLLMM/oQp Generated-by-Nova\n" # noqa
|
||||||
|
|
||||||
|
|
||||||
def make_fake_flavor(flavor_id, name, ram=100, disk=1600, vcpus=24):
|
def make_fake_flavor(flavor_id, name, ram=100, disk=1600, vcpus=24):
|
||||||
@ -58,6 +58,8 @@ def make_fake_flavor(flavor_id, name, ram=100, disk=1600, vcpus=24):
|
|||||||
u'swap': u'',
|
u'swap': u'',
|
||||||
u'vcpus': vcpus
|
u'vcpus': vcpus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FAKE_FLAVOR = make_fake_flavor(FLAVOR_ID, 'vanilla')
|
FAKE_FLAVOR = make_fake_flavor(FLAVOR_ID, 'vanilla')
|
||||||
FAKE_CHOCOLATE_FLAVOR = make_fake_flavor(
|
FAKE_CHOCOLATE_FLAVOR = make_fake_flavor(
|
||||||
CHOCOLATE_FLAVOR_ID, 'chocolate', ram=200)
|
CHOCOLATE_FLAVOR_ID, 'chocolate', ram=200)
|
||||||
@ -248,6 +250,7 @@ def make_fake_machine(machine_name, machine_id=None):
|
|||||||
id=machine_id,
|
id=machine_id,
|
||||||
name=machine_name))
|
name=machine_name))
|
||||||
|
|
||||||
|
|
||||||
def make_fake_port(address, node_id=None, port_id=None):
|
def make_fake_port(address, node_id=None, port_id=None):
|
||||||
if not node_id:
|
if not node_id:
|
||||||
node_id = uuid.uuid4().hex
|
node_id = uuid.uuid4().hex
|
||||||
@ -377,6 +380,7 @@ class FakeMachinePort(object):
|
|||||||
self.address = address
|
self.address = address
|
||||||
self.node_uuid = node_id
|
self.node_uuid = node_id
|
||||||
|
|
||||||
|
|
||||||
def make_fake_neutron_security_group(
|
def make_fake_neutron_security_group(
|
||||||
id, name, description, rules, project_id=None):
|
id, name, description, rules, project_id=None):
|
||||||
if not rules:
|
if not rules:
|
||||||
|
@ -75,6 +75,7 @@ class FakeCloud(object):
|
|||||||
def get_default_network(self):
|
def get_default_network(self):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
standard_fake_server = fakes.make_fake_server(
|
standard_fake_server = fakes.make_fake_server(
|
||||||
server_id='test-id-0',
|
server_id='test-id-0',
|
||||||
name='test-id-0',
|
name='test-id-0',
|
||||||
|
4
tox.ini
4
tox.ini
@ -32,7 +32,7 @@ skip_install = True
|
|||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
||||||
doc8
|
doc8
|
||||||
hacking
|
hacking>=2.0,<3
|
||||||
pygments
|
pygments
|
||||||
commands =
|
commands =
|
||||||
doc8 doc/source
|
doc8 doc/source
|
||||||
@ -97,7 +97,7 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
|||||||
# H4 Are about docstrings - and there's just too many of them to fix
|
# H4 Are about docstrings - and there's just too many of them to fix
|
||||||
# W503 Is supposed to be off by default but a bug has it on by default. It's
|
# W503 Is supposed to be off by default but a bug has it on by default. It's
|
||||||
# also a categorially terrible idea and Donald Knuth agrees with me.
|
# also a categorially terrible idea and Donald Knuth agrees with me.
|
||||||
ignore = H103,H306,H4,W503
|
ignore = H103,H306,H4,W503,W504
|
||||||
show-source = True
|
show-source = True
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||||
|
Loading…
Reference in New Issue
Block a user