[ci] Revert a part of osresources changes
This should be done to unblock other projects that have rally job in their stable branches. Change-Id: Ib4f9c3d952140ed7086bfedee2bfd362ac808086
This commit is contained in:
parent
e46de4521f
commit
12494941f1
@ -1,85 +1,7 @@
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- rally-tox-cover
|
||||
- rally-tox-pep8
|
||||
- rally-tox-py36
|
||||
- rally-tox-py37
|
||||
- rally-tox-py38
|
||||
- rally-dsvm-tox-functional
|
||||
- rally-docker-check
|
||||
- rally-task-basic-with-existing-users:
|
||||
# use_existing_users key did not trigger proper ansible tasks
|
||||
voting: false
|
||||
- rally-task-simple-job
|
||||
- rally-task-barbican:
|
||||
files:
|
||||
- rally-jobs/barbican.yaml
|
||||
- rally_openstack/common/osclients.py
|
||||
- rally_openstack/common/services/key_manager
|
||||
- rally_openstack/task/cleanup/resources.py
|
||||
- rally_openstack/task/scenarios/barbican
|
||||
- rally-task-cinder
|
||||
# NOTE(andreykurilin): this requires more thing to configure before
|
||||
# launching.
|
||||
#- rally-task-designate
|
||||
- rally-task-heat:
|
||||
voting: false
|
||||
- rally-task-ironic
|
||||
- rally-task-keystone-glance-swift
|
||||
- rally-task-magnum:
|
||||
voting: false
|
||||
files:
|
||||
- rally-jobs/magnum.yaml
|
||||
- rally_openstack/cleanup/resources.py
|
||||
- rally_openstack/contexts/magnum
|
||||
- rally_openstack/scenarios/magnum
|
||||
- rally_openstack/osclients.py
|
||||
- rally-task-manila-no-ss:
|
||||
voting: false
|
||||
- rally-task-manila-ss:
|
||||
voting: false
|
||||
- rally-task-mistral
|
||||
# it did not work for a long time. try to re-configure it
|
||||
#- rally-task-monasca
|
||||
- rally-task-murano:
|
||||
voting: false
|
||||
- rally-task-neutron
|
||||
- rally-task-neutron-trunk:
|
||||
files:
|
||||
- rally-jobs/neutron-trunk.yaml
|
||||
- rally_openstack/scenarios/neutron/trunk.py
|
||||
- rally_openstack/scenarios/neutron/network.py
|
||||
- rally-task-neutron-with-extensions:
|
||||
voting: false
|
||||
- rally-task-nova:
|
||||
voting: false
|
||||
# it did not work for a long time
|
||||
#- rally-task-senlin
|
||||
#- rally-task-octavia:
|
||||
# voting: false
|
||||
- rally-task-telemetry
|
||||
- rally-task-watcher:
|
||||
# watcher-api did not start last time
|
||||
voting: false
|
||||
- rally-task-zaqar
|
||||
- rally-verify-tempest
|
||||
gate:
|
||||
jobs:
|
||||
- rally-tox-cover
|
||||
- rally-tox-pep8
|
||||
- rally-tox-py36
|
||||
- rally-tox-py37
|
||||
- rally-tox-py38
|
||||
- rally-dsvm-tox-functional
|
||||
- rally-docker-check
|
||||
- rally-task-simple-job
|
||||
- rally-task-cinder
|
||||
#- rally-task-heat
|
||||
- rally-task-ironic
|
||||
- rally-task-keystone-glance-swift
|
||||
- rally-task-mistral
|
||||
- rally-task-neutron
|
||||
- rally-task-telemetry
|
||||
- rally-task-zaqar
|
||||
- rally-verify-tempest
|
||||
|
@ -24,8 +24,13 @@ from rally.cli import cliutils
|
||||
from rally.common.plugin import discover
|
||||
from rally import plugins
|
||||
|
||||
from rally_openstack.common import consts
|
||||
from rally_openstack.common import credential
|
||||
try:
|
||||
from rally_openstack.common import consts
|
||||
from rally_openstack.common import credential
|
||||
except ImportError:
|
||||
# backward compatibility for stable branches
|
||||
from rally_openstack import consts
|
||||
from rally_openstack import credential
|
||||
|
||||
|
||||
def skip_if_service(service):
|
||||
@ -518,7 +523,7 @@ class CloudResources(object):
|
||||
|
||||
def dump_resources(resources_mgr, args):
|
||||
resources_list = resources_mgr.list()
|
||||
with open(args.out, "w") as f:
|
||||
with open(args.dump_list, "w") as f:
|
||||
f.write(json.dumps(resources_list))
|
||||
|
||||
|
||||
@ -538,7 +543,7 @@ def _print_tabular_resources(resources, table_label):
|
||||
|
||||
|
||||
def check_resource(resources_mgs, args):
|
||||
with open(args.dump) as f:
|
||||
with open(args.compare_with_list) as f:
|
||||
compare_to = f.read()
|
||||
compare_to = json.loads(compare_to)
|
||||
changes = resources_mgs.compare(with_list=compare_to)
|
||||
@ -603,28 +608,16 @@ def main():
|
||||
"list", help="List and save available cloud resources."
|
||||
)
|
||||
p.set_defaults(func=dump_resources)
|
||||
p.add_argument(
|
||||
"--out",
|
||||
type=str,
|
||||
metavar="<path/to/output/list.json>",
|
||||
required=True,
|
||||
help="A path to save dump to."
|
||||
)
|
||||
|
||||
p = subparsers.add_parser(
|
||||
"compare",
|
||||
help="Compare current with given resources."
|
||||
)
|
||||
p.set_defaults(func=check_resource)
|
||||
p.add_argument(
|
||||
"--with",
|
||||
type=str,
|
||||
dest="dump",
|
||||
metavar="<path/to/input/list.json>",
|
||||
required=True,
|
||||
help="A path to dump file with a JSON to compare resource with."
|
||||
)
|
||||
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
group.add_argument("--dump-list",
|
||||
type=str,
|
||||
metavar="<path/to/output/list.json>",
|
||||
help="dump resources to given file in JSON format")
|
||||
group.add_argument("--compare-with-list",
|
||||
type=str,
|
||||
metavar="<path/to/existent/list.json>",
|
||||
help=("compare current resources with a list from "
|
||||
"given JSON file"))
|
||||
args = parser.parse_args()
|
||||
|
||||
out = subprocess.check_output(
|
||||
@ -637,7 +630,10 @@ def main():
|
||||
|
||||
resources = CloudResources(**config)
|
||||
|
||||
return args.func(resources, args)
|
||||
if args.dump_list:
|
||||
return dump_resources(resources, args)
|
||||
else:
|
||||
return check_resource(resources, args)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -3,7 +3,7 @@
|
||||
become_user: stack
|
||||
shell:
|
||||
cmd: |
|
||||
python3 ./tests/ci/osresources.py compare --with {{ rally_resources_at_start }}
|
||||
python3 ./tests/ci/osresources.py --compare-with-list {{ rally_resources_at_start }}
|
||||
chdir: "{{ zuul.projects['opendev.org/openstack/rally-openstack'].src_dir }}"
|
||||
ignore_errors: yes
|
||||
register: command_result
|
||||
|
@ -3,6 +3,6 @@
|
||||
become_user: stack
|
||||
shell:
|
||||
cmd: |
|
||||
python3 ./tests/ci/osresources.py list --out {{ rally_resources_at_start }}
|
||||
python3 ./tests/ci/osresources.py --dump-list {{ rally_resources_at_start }}
|
||||
args:
|
||||
chdir: "{{ zuul.projects['opendev.org/openstack/rally-openstack'].src_dir }}"
|
||||
|
Loading…
Reference in New Issue
Block a user