[ci] Fix list-os-resources role

Plus restore dsvm CI jobs

Change-Id: I42e956f9765b9d030e6a74348c94f792a01fcff1
This commit is contained in:
Andrey Kurilin 2022-07-12 12:28:13 +03:00
parent c1d9cf911b
commit 09d2bb61c5
2 changed files with 86 additions and 114 deletions

View File

@ -11,75 +11,75 @@
- rally-openstack-docker-build
#- rally-task-basic-with-existing-users
#- rally-task-simple-job
#- rally-task-barbican:
# files:
# - .zuul.d/zuul.yaml
# - 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
# - tests/ci/playbooks
#- rally-task-cinder
#- rally-task-designate:
# files:
# - .zuul.d/zuul.yaml
# - rally-jobs/designate.yaml
# - rally_openstack/common/osclients.py
# - rally_openstack/task/cleanup/resources.py
# - rally_openstack/task/contexts/designate
# - rally_openstack/task/scenarios/designate
# - tests/ci/playbooks
#- rally-task-heat:
# voting: false
#- rally-task-ironic
#- rally-task-keystone-glance-swift
#- rally-task-magnum:
# voting: false
# files:
# - .zuul.d/zuul.yaml
# - rally-jobs/magnum.yaml
# - rally_openstack/common/osclients.py
# - rally_openstack/task/cleanup/resources.py
# - rally_openstack/task/contexts/magnum
# - rally_openstack/task/scenarios/magnum
# - tests/ci/playbooks
#- rally-task-manila-no-ss:
# voting: false
#- rally-task-manila-ss:
# voting: false
#- rally-task-mistral
- rally-task-barbican:
files:
- .zuul.d/zuul.yaml
- 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
- tests/ci/playbooks
- rally-task-cinder
- rally-task-designate:
files:
- .zuul.d/zuul.yaml
- rally-jobs/designate.yaml
- rally_openstack/common/osclients.py
- rally_openstack/task/cleanup/resources.py
- rally_openstack/task/contexts/designate
- rally_openstack/task/scenarios/designate
- tests/ci/playbooks
- rally-task-heat:
voting: false
- rally-task-ironic
- rally-task-keystone-glance-swift
- rally-task-magnum:
voting: false
files:
- .zuul.d/zuul.yaml
- rally-jobs/magnum.yaml
- rally_openstack/common/osclients.py
- rally_openstack/task/cleanup/resources.py
- rally_openstack/task/contexts/magnum
- rally_openstack/task/scenarios/magnum
- tests/ci/playbooks
- 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-murano:
voting: false
#- rally-task-neutron
#- rally-task-neutron-trunk:
# files:
# - .zuul.d/zuul.yaml
# - rally-jobs/neutron-trunk.yaml
# - rally_openstack/common/osclients.py
# - rally_openstack/common/services/network
# - rally_openstack/task/cleanup/resources.py
# - rally_openstack/task/contexts/network
# - rally_openstack/task/scenarios/neutron/trunk.py
# - rally_openstack/task/scenarios/neutron/network.py
# - tests/ci/playbooks
#- rally-task-neutron-with-extensions:
# voting: false
- rally-task-neutron-trunk:
files:
- .zuul.d/zuul.yaml
- rally-jobs/neutron-trunk.yaml
- rally_openstack/common/osclients.py
- rally_openstack/common/services/network
- rally_openstack/task/cleanup/resources.py
- rally_openstack/task/contexts/network
- rally_openstack/task/scenarios/neutron/trunk.py
- rally_openstack/task/scenarios/neutron/network.py
- tests/ci/playbooks
- 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:
# voting: false
#- rally-task-watcher:
# # watcher-api did not start last time
# voting: false
#- rally-task-zaqar:
# voting: false
- rally-task-telemetry:
voting: false
- rally-task-watcher:
# watcher-api did not start last time
voting: false
- rally-task-zaqar:
voting: false
#- rally-verify-tempest
gate:
jobs:
@ -93,31 +93,31 @@
- rally-openstack-docker-build
#- rally-task-basic-with-existing-users
#- rally-task-simple-job
#- rally-task-barbican:
# files:
# - .zuul.d/zuul.yaml
# - 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
# - tests/ci/playbooks
#- rally-task-cinder
- rally-task-barbican:
files:
- .zuul.d/zuul.yaml
- 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
- tests/ci/playbooks
- rally-task-cinder
#- rally-task-heat
#- rally-task-ironic
#- rally-task-keystone-glance-swift
#- rally-task-mistral
- rally-task-ironic
- rally-task-keystone-glance-swift
- rally-task-mistral
#- rally-task-neutron
#- rally-task-neutron-trunk:
# files:
# - rally-jobs/neutron-trunk.yaml
# - rally_openstack/common/osclients.py
# - rally_openstack/common/services/network
# - rally_openstack/task/cleanup/resources.py
# - rally_openstack/task/contexts/network
# - rally_openstack/task/scenarios/neutron/trunk.py
# - rally_openstack/task/scenarios/neutron/network.py
# - tests/ci/playbooks
- rally-task-neutron-trunk:
files:
- rally-jobs/neutron-trunk.yaml
- rally_openstack/common/osclients.py
- rally_openstack/common/services/network
- rally_openstack/task/cleanup/resources.py
- rally_openstack/task/contexts/network
- rally_openstack/task/scenarios/neutron/trunk.py
- rally_openstack/task/scenarios/neutron/network.py
- tests/ci/playbooks
#- rally-verify-tempest
post:
jobs:

View File

@ -15,11 +15,9 @@
"""List and compare most used OpenStack cloud resources."""
import argparse
import io
import json
import subprocess
import sys
from ansible.module_utils.basic import AnsibleModule
@ -596,7 +594,7 @@ def check_resource(resources_mgs, compare_with, json_output):
@plugins.ensure_plugins_are_loaded
def main(json_output, compare_with):
def do_it(json_output, compare_with):
out = subprocess.check_output(
["rally", "env", "show", "--only-spec", "--env", "devstack"])
@ -622,7 +620,7 @@ def ansible_main():
)
)
rc, json_result = main(
rc, json_result = do_it(
json_output=module.params.get("json_output"),
compare_with=module.params.get("compare_with")
)
@ -636,31 +634,5 @@ def ansible_main():
module.exit_json(rc=0, changed=True, resources=json_result)
def cli_main():
parser = argparse.ArgumentParser(
description=("Save list of OpenStack cloud resources or compare "
"with previously saved list."))
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()
rc, _json_result = main(
json_output=args.dump_list, compare_with=args.compare_with_list)
return rc
if __name__ == "__main__":
if sys.stdin.isatty():
cli_main()
else:
ansible_main()
ansible_main()