File ardana-qa-ansible-9.0+git.1530715154.29b3e81.obscpio of Package ardana-qa-ansible

07070100A63316000081A4000003E800000064000000015B3CDC1200000002000001030000000400000000000000000000003E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/.copyrightignore*
07070100A6330F000081A4000003E800000064000000015B3CDC1200000080000001030000000400000000000000000000003800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/.gitreview[gerrit]
host=gerrit.suse.provo.cloud
port=29418
project=ardana/ardana-qa-ansible.git
defaultremote=ardana
defaultbranch=master
07070100A6331E000081A4000003E800000064000000015B3CDC12000000FF000001030000000400000000000000000000003F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/.rebranding-links./hos-qa-deploy.yml
./roles/hqe-common/tasks/read-hlm-admin-token.yml
./roles/hqe-common/tasks/read-hlm-group-vars.yml
./roles/hqe-monascatempest-deploy/templates/helion-tempest.sh.j2
./hos-qa-run.yml
./hos-qa-pre-deploy.yml
./hos-qa-role-scaffolding.yml
07070100A6330E000081A4000003E800000064000000015B3CDC120000279F000001030000000400000000000000000000003500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/LICENSE
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

07070100A6331F000081A4000003E800000064000000015B3CDC1200000DF7000001030000000400000000000000000000003700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/README.mdREADME
======

This repo holds ansible playbooks to install, configure and execute
Ardana OpenStack QE tests. The ansible code aims to be consumable by
different parties, such as:
- Jenkins jobs in the various steps of the testing pipeline
- Ardana developers to test their code
- Professional services, customers

These tests runs against OpenStack, version 2.0 and further.

The tests targeted by ardana/ardana-qa-ansible are stored in the
ardana/ardana-qa-tests repository. The ardana-qa-tests holds an
heterogeneous set of tests, which cover different area and aspects
of testing, and use different technologies.

This repo implements a common interface that can be used to
interact with all these different tests. It defines a number of roles,
two per type of tests, one covering test deployment and one covering
test execution. Within each role a common set of tests is defined.

Different consumers need to have the ability to execute subset the roles,
as well as subsets of the tests available within each role.
To select roles we use tags, which allow us to both:
- create predefined collections of roles, used by CI
- select custom list of roles by specifying a custom list of tags

The folder structure is:

```
└── ardana-qa-ansible
    ├── ardana-qa-deploy.yml
    ├── ardana-qa-run.yml
    └── roles
        ├── hqe-common-deploy
        │   ├── defaults
        │   ├── files
        │   ├── handlers
        │   ├── meta
        │   ├── tasks
        │   │   └── .....
        │   ├── templates
        │   └── vars
        │       └── main.yml
        ├── hqe-common-run
        │   ├── defaults
        │   ├── files
        │   ├── handlers
        │   ├── meta
        │   ├── tasks
        │   │   └── .....
        │   ├── templates
        │   └── vars
        │       └── main.yml
        ├── hqe-test-group1-deploy
        │   ├── defaults
        │   ├── vars
        │   ├── files
        │   ├── templates
        │   ├── tasks
        │   │   └── main.yml        
        │   │   └── install.yml
        │   │   └── configure.yml
        ├── hqe-test-group1-run
        │   ├── defaults
        │   ├── vars
        │   ├── files
        │   ├── templates
        │   ├── tasks
        │   │   └── main.yml        
        │   │   └── test-resources.yml
        │   │   └── run.yml
        │   │   └── cleanup.yml
       (...)
        ├── hqe-test-groupN-deploy
        ├── hqe-test-groupN-run

```

The hqe-common-(deploy|run) roles contain tools that can be shared among tests
across roles, such as git repo cloning, cleanup tools, resource creation tools,
result processing tools.

The root deploy and run playbooks use tags to select which roles shall be
executed in which run (CI, periodic, etc). Tags are applied to roles and
automatically propagated, via the main.yml task, to all the relevant tasks.

To use several groups of tests for a specific test run, define a tag, apply it
the relevant roles in the deploy and in the run playbooks, and then install
and run with:

```
ansible-playbook ardana-qa-deploy.yml --tags my-run-tag
ansible-playbook ardana-qa-run.yml --tags my-run-tag
```
07070100A6331A000081A4000003E800000064000000015B3CDC12000005C3000001030000000400000000000000000000004600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/SERVICE_AVAILABILITY.rstService availability in HLM
===========================

Depending on model used some service might not be available in HLM system that
is being tested. There is ansible code that is able to find is those services
are there from analysis of inventory file. It then sets value of variable for
every service to be either "True" or "False" depending if service is there.
Note that those values are strings, so when using them in ansible you must use
filter '| bool'

It is up to owners of various suites to consume this information and update
playbooks to use it. In most cases (like Swift) it simply enough to add clause
'when:' to task/main.yml items in deploy and run role, for example:

.. code-block:: yaml

   - include: install.yml
     when: hqe_group_vars.swift_available | bool

Sometimes it may be required to run tests, but make sure they information that
service is disabled in passed on. In case of logging when centralized system
is not there we just skip passing variable with configuration, so template
file looks like that:

.. code-block:: jinja

   {% if hqe_group_vars.centralized_logging_available | bool %}
   export ES_NODE_COUNT={{ es_servers| count }}
   export ES_URL={{ es_url }}
   export ES_USERNAME='kibana'
   export ES_PASSWORD={{ kibana_password }}
   {% endif %}

Then inside affected tests skipUnless is used

.. code-block:: python

   @skipUnless('ES_URL' in environ, 'Centralized logging is disabled')
   def test_basic_vip_access(self):

07070100A63318000081A4000003E800000064000000015B3CDC120000016D000001030000000400000000000000000000003600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/TEST.rstTesting
=======

Tests are only available at the moment for the test_tracker module.

Test Tracker Module Tests
-------------------------
Tests must be executed with a virtualenv.
Run the following steps::

    virtualenv test
    ./test/bin/activate
    pip install -r test-requirements.txt
    ansible-playbook -c local tests/library/test_tracker.yml -M library/
07070100A63311000081A4000003E800000064000000015B3CDC120000038E000001030000000400000000000000000000003800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/VOTING.rstVoting
======

Voting means that if test fails and it will mark ansible run to be failed. In
case of runs inside automated systems like CI/CD this usually would mean that
build will be marked with failure.

Voting happens each time after run.yml for a given role was executed and it
reads return code from test_output variable. If this code is different than 0
and suite is permitted to vote it would set test_status variable to be false.
Even if later suites would pass, whole run would me marked as failed.

Voting is by default enabled for every role, if you need to get it disabled
you need to use variable that is [name]_voting where [name] is value
between 'hqe-' and '-run' in role name of your job(with dashes removed, if any).
For example for hqe-swift-run this would be swift_voting. You can pass this
value using '-e' option in ansible-playbook and permanently change in
var/main.yml for your role.
07070100A63317000081A4000003E800000064000000015B3CDC1200000E5A000001030000000400000000000000000000004200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/ardana-qa-deploy.yml---
# This playbook deployes tests to be run against a deployed cloud.
# It is not executed as part of HLM deploy. It is instead triggered
# independently either by CI, or by an user of the deployed cloud.

# Example usage:
#     ansible-playbook -c local -i hosts -e cache_folder=[local cache folder]
#         -e run_filter=periodic ardana-qa-deploy.yml --tags periodic

- hosts: test_driver
  remote_user: "{{ test_driver_login }}"
  sudo: yes
  sudo_user: "{{ hqe_user }}"
  roles:
    - { role: hqe-common, tags: always }

- hosts: test_driver
  remote_user: "{{ test_driver_login }}"
  sudo: yes
  sudo_user: "{{ hqe_user }}"
  environment: "{{ test_driver_env }}"
  roles:
# Tag details:
# 1. "<rolename>" - Tag that is same as role name gets used in Parallel environment.
#    Please do not use "parallel" tag.
# 2. "periodic" - Used by Dev pipeline in baremetal installations.
# 3. "periodic-virtual"- Used by dev pipeline in virtual install.
# 4. "smoke" - Used by canary builds
# 5.  "no-qa" - Used to skip tests in tests-ci which tests the tests.
    - { role: hqe-common-deploy, tags: always }
    - { role: hqe-template-deploy, tags: ["template", "ci", "periodic", "periodic-virtual", "smoke"] }
    - { role: hqe-boot-many-deploy, tags: ["boot-many", "no-qa"] }
    - { role: hqe-test-stress-run-deploy, tags: ["test-stress-run", "no-qa"] }
    - { role: hqe-net-smoke-deploy, tags: ["net-smoke", "periodic", "ci"] }
    - { role: hqe-net-endurance-deploy, tags: ["net-endurance", "periodic", "no-qa"] }
    - { role: hqe-net-fragping-deploy, tags: ["net-fragping", "periodic", "no-qa"] }
    - { role: hqe-net-vrrp-deploy, tags: ["net-vrrp", "no-qa"] }
    - { role: hqe-net-transpvlan-deploy, tags: ["net-transpvlan", "periodic", "no-qa"] }
    - { role: hqe-net-rbac-deploy, tags: ["net-rbac", "periodic", "no-qa"] }
    - { role: hqe-net-dsnat-deploy, tags: ["net-dsnat", "periodic", "no-qa"] }
    - { role: hqe-monasca-cli-tests-deploy, tags: ["monasca-cli-tests", "no-qa"] }
    - { role: hqe-keystone-soapui-deploy, tags: ["keystone-soapui", "periodic", "no-qa"] }
    - { role: hqe-cinder-backup-restore-deploy, tags: ["cinder-backup-restore", "no-qa"] }
    - { role: hqe-swift-deploy, tags: ["swift", "ci", "periodic", "periodic-virtual", "smoke"] }
    - { role: hqe-cinder-snapshot-stack-deploy, tags: ["cinder-snapshot-stack", "no-qa"] }
    - { role: hqe-logging-deploy, tags: ["logging", "periodic", "periodic-virtual", "smoke"] }
    - { role: hqe-keystone-ansible-deploy, tags: ["keystone-ansible", "periodic", "no-qa"] }
    - { role: hqe-monasca-soapui-deploy, tags: ["monasca-soapui", "periodic", "no-qa"] }
    - { role: hqe-keystone-ldap-deploy, tags: ["keystone-ldap", "periodic", "no-qa"] }
    - { role: hqe-cinder-multiple-attach-detach-deploy, tags: ["cinder-multiple-attach-detach", "no-qa"] }
    - { role: hqe-monascatempest-deploy, tags: ["monascatempest", "no-qa"] }
    - { role: hqe-barbican-functional-deploy, tags: ["barbican-functional", "no-qa"] }
    - { role: hqe-barbican-cli-func-deploy, tags: ["barbican-cli-func", "no-qa"] }
    - { role: hqe-barbican-monitoring-deploy, tags: ["barbican-monitoring", "no-qa"] }
    - { role: hqe-ceilometer-test-deploy, tags: ["ceilometer-test", "no-qa"] }
    - { role: hqe-ceph-deploy, tags: ["ceph", "no-qa"] }
    - { role: hqe-iverify-deploy, tags: ["hqe-iverify", "no-qa"] }
    - { role: hqe-heat-integrationtests-deploy, tags: ["heat-integrationtests", "no-qa"] }
    - { role: hqe-heat-sampletests-deploy, tags: ["heat-sampletests", "no-qa"] }
    - { role: hqe-tempest-plugin-deploy, tags: ["tempest-plugin"] }
    - { role: hqe-playbooktests, tags: ["playbooktests"] }
07070100A6330A000081A4000003E800000064000000015B3CDC120000054E000001030000000400000000000000000000004600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/ardana-qa-pre-deploy.yml---
# This playbook pulls the files needed for the test from a deployed cloud.
# It is not executed as part of HLM deploy. It is instead triggered
# independently either by CI, or by an user of the deployed cloud.

# Example usage:
#
# Customise your inventory file, e.g. copy default_hosts to my_hosts and add
# in there the IP of the deployer and test driver (typically localhost).
#
# ansible-playbook -i hosts/my_hosts ardana-qa-pre-deploy.yml
# -e ardana_group_vars_node_name="ccp"
# -e cache_folder=/home/nithyag/qe -e ardana_user=ardana
# -e ardana_ansible_root="/var/lib/ardana/scratch/ansible/next/ardana/ansible"
# -e ardana_home_folder=/var/lib/ardana
#
# Notes:
# - the pre-deploy play can run on a test node or on the deployer node
# - when running from
#
# Prerequisites on the test driver node:
# - passwordless ssh access to the deployer via "ardana_user"
# - account running ansible must have passworldless sudo rights on the node
#
# Running on macosx:
# - the sudoers group is usually called wheel - you can tell the play that
#   by passing -e test_driver_sudo_group=wheel

- hosts: hqa_deployer
  remote_user: "{{ ardana_user }}"
  roles:
  - { role: hqe-common-pull-from-deployer, tags: always }

- hosts: test_driver
  remote_user: "{{ test_driver_login }}"
  sudo: yes
  roles:
  - { role: hqe-common-init-test-driver, tags: always }
07070100A63312000081A4000003E800000064000000015B3CDC120000011C000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/ardana-qa-role-scaffolding.yml---
# This playbook builds a skeleton test script ansible wrapper.
# It is triggered by tools/bin/roles_scaffolding.sh

# Example usage:
#     ansible-playbook hqe-role-scaffolding.yml -e role_name="$1"

- hosts: localhost
  gather_facts: no
  roles:
    - role: hqe-role-scaffolding
07070100A6331B000081A4000003E800000064000000015B3CDC12000014CD000001030000000400000000000000000000003F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/ardana-qa-run.yml---
# This playbook performs a test run against a deployed cloud.
# It is not executed as part of HLM deploy. It is instead triggered
# independently either by CI, or by an user of the deployed cloud.

# This playbook aims to return the cloud to the same state it was before tests
# were executed. To achieve this it will create test resources, update the
# configuration, run the tests, archive the test results, and cleanup the
# test resources initially created.

# Example usage:
#     ansible-playbook -c local -i hosts ardana-qa-run.yml --tags periodic -e run_filter=periodic

- hosts: test_driver
  remote_user: "{{ test_driver_login }}"
  sudo: yes
  sudo_user: "{{ hqe_user }}"
  roles:
    - { role: hqe-common, tags: always }

- hosts: test_driver
  remote_user: "{{ test_driver_login }}"
  sudo: yes
  sudo_user: "{{ hqe_user }}"
  vars:
    run_filter: ci
  environment: "{{ test_driver_env }}"
  roles:
# Tag details:
# 1. "<rolename>" - Tag that is same as role name gets used in Parallel environment.
#    Please do not use "parallel" tag.
# 2. "periodic" - Used by Dev pipeline in baremetal installations.
# 3. "periodic-virtual"- Used by dev pipeline in virtual install.
# 4. "smoke" - Used by canary builds.
# 5.  "no-qa" - Used to skip tests in tests-ci which tests the tests.
    - { role: hqe-common-run, tags: always }
    - { role: hqe-template-run, run_filter_file: "{{ run_filter }}.txt", tags: ["template", "ci", "periodic", "periodic-virtual", "smoke"] }
    - { role: hqe-boot-many-run, run_filter_file: "{{ run_filter }}.txt", tags: ["boot-many", "no-qa"] }
    - { role: hqe-test-stress-run-run, run_filter_file: "{{ run_filter }}.txt", tags: ["test-stress-run", "no-qa"] }
    - { role: hqe-net-smoke-run, run_filter_file: "{{ run_filter }}.txt", tags: ["net-smoke", "periodic", "no-qa"] }
    - { role: hqe-net-endurance-run, run_filter_file: "{{ run_filter }}.txt", tags: ["net-endurance", "periodic", "no-qa"] }
    - { role: hqe-net-fragping-run, run_filter_file: "{{ run_filter }}.txt", tags: ["net-fragping", "periodic", "no-qa"] }
    - { role: hqe-net-vrrp-run, run_filter_file: "{{ run_filter }}.txt", tags: ["net-vrrp", "no-qa"] }
    - { role: hqe-net-transpvlan-run, run_filter_file: "{{ run_filter }}.txt", tags: ["net-transpvlan", "periodic", "no-qa"] }
    - { role: hqe-net-rbac-run, run_filter_file: "{{ run_filter }}.txt", tags: ["net-rbac", "periodic", "no-qa"] }
    - { role: hqe-net-dsnat-run, run_filter_file: "{{ run_filter }}.txt", tags: ["net-dsnat", "periodic", "no-qa"] }
    - { role: hqe-monasca-cli-tests-run, run_filter_file: "{{ run_filter }}.txt", tags: ["monasca-cli-tests", "no-qa"] }
    - { role: hqe-keystone-soapui-run, run_filter_file: "{{ run_filter }}.txt", tags: ["keystone-soapui", "periodic", "no-qa"] }
    - { role: hqe-cinder-backup-restore-run, run_filter_file: "{{ run_filter }}.txt", tags: ["cinder-backup-restore", "no-qa"] }
    - { role: hqe-keystone-ansible-run, run_filter_file: "{{ run_filter }}.txt", tags: ["keystone-ansible", "periodic", "no-qa"] }
    - { role: hqe-monasca-soapui-run, run_filter_file: "{{ run_filter }}.txt", tags: ["monasca-soapui", "periodic", "no-qa"] }
    - { role: hqe-swift-run, run_filter_file: "{{ run_filter }}.txt", tags: ["swift", "ci", "periodic", "periodic-virtual", "smoke"] }
    - { role: hqe-keystone-ldap-run, run_filter_file: "{{ run_filter }}.txt", tags: ["keystone-ldap", "periodic", "no-qa"] }
    - { role: hqe-cinder-snapshot-stack-run, run_filter_file: "{{ run_filter }}.txt", tags: ["cinder-snapshot-stack", "no-qa"] }
    - { role: hqe-cinder-multiple-attach-detach-run, run_filter_file: "{{ run_filter }}.txt", tags: ["cinder-multiple-attach-detach", "no-qa"] }
    - { role: hqe-barbican-functional-run, run_filter_file: "{{ run_filter }}.txt", tags: ["barbican-functional", "no-qa"] }
    - { role: hqe-barbican-cli-func-run, run_filter_file: "{{ run_filter }}.txt", tags: ["barbican-cli-func", "no-qa"] }
    - { role: hqe-barbican-monitoring-run, run_filter_file: "{{ run_filter }}.txt", tags: ["barbican-monitoring", "no-qa"] }
    - { role: hqe-ceilometer-test-run, run_filter_file: "{{ run_filter }}.txt", tags: ["ceilometer-test", "no-qa"] }
    - { role: hqe-monascatempest-run, run_filter_file: "{{ run_filter }}.txt", tags: ["monascatempest", "periodic", "parallel", "no-qa"] }
    - { role: hqe-ceph-run, run_filter_file: "{{ run_filter }}.txt", tags: ["ceph", "parallel", "no-qa"] }
    - { role: hqe-iverify-run, run_filter_file: "{{ run_filter }}.txt", tags: ["hqe-iverify", "no-qa"] }
    - { role: hqe-heat-integrationtests-run, run_filter_file: "{{ run_filter }}.txt", tags: ["heat-integrationtests", "no-qa"] }
    - { role: hqe-heat-sampletests-run, run_filter_file: "{{ run_filter }}.txt", tags: ["heat-sampletests", "no-qa"] }
    - { role: hqe-playbooktests, run_filter_file: "{{ run_filter }}.txt", tags: ["playbooktests"] }
# Please add further tests above this line, so logging tests can run as last, this way there would be some logs already collected
    - { role: hqe-logging-run, run_filter_file: "{{ run_filter }}.txt", tags: ["logging", "periodic", "periodic-virtual", "smoke"] }

  tasks:
  - name: ardana-qa-run | test status
    fail: msg="Test run failed. Please look at the logs for further information"
    when: not test_status
    tags: always
07070100A6330B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000003C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/filter_plugins07070100A6330D000081A4000003E800000064000000015B3CDC12000004AD000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/filter_plugins/update_dict.py#
# (c) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Create a dict update filter


def update(hash_a, hash_b):
    new = dict(hash_a)
    for k_b, v_b in hash_b.items():
        v_a = hash_a.get(k_b)
        # If both are dicts, merge recursively
        if isinstance(v_b, dict) and isinstance(v_a, dict):
            v_b = update(v_a, v_b)
        # If both are lists, concatenate
        elif isinstance(v_b, list) and isinstance(v_a, list):
            v_b = v_a + v_b
        new[k_b] = v_b
    return new


class FilterModule(object):

    def filters(self):
        return {'update': update}
07070100A6330C000081A4000003E800000064000000015B3CDC120000019B000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/filter_plugins/utils.py# Util filters for HOS QA

import uuid

UUID_NAMESPACE_HOSQA = uuid.UUID('361E6D51-FAEC-444A-9079-341386DA8E2F')

# This is pretty much a backport from ansible 1.9.0
def to_uuid(string):
    return str(uuid.uuid5(UUID_NAMESPACE_HOSQA, str(string)))

class FilterModule(object):
    # HOS QA util jinja2 filters

    def filters(self):
        return {
            # uuid
            'to_uuid': to_uuid
        }07070100AE30AD000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000003800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars07070100B03BAC000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000003C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all07070100B03BAF000081A4000003E800000064000000015B3CDC120000035C000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_barbican_client_functional#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


hqe_barbican_client_functional:
    deploy:
        venv_folder: hqe-barbican-cli-func
        tests_folder: hqe-barbican-client
        test_suite: barbican-cli-func
        service_name: hqe_barbican-cli-func
07070100B03BC3000081A4000003E800000064000000015B3CDC1200000350000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_barbican_functional#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_barbican_functional:
    deploy:
        venv_folder: hqe-barbican-functional
        tests_folder: barbican
        test_suite: barbican-functional
        service_name: hqe_barbican_functional
07070100B03BB6000081A4000003E800000064000000015B3CDC1200000342000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_barbican_monitoring#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_barbican_monitoring:
    deploy:
        tests_folder: ardana-qa-tests/barbican-hlm/monitoring
        test_suite: barbican-monitoring
        service_name: hqe_barbican_monitoring
07070100B03BB4000081A4000003E800000064000000015B3CDC1200000301000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_boot_many#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_boot_many:
    deploy:
        tests_folder: ardana-qa-tests/system/boot-many-at-once
        test_suite: boot-many
07070100B03BB2000081A4000003E800000064000000015B3CDC120000030E000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_ceilometer_test#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_ceilometer_test:
    deploy:
        tests_folder: ardana-qa-tests/ceilometer/ceilometertest
        test_suite: ceilometer-test
07070100B03BB1000081A4000003E800000064000000015B3CDC12000002E3000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_ceph#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_ceph:
    deploy:
        tests_folder: ardana-qa-tests/ceph
        test_suite: ceph
07070100B03BC5000081A4000003E800000064000000015B3CDC1200000316000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_cinder_backup_restore#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_cinder_backup_restore:
    deploy:
        tests_folder: ardana-qa-tests/cinder/backup_restore
        test_suite: cinder-backup-restore
07070100B03BB9000081A4000003E800000064000000015B3CDC1200000335000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_cinder_multiple_attach_detach#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_cinder_multiple_attach_detach:
    deploy:
        tests_folder: ardana-qa-tests/system/cinder-multiple-attach-detach
        test_suite: cinder-multiple-attach-detach
07070100B03BB0000081A4000003E800000064000000015B3CDC120000031D000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_cinder_snapshot_stack#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_cinder_snapshot_stack:
    deploy:
        tests_folder: ardana-qa-tests/system/cinder-snapshot-stack
        test_suite: cinder-snapshot-stack
07070100B03BC9000081A4000003E800000064000000015B3CDC12000005C9000001030000000400000000000000000000004700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_common#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
build_venvs: False
ca_bundle: /etc/ssl/ca-bundle.pem

hqe_common:
    deploy:
        hqe_user: hqe
        hqe_group: hqe
        code_folder: /home/ardanauser
        tests_git_repo: ardana-qa-tests
        work_folder: /opt/stack/hqe
        venv_folder_root: /opt/stack/venv
        inventory_location: "verb_hosts_{{ groups['hqa_deployer'][0] }}"
        hlm_ansible_dir: /home/stack/scratch/ansible/next/ardana/ansible
        venv_folder: ardana-qa-tests-example
        ardana_user: ardanauser
        test_driver_login: ardanauser
        default_test_region: region1
    run:
        test_suite_results_output: hosqa.subunit
        test_results_output: hosqa-tests.subunit

hqe_template:
    deploy:
        service_name: ardana_qa_tests_example
        tests_folder: ardana-qa-tests/example
        test_suite: template
07070100B03BBF000081A4000003E800000064000000015B3CDC1200000358000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_heat_integrationtests#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
hqe_heat_integrationtests:
    deploy:
        venv_folder: hqe-heat-integrationtests
        service_name: ardana_qa_heat
        tests_folder: heat-integrationtests
        test_suite: heat-integrationtests
07070100B03BBC000081A4000003E800000064000000015B3CDC1200000366000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_heat_sampletests#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_heat_sampletests:
    deploy:
        venv_folder: hqe-heat-sampletests
        service_name: hos_heat_samples
        tests_folder: ardana-qa-tests/heat/testcase/sample_templates
        test_suite: heat-sampletests
07070100B03BB5000081A4000003E800000064000000015B3CDC120000030D000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_iverify#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_iverify:
    deploy:
        venv_folder: hqe-iverify
        tests_folder: ardana-qa-tests/iverify
        test_suite: iverify
07070100B03BBB000081A4000003E800000064000000015B3CDC1200000324000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_keystone_ansible#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_keystone_ansible:
    deploy:
        tests_folder: ardana-qa-tests/keystone/testcase/functional/keystone-ansible
        test_suite: keystone-ansible
07070100B03BC7000081A4000003E800000064000000015B3CDC1200000314000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_keystone_ldap#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_keystone_ldap:
    deploy:
        tests_folder: ardana-qa-tests/keystone/testcase/functional/SoapUI
        test_suite: keystone-ldap
07070100B03BC6000081A4000003E800000064000000015B3CDC1200000318000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_keystone_soapui#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_keystone_soapui:
    deploy:
        tests_folder: ardana-qa-tests/keystone/testcase/functional/SoapUI
        test_suite: keystone-soapui
07070100B03BCA000081A4000003E800000064000000015B3CDC120000033B000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_logging#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_logging:
    deploy:
        venv_folder: ardana_qa_logging
        tests_folder: ardana-qa-tests/logging
        service_name: ardana_qa_logging
        test_suite: logging
07070100B03BC2000081A4000003E800000064000000015B3CDC120000031F000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_monasca_cli_tests#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_monasca_cli_tests:
    deploy:
        tests_folder: ardana-qa-tests/monasca/python-monasca-client-tests
        test_suite: monasca-client-tests
07070100B03BBA000081A4000003E800000064000000015B3CDC120000030C000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_monasca_soapui#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_monasca_soapui:
    deploy:
        tests_folder: ardana-qa-tests/monasca/monasca-api-tests
        test_suite: monasca-soapui
07070100B03BBE000081A4000003E800000064000000015B3CDC1200000316000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_monascatempest#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_monascatempest:
    deploy:
        venv_folder: hqe-monascatempest
        tests_folder: monasca-api
        test_suite: monascatempest
07070100B03BC0000081A4000003E800000064000000015B3CDC12000002F1000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_net_dsnat#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_net_dsnat:
    deploy:
        tests_folder: ardana-qa-tests/neutron
        test_suite: net-dsnat

07070100B03BAD000081A4000003E800000064000000015B3CDC12000002F8000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_net_endurance#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_net_endurance:
    deploy:
        tests_folder: ardana-qa-tests/neutron
        test_suite: net-endurance
07070100B03BC1000081A4000003E800000064000000015B3CDC12000002F6000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_net_fragping#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_net_fragping:
    deploy:
        tests_folder: ardana-qa-tests/neutron
        test_suite: net-fragping
07070100B03BB3000081A4000003E800000064000000015B3CDC12000002EE000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_net_rbac#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_net_rbac:
    deploy:
        tests_folder: ardana-qa-tests/neutron
        test_suite: net-rbac
07070100B03BBD000081A4000003E800000064000000015B3CDC1200000318000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_net_smoke#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_net_smoke:
    deploy:
        service_name: ardana_qa_neutron
        tests_folder: ardana-qa-tests/neutron
        test_suite: net-smoke
07070100B03BC8000081A4000003E800000064000000015B3CDC1200000347000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_net_transpvlan#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_net_transpvlan:
    deploy:
        service_name: hos_net_transpvlan
        tests_folder: ardana-qa-tests/neutron
        venv_folder: hos-qa-neutron
        test_suite: net-transpvlan
07070100B03BAE000081A4000003E800000064000000015B3CDC12000002EE000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_net_vrrp#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_net_vrrp:
    deploy:
        tests_folder: ardana-qa-tests/neutron
        test_suite: net-vrrp
07070100B03BB8000081A4000003E800000064000000015B3CDC12000002BD000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_playbooktests#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


hqe_playbootests:
        test_suite: playbooktests
07070100B03BB7000081A4000003E800000064000000015B3CDC1200000331000001030000000400000000000000000000004600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_swift#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_swift:
    deploy:
        venv_folder: ardana_qa_swift
        service_name: ardana_qa_swift
        tests_folder: ardana-qa-tests/swift
        test_suite: swift
07070100B03BC4000081A4000003E800000064000000015B3CDC120000030B000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/group_vars/all/hqe_test_stress_run#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
hqe_test_stress_run:
    deploy:
        tests_folder: ardana-qa-tests/system/test_stress_run
        test_suite: test-stress-run
07070100A633190000A1FF000003E800000064000000015CCC2E2D00000014000001030000000400000000000000000000003F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/hos-qa-deploy.ymlardana-qa-deploy.yml07070100A633140000A1FF000003E800000064000000015CCC2E2D00000018000001030000000400000000000000000000004300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/hos-qa-pre-deploy.ymlardana-qa-pre-deploy.yml07070100A633100000A1FF000003E800000064000000015CCC2E2D0000001E000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/hos-qa-role-scaffolding.ymlardana-qa-role-scaffolding.yml07070100A633130000A1FF000003E800000064000000015CCC2E2D00000011000001030000000400000000000000000000003C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/hos-qa-run.ymlardana-qa-run.yml07070100AE30AB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000003700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/host_vars07070100AE30AC000081A4000003E800000064000000015B3CDC1200000036000001030000000400000000000000000000004100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/host_vars/localhost# We only need this to make the ansible lint job happy07070100A82E6D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000003300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/hosts07070100A82E6E000081A4000003E800000064000000015B3CDC1200000322000001030000000400000000000000000000004100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/hosts/default_hosts#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Default setup for CI, all in one box:
# ansible runs on the deployer, tests are executed on the deployer

[test_driver]
localhost

[hqa_deployer]
localhost
07070100C21527000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000003500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/library07070100C21528000081A4000003E800000064000000015B3CDC1200002C6F000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/library/test_tracker.py#!/usr/bin/python
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

Documentation = """
---
module: test_tracker
short_description: track ansible tasks as tests
description: track ansible tasks (or parts of them) as tests. Generate
             subunit (in a file) which includes the result of the task,
             the time it took to execute and other metadata.
             This module requires python-subunit to be installed.
             Note: the ability to add attachments is not fully verified
             yet, so it's not recommended.
options:
    name:
        required: true
        description:
            - The name of the test suite or task to track. Naming convention:
              In case of tests, test-framework.test-suite.task, in case of
              installer, installer-name.role.task
    output:
        required: true
        description:
            - The subunit file where the test results are to be appended.
              The directory where the file is written must exists. If the
              file does not yet exist it will be created.
    status:
        required: false
        default: "inprogress"
        choices: ["xfail", "success", "uxsuccess", "fail", "skip", "inprogress"]
        description:
            - The status of the test. "inprogress" is used to start a test, or
              to report that the test is still running. See http://testtools.readthedocs.org/en/latest/api.html#testtools.StreamResult.status
              for details on the other statuses.
    status_rc:
        required: false
        description:
            - The status of the test expressed via an integer. This can be used
              as an alternative to status, to pass in a return code directly.
              0 -> 'success', =!0 -> 'fail'
    attachment_name: (beta)
        required: false
        default: "console"
        choices: ["stdout", "stderr", "console", "notes"]
        description:
            - The name of the test attachment. "stdout" and "stderr" are what
              one might expect them to be from the name. "console" can be used
              if all output streams are mixed. "notes" can be used to attach
              any extra text to a test.
    attachment_file: (beta)
        required: false
        description:
            - Path to the file that contains the attachment. Either attachment
              or attachment-file can be specified.
    attachment: (beta)
        required: false
        description:
            - Content of the attachment. Either attachment or attachment-file
              can be specified.
    mime_type: (beta)
        required: false
        description:
            - The mime type of the file to attach. This is only used when
              attachment-file is specified.
    run_filter:
        required: false
        description:
            - Run filter used - if any. When provided, it is used to extend the
              test name.
    tags:
        required: false
        description:
            - List of tags attached to the test

"""

Examples = """
# Example usage with a test
- test_tracker:
    name: hos-qa.template.run
    run_filter: ci
    output: {{ test_results_subunit }}

# Run test, collect result
- [test run command]
  ignore_errors: True
  register: test_result

- test_tracker:
    name: hos-qa.template.run
    run_filter: ci
    status_rc: {{ test_result.rc }}
    attachment_name: console
    attachment: {{ test_result.stdout_lines }}
    output: {{ test_results_subunit }}

# Example usage within an installer
- test_tracker:
    name: hos-qa-hlm-installer.configure.unarchive_hlm

# Ansible steps to unarchive
(...)

# We only track the execution time in case of success
- test_tracker:
    name: hos-qa-hlm-installer.configure.unarchive_hlm
    status: "success"
"""


# ===========================================

import datetime
from functools import partial
import io
import os


_CHUNK_SIZE = 3670016 # 3.5 MiB


def create_timestamp():
    return datetime.datetime.now(UTC)


class TestTracker(object):

    def __init__(self, ansible_module):
        self.ansible_module = ansible_module
        import_msg = "Could not import subunit"
        SUBUNIT_AVAILABLE or ansible_module.fail_json(msg=import_msg)
        self.name = ansible_module.params['name']
        self.output = ansible_module.params['output']
        status = ansible_module.params['status']
        status_rc = ansible_module.params['status_rc']
        self.attachment_name = ansible_module.params['attachment_name']
        attachment_file = ansible_module.params['attachment_file']
        attachment = ansible_module.params['attachment']
        self.attachment = attachment
        self.mime_type = ansible_module.params['mime_type']
        self.run_filter = ansible_module.params['run_filter']
        self.tags = ansible_module.params['tags']

        # Perform some further input validation
        if status and status_rc is not None:
            msg = 'Both status=%s and status_rc=%s have been specified\n'
            msg += '     Use either of the two to specify status'
            ansible_module.fail_json(msg=msg % (status, status_rc))
        elif not status and status_rc is None:
            # Define default here and not in the AnsibleModule directly
            # because the default there would mask the user input and make
            # validation not possible
            status = 'inprogress'

        if attachment and attachment_file:
            msg = 'Both attachment=%s and attachment_file=%s have been'
            msg += ' specified\n     Use only one of these two options'
            ansible_module.fail_json(msg=msg % (attachment, attachment_file))

        directory = os.path.dirname(self.output) or "."
        if not os.path.exists(directory):
            msg = 'The folder \"%s\" does not exist, cannot write subunit.'
            ansible_module.fail_json(msg=msg % directory)

        if not (attachment_file or attachment) and self.mime_type:
            msg = 'Cannot specify mime type without attachment'
            ansible_module.fail_json(msg=msg)

        # Set the name
        # TODO(andreaf) add validation for names and run_filters
        # Names and run_filters should be [a-z0-9_\-\.]+ only
        if self.run_filter:
            self.name = "".join([self.name, "[", self.run_filter, "]"])

        # Set the status
        if status_rc is not None:
            if status_rc == 0:
                self.status = 'success'
            else:
                self.status = 'fail'
        else:
            self.status = status

        # Set the input
        if attachment:
            self.attachment_input = partial(io.BytesIO(
                bytearray(attachment)).read, _CHUNK_SIZE)
        elif attachment_file:
            # TODO(andreaf) we don't close this file
            file = open(attachment_file, 'rb')
            self.attachment_input = partial(file.read, _CHUNK_SIZE)
        else:
            self.attachment_input = None

    def write_to_stream(self, output_writer):
        # This code is mostly taken from the _output module of python-subunit.
        # The original code is written as private, and not meant to be
        # consumed as a stable interface - which is the reason for the copy
        # here.
        output_writer.startTestRun()

        if self.attachment_input:
            this_file_hunk = self.attachment_input()
            next_file_hunk = self.attachment_input()

        is_first_packet = True
        is_last_packet = False
        while not is_last_packet:
            write_status = output_writer.status

            if is_first_packet:
                if self.attachment_input:
                    if self.mime_type:
                        write_status = partial(write_status,
                                               mime_type=self.mime_type)
                if self.tags:
                    write_status = partial(write_status,
                                           test_tags=set(self.tags))
                write_status = partial(write_status,
                                       timestamp=create_timestamp())
                if self.status == 'inprogress':
                    write_status = partial(write_status,
                                           test_status='inprogress')
                is_first_packet = False

            if self.attachment_input:
                filename = self.attachment_name
                write_status = partial(write_status, file_name=filename,
                                       file_bytes=this_file_hunk)
                if next_file_hunk == b'':
                    write_status = partial(write_status, eof=True)
                    is_last_packet = True
                else:
                    this_file_hunk = next_file_hunk
                    next_file_hunk = self.attachment_input()
            else:
                is_last_packet = True

            if self.name:
                write_status = partial(write_status, test_id=self.name)

            if is_last_packet:
                if self.status != 'inprogress':
                    write_status = partial(write_status,
                                           test_status=self.status)

            write_status()

        output_writer.stopTestRun()


def main():
    ansible_module = AnsibleModule(
        argument_spec=dict(
            name=dict(required=True, type='str'),
            output=dict(required=True, type='str'),
            status=dict(choices=['xfail', 'success', 'uxsuccess', 'fail',
                                 'skip', 'inprogress'],
                        type='str'),
            status_rc=dict(default=None, type='int'),
            attachment_name=dict(default='console',
                                 choices=['stdout', 'stderr', 'console',
                                          'notes'], type='str'),
            attachment_file=dict(default=None, type='str'),
            attachment=dict(default=None, type='str'),
            mime_type=dict(default=None, type='str'),
            run_filter=dict(default=None, type='str'),
            tags=dict(default=None, type='list'),
        ),
        supports_check_mode=False
    )

    test_tracker = TestTracker(ansible_module=ansible_module)

    with open(test_tracker.output, 'ab') as file_output:
        output = StreamResultToBytes(file_output)
        test_tracker.write_to_stream(output)

    ansible_module.exit_json(attachment=test_tracker.attachment)


# import module snippets
from ansible.module_utils.basic import *
try:
    import subunit
    from subunit.iso8601 import UTC
    from subunit.v2 import StreamResultToBytes
    SUBUNIT_AVAILABLE = True
except ImportError:
    SUBUNIT_AVAILABLE = False

if __name__ == '__main__':
    main()
07070100C21529000041ED000003E800000064000000445B3CDC1200000000000001030000000400000000000000000000003300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles07070101200ED5000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy07070101200EDB000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/files07070101200EDC000081A4000003E800000064000000015B3CDC12000001D3000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/files/.testr.conf[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
             OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
             OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
             OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
             ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./functionaltests} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]*\.)*
07070101200EDD000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/files/run_filters07070101200EDF000081A4000003E800000064000000015B3CDC1200000011000001030000000400000000000000000000007800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/files/run_filters/barbican-cli-func.txt+functionaltests
07070101200EDE000081A4000003E800000064000000015B3CDC1200000000000001030000000400000000000000000000007100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/files/run_filters/tests2skip.txt07070101200EE0000081A4000003E800000064000000015B3CDC120000084A000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/files/tests2skip.py#!/usr/bin/env python
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# Reads in a list of exclude regular expressions from a file and outputs a
# regex suitable to be passed into testr

import sys

"""
Whitelist is applied first. The blacklist is executed against the set of
tests returned by the whitelist.
If whitelist is empty, all available tests are fed to blacklist.
If blacklist is empty, all tests from whitelist are returned.

The syntax for white-list and black-list is as follows:
- lines starting with # or empty are ignored
- lines starting with "+" are whitelisted
- lines starting with "-" are blacklisted
- lines not matching any of the above conditions are blacklisted

The match for each line gets added a "^" in the beginning,
so the regular expression should account for that.

For example, the following scenario:

    run all the smoke tests and scenario tests,
    but exclude the api.volume tests.

is implemented as:

    +.*smoke
    +tempest\.scenario
    -tempest\.api\.volume.*
"""

whitelist = []
blacklist = []
with open(sys.argv[1]) as fp:
    for line in fp:
        line = line.strip()
        if not line or line[0] == '#':
            continue
        if line.startswith("+"):
            whitelist.append(line[1:])
        elif line.startswith("-"):
            blacklist.append(line[1:])
        else:
            blacklist.append(line)

regex = '^(?=({whitelist}))'
params = dict(whitelist="|".join(whitelist))
if blacklist:
    regex += '(?!({blacklist}))'
    params['blacklist'] = "|".join(blacklist)

print(regex.format(**params))
07070101200EE1000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/tasks07070101200EE3000081A4000003E800000064000000015B3CDC1200000862000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/tasks/configure.yml- name: hqe-barbican-cli-func | configure | Create work folder {{ barbican_client_functional_work_folder }}
  file:
    path: "{{ barbican_client_functional_work_folder }}"
    state: "directory"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

- name: hqe-barbican-cli-func | configure | Create venv folder {{ barbican_client_functional_venv_folder }}
  file:
    path: "{{ barbican_client_functional_venv_folder }}"
    mode: 0755

- name: hqe-barbican-cli-func | configure | Initialise the .testrepository directory if it doesn't exist
  become: yes
  become_user: "{{ hqe_user }}"
  shell: "{{ barbican_client_functional_venv_folder }}/bin/testr init"
  args:
    chdir: "{{ barbican_client_functional_work_folder }}"
    creates: "{{ barbican_client_functional_work_folder }}/.testrepository"

- name: hqe-barbican-cli-func | configure | Create testr config file
  copy:
    src: .testr.conf
    dest: "{{ barbican_client_functional_work_folder }}/.testr.conf"
    mode: 0640

- name: hqe-barbican-cli-func | configure | Update functional_tests.conf
  template:
    src: functional_tests.conf.j2
    dest: "{{ barbican_client_functional_work_folder }}/etc/functional_tests.conf"

- name: hqe-barbican-cli-func | configure | Fix configuration file ownership
  file:
    path: "{{ barbican_client_functional_work_folder }}/etc/functional_tests.conf"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-barbican-cli-func | configure | Deploy tests2skip.py
  copy:
    src: tests2skip.py
    dest: "{{ barbican_client_functional_work_folder }}/tests2skip.py"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-barbican-cli-func | configure | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ barbican_client_functional_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-barbican-cli-func | configure | Deploy run script
  template: >
    src=hqe-barbican-cli-func.sh.j2
    dest="{{ barbican_client_functional_work_folder }}/hqe-barbican-cli-func.sh"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0700

07070101200EE2000081A4000003E800000064000000015B3CDC1200000A91000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/tasks/install.yml---
# Install test dependencies

- name: hqe-barbican-cli-func-deploy | install | Update package cache
  install_package:
    cache: update
  when: not (build_venvs | bool)

- name: hqe-barbican-cli-func-deploy | install | Install the prebuilt env
  install_package:
    name: "{{ barbican_client_functional_service_name }}"
    service: "{{ barbican_client_functional_service_name }}"
    state: present
  when: not (build_venvs | bool)

# NOTE(andreaf) In future repo cloning shall be handled by the framework. For now
# we sudo to create the clone folder
- name: hqe-barbican-cli-func-deploy | install | Create the clone folder
  become: yes
  become_user: root
  file:
    path: "{{ barbican_client_functional_code_folder }}"
    state: directory
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-barbican-cli-func-deploy | install | Pull the functional tests from the barbican client repo
  git:
    # Liberty based tests
    # NOTE(andreaf) Having the repo hardcoded here should be fixed
    # It will be done as part of the overall refactor
    repo: "http://git.suse.provo.cloud/openstack/python-barbicanclient.git"
    dest: "{{ barbican_client_functional_code_folder }}"
    version: stable/pike
    force: yes

- name: hqe-barbican-cli-func-deploy | install | Upgrade pip
  pip:
    name: pip
    extra_args: --upgrade
    virtualenv: "{{ barbican_client_functional_venv_folder }}"
  when: build_venvs | bool

- name: hqe-barbican-cli-func | install | Install requirements
  pip:
    requirements: "{{ barbican_client_functional_code_folder }}/requirements.txt"
    virtualenv: "{{ barbican_client_functional_venv_folder }}"
  when: build_venvs | bool

- name: hqe-barbican-cli-func | install | Install test requirements
  pip:
    requirements={{ barbican_client_functional_code_folder }}/test-requirements.txt
    virtualenv={{ barbican_client_functional_venv_folder }}
  when: build_venvs | bool

- name: hqe-barbican-cli-func | install | Install os-testr
  #for subunit-trace
  pip: name=os-testr
    virtualenv={{ barbican_client_functional_venv_folder }}
    extra_args='--upgrade'
  when: build_venvs | bool

- name: hqe-barbican-cli-func | install | Install client from source
  shell: "{{ barbican_client_functional_venv_folder }}/bin/python setup.py install"
  args:
    chdir: "{{ barbican_client_functional_code_folder }}"
  when: build_venvs | bool

# NOTE: This task can be removed for next release as we have a fix upstream
- name: hqe-barbican-cli-func-deploy | install | temporary fix for bugzilla-1084362
  shell: "git grep -l '2018-02' | xargs sed -i 's/2018-02/2021-02/g'"
  args:
    chdir: "{{ barbican_client_functional_code_folder }}"
07070101200EE4000081A4000003E800000064000000015B3CDC1200000033000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml07070101200ED8000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/templates07070101200EDA000081A4000003E800000064000000015B3CDC120000021C000001030000000400000000000000000000007300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/templates/functional_tests.conf.j2[DEFAULT]

[identity]
uri={{ uri }}
auth_version=v3
username={{ username }}
tenant_name={{ tenant_name }}
password={{ password }}
domain_name={{ domain_name }}
admin_username={{ admin_username }}
admin_tenant_name={{ admin_tenant_name }}
admin_password={{ admin_password }}
admin_domain_name={{ admin_domain_name }}

[keymanager]
url={{ km_url }}
username={{ km_username }}
password={{ km_password }}
project_name={{ km_project_name }}
project_id={{ km_project_id }}
#max_payload_size=10000
project_domain_name={{ km_project_domain_name }}
07070101200ED9000081A4000003E800000064000000015B3CDC12000003F3000001030000000400000000000000000000007600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/templates/hqe-barbican-cli-func.sh.j2#!/usr/bin/env bash

set -eux
set -o pipefail

# This script runs barbican client functional tests against a deployed Helion OpenStack cloud

# Discover cli tests
export OS_TEST_PATH="{{ barbican_client_functional_code_folder }}/functionaltests"
export OS_TOP_LEVEL="{{ barbican_client_functional_code_folder }}"
export VENV_FOLDER="{{ barbican_client_functional_venv_folder }}"
export TESTR="{{ barbican_client_functional_venv_folder }}/bin/testr"
export PYTHON="{{ barbican_client_functional_venv_folder }}/bin/python"
export TESTS_TO_SKIP_BIN="{{ barbican_client_functional_work_folder }}/tests2skip.py"
export RUN_FILTER="{{ barbican_client_functional_work_folder }}/run_filters/${1:-{{ run_filter }}}.txt"
export REQUESTS_CA_BUNDLE={{ ca_bundle }}

cd {{ barbican_client_functional_work_folder }}

http_proxy= https_proxy= HTTP_PROXY= HTTPS_PROXY= ${TESTR} run \
    --subunit $(python ${TESTS_TO_SKIP_BIN} ${RUN_FILTER})|
    ${VENV_FOLDER}/bin/subunit-trace --no-failure-debug -f | tee testr_results.log
07070101200ED6000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/vars07070101200ED7000081A4000003E800000064000000015B3CDC120000059E000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-deploy/vars/main.yml---
barbican_client_functional_service_name: "{{ hqe_barbican_client_functional.deploy.service_name }}"
barbican_client_functional_venv_folder: "{{ common_venv_root }}/{{ hqe_barbican_client_functional.deploy.venv_folder }}"

run_filter: smoke
run_concurrency: 0

uri: "{{ osrc_vars.os_unversioned_auth_url }}"
auth_version: v3
username:  "{{ osrc_vars.os_username }}"
password: "{{ osrc_vars.os_password }}"
tenant_name: "{{ osrc_vars.os_project_name }}"
domain_name: "{{ osrc_vars.os_domain_name }}"
os_ca_cert: "{{ osrc_vars.os_ca_cert }}"

admin_username: "{{ osrc_vars.os_username }}"
admin_password: "{{ osrc_vars.os_password }}"
admin_tenant_name: "{{ osrc_vars.os_project_name }}"
admin_domain_name: "{{ osrc_vars.os_domain_name }}"

km_url: "{{ hqe_group_vars.km_url }}"
km_username: barbican_client_hqe_admin
km_password: barbican_client_hqe_admin
km_project_name: barbican_client_hqe_admin_project
km_project_id: barbican_client_hqe_admin_project
km_project_domain_name: "{{ osrc_vars.os_domain_name }}"

# NOTE(andreaf) Barbican has an own repo for tests, so the path where the git
# repo is cloned is in tests_folder, and the path to the tests within the folder
# is hardcoded in the run script
barbican_client_functional_code_folder: "{{ work_folder }}/{{ hqe_barbican_client_functional.deploy.test_suite }}"
barbican_client_functional_work_folder: "{{ work_folder }}/{{ hqe_barbican_client_functional.deploy.test_suite }}"
07070100EE203E000041ED000003E800000064000000045B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run07070100F03618000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run/tasks07070100F03619000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run/tasks/cleanup.yml---
07070100F0361A000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070100F0361B000081A4000003E800000064000000015B3CDC1200000250000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-barbican-cli-func-run | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  command: "{{ barbican_client_functional_work_folder }}/hqe-barbican-cli-func.sh {{ run_filter }}"
  register: test_output
  ignore_errors: True

- name: hqe-barbican-cli-func| run | Show test output
  debug: var=test_output

07070100F0361C000081A4000003E800000064000000015B3CDC12000006DB000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run/tasks/test-resources.yml---
# Setup the test account used for testing the client
- name: hqe-barbican-cli-func | test_resources  | Get a domain scoped token
  keystone_v3:
    endpoint: "{{ uri_v3 }}"
    login_username: "{{ admin_username }}"
    login_password: "{{ admin_password }}"
    login_user_domain_name: "Default"
    login_domain_name: "Default"
    action: "token_get"
    cacert: "{{ os_ca_cert }}"
  register: domain_scoped_token

- name: hqe-barbican-cli-func | test_resources | Create Test User barbican_client_hqe_admin
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ km_username }}"
    user_password: "{{ km_password }}"
    description: "key-manager:admin"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-cli-func | test_resources | Create Test Project barbican_client_hqe_admin_project
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_project"
    project_name: "{{ km_project_name }}"
    project_domain_name: "{{ km_project_domain_name }}"
    description: "barbican_client_hqe_admin_project"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-cli-func | test_resources | add key-manager:admin role assignment
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ km_username }}"
    project_name: "{{ km_project_name  }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ km_project_domain_name }}"
    role_name: "key-manager:admin"
    cacert: "{{ os_ca_cert }}"
  run_once: true07070100F03616000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run/vars07070100F03617000081A4000003E800000064000000015B3CDC120000057C000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-cli-func-run/vars/main.yml---
service_name: "{{ hqe_barbican_client_functional.deploy.service_name }}"
venv_folder: "{{ hqe_barbican_client_functional.deploy.venv_folder }}"

run_filter: smoke
run_concurrency: 0

uri: "{{ osrc_vars.os_unversioned_auth_url }}/v2.0"
uri_v3: "{{ osrc_vars.os_auth_url }}"
auth_version: v3
username:  "{{ osrc_vars.os_username }}"
password: "{{ osrc_vars.os_password }}"
tenant_name: "{{ osrc_vars.os_project_name }}"
domain_name: "{{ osrc_vars.os_domain_name }}"
os_ca_cert: "{{ osrc_vars.os_ca_cert }}"

admin_username: "{{ osrc_vars.os_username }}"
admin_password: "{{ osrc_vars.os_password }}"
admin_tenant_name: "{{ osrc_vars.os_project_name }}"
admin_domain_name: "{{ osrc_vars.os_domain_name }}"

km_url: "{{ hqe_group_vars.km_url }}"
km_username: barbican_client_hqe_admin
km_password: barbican_client_hqe_admin
km_project_name: barbican_client_hqe_admin_project
km_project_id: barbican_client_hqe_admin_project
km_project_domain_name: "{{ osrc_vars.os_domain_name }}"

# NOTE(andreaf) Barbican has an own repo for tests, so the path where the git
# repo is cloned is in tests_folder, and the path to the tests within the folder
# is hardcoded in the run script
barbican_client_functional_code_folder: "{{ work_folder }}/{{ hqe_barbican_client_functional.deploy.test_suite }}"
barbican_client_functional_work_folder: "{{ work_folder }}/{{ hqe_barbican_client_functional.deploy.test_suite }}"
07070100FA1E7F000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy07070100FC2097000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files07070100FC2098000081A4000003E800000064000000015B3CDC12000001D7000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/.testr.conf[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
             OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
             OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
             OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
             ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./functionaltests/api} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]*\.)*
07070100FE2642000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/run_filters07070100FE2646000081A4000003E800000064000000015B3CDC1200000C5C000001030000000400000000000000000000007C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/run_filters/barbican-functional.txt+functionaltests\.api\.v1\.functional
+functionaltests\.api\.v1\.smoke

-functionaltests\.api\.v1\.functional\.test_certificate_orders\.CertificatesTestCase\.test_create_simple_cmc_order
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_add_snakeoil_ca__to_project_and_get_preferred
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_and_delete_snakeoil_subca
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_and_delete_snakeoil_subca_and_artifacts
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_snakeoil_subca
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_snakeoil_subca_and_get_cacert
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_snakeoil_subca_and_send_cert_order
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_snakeoil_subca_and_send_cert_order_and_verify_cert
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_snakeoil_subca_with_missing_subjectdn
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_create_subca_of_snakeoil_subca
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_fail_to_create_subca_of_snakeoil_not_owned_subca
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_fail_to_delete_top_level_snakeoil_ca
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_try_and_fail_to_add_to_proj_snakeoil_subca_that_is_not_mine
-functionaltests\.api\.v1\.functional\.test_cas\.CertificateAuthoritiesTestCase\.test_try_and_fail_to_use_snakeoil_subca_that_is_not_mine
-functionaltests\.api\.v1\.functional\.test_cas\.GlobalPreferredCATestCase\.test_global_preferred_affects_project_preferred
-functionaltests\.api\.v1\.functional\.test_cas\.GlobalPreferredCATestCase\.test_project_preferred_overrides_global_preferred
-functionaltests\.api\.v1\.functional\.test_cas\.ListingCAsTestCase\.test_list_snakeoil_and_simple_cert_cas
-functionaltests\.api\.v1\.functional\.test_cas\.ProjectCATestCase\.test_addition_of_project_ca_affects_getting_ca_list
-functionaltests\.api\.v1\.functional\.test_quotas_enforce\.QuotaEnforcementTestCase\.test_snakeoil_cas_unlimited
-functionaltests\.api\.v1\.functional\.test_quotas_enforce\.QuotaEnforcementTestCase\.test_snakeoil_cas_disabled
-functionaltests\.api\.v1\.functional\.test_quotas_enforce\.QuotaEnforcementTestCase\.test_snakeoil_cas_limited_one
-functionaltests\.api\.v1\.functional\.test_quotas_enforce\.QuotaEnforcementTestCase\.test_snakeoil_cas_limited_five
-functionaltests\.api\.v1\.functional\.test_secretmeta\.SecretMetadataTestCase\.test_secret_metadata_create_no_secret
-functionaltests\.api\.v1\.functional\.test_secretmeta\.SecretMetadataTestCase\.test_secret_metadata_get_no_secret
-functionaltests\.api\.v1\.functional\.test_secrets\.SecretsTestCase\.test_secret_put_two_phase_w_oversized_binary_data_not_utf8
07070100FE2645000081A4000003E800000064000000015B3CDC1200000047000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/run_filters/ci.txt+functionaltests\.api\.v1\.smoke
-functionaltests\.api\.v1\.functional
07070100FE2647000081A4000003E800000064000000015B3CDC1200000047000001030000000400000000000000000000007100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/run_filters/periodic.txt+functionaltests\.api\.v1\.functional
-functionaltests\.api\.v1\.smoke
07070100FE2643000081A4000003E800000064000000015B3CDC1200000000000001030000000400000000000000000000007300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/run_filters/tests2skip.txt07070100FE2644000081A4000003E800000064000000015B3CDC1200000047000001030000000400000000000000000000007000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/run_filters/upgrade.txt-functionaltests\.api\.v1\.smoke
-functionaltests\.api\.v1\.functional
07070100FC2099000081A4000003E800000064000000015B3CDC120000084A000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/files/tests2skip.py#!/usr/bin/env python
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# Reads in a list of exclude regular expressions from a file and outputs a
# regex suitable to be passed into testr

import sys

"""
Whitelist is applied first. The blacklist is executed against the set of
tests returned by the whitelist.
If whitelist is empty, all available tests are fed to blacklist.
If blacklist is empty, all tests from whitelist are returned.

The syntax for white-list and black-list is as follows:
- lines starting with # or empty are ignored
- lines starting with "+" are whitelisted
- lines starting with "-" are blacklisted
- lines not matching any of the above conditions are blacklisted

The match for each line gets added a "^" in the beginning,
so the regular expression should account for that.

For example, the following scenario:

    run all the smoke tests and scenario tests,
    but exclude the api.volume tests.

is implemented as:

    +.*smoke
    +tempest\.scenario
    -tempest\.api\.volume.*
"""

whitelist = []
blacklist = []
with open(sys.argv[1]) as fp:
    for line in fp:
        line = line.strip()
        if not line or line[0] == '#':
            continue
        if line.startswith("+"):
            whitelist.append(line[1:])
        elif line.startswith("-"):
            blacklist.append(line[1:])
        else:
            blacklist.append(line)

regex = '^(?=({whitelist}))'
params = dict(whitelist="|".join(whitelist))
if blacklist:
    regex += '(?!({blacklist}))'
    params['blacklist'] = "|".join(blacklist)

print(regex.format(**params))
07070100FE2648000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/tasks07070100FE264A000081A4000003E800000064000000015B3CDC120000081F000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/tasks/configure.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
- name: hqe-barbican-functional | configure | Set ownership of {{ barbican_functional_code_folder }} folder
  file: path={{ barbican_functional_code_folder }} owner={{ hqe_user }} group={{ hqe_group }} state=directory recurse=yes

- name: hqe-barbican-functional | configure | Set ACLs of {{ barbican_functional_venv_folder }} folder
  file: path={{ barbican_functional_venv_folder }} mode=0755 recurse=no

- name: hqe-barbican-functional | configure | Initialise the .testrepository directory if it doesn't exist
  become: yes
  become_user: "{{ hqe_user }}"
  shell: "{{ barbican_functional_venv_folder }}/bin/testr init"
  args:
    chdir: "{{ barbican_functional_work_folder }}"
    creates: "{{ barbican_functional_work_folder }}/.testrepository"

- name: hqe-barbican-functional | configure | Create testr config file
  copy:
    src: .testr.conf
    dest: "{{ barbican_functional_work_folder }}/.testr.conf"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-barbican-functional | configure | Update barbican-functional.conf
  template:
    src: barbican-functional.conf.j2
    dest: "{{ barbican_functional_work_folder }}/etc/barbican/barbican-functional.conf"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-barbican-functional | configure | Deploy tests2skip.py
  copy:
    src: tests2skip.py
    dest: "{{ barbican_functional_work_folder }}/tests2skip.py"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-barbican-functional | configure | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ barbican_functional_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-barbican-functional | configure | Deploy run script
  template: >
    src=hqe-barbican-functional.sh.j2
    dest="{{ barbican_functional_work_folder }}/hqe-barbican-functional.sh"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0700

07070100FE2649000081A4000003E800000064000000015B3CDC1200000CFA000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/tasks/install.yml---
# Install test dependencies

- name: hqe-barbican-functional | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-barbican-functional | install | Install binary dependencies for barbican functional tests
  become: yes
  become_user: root
  package: name={{ item }} state=present
  with_items: hqe_barbican_functional_pkgs

- name: hqe-barbican-functional-deploy | install | Update package cache
  install_package:
    cache: update
  when: not (build_venvs | bool)

- name: hqe-barbican-functional-deploy | install | Install the prebuilt env
  install_package:
    name: "{{ barbican_functional_service_name }}"
    service: "{{ barbican_functional_service_name }}"
    state: present
  when: not (build_venvs | bool)

# NOTE(andreaf) In future repo cloning shall be handled by the framework. For now
# we sudo to create the clone folder
- name: hqe-barbican-functional-deploy | install | Create the clone folder
  become: yes
  become_user: root
  file:
    path: "{{ barbican_functional_code_folder }}"
    state: directory
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-barbican-functional-deploy | install | Pull the functional tests from the barbican repo
  git:
    # Liberty based tests
    # NOTE(andreaf) Having the repo hardcoded here should be fixed
    # It will be done as part of the overall refactor
    repo: "http://git.suse.provo.cloud/openstack/barbican.git"
    dest: "{{ barbican_functional_code_folder }}"
    version: stable/pike
    force: yes

- name: hqe-barbican-functional-deploy | install | Upgrade pip
  pip:
    name: pip
    extra_args: --upgrade
    virtualenv: "{{ barbican_functional_venv_folder }}"
  when: build_venvs | bool

- name: hqe-barbican-functional | install | Install requirements
  pip:
    requirements={{ barbican_functional_code_folder }}/requirements.txt
    virtualenv={{ barbican_functional_venv_folder }}
  when: build_venvs | bool

- name: hqe-barbican-functional | install | Install test requirements
  pip:
    requirements={{ barbican_functional_code_folder }}/test-requirements.txt
    virtualenv={{ barbican_functional_venv_folder }}
  when: build_venvs | bool

- name: hqe-barbican-functional | install | Install os-testr
  #for subunit-trace
  pip: name=os-testr
    virtualenv={{ barbican_functional_venv_folder }}
    extra_args='--upgrade'
  when: build_venvs | bool

- name: hqe-barbican-functional | Ensures ~/.barbican
  file:
    path: ~/.barbican
    state: directory

- name: hqe-barbican-functional | Copy barbican.conf
  template:
    src: "barbican.conf"
    dest: "~/.barbican/barbican.conf"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0644

# NOTE(andreaf) Barbican functional relies on oslo.cfg, which expects the
# config dir to be under ~/.barbican. WHile this is outside the work folder,
# it's at least within the home of hqe_user, and still allows some degree
# of multi-tenancy on the test driver.
#
# No longer needed
#- name: hqe-barbican-functional | Copy barbican.conf
#  template:
#    src: "{{ barbican_functional_code_folder }}/etc/barbican/barbican.conf"
#    dest: "~/.barbican/barbican.conf"
#    owner: "{{ hqe_user }}"
#    group: "{{ hqe_group }}"
#    mode: 0644
07070100FE264B000081A4000003E800000064000000015B3CDC1200000033000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml07070100FC2093000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/templates07070100FC2094000081A4000003E800000064000000015B3CDC12000005AF000001030000000400000000000000000000007800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/templates/barbican-functional.conf.j2[DEFAULT]
[identity]
uri={{ os_auth_url }}
version=v3
username={{ username }}
project_name={{ project_name }}
password={{ password }}
domain_name={{ domain_name }}
service_admin={{ service_admin }}
service_admin_project={{ service_admin_project }}
service_admin_password={{ service_admin_password }}

[keymanager]
service_type={{ service_type }}
service_name={{ barbican_service_name }}
region_name={{ region_name }}
endpoint_type={{ endpoint_type }}
override_url={{ override_url }}
override_url_version={{ override_url_version }}
server_host_href_set={{ server_host_href_set }}

[rbac_users]
project_a={{ project_a }}
project_b={{ project_b }}
admin_a={{ admin_a }}
admin_a_password={{ admin_a_password }}
creator_a={{ creator_a }}
creator_a_password={{ creator_a_password }}
creator_a_2={{ creator_a_2 }}
creator_a_2_password={{ creator_a_2_password }}
observer_a={{ observer_a }}
observer_a_password={{ observer_a_password }}
auditor_a={{ auditor_a }}
auditor_a_password={{ auditor_a_password }}
admin_b={{ admin_b }}
admin_b_password={{ admin_b_password }}
creator_b={{ creator_b }}
creator_b_password={{ creator_b_password }}
observer_b={{ observer_b }}
observer_b_password={{ observer_b_password }}
auditor_b={{ auditor_b }}
auditor_b_password={{ auditor_b_password }}

[quotas]
quota_secrets={{ quota_secrets }}
quota_orders={{ quota_orders }}
quota_containers={{ quota_containers }}
quota_consumers={{ quota_consumers }}
quota_cas={{ quota_cas }}
07070100FC2096000081A4000003E800000064000000015B3CDC120000000A000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/templates/barbican.conf[DEFAULT]
07070100FC2095000081A4000003E800000064000000015B3CDC12000003C5000001030000000400000000000000000000007A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/templates/hqe-barbican-functional.sh.j2#!/usr/bin/env bash

set -eux
set -o pipefail

# This script runs barbican functional tests against a deployed Helion OpenStack cloud

# Discover only API tests for now
export OS_TEST_PATH="{{ barbican_functional_code_folder }}/functionaltests/api"
export OS_TOP_LEVEL="{{ barbican_functional_code_folder }}"
export VENV_FOLDER="{{ barbican_functional_venv_folder }}"
export TESTR="{{ barbican_functional_venv_folder }}/bin/testr"
export PYTHON="{{ barbican_functional_venv_folder }}/bin/python"
export TESTS_TO_SKIP_BIN="{{ barbican_functional_work_folder }}/tests2skip.py"
export RUN_FILTER="{{ barbican_functional_work_folder }}/run_filters/${1:-{{ run_filter }}}.txt"
export REQUESTS_CA_BUNDLE={{ ca_bundle }}

cd {{ barbican_functional_work_folder }}

http_proxy= https_proxy= HTTP_PROXY= HTTPS_PROXY= ${TESTR} run \
    --subunit $(python ${TESTS_TO_SKIP_BIN} ${RUN_FILTER})|
    ${VENV_FOLDER}/bin/subunit-trace --no-failure-debug -f | tee testr_results.log
07070100FA1E80000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/vars07070100FA1E81000081A4000003E800000064000000015B3CDC120000009A000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/vars/debian.yml---
hqe_barbican_functional_pkgs:
  - python-dev
  - libffi-dev
  - libssl-dev
  - libmysqlclient18
  - libldap2-dev
  - libsasl2-dev
  - python-httplib2
07070100FA1E83000081A4000003E800000064000000015B3CDC1200000B2A000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/vars/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
barbican_functional_service_name: "{{ hqe_barbican_functional.deploy.service_name }}"
barbican_functional_venv_folder: "{{ common_venv_root }}/{{ hqe_barbican_functional.deploy.venv_folder }}"
barbican_functional_test_suite: "{{ hqe_barbican_functional.deploy.test_suite }}"

run_filter: ci
run_concurrency: 0

admin_user: "{{ osrc_vars.os_username }}"
admin_password: "{{ osrc_vars.os_password }}"
os_auth_url: "{{ osrc_vars.os_auth_url }}"
username: barbican_hqe_admin
password: barbican_hqe_admin
project_name: barbican_hqe_admin_project
domain_name: "{{ osrc_vars.os_domain_name }}"
os_ca_cert: "{{ osrc_vars.os_ca_cert }}"

#### Mitaka based configuration
service_type: key-manager
barbican_service_name: barbican
region_name: region1
endpoint_type: internal
server_host_href_set: False

# This workaround to use override is needed until we backport the review
# https://review.openstack.org/#/c/229588. Once that happens, I will remove
# this reference to KEYMGR_API
override_url: "{{ hqe_group_vars.km_url }}"
override_url_version: v1

service_admin: barbican_hqe_service_admin
service_admin_project: barbican_hqe_service_admin_project
service_admin_password: barbican_hqe_service_admin

#Projects
project_a: barbican_project_a
project_b: barbican_project_b

# users for project_a
admin_a: barbican_project_a_admin
admin_a_password: barbican
creator_a: barbican_project_a_creator
creator_a_password: barbican
observer_a: barbican_project_a_observer
observer_a_password: barbican
auditor_a: barbican_project_a_auditor
auditor_a_password: barbican

# Another creator user for project_a due to changes in review 120282
creator_a_2: barbican_project_a_creator_2
creator_a_2_password: barbican

# users for project_b
admin_b: barbican_project_b_admin
admin_b_password: barbican
creator_b: barbican_project_b_creator
creator_b_password: barbican
observer_b: barbican_project_b_observer
observer_b_password: barbican
auditor_b: barbican_project_b_auditor
auditor_b_password: barbican

#Quotas
# default number of secrets allowed per project
quota_secrets: -1

# default number of orders allowed per project
quota_orders: -1

# default number of containers allowed per project
quota_containers: -1

# default number of consumers allowed per project
quota_consumers: -1

# default number of CAs allowed per project
quota_cas: -1

# We clone code into work folder directly, because that's the only way to make
# Barbican tests work - they depend on pbr reading the version of barbican,
# and that only works if python is invoked from barbican source folder
barbican_functional_code_folder: "{{ work_folder }}/{{ hqe_barbican_functional.deploy.test_suite }}"
barbican_functional_work_folder: "{{ work_folder }}/{{ hqe_barbican_functional.deploy.test_suite }}"
07070100FA1E82000081A4000003E800000064000000015B3CDC120000006B000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-deploy/vars/suse.yml---
hqe_barbican_functional_pkgs:
  - libffi4
  - libopenssl1_0_0
  - libmysqlclient18
  - python-httplib2
07070101220019000041ED000003E800000064000000045B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run0707010122001C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run/tasks0707010122001D000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run/tasks/cleanup.yml---
0707010122001E000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
0707010122001F000081A4000003E800000064000000015B3CDC120000024F000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-barbican-functional-run | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  command: "{{ barbican_functional_work_folder }}/hqe-barbican-functional.sh {{ run_filter }}"
  register: test_output
  ignore_errors: True

- name: hqe-barbican-functional| run | Show test output
  debug: var=test_output

07070101220020000081A4000003E800000064000000015B3CDC1200003033000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run/tasks/test-resources.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
# Setup the test account used for testing
#RBAC users
- name: hqe-barbican-functional | test_resources  | Get a domain scoped token
  keystone_v3:
    endpoint: "{{ os_auth_url }}"
    login_username: "{{ admin_user }}"
    login_password: "{{ admin_password }}"
    login_user_domain_name: "Default"
    login_domain_name: "Default"
    action: "token_get"
    cacert: "{{ os_ca_cert }}"
  register: domain_scoped_token

- name: hqe-barbican-functional | test_resources | Create Test User barbican_hqe_admin
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ username }}"
    user_password: "{{ password }}"
    description: "key:manager:admin"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test Project barbican_hqe_admin_project
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_project"
    project_name: "{{ project_name }}"
    project_domain_name: "{{ domain_name }}"
    description: "barbican_hqe_admin_project"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:admin role assignment
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ username }}"
    project_name: "{{ project_name  }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:admin"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User barbican_hqe_service_admin
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ service_admin }}"
    user_password: "{{ service_admin_password }}"
    description: "barbican_hqe_service_admin"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test Project barbican_hqe_service_admin_project
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_project"
    project_name: "{{ service_admin_project}}"
    project_domain_name: "{{ domain_name }}"
    description: "barbican_hqe_service_admin_project"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:service-admin role assignment
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ service_admin }}"
    project_name: "{{ service_admin_project  }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:service-admin"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test Project a
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_project"
    project_name: "{{ project_a }}"
    project_domain_name: "{{ domain_name }}"
    description: "projecta"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test Project b
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_project"
    project_name: "{{ project_b }}"
    project_domain_name: "{{ domain_name }}"
    description: "projecta"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User project_a_admin for project_a
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ admin_a }}"
    user_password: "{{ admin_a_password }}"
    description: "user project_a_admin"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User project_a_creator for project_a
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ creator_a }}"
    user_password: "{{ creator_a_password }}"
    description: "user project_a_creator"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true


- name: hqe-barbican-functional | test_resources | Create Test User project_a_creator_a_2 for project_a
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ creator_a_2 }}"
    user_password: "{{ creator_a_2_password }}"
    description: "user project_a_creator_a_2"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true



- name: hqe-barbican-functional | test_resources | Create Test User project_a_observer for project_a
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ observer_a }}"
    user_password: "{{ observer_a_password }}"
    description: "user project_a_observer"
    user_domain_name: "{{ domain_name }}"
    project_name: "project_a"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User project_a_auditor for project_a
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ auditor_a }}"
    user_password: "{{ auditor_a_password }}"
    description: "user project_a_auditor"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User project_b_admin for project_b
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{admin_b}}"
    user_password: "{{ admin_b_password }}"
    description: "user project_b_admin"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User project_b_creator for project_b
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ creator_b }}"
    user_password: "{{ creator_b_password }}"
    description: "user project_b_creator"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User project_b_observer for project_b
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ observer_b }}"
    user_password: "{{ observer_b_password }}"
    description: "user project_b_observer"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | Create Test User project_b_auditor for project_b
  keystone_v3:
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    action: "create_user"
    user_name: "{{ auditor_b }}"
    user_password: "{{ auditor_b_password }}"
    description: "user project_b_auditor"
    user_domain_name: "{{ domain_name }}"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manger:admin role assignment for admin_a for project_a
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ admin_a }}"
    project_name: "{{ project_a }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:admin"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:creator role assignment for creator_a for project_a
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ creator_a }}"
    project_name: "{{ project_a }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:creator"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:creator role assignment for creator_a_2 for project_a
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ creator_a_2 }}"
    project_name: "{{ project_a }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:creator"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:observer role assignment for observer_a for project_a
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ observer_a }}"
    project_name: "{{ project_a }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:observer"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:auditor role assignment for auditor_a for project_a
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ auditor_a }}"
    project_name: "{{ project_a }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:auditor"
    cacert: "{{ os_ca_cert }}"
  run_once: true



- name: hqe-barbican-functional | test_resources | add key-manager:admin role assignment for admin_b for project_b
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ admin_b }}"
    project_name: "{{ project_b }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:admin"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:creator role assignment for creator_b for project_b
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ creator_b }}"
    project_name: "{{ project_b }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:creator"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:observer role assignment for observer_b for project_b
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ observer_b }}"
    project_name: "{{ project_b }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:observer"
    cacert: "{{ os_ca_cert }}"
  run_once: true

- name: hqe-barbican-functional | test_resources | add key-manager:auditor role assignment for auditor_b for project_b
  keystone_v3:
    action: "grant_project_role"
    login_token: "{{ domain_scoped_token.result }}"
    endpoint: "{{ os_auth_url }}"
    user_name: "{{ auditor_b }}"
    project_name: "{{ project_b }}"
    user_domain_name: "{{ domain_name }}"
    project_domain_name: "{{ domain_name }}"
    role_name: "key-manager:auditor"
    cacert: "{{ os_ca_cert }}"
  run_once: true
0707010122001A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run/vars0707010122001B000081A4000003E800000064000000015B3CDC1200000A47000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-functional-run/vars/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
# Settings from deploy

## This role uses a custom virtual environment
barbican_venv_python: "{{ hqe_barbican_functional.deploy.venv_folder }}/bin/python"

run_filter: ci
run_concurrency: 0

admin_user: "{{ osrc_vars.os_username }}"
admin_password: "{{ osrc_vars.os_password }}"
os_auth_url: "{{ osrc_vars.os_auth_url }}"
username: barbican_hqe_admin
password: barbican_hqe_admin
project_name: barbican_hqe_admin_project
domain_name: "{{ osrc_vars.os_domain_name }}"
os_ca_cert: "{{ osrc_vars.os_ca_cert }}"

#### Mitaka based configuration
service_type: key-manager
service_name: barbican
region_name: region1
endpoint_type: internal
server_host_href_set: False

# This workaround to use override is needed until we backport the review
# https://review.openstack.org/#/c/229588.
override_url: "{{ hqe_group_vars.km_url }}"
override_url_version: v1

service_admin: barbican_hqe_service_admin
service_admin_project: barbican_hqe_service_admin_project
service_admin_password: barbican_hqe_service_admin

#Projects
project_a: barbican_project_a
project_b: barbican_project_b

# users for project_a
admin_a: barbican_project_a_admin
admin_a_password: barbican
creator_a: barbican_project_a_creator
creator_a_password: barbican
observer_a: barbican_project_a_observer
observer_a_password: barbican
auditor_a: barbican_project_a_auditor
auditor_a_password: barbican

# Another creator user for project_a due to changes in review 120282
creator_a_2: barbican_project_a_creator_2
creator_a_2_password: barbican

# users for project_b
admin_b: barbican_project_b_admin
admin_b_password: barbican
creator_b: barbican_project_b_creator
creator_b_password: barbican
observer_b: barbican_project_b_observer
observer_b_password: barbican
auditor_b: barbican_project_b_auditor
auditor_b_password: barbican

#Quotas
# default number of secrets allowed per project
quota_secrets: -1

# default number of orders allowed per project
quota_orders: -1

# default number of containers allowed per project
quota_containers: -1

# default number of consumers allowed per project
quota_consumers: -1

# default number of CAs allowed per project
quota_cas: -1

# NOTE(andreaf) Barbican has an own repo for tests, so the path where the git
# repo is cloned is in tests_folder, and the path to the tests within the folder
# is hardcoded in the run script
barbican_functional_code_folder: "{{ work_folder }}/{{ hqe_barbican_functional.deploy.test_suite }}"
barbican_functional_work_folder: "{{ work_folder }}/{{ hqe_barbican_functional.deploy.test_suite }}"
07070101200F23000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy07070101200F29000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/files07070101200F2A000081A4000003E800000064000000015B3CDC12000001C9000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/files/.testr.conf[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
             OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
             OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
             OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
             ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tests} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]*\.)*
07070101200F2B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/files/run_filters07070101200F2C000081A4000003E800000064000000015B3CDC1200000007000001030000000400000000000000000000007C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/files/run_filters/barbican-monitoring.txt+tests
07070101200F2D000081A4000003E800000064000000015B3CDC120000084A000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/files/tests2skip.py#!/usr/bin/env python
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# Reads in a list of exclude regular expressions from a file and outputs a
# regex suitable to be passed into testr

import sys

"""
Whitelist is applied first. The blacklist is executed against the set of
tests returned by the whitelist.
If whitelist is empty, all available tests are fed to blacklist.
If blacklist is empty, all tests from whitelist are returned.

The syntax for white-list and black-list is as follows:
- lines starting with # or empty are ignored
- lines starting with "+" are whitelisted
- lines starting with "-" are blacklisted
- lines not matching any of the above conditions are blacklisted

The match for each line gets added a "^" in the beginning,
so the regular expression should account for that.

For example, the following scenario:

    run all the smoke tests and scenario tests,
    but exclude the api.volume tests.

is implemented as:

    +.*smoke
    +tempest\.scenario
    -tempest\.api\.volume.*
"""

whitelist = []
blacklist = []
with open(sys.argv[1]) as fp:
    for line in fp:
        line = line.strip()
        if not line or line[0] == '#':
            continue
        if line.startswith("+"):
            whitelist.append(line[1:])
        elif line.startswith("-"):
            blacklist.append(line[1:])
        else:
            blacklist.append(line)

regex = '^(?=({whitelist}))'
params = dict(whitelist="|".join(whitelist))
if blacklist:
    regex += '(?!({blacklist}))'
    params['blacklist'] = "|".join(blacklist)

print(regex.format(**params))
07070101200F2E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/tasks07070101200F30000081A4000003E800000064000000015B3CDC12000007E2000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/tasks/configure.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
---
- name: hqe-barbican-monitoring | configure | Create work folder
  file:
    path: "{{ barbican_monitoring_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory

- name: hqe-barbican-monitoring | configure | Initialise the .testrepository directory if it doesn't exist
  become: yes
  become_user: "{{ hqe_user }}"
  shell: "{{ common_venv_bin }}/testr init"
  args:
    chdir: "{{ barbican_monitoring_work_folder }}"
    creates: "{{ barbican_monitoring_work_folder }}/.testrepository"

- name: hqe-barbican-monitoring | configure | Create testr config file
  copy:
    src: .testr.conf
    dest: "{{ barbican_monitoring_work_folder }}/.testr.conf"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-barbican-monitoring | configure | Prepare configuration file folder
  file:
    path: "{{ barbican_monitoring_work_folder }}/etc/barbican"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory

- name: hqe-barbican-monitoring | configure | Update monitoring_barbican.conf
  template:
    src: monitoring_barbican.conf.j2
    dest: "{{ barbican_monitoring_work_folder }}/etc/barbican/monitoring_barbican.conf"

- name: hqe-barbican-monitoring | configure | Deploy tests2skip.py
  copy:
    src: tests2skip.py
    dest: "{{ barbican_monitoring_work_folder }}/tests2skip.py"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-barbican-monitoring | configure | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ barbican_monitoring_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-barbican-monitoring | configure | Deploy run script
  template: >
    src=hqe-barbican-monitoring.sh.j2
    dest="{{ barbican_monitoring_work_folder }}/hqe-barbican-monitoring.sh"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0700



07070101200F2F000081A4000003E800000064000000015B3CDC120000020A000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/tasks/install.yml---
# Install test dependencies

# FIXME(andreaf) Extra dependencies shall be moved into common requirements
# rather than installed here into the common venv

- name: hqe-barbican-monitoring-deploy | install | Install junitxml
  pip: name=junitxml
    virtualenv={{ common_venv_folder }}
  when: build_venvs | bool

- name: hqe-barbican-monitoring-deploy | install | Install os-testr
  #for subunit-trace
  pip: name=os-testr
    virtualenv={{ common_venv_folder }}
    extra_args='--upgrade'
  when: build_venvs | bool

07070101200F31000081A4000003E800000064000000015B3CDC1200000033000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml07070101200F26000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/templates07070101200F27000081A4000003E800000064000000015B3CDC1200000352000001030000000400000000000000000000007A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/templates/hqe-barbican-monitoring.sh.j2#!/usr/bin/env bash

set -eux
set -o pipefail

# This script runs barbican monitoring tests against a deployed Helion OpenStack cloud

# Discover cli tests
export OS_TEST_PATH="{{ barbican_monitoring_code_folder }}"
export OS_TOP_LEVEL="{{ barbican_monitoring_code_folder }}"
export VENV_BIN="{{ common_venv_bin }}"
export TESTR="$VENV_BIN/testr"
export PYTHON="{{ common_venv_python }}"
export TESTS_TO_SKIP_BIN="{{ barbican_monitoring_work_folder }}/tests2skip.py"
export RUN_FILTER="{{ barbican_monitoring_work_folder }}/run_filters/${1:-{{ run_filter }}}.txt"
export REQUESTS_CA_BUNDLE={{ ca_bundle }}

cd {{ barbican_monitoring_work_folder }}

http_proxy= https_proxy= HTTP_PROXY= HTTPS_PROXY= ${TESTR} run \
    --subunit $(python ${TESTS_TO_SKIP_BIN} ${RUN_FILTER})|
    ${VENV_BIN}/subunit-trace --no-failure-debug -f | tee testr_results.log
07070101200F28000081A4000003E800000064000000015B3CDC120000024D000001030000000400000000000000000000007800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/templates/monitoring_barbican.conf.j2[monitoring_barbican]
username={{ username }}
password={{ password }}
user_domain_name={{ user_domain_name }}
project_name={{ project_name }}
project_domain_name={{ project_domain_name }}
auth_url={{ auth_url }}
cli_dir={{ barbican_monitoring_cli_dir }}
component={{ component }}
service={{ service }}
hostname1={{ hostname1 }}
hostname2={{ hostname2 }}
hostname3={{ hostname3 }}
monitoring_hostname1={{ monitoring_hostname1 }}
monitoring_hostname2={{ monitoring_hostname2 }}
monitoring_hostname3={{ monitoring_hostname3 }}
hostnameforstopstartbarbican={{ hostnameforstopstartbarbican }}

07070101200F24000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/vars07070101200F25000081A4000003E800000064000000015B3CDC12000007E7000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-deploy/vars/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
run_filter: barbican-monitoring
run_concurrency: 0

username:  "{{ osrc_vars.os_username }}"
password: "{{ osrc_vars.os_password }}"
project_name: "{{ osrc_vars.os_project_name }}"
auth_url: "{{ osrc_vars.os_auth_url }}"
endpoint_type: internalURL
user_domain_name: "{{ osrc_vars.os_user_domain_name }}"
project_domain_name: "{{ osrc_vars.os_project_domain_name }}"
barbican_monitoring_cli_dir: '{{ common_venv_bin }}'
component: 'barbican-api'
service: 'key-manager'

hostname1: "{{ hqe_group_vars.barbican_servers[0] }}"
hostname2: "{{ hqe_group_vars.barbican_servers[1] }}"
hostname3: "{{ hqe_group_vars.barbican_servers[2] | default(hqe_group_vars.barbican_servers[0]) }}" #mid-scale model - default

monitoring_hostname1: "{{ hqe_group_vars.monasca_cluster1 | default(hqe_group_vars.barbican_servers[0]) }}"
monitoring_hostname2: "{{ hqe_group_vars.monasca_cluster2 | default(hqe_group_vars.barbican_servers[1]) }}"
monitoring_hostname3: "{{ hqe_group_vars.monasca_cluster3 | default(hqe_group_vars.barbican_servers[2]) }}"

hostnameforstopstartbarbican: "{{ hqe_group_vars.barbican_servers[2] | default(hqe_group_vars.barbican_servers[0]) }}"

barbican_monitoring_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_barbican_monitoring.deploy.tests_folder }}"
barbican_monitoring_work_folder: "{{ work_folder }}/{{ hqe_barbican_monitoring.deploy.test_suite }}"
07070101200E7C000041ED000003E800000064000000045B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run07070101200E7F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run/tasks07070101200E80000081A4000003E800000064000000015B3CDC1200000003000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run/tasks/cleanup.yml---07070101200E81000081A4000003E800000064000000015B3CDC120000015C000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"

07070101200E82000081A4000003E800000064000000015B3CDC1200000225000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-barbican-monitoring-run | run | Run the tests
  command: "{{ barbican_monitoring_work_folder }}/hqe-barbican-monitoring.sh {{ run_filter }}"
  register: test_output
  ignore_errors: True

- name: hqe-barbican-monitoring-run| run | Show test output
  debug: var=test_output

07070101200E83000081A4000003E800000064000000015B3CDC1200000003000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run/tasks/test-resources.yml---07070101200E7D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run/vars07070101200E7E000081A4000003E800000064000000015B3CDC1200000811000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-barbican-monitoring-run/vars/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
run_filter: barbican-monitoring
run_concurrency: 0

hqe_user: "{{ hqe_common.deploy.hqe_user }}"
hqe_group: "{{ hqe_common.deploy.hqe_group }}"

username:  "{{ osrc_vars.os_username }}"
password: "{{ osrc_vars.os_password }}"
project_name: "{{ osrc_vars.os_project_name }}"
auth_url: "{{ osrc_vars.os_auth_url }}"
endpoint_type: internalURL
user_domain_name: "{{ osrc_vars.os_user_domain_name }}"
project_domain_name: "{{ osrc_vars.os_project_domain_name }}"

component: 'barbican-api'
service: 'key-manager'

hostname1: "{{ hqe_group_vars.barbican_servers[0] }}"
hostname2: "{{ hqe_group_vars.barbican_servers[1] }}"
hostname3: "{{ hqe_group_vars.barbican_servers[2] | default(hqe_group_vars.barbican_servers[0]) }}" #mid-scale model - default

monitoring_hostname1: "{{ hqe_group_vars.monasca_cluster1 | default(hqe_group_vars.barbican_servers[0]) }}"
monitoring_hostname2: "{{ hqe_group_vars.monasca_cluster2 | default(hqe_group_vars.barbican_servers[1]) }}"
monitoring_hostname3: "{{ hqe_group_vars.monasca_cluster3 | default(hqe_group_vars.barbican_servers[2]) }}"


hostnameforstopstartbarbican: "{{ hqe_group_vars.barbican_servers[2] | default(hqe_group_vars.barbican_servers[0]) }}"

barbican_monitoring_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_barbican_monitoring.deploy.tests_folder }}"
barbican_monitoring_work_folder: "{{ work_folder }}/{{ hqe_barbican_monitoring.deploy.test_suite }}"
070701011E1C9C000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy070701011E1CA1000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/files070701011E1CA2000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/files/run_filters070701011E1CA3000081A4000003E800000064000000015B3CDC120000000E000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/files/run_filters/boot-many.txthqe-boot-many
070701011E1CA4000081A4000003E800000064000000015B3CDC120000000E000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/files/run_filters/parallel.txthqe-boot-many
070701011E1CA5000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/tasks070701011E1CA7000081A4000003E800000064000000015B3CDC120000009A000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/tasks/configure.yml---
# Configure boot-many

# The only configuration required here is the RC file with the
# credentials but that can only be created after test-resources
070701011E1CA6000081A4000003E800000064000000015B3CDC1200000189000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/tasks/install.yml---

- name: hqe-boot-many | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ boot_many_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-boot-many | install | Deploy run script
  template: >
    src=hqe-boot-many.j2
    dest={{ boot_many_work_folder }}/hqe-boot-many
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
070701011E1CA8000081A4000003E800000064000000015B3CDC1200000033000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml070701011E1C9F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/templates070701011E1CA0000081A4000003E800000064000000015B3CDC12000003AB000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/templates/hqe-boot-many.j2#!/bin/bash

# Wrapper script to execute boot-many
# within the venv, with the right parameters
#
# Usage: hqe-boot-many run_filter_filename

set -o pipefail

IMAGE_ID=$1
KEYNAME=$2
FLAVOR=$3
AZ=$4
NVMS=$5
RUN_FILTER=${6:-parallel.txt}

TEST_HOME={{ boot_many_code_folder }}
WORK_HOME={{ boot_many_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/boot-many.testrc

# Run the test
cmd="${TEST_HOME}/boot-many-at-once.sh -d -s -i $IMAGE_ID\
                                       -k $KEYNAME\
                                       -n bootmany\
                                       -f $FLAVOR\
                                       -z $AZ\
                                       -N $NVMS\
                                       $(cat ${WORK_HOME}/run_filters/${RUN_FILTER}) | tee ${WORK_HOME}/test_boot_many.log"

echo $cmd
$cmd



070701011E1C9D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/vars070701011E1C9E000081A4000003E800000064000000015B3CDC12000000BD000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-deploy/vars/main.yml---
boot_many_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_boot_many.deploy.tests_folder }}"
boot_many_work_folder: "{{ work_folder }}/{{ hqe_boot_many.deploy.test_suite }}"
07070100F61430000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run07070100F82C30000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/tasks07070100F82C31000081A4000003E800000064000000015B3CDC1200000BBB000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-boot-many | test-resources | Detach subnet from router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-interface-delete {{ demo_test_router }} {{ demo_test_subnet }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-boot-many | test-resources | Delete subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron subnet-delete --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-boot-many | test-resources | Delete network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron net-delete {{ demo_test_network }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-boot-many | test-resources | Delete router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-delete {{ demo_test_router }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-boot-many | test-resources | Delete keyname
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/nova keypair-delete {{ demo_test_keyname }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-boot-many | test-resources | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-boot-many | test-resources | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
07070100F82C32000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070100F82C33000081A4000003E800000064000000015B3CDC120000029D000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-boot-many | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  command: "{{ boot_many_work_folder }}/hqe-boot-many {{ demo_test_image_id.stdout }} {{ demo_test_keyname }} {{ demo_test_flavor }} {{ demo_test_az }} {{ demo_test_nvms }} {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-boot-many | run | Show test output
  debug: var=test_output

07070100F82C34000081A4000003E800000064000000015B3CDC1200000E5C000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-boot-many | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-boot-many | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-boot-many | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-boot-many | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ boot_many_work_folder }}/boot-many.testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

# test requires the following items
- name: hqe-boot-many | test-resources | Create router
  ignore_errors: true
  shell: "{{ common_venv_bin }}/neutron --os-username {{ demo_test_user }} --os-tenant-name {{ demo_test_project }} --os-password {{ demo_test_password }} --os-cacert {{ ca_bundle }} --os-auth-url {{ os_auth_url }}  router-create {{ demo_test_router }}"

# not connecting router to ext-net as not needed.

- name: hqe-boot-many | test-resources | Create network
  ignore_errors: true
  shell: "{{ common_venv_bin }}/neutron --os-username {{ demo_test_user }} --os-tenant-name {{ demo_test_project }} --os-password {{ demo_test_password }} --os-cacert {{ ca_bundle }} --os-auth-url {{ os_auth_url }}  net-create {{ demo_test_network }}"

- name: hqe-boot-many | test-resources | Create subnet
  ignore_errors: true
  shell: "{{ common_venv_bin }}/neutron --os-username {{ demo_test_user }} --os-tenant-name {{ demo_test_project }} --os-password {{ demo_test_password }} --os-cacert {{ ca_bundle }} --os-auth-url {{ os_auth_url }}  subnet-create --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"

- name: hqe-boot-many | test-resources | Connect subnet to router
  ignore_errors: true
  shell: "{{ common_venv_bin }}/neutron --os-username {{ demo_test_user }} --os-tenant-name {{ demo_test_project }} --os-password {{ demo_test_password }} --os-cacert {{ ca_bundle }} --os-auth-url {{ os_auth_url }} router-interface-add {{ demo_test_router }} --subnet {{ demo_test_subnet }}"

- name: hqe-boot-many | test-resources | Create keyname
  ignore_errors: true
  shell: "{{ common_venv_bin }}/nova --os-username {{ demo_test_user }} --os-tenant-name {{ demo_test_project }} --os-password {{ demo_test_password }} --os-cacert {{ ca_bundle }} --os-auth-url {{ os_auth_url }} keypair-add {{ demo_test_keyname }} > {{ demo_test_key_file }}"

- name: hqe-boot-many | test-resources | Verify image exists
  ignore_errors: true
  shell: "{{ common_venv_bin }}/nova --os-username {{ demo_test_user }} --os-tenant-name {{ demo_test_project }} --os-password {{ demo_test_password }} --os-cacert {{ ca_bundle }} --os-auth-url {{ os_auth_url }} image-list | grep cirros | head -1 | awk '{print $2}'"
  register: demo_test_image_id
07070100F82C2E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/templates07070100F82C2F000081A4000003E800000064000000015B3CDC1200000171000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/templates/testrc.j2export OS_BASE_AUTH_URL={{ keystone_admin_endpoint }}
export OS_AUTH_URL={{ keystone_admin_endpoint }}
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_PROJECT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}07070100F61431000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/vars07070100F61432000081A4000003E800000064000000015B3CDC120000069B000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-boot-many-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_boot_many', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default
demo_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# test resources
demo_test_router: "{{ demo_random_id }}"
demo_test_network: "{{ demo_random_id }}"
demo_test_subnet: "{{ demo_random_id }}"
demo_test_cidr: "192.168.1.0/24"
demo_test_keyname: "{{ demo_random_id }}"
demo_test_key_file: "{{ boot_many_work_folder }}/{{ [demo_test_keyname, 'pem'] | join('.') }}"
demo_test_az: "nova"
demo_test_flavor: 2
demo_test_nvms: 4


# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"

# os_auth_url
os_auth_url: "{{ osrc_vars.os_unversioned_auth_url }}"

boot_many_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_boot_many.deploy.tests_folder }}"
boot_many_work_folder: "{{ work_folder }}/{{ hqe_boot_many.deploy.test_suite }}"
07070101200F7B000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy07070101200F80000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/files07070101200F81000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/files/run_filters07070101200F82000081A4000003E800000064000000015B3CDC1200000010000001030000000400000000000000000000007400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/files/run_filters/ceilometer-test.txtceilometer-test
07070101200F83000081A4000003E800000064000000015B3CDC1200000010000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/files/run_filters/parallel.txtceilometer-test
07070101200F84000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/tasks07070101200F85000081A4000003E800000064000000015B3CDC12000002BB000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/tasks/install.yml---

- name: hqe-ceilometer-test | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ ceilometer_test_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-ceilometer-test | install | Deploy run script
  template: >
    src=hqe-ceilometer-test.j2
    dest={{ ceilometer_test_work_folder }}/hqe-ceilometer-test
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-ceilometer-test | install | Deploy csv files
  copy:
    src: "{{ item }}"
    dest: "{{ ceilometer_test_work_folder }}/"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0644
  with_fileglob:
    - "{{ ceilometer_test_code_folder}}/*.csv"07070101200F86000081A4000003E800000064000000015B3CDC120000001B000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/tasks/main.yml---
- include: install.yml
07070101200F7E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/templates07070101200F7F000081A4000003E800000064000000015B3CDC120000029F000001030000000400000000000000000000006F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/templates/hqe-ceilometer-test.j2#!/bin/bash

# Wrapper script to execute ceilometer-test
# within the venv, with the right parameters
#
# Usage: hqe-ceilometer-test run_filter_filename

set -o pipefail

RUN_FILTER=${1:-ceilometer-test.txt}

TEST_HOME={{ ceilometer_test_code_folder }}
WORK_HOME={{ ceilometer_test_work_folder }}
VENV={{ common_venv_folder }}

# Activate virtual environment
source ${VENV}/bin/activate

# Run the test
export CEILOMETER_WORK_FOLDER=$WORK_HOME
export CEILOMETER_SERVICE_OSRC={{ osrc_vars.service_osrc_path }}
export CEILOMETER_KEYSTONE_OSRC={{ osrc_vars.keystone_osrc_path }}
cmd="python -m unittest discover -s ${TEST_HOME} -p test_ceilometer_client.py"

echo $cmd
$cmd
07070101200F7C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/vars07070101200F7D000081A4000003E800000064000000015B3CDC12000000D6000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-deploy/vars/main.yml---

ceilometer_test_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_ceilometer_test.deploy.tests_folder }}"
ceilometer_test_work_folder: "{{ work_folder }}/{{ hqe_ceilometer_test.deploy.test_suite }}"
07070101201004000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run07070101201009000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/tasks0707010120100A000081A4000003E800000064000000015B3CDC1200000003000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/tasks/cleanup.yml---0707010120100B000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
0707010120100C000081A4000003E800000064000000015B3CDC1200000235000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- set_fact:
      test_status: true

- name: hqe-ceilometer-test | run | Run the tests
  command: "{{ ceilometer_test_work_folder }}/hqe-ceilometer-test {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-ceilometer-test | run | Show test output
  debug: var=test_output

0707010120100D000081A4000003E800000064000000015B3CDC12000000FA000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/tasks/test-resources.yml---
- name: hqe-ceilometer-test | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ ceilometer_test_work_folder }}/hqe-ceilometer-test.testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070101201007000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/templates07070101201008000081A4000003E800000064000000015B3CDC1200000134000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/templates/testrc.j2export OS_AUTH_URL={{ os_auth_url }}
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_PROJECT_NAME={{ keystone_admin_tenant }}
export OS_CACERT={{ ca_bundle }}
export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}
07070101201005000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/vars07070101201006000081A4000003E800000064000000015B3CDC120000046A000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceilometer-test-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Settings from deploy
ceilometer_run_service_name: "not-yet-defined"

# Test account setup for testing, and clean-ed up afterwards
demo_test_user: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default


# General keystone settings
keystone_version: "v3"
keystone_admin_tenant: "{{ osrc_vars.os_project_name }}"

# os_auth_url
os_auth_url: "{{ KEY_API.advertises.vips.admin[0].url }}/{{ keystone_version }}"

ceilometer_test_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_ceilometer_test.deploy.tests_folder }}"
ceilometer_test_work_folder: "{{ work_folder }}/{{ hqe_ceilometer_test.deploy.test_suite }}"
07070100E82A60000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy07070100EC33FA000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/files07070100EC33FB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/files/run_filters07070100EC33FC000081A4000003E800000064000000015B3CDC1200000005000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/files/run_filters/ceph.txtceph
07070100EC33FD000081A4000003E800000064000000015B3CDC1200000005000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/files/run_filters/parallel.txtceph
07070100EE203A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/tasks07070100EE203C000081A4000003E800000064000000015B3CDC120000016B000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/tasks/configure.yml---
# Configure ceph

- name: hqe-ceph | configure |  Deploy ceph test input file
  shell: "cp {{ ceph_code_folder }}/ceph_inputs.json {{ ceph_work_folder }}"

- name: hqe-ceph | configure |  Fix ownership on ceph test input file
  file:
    path: "{{ ceph_work_folder }}/ceph_inputs.json"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0644

07070100EE203B000081A4000003E800000064000000015B3CDC12000003C3000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/tasks/install.yml---
- name: hqe-ceph | install |  Set ensure {{ ceph_work_folder }} folder exists
  file:
    path: "{{ ceph_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    recurse: yes

# NOTE(andreaf) Ceph test code opens the input file for read-write (even if
# it's actually only read, and the input file location is not configurable.
# As a workaround extend access to it.
- name: hqe-ceph | install | Ensure input file is readable
  become: yes
  become_user: root
  file:
    path: "{{ ceph_code_folder }}/ceph_inputs.json"
    mode: 0777

- name: hqe-ceph | install | Deploy run_filters
  copy:
    src: run_filters
    dest: "{{ ceph_work_folder }}/"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-ceph | install | Deploy run script
  template:
    src: hqe-ceph.j2
    dest: "{{ ceph_work_folder }}/hqe-ceph"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755
07070100EE203D000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070100EA2D01000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/templates07070100EA2D02000081A4000003E800000064000000015B3CDC1200000295000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/templates/hqe-ceph.j2#!/bin/bash

# Wrapper script to execute ceph
# within the venv, with the right parameters
#
# Usage: hqe-ceph run_filter_filename

set -o pipefail

IMAGE_ID=$1
KEYNAME=$2
FLAVOR=$3
AZ=$4
NVMS=$5
RUN_FILTER=${6:-parallel.txt}

TEST_HOME={{ ceph_code_folder }}
WORK_HOME={{ ceph_work_folder }}
VENV={{ common_venv_folder }}
# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/hqe-ceph.testrc

# Run the test
cmd="python -m subunit.run discover -t ${TEST_HOME} test_cinder_ceph_client"
echo $cmd "| tee ${WORK_HOME}/test_cinder_ceph_client.subunit"
$cmd | tee ${WORK_HOME}/test_cinder_ceph_client.subunit

07070100EA2CFF000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/vars07070100EA2D00000081A4000003E800000064000000015B3CDC12000004DD000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-deploy/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_ceph', demo_random_uuid] | join('-') }}"

demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default
demo_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_auth_url}}"

# os_auth_url
os_auth_url: "{{ osrc_vars.os_auth_url}}"

ceph_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_ceph.deploy.tests_folder }}"
ceph_work_folder: "{{ work_folder }}/{{ hqe_ceph.deploy.test_suite }}"
070701011E2B20000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run070701011E2B26000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/tasks070701011E2B27000081A4000003E800000064000000015B3CDC1200000288000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-ceph | test-resources | Delete test user
  ignore_errors: true
  keystone_v3:

    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-ceph | test-resources | Delete test project
  ignore_errors: true
  keystone_v3:

    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
070701011E2B28000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
070701011E2B29000081A4000003E800000064000000015B3CDC1200000213000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-ceph | run | Run the tests
  become: yes

  become_user: "{{ hqe_user }}"
  command: "{{ ceph_work_folder }}/hqe-ceph {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-ceph | run | Show test output
  debug: var=test_output

070701011E2B2A000081A4000003E800000064000000015B3CDC120000065D000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-ceph | test-resources | Create test project
  keystone_v3:

    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"


- name: hqe-ceph | test-resources | Create test user
  keystone_v3:

    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"


- name: hqe-ceph | test-resources | Grant member role to Test User on Test Project
  keystone_v3:

    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"


- name: hqe-ceph | test-resources | Deploy the configuration file
  template:
    src: testrc.j2
    dest: "{{ ceph_work_folder }}/hqe-ceph.testrc"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0600

- name: hqe-ceph | test-resources | Deploy the v2 configuration file
  template:
    src: testrc.j2
    dest: "{{ ceph_work_folder }}/hqe-ceph-v2.testrc"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0600
070701011E2B23000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/templates070701011E2B24000081A4000003E800000064000000015B3CDC12000001C6000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/templates/testrc.j2# FIXME(andreaf) hardcoded AUTH URL - HQA-910
export OS_BASE_AUTH_URL="https://myhelion.test:5000/v3"
export OS_AUTH_URL={{ keystone_admin_endpoint }}
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_PROJECT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}
export OS_ENDPOINT_TYPE=internalURL
070701011E2B25000081A4000003E800000064000000015B3CDC1200000106000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/templates/testrc_v2.j2# FIXME(andreaf) hardcoded AUTH URL - HQA-910
export OS_AUTH_URL="https://myhelion.test:5000/v2.0"
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
070701011E2B21000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/vars070701011E2B22000081A4000003E800000064000000015B3CDC12000004EB000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-ceph-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_ceph', demo_random_uuid] | join('-') }}"

demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default
demo_test_role: "{{  hqe_group_vars.keystone_member_role }}"


# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"
# os_auth_url
os_auth_url: "{{ osrc_vars.os_auth_url}}"

ceph_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_ceph.deploy.tests_folder }}"
ceph_work_folder: "{{ work_folder }}/{{ hqe_ceph.deploy.test_suite }}"
07070101200F9E000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy07070101200FA3000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/files07070101200FA4000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/files/run_filters07070101200FA5000081A4000003E800000064000000015B3CDC1200000016000001030000000400000000000000000000008000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/files/run_filters/cinder-backup-restore.txtcinder-backup-restore
07070101200FA6000081A4000003E800000064000000015B3CDC1200000016000001030000000400000000000000000000007300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/files/run_filters/parallel.txtcinder-backup-restore
07070101200FA7000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/tasks07070101200FA9000081A4000003E800000064000000015B3CDC1200000026000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/tasks/configure.yml---
# Configure cinder-backup-restore
07070101200FA8000081A4000003E800000064000000015B3CDC12000002AE000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/tasks/install.yml---
- name: hqe-cinder-backup-restore | install | Create work folder {{ cinder_backup_restore_work_folder }}
  file: path={{ cinder_backup_restore_work_folder }} owner={{ hqe_user }} group={{ hqe_group }} state=directory recurse=yes

- name: hqe-cinder-backup-restore | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ cinder_backup_restore_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }} mode=0640

- name: hqe-cinder-backup-restore | install | Deploy run script
  template: >
    src=hqe-cinder-backup-restore.j2
    dest={{ cinder_backup_restore_work_folder }}/hqe-cinder-backup-restore
    owner={{ hqe_user }} group={{ hqe_group }} mode=0755
07070101200FAA000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070101200FA1000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/templates07070101200FA2000081A4000003E800000064000000015B3CDC12000003A6000001030000000400000000000000000000007B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/templates/hqe-cinder-backup-restore.j2#!/bin/bash

# Wrapper script to execute cinder-backup-restore
# within the venv, with the right parameters
#
# Usage: hqe-cinder-backup-restore run_filter_filename

set -o pipefail

IMAGE_ID=$1
KEYNAME=$2
FLAVOR=$3
AZ=$4
NVMS=$5
RUN_FILTER=${6:-parallel.txt}

TEST_HOME={{ cinder_backup_restore_code_folder }}
WORK_HOME={{ cinder_backup_restore_work_folder }}
VENV={{ common_venv_folder }}
# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/cinder-backup-restore.testrc

# Run the test
# FIXME(andreaf) Note that this is broken, cinder tests depend on cinder/common
# which is not discoverable with this command. Common own deps are missing as well
cmd="PYTHONPATH=$PTYHONPATH:${TEST_HOME}:${TEST_HOME}/../common python -u ${TEST_HOME}/test_backup_restore.py \
        $(cat ${WORK_HOME}/run_filters/${RUN_FILTER}) | tee ${WORK_HOME}/test_backup_restore.log"

echo $cmd
$cmd
07070101200F9F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/vars07070101200FA0000081A4000003E800000064000000015B3CDC12000006A2000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-deploy/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_cinder-backup-restore', demo_random_uuid] | join('-') }}"

demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default
demo_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# test resources
demo_test_router: "{{ demo_random_id }}"
demo_test_network: "{{ demo_random_id }}"
demo_test_subnet: "{{ demo_random_id }}"
demo_test_cidr: "192.168.1.0/24"
demo_test_keyname: "{{ demo_random_id }}"
demo_test_key_file: "{{ [demo_test_keyname, 'pem'] | join('.') }}"
demo_test_az: "nova"
demo_test_flavor: 2
demo_test_nvms: 1

# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"
# os_auth_url
os_auth_url: "{{ osrc_vars.os_unversioned_auth_url }}"

cinder_backup_restore_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_cinder_backup_restore.deploy.tests_folder }}"
cinder_backup_restore_work_folder: "{{ work_folder }}/{{ hqe_cinder_backup_restore.deploy.test_suite }}"
070701010827FB000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run070701010A171B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/tasks070701010A171C000081A4000003E800000064000000015B3CDC1200000C10000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-cinder-backup-restore | test-resources | Detech subnet from router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-interface-delete {{ demo_test_router }} {{ demo_test_subnet }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-backup-restore | test-resources | Delete subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron subnet-delete --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-backup-restore | test-resources | Delete network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron net-delete {{ demo_test_network }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-backup-restore | test-resources | Delete router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-delete {{ demo_test_router }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-backup-restore | test-resources | Delete keyname
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/nova keypair-delete {{ demo_test_keyname }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-backup-restore | test-resources | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-cinder-backup-restore | test-resources | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"

070701010A171D000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
070701010A171E000081A4000003E800000064000000015B3CDC1200000212000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-cinder-backup-restore | run | Run the tests
  command: "{{ cinder_backup_restore_work_folder }}/hqe-cinder-backup-restore"
  register: test_output
  ignore_errors: True

- name: hqe-cinder-backup-restore | run | Show test output
  debug: var=test_output

070701010A171F000081A4000003E800000064000000015B3CDC1200000BA6000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-cinder-backup-restore | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-cinder-backup-restore | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-cinder-backup-restore | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-cinder-backup-restore | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ cinder_backup_restore_work_folder }}/cinder-backup-restore.testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- set_fact:
    cbr_creds: "{{ cinder_backup_restore_work_folder }}/cinder-backup-restore.testrc"

# test requires the following items
- name: hqe-cinder-backup-restore | test-resources | Create router
  ignore_errors: true
  shell: ". {{ cbr_creds }}; {{ common_venv_bin }}/neutron router-create {{ demo_test_router }}"
  # not connecting router to ext-net as not needed.

- name: hqe-cinder-backup-restore | test-resources | Create network
  ignore_errors: true
  shell: ". {{ cbr_creds }}; {{ common_venv_bin }}/neutron net-create {{ demo_test_network }}"

- name: hqe-cinder-backup-restore | test-resources | Create subnet
  ignore_errors: true
  shell: ". {{ cbr_creds }}; {{ common_venv_bin }}/neutron subnet-create --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"

- name: hqe-cinder-backup-restore | test-resources | Connect subnet to router
  ignore_errors: true
  shell: ". {{ cbr_creds }}; {{ common_venv_bin }}/neutron router-interface-add {{ demo_test_router }} --subnet {{ demo_test_subnet }}"

- name: hqe-cinder-backup-restore | test-resources | Create keyname
  ignore_errors: true
  shell: ". {{ cbr_creds }}; {{ common_venv_bin }}/nova keypair-add {{ demo_test_keyname }} > {{ demo_test_key_file }}"

- name: hqe-cinder-backup-restore | test-resources | Verify image exists
  ignore_errors: true
  shell: ". {{ cbr_creds }}; {{ common_venv_bin }}/nova image-list | grep cirros | head -1 | awk '{print $2}'"
  register: demo_test_image_id

070701010A1719000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/templates070701010A171A000081A4000003E800000064000000015B3CDC1200000172000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/templates/testrc.j2export OS_BASE_AUTH_URL={{ keystone_admin_endpoint }}
export OS_AUTH_URL={{ keystone_admin_endpoint }}
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_PROJECT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}
070701010827FC000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/vars070701010827FD000081A4000003E800000064000000015B3CDC12000002C4000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-backup-restore-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

cinder_backup_restore_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_cinder_backup_restore.deploy.tests_folder }}"
cinder_backup_restore_work_folder: "{{ work_folder }}/{{ hqe_cinder_backup_restore.deploy.test_suite }}"

07070101200FE2000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy07070101200FE7000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/files07070101200FE8000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/files/run_filters07070101200FEA000081A4000003E800000064000000015B3CDC120000001E000001030000000400000000000000000000009000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/files/run_filters/cinder-multiple-attach-detach.txtcinder-multiple-attach-detach
07070101200FE9000081A4000003E800000064000000015B3CDC120000001E000001030000000400000000000000000000007B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/files/run_filters/parallel.txtcinder-multiple-attach-detach
07070101200FEB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/tasks07070101200FED000081A4000003E800000064000000015B3CDC120000002E000001030000000400000000000000000000007000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/tasks/configure.yml---
# Configure cinder-multiple-attach-detach
07070101200FEC000081A4000003E800000064000000015B3CDC12000002EE000001030000000400000000000000000000006E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/tasks/install.yml---
- name: hqe-cinder-multiple-attach-detach | install | Create work folder {{ cinder_multiple_attach_detach_work_folder }}
  file: path={{ cinder_backup_restore_work_folder }} owner={{ hqe_user }} group={{ hqe_group }} state=directory recurse=yes

- name: hqe-cinder-multiple-attach-detach | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ cinder_multiple_attach_detach_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }} mode=0640

- name: hqe-cinder-multiple-attach-detach | install | Deploy run script
  template: >
    src=hqe-cinder-multiple-attach-detach.j2
    dest={{ cinder_multiple_attach_detach_work_folder }}/hqe-cinder-multiple-attach-detach
    owner={{ hqe_user }} group={{ hqe_group }} mode=0755
07070101200FEE000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070101200FE5000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/templates07070101200FE6000081A4000003E800000064000000015B3CDC120000039C000001030000000400000000000000000000008B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/templates/hqe-cinder-multiple-attach-detach.j2#!/bin/bash

# Wrapper script to execute cinder-multiple-attach-detach
# within the venv, with the right parameters
#
# Usage: hqe-cinder-multiple-attach-detach run_filter_filename

set -o pipefail

IMAGE_ID=$1
KEYNAME=$2
FLAVOR=$3
AZ=$4
NVMS=$5
RUN_FILTER=${6:-parallel.txt}

TEST_HOME={{ cinder_multiple_attach_detach_code_folder }}
WORK_HOME={{ cinder_multiple_attach_detach_work_folder }}
VENV={{ common_venv_folder }}
# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/cinder-multiple-attach-detach.testrc

# Run the test
# FIXME(andreaf) Note that this is broken, cinder tests depend on dependencies
# that are either not specified, not used or not discoverable (cinder/common)
cmd="python -u ${TEST_HOME}/test_multiple_attach_detach \
        $(cat ${$WORK_HOME}/run_filters/${RUN_FILTER}) | tee ${$WORK_HOME}/test_multiple_attach_detach.log"

echo $cmd
$cmd
07070101200FE3000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/vars07070101200FE4000081A4000003E800000064000000015B3CDC12000002E3000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-deploy/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

cinder_multiple_attach_detach_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_cinder_multiple_attach_detach.deploy.tests_folder }}"
cinder_multiple_attach_detach_work_folder: "{{ work_folder }}/{{ hqe_cinder_multiple_attach_detach.deploy.test_suite }}"
0707010122003B000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run07070101220040000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/tasks07070101220041000081A4000003E800000064000000015B3CDC1200000C48000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-cinder-multiple-attach-detach | test-resources | Detech subnet from router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-interface-delete {{ demo_test_router }} {{ demo_test_subnet }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-multiple-attach-detach | test-resources | Delete subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron subnet-delete --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-multiple-attach-detach | test-resources | Delete network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron net-delete {{ demo_test_network }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-multiple-attach-detach | test-resources | Delete router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-delete {{ demo_test_router }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-multiple-attach-detach | test-resources | Delete keyname
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/nova keypair-delete {{ demo_test_keyname }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-multiple-attach-detach | test-resources | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-cinder-multiple-attach-detach | test-resources | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"

07070101220042000081A4000003E800000064000000015B3CDC1200000222000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- name: hqe-cinder-multiple-attach-detach-run | main | test status
  fail: msg="hqe-cinder-multiple-attach-detach-run failed. Please look at the logs for further information"
  when: not test_status
07070101220043000081A4000003E800000064000000015B3CDC1200000232000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-cinder-multiple-attach-detach | run | Run the tests
  command: "{{ cinder_multiple_attach_detach_work_folder }}/hqe-cinder-multiple-attach-detach"
  register: test_output
  ignore_errors: True

- name: hqe-cinder-multiple-attach-detach | run | Show test output
  debug: var=test_output

07070101220044000081A4000003E800000064000000015B3CDC1200000C1B000001030000000400000000000000000000007200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-cinder-multiple-attach-detach | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-cinder-multiple-attach-detach | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-cinder-multiple-attach-detach | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-cinder-multiple-attach-detach | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ cinder_multiple_attach_detach_work_folder }}/cinder-multiple-attach-detach.testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- set_fact:
    cmad_creds: "{{ cinder_multiple_attach_detach_work_folder }}/cinder-multiple-attach-detach.testrc"

# test requires the following items
- name: hqe-cinder-multiple-attach-detach | test-resources | Create router
  ignore_errors: true
  shell: ". {{ cmad_creds }}; {{ common_venv_bin }}/neutron router-create {{ demo_test_router }}"
  # not connecting router to ext-net as not needed.

- name: hqe-cinder-multiple-attach-detach | test-resources | Create network
  ignore_errors: true
  shell: ". {{ cmad_creds }}; {{ common_venv_bin }}/neutron net-create {{ demo_test_network }}"

- name: hqe-cinder-multiple-attach-detach | test-resources | Create subnet
  ignore_errors: true
  shell: ". {{ cmad_creds }}; {{ common_venv_bin }}/neutron subnet-create --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"

- name: hqe-cinder-multiple-attach-detach | test-resources | Connect subnet to router
  ignore_errors: true
  shell: ". {{ cmad_creds }}; {{ common_venv_bin }}/neutron router-interface-add {{ demo_test_router }} --subnet {{ demo_test_subnet }}"

- name: hqe-cinder-multiple-attach-detach | test-resources | Create keyname
  ignore_errors: true
  shell: ". {{ cmad_creds }}; {{ common_venv_bin }}/nova keypair-add {{ demo_test_keyname }} > {{ demo_test_key_file }}"

- name: hqe-cinder-multiple-attach-detach | test-resources | Verify image exists
  ignore_errors: true
  shell: ". {{ cmad_creds }}; {{ common_venv_bin }}/nova image-list | grep cirros | head -1 | awk '{print $2}'"
  register: demo_test_image_id0707010122003E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/templates0707010122003F000081A4000003E800000064000000015B3CDC1200000172000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/templates/testrc.j2export OS_BASE_AUTH_URL={{ keystone_admin_endpoint }}
export OS_AUTH_URL={{ keystone_admin_endpoint }}
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_PROJECT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}
0707010122003C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/vars0707010122003D000081A4000003E800000064000000015B3CDC1200000705000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-multiple-attach-detach-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

cinder_multiple_attach_detach_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_cinder_multiple_attach_detach.deploy.tests_folder }}"
cinder_multiple_attach_detach_work_folder: "{{ work_folder }}/{{ hqe_cinder_multiple_attach_detach.deploy.test_suite }}"

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['cinder-attach-detach', demo_random_uuid] | join('-') }}"

demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default
demo_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# test resources
demo_test_router: "{{ demo_random_id }}"
demo_test_network: "{{ demo_random_id }}"
demo_test_subnet: "{{ demo_random_id }}"
demo_test_cidr: "192.168.1.0/24"
demo_test_keyname: "{{ demo_random_id }}"
demo_test_key_file: "{{ cinder_multiple_attach_detach_work_folder }}/{{ [demo_test_keyname, 'pem'] | join('.') }}"
demo_test_az: "nova"
demo_test_flavor: 2
demo_test_nvms: 1
NUM_ITERATIONS: 10
NUM_VOLUMES: 10

# os_auth_url
os_auth_url: "{{ osrc_vars.os_auth_url }}"

# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"
07070101123CD2000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy07070101142519000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/files070701011622DB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/files/run_filters070701011622DC000081A4000003E800000064000000015B3CDC1200000016000001030000000400000000000000000000008000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/files/run_filters/cinder-snapshot-stack.txtcinder-snapshot-stack
070701011622DD000081A4000003E800000064000000015B3CDC1200000016000001030000000400000000000000000000007300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/files/run_filters/parallel.txtcinder-snapshot-stack
070701011622DE000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/tasks070701011622E0000081A4000003E800000064000000015B3CDC1200000026000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/tasks/configure.yml---
# Configure cinder-snapshot-stack
070701011622DF000081A4000003E800000064000000015B3CDC12000002AE000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/tasks/install.yml---
- name: hqe-cinder-snapshot-stack | install | Create work folder {{ cinder_snapshot_stack_work_folder }}
  file: path={{ cinder_backup_restore_work_folder }} owner={{ hqe_user }} group={{ hqe_group }} state=directory recurse=yes

- name: hqe-cinder-snapshot-stack | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ cinder_snapshot_stack_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }} mode=0640

- name: hqe-cinder-snapshot-stack | install | Deploy run script
  template: >
    src=hqe-cinder-snapshot-stack.j2
    dest={{ cinder_snapshot_stack_work_folder }}/hqe-cinder-snapshot-stack
    owner={{ hqe_user }} group={{ hqe_group }} mode=0755
070701011622E1000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070101142517000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/templates07070101142518000081A4000003E800000064000000015B3CDC1200000368000001030000000400000000000000000000007B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/templates/hqe-cinder-snapshot-stack.j2#!/bin/bash

# Wrapper script to execute cinder-snapshot-stack
# within the venv, with the right parameters
#
# Usage: hqe-cinder-snapshot-stack run_filter_filename

set -o pipefail

IMAGE_ID=$1
KEYNAME=$2
FLAVOR=$3
AZ=$4
NVMS=$5
RUN_FILTER=${6:-parallel.txt}

TEST_HOME={{ cinder_snapshot_stack_code_folder }}
WORK_HOME={{ cinder_snapshot_stack_work_folder }}
VENV={{ common_venv_folder }}
# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/cinder-snapshot-stack.testrc

# Run the test
# FIXME(andreaf) Note that this is broken, cinder tests depend on dependencies
# that are either not specified, not used or not discoverable (cinder/common)
cmd="python -u ${TEST_HOME}/test_snapshot_stack.py \
         $(cat ${TEST_HOME}/run_filters/${RUN_FILTER}) | tee ${TEST_HOME}/test_snapshot_stack.log"

echo $cmd
$cmd


07070101123CD3000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/vars07070101123CD4000081A4000003E800000064000000015B3CDC12000002C3000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-deploy/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

cinder_snapshot_stack_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_cinder_snapshot_stack.deploy.tests_folder }}"
cinder_snapshot_stack_work_folder: "{{ work_folder }}/{{ hqe_cinder_snapshot_stack.deploy.test_suite }}"
07070100F21822000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run07070100F411B2000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/tasks07070100F411B3000081A4000003E800000064000000015B3CDC1200000C10000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-cinder-snapshot-stack | test-resources | Detech subnet from router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-interface-delete {{ demo_test_router }} {{ demo_test_subnet }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-snapshot-stack | test-resources | Delete subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron subnet-delete --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-snapshot-stack | test-resources | Delete network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron net-delete {{ demo_test_network }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-snapshot-stack | test-resources | Delete router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-delete {{ demo_test_router }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-snapshot-stack | test-resources | Delete keyname
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/nova keypair-delete {{ demo_test_keyname }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-cinder-snapshot-stack | test-resources | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-cinder-snapshot-stack | test-resources | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"

07070100F411B4000081A4000003E800000064000000015B3CDC120000015C000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"

07070100F411B5000081A4000003E800000064000000015B3CDC120000023E000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- set_fact:
      test_status: true

- name: hqe-cinder-snapshot-stack | run | Run the tests
  command: "{{ cinder_snapshot_stack_work_folder }}/hqe-cinder-snapshot-stack-detach"
  register: test_output
  ignore_errors: True

- name: hqe-cinder-snapshot-stack | run | Show test output
  debug: var=test_output

07070100F411B6000081A4000003E800000064000000015B3CDC1200000DC6000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-cinder-snapshot-stack | test-resources | Create test project
  keystone_v3:
    action: "create_project"
    description: "Ephemeral test account"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    login_token: "{{ keystone_admin_token }}"
    project_domain_name: "{{ demo_test_domain }}"
    project_name: "{{ demo_test_project }}"

- name: hqe-cinder-snapshot-stack | test-resources | Create test user
  keystone_v3:
    action: "create_user"
    description: "Ephemeral test account"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    login_token: "{{ keystone_admin_token }}"
    user_domain_name: "{{ demo_test_domain }}"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"

- name: hqe-cinder-snapshot-stack | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    action: "grant_project_role"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    login_token: "{{ keystone_admin_token }}"
    project_domain_name: "{{ demo_test_domain }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    user_name: "{{ demo_test_user }}"

- name: hqe-cinder-snapshot-stack | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ cinder_snapshot_stack_work_folder }}/cinder-snapshot-stack.testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- set_fact:
    css_creds: "{{ cinder_snapshot_stack_work_folder }}/cinder-snapshot-stack.testrc"

# FIXME - Starting off with default rather than enhanced quotas
# Grant enhanced snapshot quota to the user
#- name: hqe-cinder-snapshot-stack | test-resources | Grant enhanced snapshot quota to Test User
#  shell: cinder quota-update --snapshots=20  {{ demo_test_domain }}

# FIXME - Starting off with default rather than enhanced quotas
# Grant enhanced volume quota to the user
#- name: hqe-cinder-snapshot-stack | test-resources | Grant enhanced volume quota to Test User
#  shell: cinder quota-update --volumes=20  {{ demo_test_domain }}

# test requires the following items
- name: hqe-cinder-snapshot-stack | test-resources | Create router
  ignore_errors: true
  shell: ". {{ css_creds }}; {{ common_venv_bin }}/neutron router-create {{ demo_test_router }}"
  # not connecting router to ext-net as not needed.

- name: hqe-cinder-snapshot-stack | test-resources | Create network
  ignore_errors: true
  shell: ". {{ css_creds }}; {{ common_venv_bin }}/neutron net-create {{ demo_test_network }}"

- name: hqe-cinder-snapshot-stack | test-resources | Create subnet
  ignore_errors: true
  shell: ". {{ css_creds }}; {{ common_venv_bin }}/neutron subnet-create --name {{ demo_test_subnet }} {{ demo_test_network }} {{ demo_test_cidr }}"

- name: hqe-cinder-snapshot-stack | test-resources | Connect subnet to router
  ignore_errors: true
  shell: ". {{ css_creds }}; {{ common_venv_bin }}/neutron router-interface-add {{ demo_test_router }} --subnet {{ demo_test_subnet }}"

- name: hqe-cinder-snapshot-stack | test-resources | Create keyname
  ignore_errors: true
  shell: ". {{ css_creds }}; {{ common_venv_bin }}/nova keypair-add {{ demo_test_keyname }} > {{ demo_test_key_file }}"

- name: hqe-cinder-snapshot-stack | test-resources | Verify image exists
  ignore_errors: true
  shell: ". {{ css_creds }}; {{ common_venv_bin }}/nova image-list | grep cirros | head -1 | awk '{print $2}'"
  register: demo_test_image_id

07070100F411B0000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/templates07070100F411B1000081A4000003E800000064000000015B3CDC1200000171000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/templates/testrc.j2export OS_BASE_AUTH_URL={{ keystone_admin_endpoint }}
export OS_AUTH_URL={{ keystone_admin_endpoint }}
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_PROJECT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}07070100F21823000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/vars07070100F21824000081A4000003E800000064000000015B3CDC12000006C0000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-cinder-snapshot-stack-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

cinder_snapshot_stack_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_cinder_snapshot_stack.deploy.tests_folder }}"
cinder_snapshot_stack_work_folder: "{{ work_folder }}/{{ hqe_cinder_snapshot_stack.deploy.test_suite }}"

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_cinder-snapshot-stack', demo_random_uuid] | join('-') }}"

demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default
demo_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# test resources
demo_test_router: "{{ demo_random_id }}"
demo_test_network: "{{ demo_random_id }}"
demo_test_subnet: "{{ demo_random_id }}"
demo_test_cidr: "192.168.1.0/24"
demo_test_keyname: "{{ demo_random_id }}"
demo_test_key_file: "{{ cinder_snapshot_stack_work_folder }}/{{ [demo_test_keyname, 'pem'] | join('.') }}"
demo_test_az: "nova"
demo_test_flavor: 2
demo_test_nvms: 4


# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"

# os_auth_url
os_auth_url: "{{ osrc_vars.os_auth_url }}"
07070101200F5D000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000003E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common07070101200EBE000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy07070101200EBF000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/defaults07070101200EC0000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/defaults/main.yml---
07070101200EC6000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/tasks07070101200EC7000081A4000003E800000064000000015B3CDC1200000FE9000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/tasks/main.yml---
# Deployment prerequists for any test in ardana-qa-tests
# It must be executed with sudo

# NOTE(andreaf) Variable that depends on other ones cannot be defined in
# vars/main.yml as they would not pick the correct value for the variables they
# depend on in case they are overwritten via extra-vars
- set_fact:
    code_folder: "{{ cache_folder | default(code_folder) }}"
    common_venv_folder: "{{ common_venv_root }}/{{ hqe_common.deploy.venv_folder }}"
    testhelper_code_folder: "{{ cache_folder | default(work_folder) }}/{{ tests_git_repo }}/tools/testhelper/"

- include: ../../hqe-common/tasks/read-osrc.yml
- include: ../../hqe-common/tasks/read-ardana-group-vars.yml

- name: hqe-common-deploy | install | set os-specific variables
  include_vars: "{{ item }}"
  with_first_found:
  - "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}-{{ ansible_distribution_release }}.yml"
  - "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

# Install common test dependencies
- name: hqe-common-deploy | install | Install binary dependencies for common venv
  become: yes
  become_user: root
  package: name={{ item }} state=present
  with_items: hqe_common_venv_packages
  when: build_venvs | bool

- name: hqe-common-deploy | install | Update package cache
  install_package:
    cache: update
  when: not (build_venvs | bool)

- name: hqe-common-deploy | install | Install the prebuilt env
  become: yes
  become_user: root
  install_package:
    name: ardana_qa_tests_example
    service: ardana_qa_tests_example
    state: present
  when: not (build_venvs | bool)

- name: hqe-common-deploy | install | Upgrade pip
  pip:
    name: pip
    extra_args: --upgrade
    virtualenv: "{{ common_venv_folder }}"
  when: build_venvs | bool

# Build_venvs is false in CI, this step is only executed outside of CI
# In CI venvs are built from a stable pypi mirror, while outside they are
# not, so we need to use a pinner requirements file instead.
# Note that pinned requirements include extra packages as well which are not
# OSRB approved and which cannot be used in CI because of that
- name: hqe-common-deploy | install | Install requirements
  pip:
    requirements: "{{ work_folder }}/{{ tests_git_repo }}/{{ common_deploy_requirements_path }}/pinned-requirements.txt"
    virtualenv: "{{ common_venv_folder }}"
    extra_args: "--upgrade"
  when: build_venvs | bool

- name: hqe-common-deploy | configure | Set ACLs of {{ common_venv_folder }} folder
  file:
    path: "{{ common_venv_folder }}"
    mode: 0755
    recurse: no
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
  when: build_venvs | bool

# Define common venv variables
- set_fact:
    common_venv_folder: "{{ common_venv_root }}/{{ hqe_common.deploy.venv_folder }}"
    common_venv_bin: "{{ common_venv_root }}/{{ hqe_common.deploy.venv_folder }}/bin"
  when: build_venvs | bool

- set_fact:
    common_venv_folder: "{{ hqe_template.deploy.service_name | bin_dir | dirname }}"
    common_venv_bin: "{{ hqe_template.deploy.service_name | bin_dir }}"
  when: not (build_venvs | bool)

- set_fact:
    common_venv_python: "{{ common_venv_bin }}/python"
    test_results_output: "{{ work_folder }}/{{ hqe_common.run.test_results_output }}"

- name: hqe-common-deploy | main | Ensure {{ work_folder }}/bin
  file:
    path: "{{ work_folder}}/bin"
    state: directory
    mode: 0755
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

- name: hqe-common-deploy | main | Deploy last2subunit
  template:
    src: ../../hqe-common/templates/last2subunit.j2
    dest: "{{ work_folder}}/bin/last2subunit.sh"
    mode: 0750
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

- name: hqe-common-deploy | token vars | Get cloud admin token
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.keystone_osrc_path }}"
    "{{ common_venv_bin }}/openstack" token issue | grep "| id" | awk '{print $4}'
  register: domain_scoped_token
  ignore_errors: true

- include: ../../hqe-common/tasks/read-ardana-admin-token.yml
07070101200EC1000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/vars07070101200EC3000081A4000003E800000064000000015B3CDC1200000043000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/vars/debian-trusty.yml---
hqe_common_venv_packages:
  - python-virtualenv
  - python-dev
07070101200EC2000081A4000003E800000064000000015B3CDC120000003C000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/vars/debian.yml---
hqe_common_venv_packages:
  - virtualenv
  - python-dev
07070101200EC5000081A4000003E800000064000000015B3CDC1200000728000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/vars/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

---
hqe_user: "{{ hqe_common.deploy.hqe_user }}"
hqe_group: "{{ hqe_common.deploy.hqe_group }}"

code_folder: "{{ hqe_common.deploy.code_folder }}"
work_folder: "{{ hqe_common.deploy.work_folder }}"
ardana_user: "{{ hqe_common.deploy.ardana_user }}"

test_driver_login: "{{ hqe_common.deploy.test_driver_login }}"

default_test_region: "{{ hqe_common.deploy.default_test_region }}"

tests_git_repo: "{{ hqe_common.deploy.tests_git_repo }}"
# Note that inventory location cannot and shall not be overwritten via
# extra vars as it depends on work_folder
inventory_location: "{{ hqe_common.deploy.work_folder }}/{{ hqe_common.deploy.inventory_location }}"
hlm_ansible_dir: "{{ hqe_common.deploy.hlm_ansible_dir }}"

# Common venv - can be used by any role that doesn't need any
# custom requirement
common_venv_root: "{{ hqe_common.deploy.venv_folder_root }}"
common_deploy_requirements_path: ardana-qa-tests/example/

# NOTE(andreaf) Download in AE1 is available at http://downloads.suse.provo.cloud/soapui/project/soapui/soapui/4.6.4/SoapUI-4.6.4-linux-bin.tar.gz
soapui_download_url: http://10.84.144.252/downloads/SoapUI-4.6.4-linux-bin.tar.gz
soapui_install_folder: SoapUI-4.6.4
07070101200EC4000081A4000003E800000064000000015B3CDC1200000045000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-deploy/vars/suse.yml---
hqe_common_venv_packages:
  - python-virtualenv
  - python-devel
07070101200E6A000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver07070101200E71000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/tasks07070101200E73000081A4000003E800000064000000015B3CDC120000152E000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/tasks/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
# Deployment prerequists for any test in ardana-qa-tests
# It must be executed with sudo

- name: hqe-common-init-test-driver | main | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-common-init-test-driver | main | Create home directory if not present
  file:
    path: "{{ hqe_home }}"
    state: directory
    mode: 0755

# Create and configure a user used for tests
- name: hqe-common-init-test-driver | main | Add group '{{ hqe_group }}'
  group:
    name: "{{ hqe_group }}"

- name: hqe-common-init-test-driver | main | Add user '{{ hqe_user }}'
  user:
    name: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    #groups: "{{ test_driver_sudo_group }}"
    createhome: yes
    home: "{{ hqe_home }}"
    shell: /bin/bash

- name: hqe-common-init-test-driver | main | Add user '{{ hqe_user }}' to sudoers.d
  lineinfile:
    dest: /etc/sudoers.d/{{ hqe_user }}
    state: present
    create: yes
    line: '{{ hqe_user }} ALL=(ALL) NOPASSWD: ALL'

# Just in case the home directory was already existing but not owned by
# {{ hqe_user }}, we force ownership here
- name: hqe-common-init-test-driver | main | Set attributes of home directory
  file:
    path: "{{ hqe_home }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    mode: 0755

# We make the work folder globabally readable so it's easy to fetch test results and logs
- name: hqe-common-init-test-driver | main | Create work folder if not present
  file:
    path: "{{ work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    mode: 0777

- name: hqe-common-init-test-driver | main | Create venv root directory if not present
  file:
    path: "{{ common_venv_root }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    mode: 0755

- name: hqe-common-init-test-driver | main | Create SSH directory
  file:
    path: "{{ hqe_home }}/.ssh"
    mode: 0755
    state: directory
    recurse: yes
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

# Pull deployer ssh setup into {{ hqe_user }} so that we gain paswordless ssh
# cluster to the entire cluster with it
- name: hqe-common-init-test-driver | main | Pull deployer ssh configs in
  copy: src={{ test_driver_pull_folder }}/{{ item }} dest={{ hqe_home }}/.ssh/
  with_items:
    - id_rsa
    - known_hosts

- name: hqe-common-init-test-driver | main | Change group permissions of id_rsa
  file:
    path: "{{ hqe_home }}/.ssh/id_rsa"
    mode: 0400
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

- name: hqe-common-init-test-driver | main | Change group permissions of known_hosts
  file:
    path: "{{ hqe_home }}/.ssh/known_hosts"
    mode: 0600
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

- name: hqe-common-init-test-driver | main | Create a subfolder to hold HOS ca-certificates
  file:
    path: "{{ testdriver_cert_path }}"
    state: directory

- name: hqe-common-init-test-driver | main | Copy ca-certificates
  copy: src={{ item }} dest={{ testdriver_cert_path }}/{{ item | basename }}
  register: copy_certificates
  with_fileglob:
    - "{{ test_driver_pull_folder }}/*.crt"

- name: hqe-common-init-test-driver | main | Update ca-certificates
  shell: update-ca-certificates --fresh
  become: yes
  when: copy_certificates.changed

- name: hqe-common-init-test-driver | main | Pull deployer data
  copy: src={{ item }} dest={{ work_folder }}/
  with_fileglob:
    - "{{ test_driver_pull_folder }}/*"
  ignore_errors: true

- name: hqe-common-init-test-driver | main | Copy verb_hosts into test inventory
  fetch:
    src: "{{ work_folder }}/verb_hosts_{{ groups['hqa_deployer'][0] }}"
    dest: "{{ code_folder }}/ardana-qa-ansible/hosts/verb_hosts_{{ groups['hqa_deployer'][0] }}"
    flat: yes

- name: hqe-common-init-test-driver | main | Make a copy of test repository in the work folder
  synchronize:
    src: "{{ code_folder }}/{{ tests_git_repo }}"
    dest: "{{ work_folder }}/"
    rsync_path: "sudo rsync"

- name: hqe-common-init-test-driver | main | Ensure ownership to {{ hqe_user }} for pulled data
  file:
    path: "{{ work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    recurse: yes

- name: hqe-common-init-test-driver | main | Clean-up pull folder
  file:
    path: "{{ test_driver_pull_folder }}"
    state: absent

- include: ../../hqe-common/tasks/read-ardana-group-vars.yml

- name: hqe-common-init-test-driver | main | Include VIP ips in no_proxy
  set_fact:
      init_extra_exclude_proxy: "{{ init_extra_exclude_proxy }},{{ hqe_group_vars.keystone_private_vip_host }},{{ hqe_group_vars.keystone_admin_vip_host }}"

- include: proxy-setup.yml
  when: init_setup_proxy

07070101200E72000081A4000003E800000064000000015B3CDC12000004DE000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/tasks/proxy-setup.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Override / extend proxy settings from the deployer to fit the test driver
---

- debug: msg={{ groups['hqa_deployer'][0] }}
- name: hqe-common-init-test-driver | proxy-setup | Get original no_proxy
  shell: |
    . {{ work_folder }}/environment_{{ groups['hqa_deployer'][0] }}
    echo $no_proxy
  register: _init_no_proxy

- set_fact:
    init_no_proxy: "{{ _init_no_proxy.stdout_lines }}"

- name: hqe-common-init-test-driver | proxy-setup | Fix /etc/environment if needed
  template:
    src: environment.j2
    dest: "{{ work_folder }}/environment_{{ groups['hqa_deployer'][0] }}"
    force: yes
07070101200E6F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/templates07070101200E70000081A4000003E800000064000000015B3CDC12000000B1000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/templates/environment.j2no_proxy={{ init_no_proxy }},{{ init_extra_exclude_proxy }}
NO_PROXY={{ init_no_proxy }},{{ init_extra_exclude_proxy }}
http_proxy={{ init_proxy }}
https_proxy={{ init_proxy }}
07070101200E6B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/vars07070101200E6C000081A4000003E800000064000000015B3CDC1200000042000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/vars/debian.yml---
testdriver_cert_path: "/usr/local/share/ca-certificates/hos/"
07070101200E6E000081A4000003E800000064000000015B3CDC12000005A0000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/vars/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
hqe_user: "{{ hqe_common.deploy.hqe_user }}"
hqe_group: "{{ hqe_common.deploy.hqe_group }}"

hqe_home: "{{ hqe_common.deploy.work_folder }}"
work_folder: "{{ hqe_common.deploy.work_folder }}"
code_folder: "{{ hqe_common.deploy.code_folder }}"
tests_git_repo: "{{ hqe_common.deploy.tests_git_repo }}"
common_venv_root: "{{ hqe_common.deploy.venv_folder_root }}"

test_driver_login: "{{ hqe_common.deploy.test_driver_login }}"
test_driver_sudo_group: sudo
# We only have one host in the 'deployer' group, so it's safe to pick [0]
test_driver_pull_folder: "{{ hostvars[groups['hqa_deployer'][0]]['pull_folder'] }}"

default_test_region: "{{ hqe_common.deploy.default_test_region }}"

init_setup_proxy: no
init_proxy: http://proxy.houston.hpecorp.net:8080
init_extra_exclude_proxy: myhelion.test
07070101200E6D000081A4000003E800000064000000015B3CDC120000003A000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-init-test-driver/vars/suse.yml---
testdriver_cert_path: "/usr/share/pki/trust/anchors/"
07070101200E56000041ED000003E800000064000000045B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-pull-from-deployer07070101200E5B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-pull-from-deployer/tasks07070101200E5C000081A4000003E800000064000000015B3CDC12000012F1000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-pull-from-deployer/tasks/main.yml
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

---
# Deployment prerequists for any test in ardana-qa-tests

- set_fact:
    code_folder: "{{ cache_folder | default(code_folder) }}"

# Create a temporary folder to put things to be fetched outside of ansible
# The syntax for mktemp is different on linux and macosx
- name: hqe-common-pull-from-deployer | main | Create pull folder
  shell: mktemp -d 2>/dev/null || mktemp -d -t tmp
  register: mktemp
  delegate_to: localhost

# Define "pull_folder"
- set_fact: pull_folder={{ mktemp.stdout }}

- name: hqe-common-pull-from-deployer | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-common-pull-from-deployer | main | Discover HLM modules
  shell: ls -1 {{ ardana_ansible_root }}/library/
  register: hlm_modules

- name: hqe-common-pull-from-deployer | main | Pull in modules from HLM
  fetch: >
    src="{{ ardana_ansible_root }}/library/{{ item }}"
    dest="{{ code_folder }}/ardana-qa-ansible/library/{{ item }}"
    flat=yes
  with_items: "{{ hlm_modules.stdout_lines }}"

- name: hqe-common-pull-from-deployer | main | Pull in filters from HLM
  fetch: >
    src="{{ ardana_ansible_root }}/filter_plugins/{{ item }}"
    dest="{{ code_folder }}/ardana-qa-ansible/filter_plugins/{{ item }}"
    flat=yes
  with_items:
    - "packager_filters.py"
    - "item.py"

- name: hqe-common-pull-from-deployer | main | Pull in action_plugins from HLM
  fetch: >
    src="{{ ardana_ansible_root }}/action_plugins/{{ item }}"
    dest="{{ code_folder }}/ardana-qa-ansible/action_plugins/{{ item }}"
    flat=yes
  with_items:
    - "package.py"

- name: hqe-common-pull-from-deployer | main | Get group_vars file names
  shell: ls {{ ardana_ansible_root  | default('~/scratch/ansible/next/ardana/ansible') }}/group_vars/
  register: hqe_common_pull_from_deployer_group_vars_path

# We need to fail on missing, as otherwise the node will not be setup as a
# functional test_driver. Note that this may fail if the cloud model does not
# match the one defined on the target deployer
- name: hqe-common-pull-from-deployer | main | Copy group_vars file
  fetch: >
    src={{ ardana_ansible_root  | default('~/scratch/ansible/next/ardana/ansible') }}/group_vars/{{ item }}
    dest="{{ pull_folder }}/group_vars_{{ item }}_{{ inventory_hostname }}"
    flat=yes
    fail_on_missing=yes
  with_items: hqe_common_pull_from_deployer_group_vars_path.stdout_lines

- name: hqe-common-pull-from-deployer | main | Copy verb_hosts file
  fetch: >
    src={{ ardana_ansible_root  | default('~/scratch/ansible/next/ardana/ansible') }}/hosts/verb_hosts
    dest="{{ pull_folder }}/verb_hosts_{{ inventory_hostname }}"
    flat=yes
    fail_on_missing=yes

- name: hqe-common-pull-from-deployer | main | Copy keystone.osrc file
  fetch: >
    src={{ ardana_home_folder }}/keystone.osrc
    dest="{{ pull_folder }}/keystone_{{ inventory_hostname }}.osrc"
    flat=yes
    fail_on_missing=yes

- name: hqe-common-pull-from-deployer | main | Copy service.osrc file
  fetch: >
    src={{ ardana_home_folder }}/service.osrc
    dest="{{ pull_folder }}/service_{{ inventory_hostname }}.osrc"
    flat=yes
    fail_on_missing=yes

- name: hqe-common-pull-from-deployer | main | Get certificate list
  shell: ls {{ certs_location }}
  register: cert_files

- name: hqe-common-pull-from-deployer | main | Copy ca-certificates file
  fetch: >
    src="{{ item }}"
    dest="{{ pull_folder }}/{{ inventory_hostname }}_{{ item | basename }}"
    flat=yes
    fail_on_missing=yes
  with_items: cert_files.stdout_lines

- name: hqe-common-pull-from-deployer | main | Copy SSH key file
  fetch: >
    src={{ ardana_home_folder }}/.ssh/id_rsa
    dest={{ pull_folder }}/id_rsa
    flat=yes
    fail_on_missing=yes

- name: hqe-common-pull-from-deployer | main | Copy known hosts file
  fetch: >
    src={{ ardana_home_folder }}/.ssh/known_hosts
    dest={{ pull_folder }}/known_hosts
    flat=yes
    fail_on_missing=yes

- name: hqe-common-pull-from-deployer | main | Pull /etc/environment in
  fetch:
    src: "/etc/environment"
    dest: "{{ pull_folder }}/environment_{{ inventory_hostname }}"
    flat: yes
    fail_on_missing: yes
07070101200E57000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-pull-from-deployer/vars07070101200E58000081A4000003E800000064000000015B3CDC120000003D000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-pull-from-deployer/vars/debian.yml---
certs_location: "/usr/local/share/ca-certificates/*.crt"
07070101200E5A000081A4000003E800000064000000015B3CDC12000000DB000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-pull-from-deployer/vars/main.yml---
ardana_user: "{{ hqe_common.deploy.ardana_user }}"
test_driver_login: "{{ hqe_common.deploy.test_driver_login }}"

code_folder: "{{ hqe_common.deploy.code_folder }}"
ardana_home_folder: "{{ lookup('env','HOME') }}"
07070101200E59000081A4000003E800000064000000015B3CDC1200000026000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-pull-from-deployer/vars/suse.yml---
certs_location: "{{ ca_bundle }}"
07070101200EE5000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-run07070101200EE6000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-run/defaults07070101200EE7000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-run/defaults/main.yml---
07070101200EEA000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-run/tasks07070101200EEB000081A4000003E800000064000000015B3CDC12000005EE000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-run/tasks/main.yml---
- action: setup
- set_fact:
    code_folder: "{{ cache_folder | default(code_folder) }}"

- include: ../../hqe-common/tasks/read-osrc.yml
- include: ../../hqe-common/tasks/read-ardana-group-vars.yml
- set_fact:
    test_status: true

# Define common venv variables
- set_fact:
    common_venv_folder: "{{ common_venv_root }}/{{ hqe_common.deploy.venv_folder }}"
    common_venv_bin: "{{ common_venv_root }}/{{ hqe_common.deploy.venv_folder }}/bin"
  when: build_venvs | bool

- set_fact:
    common_venv_folder: "{{ hqe_template.deploy.service_name | bin_dir | dirname }}"
    common_venv_bin: "{{ hqe_template.deploy.service_name | bin_dir }}"
  when: not (build_venvs | bool)

- set_fact:
    common_venv_python: "{{ common_venv_bin }}/python"

- set_fact:
    test_suite_results_output: "{{ work_folder }}/{{ hqe_common.run.test_suite_results_output }}"
    test_results_output: "{{ work_folder }}/{{ hqe_common.run.test_results_output }}"

- name: hqe-common-run | main | Clean-up test-suite level result file before run
  file:
    path: "{{ item }}"
    state: absent
  with_items:
    - "{{ test_suite_results_output}}"
    - "{{ test_results_output}}"

- name: hqe-common-run | token vars | Get cloud admin token
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.keystone_osrc_path }}"
    "{{ common_venv_bin }}/openstack" token issue | grep "| id" | awk '{print $4}'
  register: domain_scoped_token
  ignore_errors: true

- include: ../../hqe-common/tasks/read-ardana-admin-token.yml
07070101200EE8000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-run/vars07070101200EE9000081A4000003E800000064000000015B3CDC12000006EB000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common-run/vars/main.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

---
# Common vars, shared by all roles
# NOTE: common vars are not mean to be overwritten by roles. In case that
# would happen to be necessary, a different var must be used, with a name
# scoped to the role, to avoid the specific role affecting behavior of
# other roles
hqe_user: "{{ hqe_common.deploy.hqe_user }}"
hqe_group: "{{ hqe_common.deploy.hqe_group }}"

code_folder: "{{ hqe_common.deploy.code_folder }}"
work_folder: "{{ hqe_common.deploy.work_folder }}"
ardana_user: "{{ hqe_common.deploy.ardana_user }}"

test_driver_login: "{{ hqe_common.deploy.test_driver_login }}"

default_test_region: "{{ hqe_common.deploy.default_test_region }}"

tests_git_repo: "{{ hqe_common.deploy.tests_git_repo }}"
# Note that inventory location cannot and shall not be overwritten via
# extra vars as it depends on work_folder
inventory_location: "{{ hqe_common.deploy.work_folder }}/{{ hqe_common.deploy.inventory_location }}"
hlm_ansible_dir: "{{ hqe_common.deploy.hlm_ansible_dir }}"

# Common venv - can be used by any role that doesn't need any
# custom requirement
common_venv_root: "{{ hqe_common.deploy.venv_folder_root }}"
07070101200F62000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks07070101200F69000081A4000003E800000064000000015B3CDC12000006A4000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/common-run.yml# Common run task, tracks test duration and result in subunit
---

- set_fact:
    _test_suite: "{{ caller_role_path | regex_replace('^.*/hqe-(.*)-run$', '\\\\1') }}"

# This code sets the start time of the test suite
- name: hqe-{{ test_suite_name }} | common-run | start recording test result
  test_tracker:
    name: hos-qa.{{ _test_suite }}.run
    run_filter: "{{ run_filter_file | basename | regex_replace('\\.[^.]+$', '') }}"
    output: "{{ test_suite_results_output }}"

- include: "{{ caller_role_path }}/tasks/run.yml"

# This registers failed test, unless suite is explicitly marked and non voting
- name: hqe-{{ test_suite_name }} | run | Set test status
  set_fact:
      test_status: false
  when: ( test_output.rc != 0 ) and ( {{ _test_suite | regex_replace('-', '') }}_voting | default(true) )

# This code sets the final result of the test suite and records stop time
- name: hqe-{{ test_suite_name }} | run | stop recording test result
  test_tracker:
    name: hos-qa.{{ _test_suite }}.run
    run_filter: "{{ run_filter_file | basename | regex_replace('\\.[^.]+$', '') }}"
    output: "{{ test_suite_results_output }}"
    status_rc: "{{ test_output.rc }}"

# NOTE(andreaf) We calculate here the role specific work folder based on
# {{ role_path }}. This may be not ideal, but it saves passing an extra
# role specific variable
- name: hqe-{{ test_suite_name }} | common-run | run last2subunit script
  command: "{{ work_folder }}/bin/last2subunit.sh {{ work_folder }}/{{ _test_suite }} {{ work_folder }}/{{ _test_suite }}.subunit"
  register: last2subunit_output

- name: hqe-{{ test_suite_name }} | common-run | show script output
  debug:
    var: last2subunit_output.stdout
07070101200F6A000081A4000003E800000064000000015B3CDC120000011B000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/main.yml# The common role is used as a role only to setup the environment.
# The other tasks in here are included on demand where needed.
# NOTE(andreaf) This task cannot be included directly from the play because
# tags on task includes are broken in ansible
- include: read-environment.yml07070101200F67000081A4000003E800000064000000015B3CDC1200000084000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/read-ardana-admin-token.yml---
- set_fact:
      hqe_token_vars:
        keystone_admin_token: "{{ domain_scoped_token.stdout }}"

- debug: var=hqe_token_vars
07070101200F68000081A4000003E800000064000000015B3CDC1200003090000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/read-ardana-group-vars.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
- name: hqe-common | read-ardana-group-vars | Get CP details of a region in the cluster
  shell: |
    cat {{ work_folder }}/group_vars_all_{{ groups['hqa_deployer'][0] }}
  register: group_var_all_result

- name: hqe-common | read-ardana-group-vars | Set local variable to hold group_vars/all
  set_fact:
    _ardana_group_vars_all: "{{ group_var_all_result.stdout | from_yaml }}"
  no_log: true

- name: hqe-common | read-ardana-group-vars | Get the region name list
  set_fact:
      region_names: "{{ _ardana_group_vars_all.region_topology.regions.keys() }}"

- name: hqe-common | read-ardana-group-vars | Set region to the one available in single region model
  set_fact:
      default_test_region: "{{ region_names[0] }}"
  when: (_ardana_group_vars_all.region_topology.regions.keys() | length) == 1

- name: hqe-common | read-ardana-group-vars | Fail when region not found
  fail:
    msg: "Invalid region name set for testing. Please check default_test_region"
  when: default_test_region not in region_names

- name: hqe-common | read-ardana-group-vars | Get HOS services list
  set_fact:
      _hos_services_list: "{{ _ardana_group_vars_all.region_by_cp_by_service |
                           selectattr('region', 'equalto', default_test_region ) |
                           map(attribute='service_component') |
                           unique | list }}"

- name: hqe-common | read-ardana-group-vars | Get control planes for the given region
  set_fact:
      region_control_planes:  "{{ _ardana_group_vars_all.region_by_cp_by_service |
                               selectattr('region', 'equalto', default_test_region ) |
                               map(attribute='control_plane') |
                               unique | list }}"

# Debug statement added to get to know the control planes that are chosen to get the group vars
- debug: var=region_control_planes

- name: hqe-common | read-ardana-group-vars | Read the region files of QE interest
  shell: |
    cat {{ work_folder }}/group_vars_*{{ item }}_{{ groups['hqa_deployer'][0] }}
  register: group_var_list
  with_items: "{{ region_control_planes }}"

- name: hqe-common | read-ardana-group-vars | Set local variable to hold group_vars
  set_fact:
    _ardana_group_vars: "{{ item.stdout | from_yaml }}"
  no_log: true
  with_items: "{{ group_var_list.results }}"
  register: _ardana_group_var_list_result

- name: hqe-common | read-ardana-group-vars | Build hlm group_vars list
  set_fact:
    _ardana_group_vars: "{{ _ardana_group_var_list_result.results | map(attribute='ansible_facts._ardana_group_vars') | list }}"

- name: hqe-common | read-ardana-group-vars | Set available hos services
  set_fact:
      hos_services:
          # Services available for test
          cinder_available: "{{ ( 'cinder-api' in _hos_services_list ) }}"
          neutron_available: "{{ ( 'neutron-server' in _hos_services_list ) }}"
          glance_available: "{{ ( 'glance-api' in _hos_services_list ) }}"
          swift_available: "{{ ( 'swift-proxy' in _hos_services_list ) }}"
          nova_available: "{{ ( 'nova-api' in _hos_services_list ) }}"
          heat_available: "{{ ( 'heat-api' in _hos_services_list ) }}"
          ceilometer_available: "{{ ( 'ceilometer-api' in _hos_services_list ) }}"
          horizon_available: "{{ ( 'horizon' in _hos_services_list ) }}"
          sahara_available: false
          ironic_available: "{{ ( 'ironic-api' in _hos_services_list ) }}"
          trove_available: false
          zaqar_available: false
          centralized_logging_available: "{{ ( 'logging-server' in _hos_services_list ) }}"
          barbican_available: "{{ ( 'barbican-api' in _hos_services_list ) }}"
          monasca_available: "{{ ( 'monasca-api' in _hos_services_list ) }}"

- name: hqe-common | read-ardana-group-vars | Build a dictionary to hold variables of interest to QE
  set_fact:
      hqe_group_vars_key_api:
        keystone_member_role: "{{ item.KEY_API.vars.keystone_member_role }}"
        keystone_vip_protocol: "{{ item.KEY_API.advertises.vips.admin[0].protocol }}"
        keystone_admin_password: "{{ item.KEY_API.vars.keystone_admin_pwd }}"
        keystone_admin_vip_host: "{{ item.KEY_API.advertises.vips.admin[0].ip_address }}"
        keystone_private_vip_host: "{{ item.KEY_API.advertises.vips.private[0].ip_address }}"
        keystone_endpoint: "{{ item.KEY_API.advertises.vips.admin[0].protocol }}://{{ item.KEY_API.advertises.vips.admin[0].ip_address }}"
        keystone_endpoint_port: "{{ item.KEY_API.advertises.vips.private[0].port }}"
        keystone_admin_endpoint: "{{ item.KEY_API.advertises.vips.admin[0].protocol }}://{{ item.KEY_API.advertises.vips.admin[0].ip_address }}"
        keystone_admin_endpoint_port: "{{ item.KEY_API.advertises.vips.admin[0].port }}"
        keystone_noauth_admin_token: "{{ item.KEY_API.vars.keystone_admin_token }}"
        keystone_admin_user: "{{ item.KEY_API.vars.keystone_admin_user }}"
        keystone_default_domain: "{{ item.KEY_API.vars.keystone_default_domain }}"
        keystone_admin_url: "{{ item.KEY_API.advertises.vips.admin[0].url}}"
        keystone_private_url: "{{ item.KEY_API.advertises.vips.private[0].url}}"
        keystone_public_url: "{{ item.KEY_API.advertises.vips.public[0].url}}"
  when: item.KEY_API is defined
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_barbican:
        km_url: "{{ item.KEYMGR_API.advertises.vips.admin[0].url }}"
        barbican_servers: "{{ item.FND_CLU.has_proxy.KEYMGR_API.servers }}"
  when: item.KEYMGR_API is defined and item.FND_CLU.has_proxy.KEYMGR_API is defined
  with_items: "{{ _ardana_group_vars }}"
  no_log: true


- set_fact:
      hqe_group_vars_fnd_clu:
        keystone_observer_host1: "{{ item.FND_CLU.has_proxy.KEY_API.servers[0] }}"
        keystone_observer_host2: "{{ item.FND_CLU.has_proxy.KEY_API.servers[1] | default(item.FND_CLU.has_proxy.KEY_API.servers[0]) }}"
        keystone_observer_host3: "{{ item.FND_CLU.has_proxy.KEY_API.servers[2] | default(item.FND_CLU.has_proxy.KEY_API.servers[0]) }}"
        keystone_ccn_node2: "{{ item.FND_CLU.has_proxy.KEY_API.servers[1] | default(item.FND_CLU.has_proxy.KEY_API.servers[0]) }}"
  when: (item.FND_CLU is defined) and (item.FND_CLU.has_proxy.KEY_API is defined)
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_mon_api_fnd_clu:
        monasca_cluster1: "{{ item.FND_CLU.has_proxy.MON_API.servers[0] }}"
        monasca_cluster2: "{{ item.FND_CLU.has_proxy.MON_API.servers[1] | default(item.FND_CLU.has_proxy.MON_API.servers[0]) }}"
        monasca_cluster3: "{{ item.FND_CLU.has_proxy.MON_API.servers[2] | default(item.FND_CLU.has_proxy.MON_API.servers[0]) }}"
  when: ( hos_services.monasca_available | bool ) and (item.FND_CLU is defined ) and (item.FND_CLU.has_proxy.MON_API is defined)
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_cei_cmn:
        keystone_ceilometer_user: "{{ item.CEI_CMN.consumes_KEY_API.vars.keystone_ceilometer_user }}"
        keystone_ceilometer_password: "{{ item.CEI_CMN.consumes_KEY_API.vars.keystone_ceilometer_password }}"
        ceilometer_mysql_admin_user: "{{ item.CEI_CMN.consumes_FND_MDB.vars.accounts.ceilometer.username }}"
        ceilometer_mysql_admin_password: "{{ item.CEI_CMN.consumes_FND_MDB.vars.accounts.ceilometer.password }}"
  when: item.CEI_CMN is defined
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_mon_api:
        monasca_endpoint: "{{ hqe_group_vars_key_api.keystone_vip_protocol }}://{{ item.MON_API.advertises.vips.private[0].ip_address }}"
        monasca_port: "{{ item.MON_API.advertises.vips.private[0].port }}"
        monasca_user: "{{ item.MON_API.consumes_KEY_API.vars.keystone_monasca_user }}"
        monasca_password: "{{ item.MON_API.consumes_KEY_API.vars.keystone_monasca_password }}"
  when: hos_services.monasca_available | bool and (item.MON_API is defined )
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_nov_api:
        nova_admin_url: "{{ item.NOV_API.advertises.vips.admin[0].url}}"
        nova_private_url: "{{ item.NOV_API.advertises.vips.private[0].url}}"
        nova_public_url: "{{ item.NOV_API.advertises.vips.public[0].url}}"
  when: item.NOV_API is defined
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_gla_api:
        glance_admin_url: "{{ item.GLA_API.advertises.vips.admin[0].url}}"
        glance_private_url: "{{ item.GLA_API.advertises.vips.private[0].url}}"
        glance_public_url: "{{ item.GLA_API.advertises.vips.public[0].url}}"
  when: item.GLA_API is defined
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_ops_lmtgt:
        controller_network_type: "{{ item.OPS_LMTGT.consumes_OPS_LM.members.bootp[0].network }}"
  no_log: true
  when: item.OPS_LMTGT is defined
  with_items: "{{ _ardana_group_vars }}"

- set_fact:
      hqe_group_vars_logging:
        logging_kibana_password: "{{ item.LOG_SVR.vars.logging_kibana_password }}"
        es_servers: "{{ item.FND_CLU.has_proxy.LOG_SVR.servers }}"
        es_url: "{{ item.LOG_SVR.advertises.vips.private[0].url }}"
        hlm_regions: "{{ region_names }}"
  when: item.LOG_SVR is defined and item.FND_CLU.has_proxy.LOG_SVR is  defined
  with_items: "{{ _ardana_group_vars }}"
  no_log: true

- name: hqe-common | read-ardana-group-vars | Read the cluster files of QE interest
  shell: |
    cat {{ work_folder }}/group_vars_*{{ item }}-*_{{ groups['hqa_deployer'][0] }}
  register: cluster_group_var_list
  with_items: "{{ region_control_planes }}"

- name: hqe-common | read-ardana-group-vars | Set local variable to hold group_cluster_vars
  set_fact:
      _ardana_group_cluster_vars: "{{ item.stdout | from_yaml }}"
  with_items: "{{ cluster_group_var_list.results }}"
  register: _ardana_group_cluster_var_list_result
  no_log: true

- name: hqe-common | read-ardana-group-vars | Build hlm group_cluster_vars list
  set_fact:
    _ardana_group_cluster_vars: "{{ _ardana_group_cluster_var_list_result.results | map(attribute='ansible_facts._ardana_group_cluster_vars') | list }}"
  no_log: true

- name: hqe-common | read-ardana-group-vars | Load Swift rings specs
  set_fact:
      hqe_group_vars_swift:
        rings_specs: "{{ item.config_data.SWF.control_plane_rings }}"
  when: item.config_data.SWF is defined
  with_items: "{{ _ardana_group_cluster_vars }}"
  no_log: true

- set_fact:
      hqe_group_vars_others:
        config_file: "{{ work_folder }}/group_vars_{{ groups['hqa_deployer'][0] }}"
        test_region_ext_net: "ext-net"
  when: not _ardana_group_vars_all.cp_tempest_data

- set_fact:
      hqe_group_vars_others:
        config_file: "{{ work_folder }}/group_vars_{{ groups['hqa_deployer'][0] }}"
        test_region_ext_net: "{{ (_ardana_group_vars_all.cp_tempest_data[default_test_region] | item('external_networks', default=['ext-net'])) | first }}"
  when: _ardana_group_vars_all.cp_tempest_data is defined

- set_fact:
      hqe_group_vars: "{{  hos_services | update(hqe_group_vars_mon_api_fnd_clu | default({})) | update(hqe_group_vars_key_api | default({})) | update(hqe_group_vars_barbican | default({})) | update(hqe_group_vars_logging | default({})) | update(hqe_group_vars_fnd_clu | default({})) | update(hqe_group_vars_cei_cmn | default({})) | update(hqe_group_vars_mon_api | default({})) | update(hqe_group_vars_nov_api | default({}) ) | update(hqe_group_vars_gla_api | default({}) ) | update(hqe_group_vars_ops_lmtgt | default({})) | update(hqe_group_vars_others | default({})) | update(hqe_group_vars_swift | default({})) }}"
  no_log: true

- debug: var=hqe_group_vars
07070101200F64000081A4000003E800000064000000015B3CDC1200000509000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/read-environment.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
- name: hqe-common | read-environment | Read environment into a dictionary
  shell: |
     . environment_{{ groups['hqa_deployer'][0] }}

     cat <<EOF
     {
       "no_proxy": "$no_proxy",
       "http_proxy": "$http_proxy",
       "https_proxy": "$https_proxy",
       "NO_PROXY": "$no_proxy",
       "HTTP_PROXY": "$http_proxy",
       "HTTPS_PROXY": "$https_proxy",
       "REQUESTS_CA_BUNDLE": "{{ ca_bundle }}"
     }
     EOF
  args:
    chdir: "{{ work_folder }}"
    executable: "/bin/bash"
  register: _environment

- set_fact:
    test_driver_env: "{{ _environment.stdout | replace('\n', '') | replace('EOF', '') | from_json}}"
07070101200F660000A1FF000003E800000064000000015CCC2E2D0000001B000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/read-hlm-admin-token.ymlread-ardana-admin-token.yml07070101200F650000A1FF000003E800000064000000015CCC2E2D0000001A000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/read-hlm-group-vars.ymlread-ardana-group-vars.yml07070101200F63000081A4000003E800000064000000015B3CDC120000091E000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/tasks/read-osrc.yml#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
- name: hqe-common | read-osrc | Create keystone and service _all file
  shell: sed -e 's/^#[ ]*export/export/' -e 's/unset/#unset/' {{ item }}_{{ groups['hqa_deployer'][0] }}.osrc > {{ item }}_{{ groups['hqa_deployer'][0] }}_all.osrc
  args:
    chdir: "{{ work_folder }}"
  with_items:
    - service
    - keystone

- name: hqe-common | read-osrc | Read keystone.osrc into a dictionary
  shell: |
     . keystone_{{ groups['hqa_deployer'][0] }}_all.osrc
     . service_{{ groups['hqa_deployer'][0] }}_all.osrc
     OS_SERVICE_OSRC_FILE="{{ work_folder }}/service_{{ groups['hqa_deployer'][0] }}.osrc"
     OS_KEYSTONE_OSRC_FILE="{{ work_folder }}/keystone_{{ groups['hqa_deployer'][0] }}.osrc"
     OS_UNVERSIONED_AUTH_URL=`echo $OS_AUTH_URL | egrep -o 'http[s]*:\/\/[^\/]*'`

     cat <<EOF
     { "os_username": "$OS_USERNAME",
       "os_password": "$OS_PASSWORD",
       "os_identity_api_version": "$OS_IDENTITY_API_VERSION",
       "os_user_domain_name": "$OS_USER_DOMAIN_NAME",
       "os_domain_name": "$OS_DOMAIN_NAME",
       "os_auth_url": "$OS_AUTH_URL",
       "os_interface": "$OS_INTERFACE",
       "os_ca_cert": "$OS_CACERT",
       "os_project_name": "$OS_PROJECT_NAME",
       "os_project_domain_name": "$OS_PROJECT_DOMAIN_NAME",
       "os_url": "$OS_URL",
       "os_unversioned_auth_url": "$OS_UNVERSIONED_AUTH_URL",
       "service_osrc_path": "$OS_SERVICE_OSRC_FILE",
       "keystone_osrc_path": "$OS_KEYSTONE_OSRC_FILE"
     }
     EOF
  args:
    chdir: "{{ work_folder }}"
    executable: "/bin/bash"
  register: _keystone_osrc_variables

- set_fact:
    osrc_vars: "{{ _keystone_osrc_variables.stdout | replace('\n', '') | replace('EOF', '') | from_json}}"
07070101200F60000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/templates07070101200F61000081A4000003E800000064000000015B3CDC120000046F000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/templates/last2subunit.j2#!/bin/bash
#
# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Append test results to a subunit file, in case a testr repo is found.
# Usage: [script] [work_folder] [dedicated_subunit]

WORK_FOLDER=$1
DEDICATED_SUBUNIT_OUTPUT=$2
SUBUNIT_OUTPUT={{ test_results_output }}
TESTR={{ common_venv_bin }}/testr

if [ ! -d $WORK_FOLDER ]; then
    echo Work folder not found - nothing to be done
fi

cd $WORK_FOLDER

if [ -f *.subunit ]; then
    # If subunit file(s) are found use them
    # Append results to shared file
    echo Appending results from $WORK_FOLDER to $SUBUNIT_OUTPUT
    cat *.subunit >> $SUBUNIT_OUTPUT
    # Create a test suite specific file as well
    cat *.subunit > $DEDICATED_SUBUNIT_OUTPUT
elif [ -d .testrepository ]; then
    # If testr repo is found use it
    # Append results to shared file
    echo Appending results from $WORK_FOLDER to $SUBUNIT_OUTPUT
    $TESTR last --subunit >> $SUBUNIT_OUTPUT
    # Create a test suite specific file as well
    $TESTR last --subunit > $DEDICATED_SUBUNIT_OUTPUT
else
    echo No subunit data found in $WORK_FOLDER
fi
07070101200F5E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/vars07070101200F5F000081A4000003E800000064000000015B3CDC12000000A4000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-common/vars/main.yml---
work_folder: "{{ hqe_common.deploy.work_folder }}"
hqe_user: "{{ hqe_common.deploy.hqe_user }}"
test_driver_login: "{{ hqe_common.deploy.test_driver_login }}"

07070101200FEF000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy07070101200FF7000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files07070101200FF8000081A4000003E800000064000000015B3CDC12000001BC000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/.testr.conf[DEFAULT]
test_command=
    PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
    START_AT=${TESTR_START_DIR:-.}
    ${PYTHON} -m subunit.run discover -s $START_AT -t . ${OS_TEST_PATH:-./heat_integrationtests} $LISTOPT $IDOPTION
    if [ "$START_AT" = "." ]; then for plugin in $START_AT/contrib/*; do ${PYTHON} -m subunit.run discover -s $plugin $LISTOPT $IDOPTION; done; fi
test_id_option=--load-list $IDFILE
test_list_option=--list07070101200FF9000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/run_filters07070101200FFC000081A4000003E800000064000000015B3CDC1200004008000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/run_filters/ci.txt# Known test failures on scenario tests
# - HEAT-149
# - HEAT-160
#
-heat_integrationtests\.scenario\.test_server_cfn_init\.CfnInitIntegrationTest\.test_server_cfn_init
-heat_integrationtests\.scenario\.test_autoscaling_lb\.AutoscalingLoadBalancerTest\.test_autoscaling_loadbalancer_neutron
-heat_integrationtests\.scenario\.test_ceilometer_alarm\.CeilometerAlarmTest\.test_alarm
-heat_integrationtests\.scenario\.test_volumes\.VolumeBackupRestoreIntegrationTest\.test_cinder_volume_create_backup_restore
-heat_integrationtests\.scenario\.test_server_software_config\.SoftwareConfigIntegrationTest\.test_server_software_config

# List of functional tests
#
# stack action ABANDON & ADOPT disabled
#
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_non_admin_forbidden_create_flavors
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_ok
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_fail
-heat_integrationtests\.functional\.test_resource_group\.ResourceGroupAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_abandon
#
# HEAT-159
#
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_asg_notifications
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_basic_notifications
#
# HEAT-149
#
-heat_integrationtests\.functional\.test_software_config\.ParallelDeploymentsTest\.test_deployments_metadata
#
# failing to check heat config from the hard-coded location "/etc/heat/heat.conf"
#
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cfn_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cloudwatch_on_sighup
#
# failing to use the hard-coded region "RegionOne"/"DARKHOLE"
#
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_resource_validation_fail
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_update
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_suspend_resume
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_remote_stack_alone
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create_bad_region
#
# HEAT-174
#
-heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_hidden_stack
#
# HEAT-175
#
-heat_integrationtests\.functional\.test_encryption_vol_type\.EncryptionVolTypeTest\.test_create_update
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_nested_pass
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_created
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_listed
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(none)
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_create
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_changes
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_transparent_ref
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_output
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create_with_timeout
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_param
+heat_integrationtests\.functional\.test_heat_autoscaling\.AutoScalingGroupUpdateWithNoChanges\.test_as_group_update_without_resource_changes
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_from_failed
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_add_remove
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_during_suspend
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_in_place
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_increase_decrease_count
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_group_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(both)
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_scaling_meta_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(no_temp_default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_nested
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_no_infinite_recursion
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_in_place_update
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_type
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_replace
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_in_place_remove_ip
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceErrorMessageTest\.test_fail
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_with_policy_update
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs_nested
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_rollback
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_rollback
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_type
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_fail
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_to_no_allocation_pools
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_nochange
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateFailedTest\.test_update_on_failed_create
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_default
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_env
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_fail_version
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_nochange
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_resource_group_zero_novalidate
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_forbidden_resource_not_listed
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools_to_empty
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_no_ip
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange_resource_needs_update
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceSuspendResumeTest\.test_suspend_resume
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_group
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_nested_attributes
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_removal_policies
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupErrorResourceTest\.test_fail
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic_required_param
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_stack_ref
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_pass
+heat_integrationtests\.functional\.test_create_update\.CreateStackTest\.test_create_rollback
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_props_update
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_stack_delete_then_delete_parent_stack
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_off
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_validation\.StackValidationTest\.test_stack_validate_provider_references_parent_resource
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on_multiple
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(no_changes)
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_wildcard
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_after_failed_update
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_parameter_groups
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(main_tmpl_change)
+heat_integrationtests\.functional\.test_swiftsignal_update\.SwiftSignalHandleUpdateTest\.test_stack_update_same_template_replace_no_url
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_new_env
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceCheckTest\.test_check
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_replacing_userdata
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_none
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_change)
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools
+heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_stack_tag
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_change)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_change_in_file_path
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_add)
+heat_integrationtests\.functional\.test_encrypted_parameter\.EncryptedParametersTest\.test_db_encryption
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(string_empty)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_remove)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(boolean_false)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_attr_change)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(number_zero)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(comma_delimited_list)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(json_empty)
07070101200FFB000081A4000003E800000064000000015B3CDC1200004008000001030000000400000000000000000000008000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/run_filters/heat-integrationtests.txt# Known test failures on scenario tests
# - HEAT-149
# - HEAT-160
#
-heat_integrationtests\.scenario\.test_server_cfn_init\.CfnInitIntegrationTest\.test_server_cfn_init
-heat_integrationtests\.scenario\.test_autoscaling_lb\.AutoscalingLoadBalancerTest\.test_autoscaling_loadbalancer_neutron
-heat_integrationtests\.scenario\.test_ceilometer_alarm\.CeilometerAlarmTest\.test_alarm
-heat_integrationtests\.scenario\.test_volumes\.VolumeBackupRestoreIntegrationTest\.test_cinder_volume_create_backup_restore
-heat_integrationtests\.scenario\.test_server_software_config\.SoftwareConfigIntegrationTest\.test_server_software_config

# List of functional tests
#
# stack action ABANDON & ADOPT disabled
#
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_non_admin_forbidden_create_flavors
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_ok
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_fail
-heat_integrationtests\.functional\.test_resource_group\.ResourceGroupAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_abandon
#
# HEAT-159
#
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_asg_notifications
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_basic_notifications
#
# HEAT-149
#
-heat_integrationtests\.functional\.test_software_config\.ParallelDeploymentsTest\.test_deployments_metadata
#
# failing to check heat config from the hard-coded location "/etc/heat/heat.conf"
#
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cfn_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cloudwatch_on_sighup
#
# failing to use the hard-coded region "RegionOne"/"DARKHOLE"
#
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_resource_validation_fail
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_update
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_suspend_resume
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_remote_stack_alone
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create_bad_region
#
# HEAT-174
#
-heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_hidden_stack
#
# HEAT-175
#
-heat_integrationtests\.functional\.test_encryption_vol_type\.EncryptionVolTypeTest\.test_create_update
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_nested_pass
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_created
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_listed
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(none)
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_create
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_changes
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_transparent_ref
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_output
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create_with_timeout
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_param
+heat_integrationtests\.functional\.test_heat_autoscaling\.AutoScalingGroupUpdateWithNoChanges\.test_as_group_update_without_resource_changes
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_from_failed
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_add_remove
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_during_suspend
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_in_place
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_increase_decrease_count
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_group_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(both)
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_scaling_meta_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(no_temp_default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_nested
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_no_infinite_recursion
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_in_place_update
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_type
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_replace
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_in_place_remove_ip
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceErrorMessageTest\.test_fail
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_with_policy_update
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs_nested
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_rollback
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_rollback
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_type
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_fail
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_to_no_allocation_pools
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_nochange
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateFailedTest\.test_update_on_failed_create
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_default
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_env
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_fail_version
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_nochange
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_resource_group_zero_novalidate
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_forbidden_resource_not_listed
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools_to_empty
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_no_ip
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange_resource_needs_update
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceSuspendResumeTest\.test_suspend_resume
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_group
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_nested_attributes
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_removal_policies
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupErrorResourceTest\.test_fail
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic_required_param
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_stack_ref
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_pass
+heat_integrationtests\.functional\.test_create_update\.CreateStackTest\.test_create_rollback
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_props_update
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_stack_delete_then_delete_parent_stack
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_off
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_validation\.StackValidationTest\.test_stack_validate_provider_references_parent_resource
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on_multiple
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(no_changes)
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_wildcard
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_after_failed_update
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_parameter_groups
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(main_tmpl_change)
+heat_integrationtests\.functional\.test_swiftsignal_update\.SwiftSignalHandleUpdateTest\.test_stack_update_same_template_replace_no_url
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_new_env
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceCheckTest\.test_check
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_replacing_userdata
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_none
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_change)
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools
+heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_stack_tag
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_change)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_change_in_file_path
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_add)
+heat_integrationtests\.functional\.test_encrypted_parameter\.EncryptedParametersTest\.test_db_encryption
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(string_empty)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_remove)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(boolean_false)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_attr_change)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(number_zero)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(comma_delimited_list)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(json_empty)
07070101200FFF000081A4000003E800000064000000015B3CDC1200004008000001030000000400000000000000000000007B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/run_filters/periodic-virtual.txt# Known test failures on scenario tests
# - HEAT-149
# - HEAT-160
#
-heat_integrationtests\.scenario\.test_server_cfn_init\.CfnInitIntegrationTest\.test_server_cfn_init
-heat_integrationtests\.scenario\.test_autoscaling_lb\.AutoscalingLoadBalancerTest\.test_autoscaling_loadbalancer_neutron
-heat_integrationtests\.scenario\.test_ceilometer_alarm\.CeilometerAlarmTest\.test_alarm
-heat_integrationtests\.scenario\.test_volumes\.VolumeBackupRestoreIntegrationTest\.test_cinder_volume_create_backup_restore
-heat_integrationtests\.scenario\.test_server_software_config\.SoftwareConfigIntegrationTest\.test_server_software_config

# List of functional tests
#
# stack action ABANDON & ADOPT disabled
#
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_non_admin_forbidden_create_flavors
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_ok
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_fail
-heat_integrationtests\.functional\.test_resource_group\.ResourceGroupAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_abandon
#
# HEAT-159
#
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_asg_notifications
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_basic_notifications
#
# HEAT-149
#
-heat_integrationtests\.functional\.test_software_config\.ParallelDeploymentsTest\.test_deployments_metadata
#
# failing to check heat config from the hard-coded location "/etc/heat/heat.conf"
#
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cfn_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cloudwatch_on_sighup
#
# failing to use the hard-coded region "RegionOne"/"DARKHOLE"
#
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_resource_validation_fail
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_update
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_suspend_resume
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_remote_stack_alone
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create_bad_region
#
# HEAT-174
#
-heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_hidden_stack
#
# HEAT-175
#
-heat_integrationtests\.functional\.test_encryption_vol_type\.EncryptionVolTypeTest\.test_create_update
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_nested_pass
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_created
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_listed
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(none)
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_create
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_changes
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_transparent_ref
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_output
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create_with_timeout
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_param
+heat_integrationtests\.functional\.test_heat_autoscaling\.AutoScalingGroupUpdateWithNoChanges\.test_as_group_update_without_resource_changes
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_from_failed
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_add_remove
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_during_suspend
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_in_place
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_increase_decrease_count
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_group_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(both)
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_scaling_meta_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(no_temp_default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_nested
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_no_infinite_recursion
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_in_place_update
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_type
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_replace
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_in_place_remove_ip
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceErrorMessageTest\.test_fail
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_with_policy_update
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs_nested
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_rollback
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_rollback
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_type
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_fail
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_to_no_allocation_pools
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_nochange
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateFailedTest\.test_update_on_failed_create
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_default
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_env
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_fail_version
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_nochange
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_resource_group_zero_novalidate
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_forbidden_resource_not_listed
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools_to_empty
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_no_ip
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange_resource_needs_update
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceSuspendResumeTest\.test_suspend_resume
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_group
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_nested_attributes
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_removal_policies
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupErrorResourceTest\.test_fail
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic_required_param
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_stack_ref
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_pass
+heat_integrationtests\.functional\.test_create_update\.CreateStackTest\.test_create_rollback
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_props_update
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_stack_delete_then_delete_parent_stack
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_off
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_validation\.StackValidationTest\.test_stack_validate_provider_references_parent_resource
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on_multiple
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(no_changes)
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_wildcard
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_after_failed_update
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_parameter_groups
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(main_tmpl_change)
+heat_integrationtests\.functional\.test_swiftsignal_update\.SwiftSignalHandleUpdateTest\.test_stack_update_same_template_replace_no_url
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_new_env
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceCheckTest\.test_check
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_replacing_userdata
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_none
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_change)
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools
+heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_stack_tag
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_change)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_change_in_file_path
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_add)
+heat_integrationtests\.functional\.test_encrypted_parameter\.EncryptedParametersTest\.test_db_encryption
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(string_empty)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_remove)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(boolean_false)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_attr_change)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(number_zero)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(comma_delimited_list)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(json_empty)
07070101200FFD000081A4000003E800000064000000015B3CDC1200004008000001030000000400000000000000000000007300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/run_filters/periodic.txt# Known test failures on scenario tests
# - HEAT-149
# - HEAT-160
#
-heat_integrationtests\.scenario\.test_server_cfn_init\.CfnInitIntegrationTest\.test_server_cfn_init
-heat_integrationtests\.scenario\.test_autoscaling_lb\.AutoscalingLoadBalancerTest\.test_autoscaling_loadbalancer_neutron
-heat_integrationtests\.scenario\.test_ceilometer_alarm\.CeilometerAlarmTest\.test_alarm
-heat_integrationtests\.scenario\.test_volumes\.VolumeBackupRestoreIntegrationTest\.test_cinder_volume_create_backup_restore
-heat_integrationtests\.scenario\.test_server_software_config\.SoftwareConfigIntegrationTest\.test_server_software_config

# List of functional tests
#
# stack action ABANDON & ADOPT disabled
#
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_non_admin_forbidden_create_flavors
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_ok
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_fail
-heat_integrationtests\.functional\.test_resource_group\.ResourceGroupAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_abandon
#
# HEAT-159
#
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_asg_notifications
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_basic_notifications
#
# HEAT-149
#
-heat_integrationtests\.functional\.test_software_config\.ParallelDeploymentsTest\.test_deployments_metadata
#
# failing to check heat config from the hard-coded location "/etc/heat/heat.conf"
#
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cfn_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cloudwatch_on_sighup
#
# failing to use the hard-coded region "RegionOne"/"DARKHOLE"
#
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_resource_validation_fail
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_update
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_suspend_resume
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_remote_stack_alone
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create_bad_region
#
# HEAT-174
#
-heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_hidden_stack
#
# HEAT-175
#
-heat_integrationtests\.functional\.test_encryption_vol_type\.EncryptionVolTypeTest\.test_create_update
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_nested_pass
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_created
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_listed
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(none)
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_create
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_changes
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_transparent_ref
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_output
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create_with_timeout
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_param
+heat_integrationtests\.functional\.test_heat_autoscaling\.AutoScalingGroupUpdateWithNoChanges\.test_as_group_update_without_resource_changes
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_from_failed
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_add_remove
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_during_suspend
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_in_place
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_increase_decrease_count
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_group_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(both)
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_scaling_meta_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(no_temp_default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_nested
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_no_infinite_recursion
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_in_place_update
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_type
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_replace
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_in_place_remove_ip
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceErrorMessageTest\.test_fail
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_with_policy_update
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs_nested
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_rollback
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_rollback
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_type
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_fail
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_to_no_allocation_pools
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_nochange
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateFailedTest\.test_update_on_failed_create
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_default
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_env
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_fail_version
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_nochange
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_resource_group_zero_novalidate
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_forbidden_resource_not_listed
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools_to_empty
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_no_ip
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange_resource_needs_update
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceSuspendResumeTest\.test_suspend_resume
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_group
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_nested_attributes
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_removal_policies
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupErrorResourceTest\.test_fail
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic_required_param
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_stack_ref
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_pass
+heat_integrationtests\.functional\.test_create_update\.CreateStackTest\.test_create_rollback
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_props_update
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_stack_delete_then_delete_parent_stack
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_off
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_validation\.StackValidationTest\.test_stack_validate_provider_references_parent_resource
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on_multiple
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(no_changes)
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_wildcard
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_after_failed_update
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_parameter_groups
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(main_tmpl_change)
+heat_integrationtests\.functional\.test_swiftsignal_update\.SwiftSignalHandleUpdateTest\.test_stack_update_same_template_replace_no_url
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_new_env
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceCheckTest\.test_check
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_replacing_userdata
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_none
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_change)
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools
+heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_stack_tag
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_change)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_change_in_file_path
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_add)
+heat_integrationtests\.functional\.test_encrypted_parameter\.EncryptedParametersTest\.test_db_encryption
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(string_empty)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_remove)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(boolean_false)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_attr_change)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(number_zero)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(comma_delimited_list)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(json_empty)
07070101200FFE000081A4000003E800000064000000015B3CDC1200004008000001030000000400000000000000000000007000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/run_filters/smoke.txt# Known test failures on scenario tests
# - HEAT-149
# - HEAT-160
#
-heat_integrationtests\.scenario\.test_server_cfn_init\.CfnInitIntegrationTest\.test_server_cfn_init
-heat_integrationtests\.scenario\.test_autoscaling_lb\.AutoscalingLoadBalancerTest\.test_autoscaling_loadbalancer_neutron
-heat_integrationtests\.scenario\.test_ceilometer_alarm\.CeilometerAlarmTest\.test_alarm
-heat_integrationtests\.scenario\.test_volumes\.VolumeBackupRestoreIntegrationTest\.test_cinder_volume_create_backup_restore
-heat_integrationtests\.scenario\.test_server_software_config\.SoftwareConfigIntegrationTest\.test_server_software_config

# List of functional tests
#
# stack action ABANDON & ADOPT disabled
#
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_non_admin_forbidden_create_flavors
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_ok
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_fail
-heat_integrationtests\.functional\.test_resource_group\.ResourceGroupAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_abandon
#
# HEAT-159
#
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_asg_notifications
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_basic_notifications
#
# HEAT-149
#
-heat_integrationtests\.functional\.test_software_config\.ParallelDeploymentsTest\.test_deployments_metadata
#
# failing to check heat config from the hard-coded location "/etc/heat/heat.conf"
#
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cfn_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cloudwatch_on_sighup
#
# failing to use the hard-coded region "RegionOne"/"DARKHOLE"
#
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_resource_validation_fail
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_update
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_suspend_resume
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_remote_stack_alone
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create_bad_region
#
# HEAT-174
#
-heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_hidden_stack
#
# HEAT-175
#
-heat_integrationtests\.functional\.test_encryption_vol_type\.EncryptionVolTypeTest\.test_create_update
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_nested_pass
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_created
+heat_integrationtests\.functional\.test_conditional_exposure\.ServiceBasedExposureTest\.test_unavailable_resources_not_listed
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(none)
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_create
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_changes
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_transparent_ref
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_output
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create_with_timeout
+heat_integrationtests\.functional\.test_template_resource\.ValidateFacadeTest\.test_missing_param
+heat_integrationtests\.functional\.test_heat_autoscaling\.AutoScalingGroupUpdateWithNoChanges\.test_as_group_update_without_resource_changes
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_from_failed
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_add_remove
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_during_suspend
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_in_place
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_increase_decrease_count
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_group_suspend_resume
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(both)
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_scaling_meta_update
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider
+heat_integrationtests\.functional\.test_default_parameters\.DefaultParametersTest\.test_defaults(no_temp_default)
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_nested
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_no_infinite_recursion
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupBasicTest\.test_basic_create_works
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_in_place_update
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_alias_type
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_replace
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_in_place_remove_ip
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceErrorMessageTest\.test_fail
+heat_integrationtests\.functional\.test_autoscaling\.AutoScalingSignalTest\.test_signal_with_policy_update
+heat_integrationtests\.functional\.test_heat_autoscaling\.HeatAutoscalingTest\.test_path_attrs_nested
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_rollback
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_rollback
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_type
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_fail
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_to_no_allocation_pools
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_nochange
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateFailedTest\.test_update_on_failed_create
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_default
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_env
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_fail_version
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_update_group_replace
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_update_nochange
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_resource_group_zero_novalidate
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_conditional_exposure\.RoleBasedExposureTest\.test_forbidden_resource_not_listed
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools_to_empty
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_no_ip
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_size_updates_work
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_nochange_resource_needs_update
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_no_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceSuspendResumeTest\.test_suspend_resume
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_provider_group
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_nested_attributes
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_update_removal_policies
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupErrorResourceTest\.test_fail
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_basic_required_param
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace
+heat_integrationtests\.functional\.test_template_resource\.NestedAttributesTest\.test_stack_ref
+heat_integrationtests\.functional\.test_preview\.StackPreviewTest\.test_basic_pass
+heat_integrationtests\.functional\.test_create_update\.CreateStackTest\.test_create_rollback
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTest\.test_props_update
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_nested_stack_delete_then_delete_parent_stack
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_off
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupBasicTest\.test_create_instance_error_causes_group_error
+heat_integrationtests\.functional\.test_validation\.StackValidationTest\.test_stack_validate_provider_references_parent_resource
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_nested_on_multiple
+heat_integrationtests\.functional\.test_instance_group\.InstanceGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_batch_size
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_huge_min_in_service
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(no_changes)
+heat_integrationtests\.functional\.test_autoscaling\.AutoscalingGroupUpdatePolicyTest\.test_instance_group_update_replace_with_adjusted_capacity
+heat_integrationtests\.functional\.test_hooks\.HooksTest\.test_hook_pre_create_wildcard
+heat_integrationtests\.functional\.test_create_update_neutron_port\.UpdatePortTest\.test_stack_update_replace_with_ip_after_failed_update
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_parameter_groups
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_replace
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(main_tmpl_change)
+heat_integrationtests\.functional\.test_swiftsignal_update\.SwiftSignalHandleUpdateTest\.test_stack_update_same_template_replace_no_url
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_new_env
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceCheckTest\.test_check
+heat_integrationtests\.functional\.test_create_update\.UpdateStackTest\.test_stack_update_with_replacing_userdata
+heat_integrationtests\.functional\.test_template_validate\.StackTemplateValidateTest\.test_template_validate_override_none
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_change)
+heat_integrationtests\.functional\.test_create_update_neutron_subnet\.UpdateSubnetTest\.test_update_allocation_pools
+heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_stack_tag
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_change)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceTest\.test_change_in_file_path
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_add)
+heat_integrationtests\.functional\.test_encrypted_parameter\.EncryptedParametersTest\.test_db_encryption
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(string_empty)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_props_remove)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(boolean_false)
+heat_integrationtests\.functional\.test_template_resource\.TemplateResourceUpdateTest\.test_template_resource_update_template_schema(provider_attr_change)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(number_zero)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(comma_delimited_list)
+heat_integrationtests\.functional\.test_resource_group\.ResourceGroupTestNullParams\.test_create_pass_zero_parameter(json_empty)
07070101200FFA000081A4000003E800000064000000015B3CDC1200001298000001030000000400000000000000000000007500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/run_filters/tests2skip.txt# Known test failures on scenario tests
#  HEAT-160
#
-heat_integrationtests\.scenario\.test_server_cfn_init\.CfnInitIntegrationTest\.test_server_cfn_init
-heat_integrationtests\.scenario\.test_autoscaling_lb\.AutoscalingLoadBalancerTest\.test_autoscaling_loadbalancer_neutron
-heat_integrationtests\.scenario\.test_ceilometer_alarm\.CeilometerAlarmTest\.test_alarm
#
#  VolumeBackupRestoreIntegrationTest skipped until failure rate can be reduced
#   ref bug #1382300
#
-heat_integrationtests\.scenario\.test_volumes\.VolumeBackupRestoreIntegrationTest\.test_cinder_volume_create_backup_restore
#
#  HEAT-149
#
-heat_integrationtests\.scenario\.test_server_software_config\.SoftwareConfigIntegrationTest\.test_server_software_config
#
# List of functional test class or class.method names to skip
#
# 1) All tests for stack action ABANDON & ADOPT fail due to
#    the fact that stack action ABANDON & ADOPT are not enabled
#    by default in HOS.
#
# heat_integrationtests.conf can also add the following setting
# to skip all those stack ABANDON and ADOPT tests
#
# 'skip_test_stack_action_list = ABANDON, ADOPT'
#
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_ok
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_adopt_fail
-heat_integrationtests\.functional\.test_resource_group\.ResourceGroupAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_adopt
-heat_integrationtests\.functional\.test_template_resource\.TemplateResourceAdoptTest\.test_abandon
#
# 2) ReloadOnSighupTest failing due to the fact that it checks the heat config
#    file from the hard-coded location "/etc/heat/heat.conf":
#
#  test_api_cloudwatch_on_sighup [9.648422s] ... FAILED
#  test_api_cfn_reload_on_sighup [7.341564s] ... FAILED
#  test_api_reload_on_sighup [3.670955s] ... FAILED
#
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cfn_reload_on_sighup
-heat_integrationtests\.functional\.test_reload_on_sighup\.ReloadOnSighupTest\.test_api_cloudwatch_on_sighup
#
# 3) NotificationTest failures (ref HEAT-159):
#
#  test_asg_notifications [10.355411s] ... FAILED
#  test_basic_notifications [3.105386s] ... FAILED
#
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_asg_notifications
-heat_integrationtests\.functional\.test_notifications\.NotificationTest\.test_basic_notifications
#
# 4) RemoteStackTest uses the hard-coded region "RegionOne"/"DARKHOLE"
#
#  test_stack_update [11.778883s] ... FAILED
#  testt_stack_suspend_resume [8.017749s] ... FAILED
#  test_stack_create [9.552089s] ... FAILED
#  test_stack_create_bad_region [6.491339s] ... FAILED
#  test_stack_resource_validation_fail [4.755732s] ... FAILED
#  test_remote_stack_alone [34.286681s] ... ok
#
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_resource_validation_fail
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_update
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_suspend_resume
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_remote_stack_alone
-heat_integrationtests\.functional\.test_remote_stack\.RemoteStackTest\.test_stack_create_bad_region
#
# 5) StackTagTest failing (ref HEAT-174)
#
# heat_integrationtests.functional.test_stack_tags.StackTagTest.test_hidden_stack [13.200199s] ... FAILED
#
-heat_integrationtests\.functional\.test_stack_tags\.StackTagTest\.test_hidden_stack
#
# 6) ParallelDeploymentsTest faling (ref HEAT-149)
#
# heat_integrationtests.functional.test_software_config.ParallelDeploymentsTest.test_deployments_metadata [130.187339s] ... FAILED
#
-heat_integrationtests\.functional\.test_software_config\.ParallelDeploymentsTest\.test_deployments_metadata
#
# 7) EncryptionVolTypeTest failing (ref HEAT-175)
#
# heat_integrationtests.functional.test_encryption_vol_type.EncryptionVolTypeTest.test_create_update [0.423449s] ... FAILED
#
-heat_integrationtests\.functional\.test_encryption_vol_type\.EncryptionVolTypeTest\.test_create_update
#
# 7) Misc
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_suspend_resume
-heat_integrationtests\.functional\.test_aws_stack.AwsStackTest\.test_nested_stack_update
-heat_integrationtests\.functional\.test_aws_stack\.AwsStackTest\.test_nested_stack_create_with_timeout
07070101201000000081A4000003E800000064000000015B3CDC120000084A000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/files/tests2skip.py#!/usr/bin/env python
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# Reads in a list of exclude regular expressions from a file and outputs a
# regex suitable to be passed into testr

import sys

"""
Whitelist is applied first. The blacklist is executed against the set of
tests returned by the whitelist.
If whitelist is empty, all available tests are fed to blacklist.
If blacklist is empty, all tests from whitelist are returned.

The syntax for white-list and black-list is as follows:
- lines starting with # or empty are ignored
- lines starting with "+" are whitelisted
- lines starting with "-" are blacklisted
- lines not matching any of the above conditions are blacklisted

The match for each line gets added a "^" in the beginning,
so the regular expression should account for that.

For example, the following scenario:

    run all the smoke tests and scenario tests,
    but exclude the api.volume tests.

is implemented as:

    +.*smoke
    +tempest\.scenario
    -tempest\.api\.volume.*
"""

whitelist = []
blacklist = []
with open(sys.argv[1]) as fp:
    for line in fp:
        line = line.strip()
        if not line or line[0] == '#':
            continue
        if line.startswith("+"):
            whitelist.append(line[1:])
        elif line.startswith("-"):
            blacklist.append(line[1:])
        else:
            blacklist.append(line)

regex = '^(?=({whitelist}))'
params = dict(whitelist="|".join(whitelist))
if blacklist:
    regex += '(?!({blacklist}))'
    params['blacklist'] = "|".join(blacklist)

print(regex.format(**params))
07070101201001000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/tasks07070101201002000081A4000003E800000064000000015B3CDC1200000D67000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/tasks/install.yml---
# Install heat integrationtests dependencies

- name: hqe-heat-integrationtests | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-heat-integrationtests | install | Create the work folder
  file:
    path: "{{ heat_integrationtests_work_folder }}"
    state: directory
    mode: 0755

# NOTE(andreaf) In future repo cloning shall be handled by the framework. For now
# we sudo to create the clone folder
- name: hqe-heat-integrationtests | install | Create the clone folder
  become: yes
  become_user: root
  file:
    path: "{{ heat_integrationtests_code_folder }}"
    state: directory
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-heat-integrationtests | install | Pull heat integration tests from the heat repo
  git:
    repo: "{{ heat_integrationtests_repo }}"
    version: "{{ heat_integrationtests_branch }}"
    dest: "{{ heat_integrationtests_code_folder }}"
    force: yes

- name: hqe-heat-integrationtests | install | Install binary dependencies for heat integrationtests venv
  become: yes
  become_user: root
  package: name={{ item }} state=present
  with_items: hqe_heat_integrationtests_pkgs
  when: build_venvs | bool

- name: hqe-heat-integrationtests | install | Upgrade pip
  pip:
    name: pip
    extra_args: --upgrade
    virtualenv: "{{ heat_integrationtests_venv_folder }}"
  when: build_venvs | bool

- name: hqe-heat-integrationtests | install | Install test-requirements
  pip:
    requirements: "{{ heat_integrationtests_code_folder }}/test-requirements.txt"
    virtualenv: "{{ heat_integrationtests_venv_folder }}"
    extra_args: '--upgrade'
  when: build_venvs | bool

- name: hqe-heat-integrationtests | install | Install requirements
  pip:
    requirements: "{{ heat_integrationtests_code_folder }}/requirements.txt"
    virtualenv: "{{ heat_integrationtests_venv_folder }}"
    extra_args: '--upgrade'
  when: build_venvs | bool

# NOTE(andreaf) Use heat .testr.conf
- name: hqe-heat-integrationtests | install | Deploy .testr.conf
  copy:
    src: .testr.conf
    dest: "{{ heat_integrationtests_work_folder }}/"
    mode: 0644

- name: hqe-heat-integrationtests | install | Initialise the .testrepository directory if it doesn't exist
  shell: "{{ heat_integrationtests_venv_folder }}/bin/testr init"
  args:
    chdir: "{{ heat_integrationtests_work_folder }}"
    creates: "{{ heat_integrationtests_work_folder }}/.testrepository"

- name: hqe-heat-integrationtests | install | Deploy run_filters
  copy:
    src: run_filters
    dest: "{{ heat_integrationtests_work_folder }}/"
    mode: 0640

- name: hqe-heat-integrationtests | install | Deploy tests2skip.py
  copy:
    src: tests2skip.py
    dest: "{{ heat_integrationtests_work_folder }}/tests2skip.py"
    mode: 0640

# NOTE(andreaf) Heat tests will look for the config file only where the code is
# so deploying it there
- name: hqe-heat-integrationtests | install | Deploy heat integration config
  template:
    src: heat_integrationtests.conf.j2
    dest: "{{ heat_integrationtests_code_folder }}/heat_integrationtests/heat_integrationtests.conf"
    mode: 0644

- name: hqe-heat-integrationtests | install | Deploy heat integration run script
  template:
    src: heat-integrationtests.sh.j2
    dest: "{{ heat_integrationtests_work_folder }}/heat-integrationtests.sh"
    mode: 0755
07070101201003000081A4000003E800000064000000015B3CDC120000001B000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/tasks/main.yml---
- include: install.yml
07070101200FF4000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/templates07070101200FF5000081A4000003E800000064000000015B3CDC1200000674000001030000000400000000000000000000007A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/templates/heat-integrationtests.sh.j2#!/usr/bin/env bash
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

set -eux
set -o pipefail

# This script runs heat integration tests against a deployed Helion OpenStack cloud
#
# Usage: [path]/heat-integrationtests.sh [run-filter]

# Environment variable may be overridden by the caller
export OS_TEST_PATH={{ heat_integrationtests_code_folder }}
export TESTR_START_DIR="heat_integrationtests"

PYTHON={{ heat_integrationtests_venv_folder }}/bin/python
TESTS_HOME={{ heat_integrationtests_code_folder }}
WORK_HOME={{ heat_integrationtests_work_folder }}
TESTS_TO_SKIP_BIN=${WORK_HOME}/tests2skip.py
RUN_FILTER=${WORK_HOME}/run_filters/${1:-{{ run_filter }}}.txt

# Activate the virtual environment
set +u
source {{ heat_integrationtests_venv_folder }}/bin/activate
set -u

source ${WORK_HOME}/heatv2.testrc

cd ${WORK_HOME}
${PYTHON} setup.py testr --slowest --testr-args="--subunit --parallel $(${PYTHON} ${TESTS_TO_SKIP_BIN} ${RUN_FILTER})" | {{ heat_integrationtests_venv_folder }}/bin/subunit-trace --no-failure-debug -f | tee {{ test_results_output }}
07070101200FF6000081A4000003E800000064000000015B3CDC12000003AD000001030000000400000000000000000000007C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/templates/heat_integrationtests.conf.j2[heat_plugin]
username = {{ osrc_vars.os_username }}
password = {{ osrc_vars.os_password }}
admin_username = {{ osrc_vars.os_username }}
admin_password = {{ osrc_vars.os_password }}
project_name = {{ osrc_vars.os_project_name }}
admin_project_name = {{ osrc_vars.os_project_name }}
auth_url = {{ osrc_vars.os_auth_url }}
auth_version = 3
user_domain_name = Default
project_domain_name = Default
region = region1
instance_type = m1.tiny
minimal_instance_type = m1.heat_micro
image_ref = fedora-heat-test-image
keypair_name = heat
minimal_image_ref = cirros-0.3.4-x86_64
ca_file = {{ ca_bundle }}
network_for_ssh = heat-net
fixed_network_name = heat-net
floating_network_name = {{ hqe_group_vars.test_region_ext_net }}
fixed_subnet_name = heat-subnet
endpoint_type = internal
convergence_engine_enabled = False
boot_config_env = heat_integrationtests/scenario/templates/boot_config_none_env.yaml
build_timeout = 3000
connectivity_timeout = 30007070101200FF0000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/vars07070101200FF1000081A4000003E800000064000000015B3CDC1200000046000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/vars/debian.yml---
hqe_heat_integrationtests_pkgs:
  - libxml2-dev
  - libxslt1-dev

07070101200FF3000081A4000003E800000064000000015B3CDC12000003AB000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/vars/main.yml---
heat_integrationtests_service_name: "{{ hqe_heat_integrationtests.deploy.service_name }}"
heat_integrationtests_venv_folder: "{{ common_venv_root }}/{{ hqe_heat_integrationtests.deploy.venv_folder }}"
heat_integrationtests_test_suite: "{{ hqe_heat_integrationtests.deploy.test_suite }}"

# NOTE(andreaf) Heat has an own repo for tests, so the path where the git
# repo is cloned is in tests_folder, and the path to the tests within the folder
# is hardcoded in the run script
heat_integrationtests_code_folder: "{{ work_folder }}/{{ hqe_heat_integrationtests.deploy.test_suite }}"
heat_integrationtests_work_folder: "{{ work_folder }}/{{ hqe_heat_integrationtests.deploy.test_suite }}"

#heat_integrationtests_repo: "http://git.suse.provo.cloud/openstack/heat.git"
#heat_integrationtests_branch: "hp/prerelease/mitaka"
heat_integrationtests_repo: "http://git.suse.provo.cloud/openstack/heat.git"
heat_integrationtests_branch: "master"
07070101200FF2000081A4000003E800000064000000015B3CDC120000003D000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-deploy/vars/suse.yml---
hqe_heat_integrationtests_pkgs:
  - libxml2
  - libxslt1
07070101200FB4000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run07070101200FB9000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/tasks07070101200FBA000081A4000003E800000064000000015B3CDC1200001528000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/tasks/cleanup.yml---
# Cleanup the account used for heat integration testing

- name: hqe-heat-integrationtests | cleanup test resources | delete any created heat stacks
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
      for sid in $({{ common_venv_bin }}/heat stack-list | grep -e CREATE -e DELETE -e MODIFY -e UPDATE | awk '{print $2'}); do heat stack-delete $sid; done

- name: hqe-heat-integrationtests | cleanup test resources | wait to ensure heat stacks gone
  ignore_errors: true
  shell: sleep "{{ heat_wait_time }}"

- name: hqe-heat-integrationtests | cleanup test resources | delete flavor m1.heat_int
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack flavor delete {{ demo_test_flavor_int }}

- name: hqe-heat-integrationtests | cleanup test resources | delete flavor m1.heat_micro
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack flavor delete {{ demo_test_flavor_micro }}

- name: hqe-heat-integrationtests | cleanup test resources | delete image
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack image delete {{ heat_test_image_id.stdout }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-integrationtests | cleanup test resources | delete heat test keypair
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack keypair delete {{ demo_test_keyname }}

- name: hqe-heat-integrationtests | cleanup test resources | delete router interface
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-interface-delete {{ heat_test_router_id.stdout }} subnet={{ demo_test_subnet }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-integrationtests | cleanup test resources | delete heat test private subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron subnet-delete {{ demo_test_subnet }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-integrationtests | cleanup test resources | delete heat test private network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack network delete {{ demo_test_network }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-integrationtests | cleanup test resources | delete router to ext-net gateway
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-gateway-clear {{ demo_test_router }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-integrationtests | cleanup test resources | delete router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-delete {{ demo_test_router }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-integrationtests | cleanup test resources | delete roles
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack role remove --project "{{ demo_test_project }}" --user "{{ demo_test_user }}" _member_
    {{ common_venv_bin }}/openstack role remove --project "{{ demo_test_project }}" --user "{{ os_admin_username }}" admin

- name: hqe-heat-integrationtests | cleanup test resources | delete test user
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack user delete {{ demo_test_user }}

- name: hqe-heat-integrationtests | cleanup test resources | delete test project
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack project delete {{ demo_test_project }}

07070101200FBB000081A4000003E800000064000000015B3CDC120000025B000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/tasks/main.yml---
- set_fact:
    heat_integrationtests_venv_bin: "{{ heat_integrationtests_venv_folder }}/bin"
    heat_integrationtests_venv_python: "{{ heat_integrationtests_venv_folder }}/bin/python"

- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ heat_integrationtests_venv_python | quote }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ heat_integrationtests_venv_python | quote }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ heat_integrationtests_venv_python | quote }}"
07070101200FBC000081A4000003E800000064000000015B3CDC12000002B4000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/tasks/run.yml---
# Run the heat integration test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We may need to store the exit code somewhere for Jenkins to pick it up

- name: hqe-heat-integrationtests | run | Run heat integration tests
  command: "{{ heat_integrationtests_work_folder }}/heat-integrationtests.sh {{ run_filter }}"
  register: test_output
  ignore_errors: True

- name: hqe-heat-integrationtests | run | Show test output
  debug: var=test_output

- name: hqe-heat-integrationtests | run | Set test status
  set_fact:
      test_status: false
  when: test_output.rc != 0
07070101200FBD000081A4000003E800000064000000015B3CDC1200002699000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/tasks/test-resources.yml---
# Setup the test account used for heat integration testing
- name: hqe-heat-integrationtests | test-resources | get os_auth_url_public
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack catalog show keystone | awk '/public/ {print $4}'
  register: os_auth_url_public_raw

- name: hqe-heat-integrationtests | test-resources | set os_auth_url
  set_fact:
    os_auth_url: "{{ os_auth_url_public_raw.stdout }}"

- name: hqe-heat-integrationtests | test-resources | check if ext-net exists
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack network list |  awk '/ {{ demo_test_ext_net }} / {print $2}'
  register: public_network_id_result

- name: hqe-heat-integrationtests | test-resources | check and fail if there is no external network
  fail: msg="No ext-net found. Please create one."
  when: public_network_id_result.stdout == ""

- name: hqe-heat-integrationtests | test-resources | create heat integration test project
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack project create "{{ demo_test_project }}"
  register: project_create_output

- name: hqe-heat-integrationtests | test-resources | create heat integration test project debug
  debug: var=project_create_output

- name: hqe-heat-integrationtests | test-resources | create heat integration test user
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack user create --password "{{ demo_test_password }}" --project "{{ demo_test_project }}" "{{ demo_test_user }}"
  register: user_create_output

- name: hqe-heat-integrationtests | test-resources | create heat integration test user debug
  debug: var=user_create_output

- name: hqe-heat-integrationtests | test-resources | show heat integration test project exists
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack project list | grep "{{ demo_test_project }}"
  register: project_list_output

- name: hqe-heat-integrationtests | test-resources | show heat integration test project exists debug
  debug: var=project_list_output

- name: hqe-heat-integrationtests | test-resources | add roles
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack role add --project "{{ demo_test_project }}" --user "{{ demo_test_user }}" Member
    {{ common_venv_bin }}/openstack role add --project "{{ demo_test_project }}" --user "{{ demo_test_user }}" _member_
    {{ common_venv_bin }}/openstack role add --project "{{ demo_test_project }}" --user "{{ os_admin_username }}" admin
  register: role_add_output

- name: hqe-heat-integrationtests | test-resources | show heat integration add role debug
  debug: var=role_add_output

- name: hqe-heat-integrationtests | test-resources | deploy heat integration test creds file
  template:
    src: testrc.j2
    dest: "{{ heat_osrc }}"
    mode: 0600

- name: hqe-heat-integrationtests | test-resources | capture heat integration test creds
  shell: cat {{ heat_osrc }}
  register: heat_test_creds_output

- name: hqe-heat-integrationtests | test-resources | show heat integration test creds - debug
  debug: var=heat_test_creds_output

# test requires the following items
- name: hqe-heat-integrationtests | test-resources | create flavor m1.heat_int
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack flavor create {{ demo_test_flavor_int }} --id 452 --ram 512 --disk 0 --vcpus 1
  register: heat_flavor_int_create

- name: hqe-heat-integrationtests | test-resources | create flavor m1.heat_int - debug
  debug: var=heat_flavor_int_create

- name: hqe-heat-integrationtests | test-resources | create flavor m1.heat_micro
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack flavor create {{ demo_test_flavor_micro }} --id 453 --ram 128 --disk 0 --vcpus 1
  register: heat_flavor_micro_create

- name: hqe-heat-integrationtests | test-resources | create flavor m1.heat_micro - debug
  debug: var=heat_flavor_micro_create

- name: hqe-heat-integrationtests | test-resources | get heat test image file name
  ignore_errors: true
  shell: basename {{ demo_test_heat_integrationtests_image_url }}
  register: image_file_name

- name: hqe-heat-integrationtests | test-resources | get heat test image file name - debug
  debug: var=image_file_name

- name: hqe-heat-integrationtests | test-resources | get image file
  shell: |
    echo "`date` : `env | grep proxy`"
    if [ -e "{{ heat_integrationtests_work_folder }}/{{ image_file_name.stdout }}" ]; then
        echo "Re-using existing heat test image file"
    else
        wget -O "{{ heat_integrationtests_work_folder }}/{{ image_file_name.stdout }}" "{{ demo_test_heat_integrationtests_image_url }}"
    fi
    # just check it is there
    ls "{{ heat_integrationtests_work_folder }}/{{ image_file_name.stdout }}"
  register: get_image_file_log

- name: hqe-heat-integrationtests | test-resources | show heat test image file get - debug
  debug: var=get_image_file_log

- name: hqe-heat-integrationtests | test-resources | get heat test image name
  ignore_errors: true
  shell: basename {{ demo_test_heat_integrationtests_image_url }} '.qcow2'
  register: heat_test_image_name

- name: hqe-heat-integrationtests | test-resources | get heat test image name - debug
  debug: var=heat_test_image_name

- name: hqe-heat-integrationtests | test-resources | upload heat test image to glance
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack image create {{ heat_test_image_name.stdout }} --container-format bare --disk-format qcow2 --public --file {{ heat_integrationtests_work_folder }}/{{ image_file_name.stdout }} | awk '/ id / {print $4}'
  register: heat_test_image_id

- name: hqe-heat-integrationtests | test-resources | check on heat_test_image_id - debug
  debug: var=heat_test_image_id

- name: hqe-heat-integrationtests | test-resources | create heat test keypair
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack keypair create {{ demo_test_keyname }}

- name: hqe-heat-integrationtests | test-resources | create heat test router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-create {{ demo_test_router }}

- name: hqe-heat-integrationtests | test-resources | connect router to ext-net
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-gateway-set {{ demo_test_router }} {{ demo_test_ext_net }}

- name: hqe-heat-integrationtests | test-resources | verify heat test router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-list | grep {{ demo_test_router }} | awk '{print $2}'
  register: heat_test_router_id

- name: hqe-heat-integrationtests | test-resources | verify heat test router - debug
  debug: var=heat_test_router_id

- name: hqe-heat-integrationtests | test-resources | create heat test private network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack network create {{ demo_test_network }}
  register: heat_private_net

- name: hqe-heat-integrationtests | test-resources | heat test private network - debug
  debug: var=heat_private_net

- name: hqe-heat-integrationtests | test-resources | create heat test private subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron subnet-create --name {{ demo_test_subnet }} --dns-nameserver {{ tsr_dns_server_ip }} {{ demo_test_network }} {{ demo_test_cidr }}
  register: heat_private_subnet

- name: hqe-heat-integrationtests | test-resources | heat test private subnet - debug
  debug: var=heat_private_subnet

- name: hqe-heat-integrationtests | test-resources | add router interface
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ demo_test_user }}"
      OS_TENANT_NAME: "{{ demo_test_project }}"
      OS_PASSWORD: "{{ demo_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-interface-add {{ heat_test_router_id.stdout }} subnet={{ demo_test_subnet }}
  register: router_inteface

- name: hqe-heat-integrationtests | test-resources | add router interface - debug
  debug: var=router_inteface
07070101200FB7000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/templates07070101200FB8000081A4000003E800000064000000015B3CDC120000016E000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/templates/testrc.j2export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ osrc_vars.os_ca_cert }}
export OS_IDENTITY_API_VERSION="2.0"
export OS_NO_CACHE=True
export OS_AUTH_URL={{ os_auth_url }}
export OS_ADMIN_NAME={{ os_admin_username }}
export OS_ADMIN_PASSWORD={{ os_admin_password }}
07070101200FB5000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/vars07070101200FB6000081A4000003E800000064000000015B3CDC12000007FE000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-integrationtests-run/vars/main.yml---
# NOTE(andreaf) Heat has an own repo for tests, so the path where the git
# repo is cloned is in tests_folder, and the path to the tests within the folder
# is hardcoded in the run script
heat_integrationtests_code_folder: "{{ work_folder }}/{{ hqe_heat_integrationtests.deploy.test_suite }}"
heat_integrationtests_work_folder: "{{ work_folder }}/{{ hqe_heat_integrationtests.deploy.test_suite }}"

heat_integrationtests_venv_folder: "{{ common_venv_root }}/{{ hqe_heat_integrationtests.deploy.venv_folder }}"

system_python: "{{ ansible_python_interpreter }}"

run_filter: smoke
run_concurrency: 0

os_auth_url: "{{ osrc_vars.os_auth_url}}"
os_endpoint_type: "internalURL"
os_interface: "{{ osrc_vars.os_interface }}"
os_admin_username:  "{{ osrc_vars.os_username }}"
os_admin_password: "{{ osrc_vars.os_password }}"

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_heat_integrationtests', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
heat_wait_time: 60
heat_osrc: "{{ heat_integrationtests_work_folder }}/heatv2.testrc"
heat_integrationtests_conf: "{{ heat_integrationtests_code_folder }}/heat_integrationtests.conf"

# test resources
demo_test_router: "{{ demo_random_id }}"
demo_test_network: "heat-net"
demo_test_subnet: "heat-subnet"
demo_test_cidr: "192.168.1.0/24"
demo_test_keyname: "heat"
demo_test_key_file: "{{ [demo_test_keyname, 'pem'] | join('.') }}"

# test suite parameters
demo_test_flavor_int: "m1.heat_int"
demo_test_flavor_micro: "m1.heat_micro"
demo_test_ext_net: "{{ hqe_group_vars.test_region_ext_net }}"
demo_test_heat_integrationtests_image_url: "http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2"
tsr_dns_server_ip: "10.1.64.20"

# General keystone settings
auth_tail: "v2.0"
service_osrc: "{{ osrc_vars.service_osrc_path }}"
keystone_osrc: "{{ osrc_vars.keystone_osrc_path }}"
07070101200EC8000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy07070101200ECD000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/files07070101200ECE000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/files/run_filters07070101200ECF000081A4000003E800000064000000015B3CDC12000003E3000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/files/run_filters/ci.txt#
# The syntax for test list below as follows:
#- lines starting with # or empty are ignored
#- lines starting with "+" are run
#- lines starting with "-" are skipped
#- lines not matching any of the above conditions are ignored
#
+t1-servers-to-existing-network-with-vol-on-server-1.yaml
+t2-create-network-router-2-servers-floating-ip.yaml
# JAH-2741
-t3-autoscaling-without-load-balancing.yaml
+t4-bootable-vol-existing-network.yaml
+t5-deploy-server-bootable-volume-new-network.yaml
+t6-deploy-server-from-volume-snapshot-new-network.yaml
+t7-deploy-server-from-volume-snapshot-existing-network.yaml
+t8-us-all-nova-resource-types.yaml
+t9-create-container.yaml
+t10-create-glance-image-from-swift-container-file.yaml
+t11-use-resource-group-create-3-servers.yaml
# JAH-2741
-t12-use-instance-group-deploy-2-servers-existing-network-add-floating-ip.yaml
+t13-demo-different-configurations-for-boot-time.yaml
+t14-create-25-servers.yaml
+t15-create-network-router-25-servers-floating-ip.yaml
07070101200ED1000081A4000003E800000064000000015B3CDC12000003E3000001030000000400000000000000000000006E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/files/run_filters/parallel.txt#
# The syntax for test list below as follows:
#- lines starting with # or empty are ignored
#- lines starting with "+" are run
#- lines starting with "-" are skipped
#- lines not matching any of the above conditions are ignored
#
+t1-servers-to-existing-network-with-vol-on-server-1.yaml
+t2-create-network-router-2-servers-floating-ip.yaml
# JAH-2741
-t3-autoscaling-without-load-balancing.yaml
+t4-bootable-vol-existing-network.yaml
+t5-deploy-server-bootable-volume-new-network.yaml
+t6-deploy-server-from-volume-snapshot-new-network.yaml
+t7-deploy-server-from-volume-snapshot-existing-network.yaml
+t8-us-all-nova-resource-types.yaml
+t9-create-container.yaml
+t10-create-glance-image-from-swift-container-file.yaml
+t11-use-resource-group-create-3-servers.yaml
# JAH-2741
-t12-use-instance-group-deploy-2-servers-existing-network-add-floating-ip.yaml
+t13-demo-different-configurations-for-boot-time.yaml
+t14-create-25-servers.yaml
+t15-create-network-router-25-servers-floating-ip.yaml
07070101200ED0000081A4000003E800000064000000015B3CDC12000003E3000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/files/run_filters/smoke.txt#
# The syntax for test list below as follows:
#- lines starting with # or empty are ignored
#- lines starting with "+" are run
#- lines starting with "-" are skipped
#- lines not matching any of the above conditions are ignored
#
+t1-servers-to-existing-network-with-vol-on-server-1.yaml
+t2-create-network-router-2-servers-floating-ip.yaml
# JAH-2741
-t3-autoscaling-without-load-balancing.yaml
+t4-bootable-vol-existing-network.yaml
+t5-deploy-server-bootable-volume-new-network.yaml
+t6-deploy-server-from-volume-snapshot-new-network.yaml
+t7-deploy-server-from-volume-snapshot-existing-network.yaml
+t8-us-all-nova-resource-types.yaml
+t9-create-container.yaml
+t10-create-glance-image-from-swift-container-file.yaml
+t11-use-resource-group-create-3-servers.yaml
# JAH-2741
-t12-use-instance-group-deploy-2-servers-existing-network-add-floating-ip.yaml
+t13-demo-different-configurations-for-boot-time.yaml
+t14-create-25-servers.yaml
+t15-create-network-router-25-servers-floating-ip.yaml
07070101200ED2000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/tasks07070101200ED3000081A4000003E800000064000000015B3CDC1200000332000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/tasks/install.yml---
# Install heat sampletests dependencies

- name: hqe-heat-sampletests | install | Create the work folder
  become: yes
  become_user: root
  file:
    path: "{{ heat_sampletests_work_folder }}"
    state: directory
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-heat-sampletests | install | Install dependent packages
  pip: name={{ item }} virtualenv={{ heat_sampletests_venv_folder }}
  with_items:
  - python-subunit

- name: hqe-heat-sampletests | install | Deploy run_filters
  copy:
    src: run_filters
    dest: "{{ heat_sampletests_work_folder }}/"
    mode: 0640

- name: hqe-heat-sampletests | install | Deploy heat sample test run script
  template:
    src: heat-sampletests.sh.j2
    dest: "{{ heat_sampletests_work_folder }}/heat-sampletests.sh"
    mode: 0755
07070101200ED4000081A4000003E800000064000000015B3CDC120000001B000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/tasks/main.yml---
- include: install.yml
07070101200ECB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/templates07070101200ECC000081A4000003E800000064000000015B3CDC1200000DEB000001030000000400000000000000000000007000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/templates/heat-sampletests.sh.j2#!/usr/bin/env bash
#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

set -eux
set -o pipefail

# This script runs heat sample template tests against a deployed Helion OpenStack cloud
#
# Usage: [path]/heat-sampletests.sh [run-filter]

# Environment variable may be overridden by the caller
TESTS_HOME={{ heat_sampletests_code_folder }}
WORK_HOME={{ heat_sampletests_work_folder }}
HEAT_VENV={{ heat_sampletests_venv_folder }}
RUN_FILTER=${WORK_HOME}/run_filters/${1:-{{ run_filter }}}.txt
HEAT_OSRC=${WORK_HOME}/heat_samples.testrc
SAMPLE_ENV_FILE="sampletests_env.yaml"
SUBUNIT_BIN=${HEAT_VENV}/bin
SUBUNIT_OUTPUT=${WORK_HOME}/subunit_output
SAMPLE_TEST="Heat Sample Template Tests: "

# ensure have the environment set up as needed (proxies, no_proxy in particular)
# if you forget, CLI commands will fail with a 404 error.
source /etc/environment

# Activate the virtual environment
set +u
source ${HEAT_VENV}/bin/activate
set -u

source ${HEAT_OSRC}

rm -f $SUBUNIT_OUTPUT
cd ${WORK_HOME}

skipped_count=0
failure_count=0
success_count=0
while read sample; do
    if [ ${sample:0:1} = "-" ]
    then
      echo "Sample test skipped !"
      skipped_count=$(expr $skipped_count + 1)
    elif [ ${sample:0:1} = "+" ]
    then
      echo "Sample test executed !"
      test=${sample:1}
      stack_name=$( echo $test | cut -d "-" -f 1 )
      status="--inprogress"
      test_id=${SAMPLE_TEST}$test
      ${SUBUNIT_BIN}/subunit-output $status $test_id >> $SUBUNIT_OUTPUT
      heat stack-create -e ${SAMPLE_ENV_FILE} -f ${TESTS_HOME}/$test $stack_name

      # wait for heat stack create completes
      LOOP=30
      while (( $LOOP >= 1 )); do
        LOOP=$(expr ${LOOP} - 1)
        stackstatus=$(heat stack-list | grep -w ${stack_name} | awk '{print $6}')
        if [[ ${stackstatus} == "CREATE_COMPLETE" ]]; then
            status="--success"
            success_count=$(expr $success_count + 1)
            ${SUBUNIT_BIN}/subunit-output $status $test_id >> $SUBUNIT_OUTPUT
            LOOP=0
        elif [[ ${stackstatus} == "CREATE_FAILED" ]]; then
            status="--fail"
            failure_count=$(expr $failure_count + 1)
            ${SUBUNIT_BIN}/subunit-output $status $test_id >> $SUBUNIT_OUTPUT
            LOOP=0
        else
            if (( ${LOOP} <= 0 )); then
                status="--fail"
                failure_count=$(expr $failure_count + 1)
                ${SUBUNIT_BIN}/subunit-output $status $test_id >> $SUBUNIT_OUTPUT
            fi
            echo "Still creating ..."
            sleep 10
        fi
      done
      heat stack-list
      heat event-list $stack_name
      heat stack-delete -y $stack_name
      sleep 20
    else
      echo "Comment line ignored !"
    fi
done < ${RUN_FILTER}

echo " ============"
echo " Run finished"
echo " ============"
echo " - Passed: $success_count"
echo " - Skipped: $skipped_count"
echo " - Failed: $failure_count"

${SUBUNIT_BIN}/subunit2pyunit $SUBUNIT_OUTPUT
exit $failure_count
07070101200EC9000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/vars07070101200ECA000081A4000003E800000064000000015B3CDC12000003BC000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-deploy/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter: smoke
# Settings from deploy

heat_sampletests_service_name: "{{ hqe_heat_sampletests.deploy.service_name }}"
heat_sampletests_venv_folder: "{{ common_venv_root }}/{{ hqe_heat_sampletests.deploy.venv_folder }}"
heat_sampletests_test_suite: "{{ hqe_heat_sampletests.deploy.test_suite }}"

heat_sampletests_code_folder: "{{ code_folder }}/{{ tests_git_repo }}/{{ hqe_heat_sampletests.deploy.tests_folder }}"
heat_sampletests_work_folder: "{{ work_folder}}/{{ hqe_heat_sampletests.deploy.test_suite }}"

07070100D43572000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run07070100D8334E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/tasks07070100D8334F000081A4000003E800000064000000015B3CDC1200001A6E000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/tasks/cleanup.yml---
# Cleanup the account used for heat integration testing

- name: hqe-heat-sampletests | cleanup test resources | delete any created heat stacks
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
      for sid in $({{ common_venv_bin }}/openstack stack list | grep -e CREATE -e DELETE -e MODIFY -e UPDATE | awk '{print $2'}); do {{ common_venv_bin }}/openstack stack delete $sid; done

- name: hqe-heat-sampletests | cleanup test resources | wait to ensure heat stacks gone
  ignore_errors: true
  shell: sleep "{{ heat_wait_time }}"

- name: hqe-heat-sampletests | cleanup test resources | delete heat sample test object from container
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack object delete {{ sample_test_container }} {{ sample_test_image_local }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete heat sample test container
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack container delete {{ sample_test_container }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete heat sample test keypair
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack keypair delete {{ sample_test_keyname }}

- name: hqe-heat-sampletests | cleanup test resources | delete volume snapshots
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack snapshot delete {{ snapshot_volume_id.stdout }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete volumes
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack volume delete {{ bootable_volume_id.stdout }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete router interface
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-interface-delete {{ sample_test_router_id.stdout }} subnet={{ sample_test_subnet }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete heat test private subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron subnet-delete {{ sample_test_subnet }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete heat test private network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack network delete {{ sample_test_network }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete router to ext-net gateway
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-gateway-clear {{ sample_test_router }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-delete {{ sample_test_router }}
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-heat-sampletests | cleanup test resources | delete roles
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack role remove --project "{{ sample_test_project }}" --user "{{ sample_test_user }}" _member_
    {{ common_venv_bin }}/openstack role remove --project "{{ sample_test_project }}" --user "{{ sample_test_user }}" admin_
    {{ common_venv_bin }}/openstack role remove --project "{{ sample_test_project }}" --user "{{ os_admin_username }}" admin

- name: hqe-heat-sampletests | cleanup test resources | delete test user
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack user delete {{ sample_test_user }}

- name: hqe-heat-sampletests | cleanup test resources | delete test project
  ignore_errors: true
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack project delete {{ sample_test_project }}

07070100D83350000081A4000003E800000064000000015B3CDC120000023A000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/tasks/main.yml---
- set_fact:
    heat_sampletests_venv_bin: "{{ heat_sampletests_venv_folder }}/bin"
    heat_sampletests_venv_python: "{{ heat_sampletests_venv_folder }}/bin/python"

- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ heat_sampletests_venv_python | quote }}"

- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ heat_sampletests_venv_python | quote }}"

- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ heat_sampletests_venv_python | quote }}"
07070100D83351000081A4000003E800000064000000015B3CDC12000002B8000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/tasks/run.yml---
# Run the heat sample test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up

- name: hqe-heat-sampletests | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  command: "{{ heat_sampletests_work_folder }}/heat-sampletests.sh {{ run_filter }}"
  register: test_output
  ignore_errors: True

- name: hqe-heat-sampletests | run | Show test output
  debug: var=test_output

- name: hqe-heat-sampletests | run | Set test status
  set_fact:
      test_status: false
  when: test_output.rc != 0
07070100D83352000081A4000003E800000064000000015B3CDC1200003A09000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/tasks/test-resources.yml---
# Setup the test accounts and resource  used for heat sample testing
- name: hqe-heat-sampletests | test-resources | get os_auth_url_public
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack catalog show keystone | awk '/public/ {print $4}'
  register: os_auth_url_public_raw

- name: hqe-heat-sampletests | test-resources | set os_auth_url
  set_fact:
    os_auth_url: "{{ os_auth_url_public_raw.stdout }}"

- name: hqe-heat-sampletests | test-resources | check if ext-net exists
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack network list |  awk '/ {{ sample_test_ext_net }} / {print $2}'
  register: sample_public_net_id

- name: hqe-heat-sampletests | test-resources | check and fail if there is no external network
  fail: msg="No ext-net found. Please create one."
  when: sample_public_net_id.stdout == ""

- name: hqe-heat-sampletests | test-resources | create heat sample test project
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack project create "{{ sample_test_project }}"
  register: project_create_output

- name: hqe-heat-sampletests | test-resources | create heat sample test project debug
  debug: var=project_create_output

- name: hqe-heat-sampletests | test-resources | create heat sample test user
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack user create --password "{{ sample_test_password }}" --project "{{ sample_test_project }}" "{{ sample_test_user }}"
  register: user_create_output

- name: hqe-heat-sampletests | test-resources | create heat sample test user debug
  debug: var=user_create_output

- name: hqe-heat-sampletests | test-resources | show heat sample test project exists
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack project list | grep "{{ sample_test_project }}" | awk '{print $2}'
  register: test_project_id

- name: hqe-heat-sampletests | test-resources | show heat sample test project exist debug
  debug: var=test_project_id

- name: hqe-heat-sampletests | test-resources | add roles
  args:
    executable: /bin/bash
  shell: |
    source "{{ keystone_osrc }}"
    {{ common_venv_bin }}/openstack role add --project "{{ sample_test_project }}" --user "{{ sample_test_user }}" Member
    {{ common_venv_bin }}/openstack role add --project "{{ sample_test_project }}" --user "{{ sample_test_user }}" _member_
    {{ common_venv_bin }}/openstack role add --project "{{ sample_test_project }}" --user "{{ sample_test_user }}" admin
    {{ common_venv_bin }}/openstack role add --project "{{ sample_test_project }}" --user "{{ os_admin_username }}" admin
  register: role_add_output

- name: hqe-heat-sampletests | test-resources | show heat sample add role debug
  debug: var=role_add_output

- name: hqe-heat-sampletests | test-resources | set quota
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack quota set --ram -1 --instances 1000 {{ test_project_id.stdout }}
  register: quota_set_output

- name: hqe-heat-sampletests | test-resources | set quota debug
  debug: var=quota_set_output

- name: hqe-heat-sampletests | test-resources | check quota
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack quota show {{ test_project_id.stdout }}
  register: quota_show_output

- name: hqe-heat-sampletests | test-resources | check quota debug
  debug: var=quota_show_output

- name: hqe-heat-sampletests | test-resources | deploy heat sample test creds file
  template:
    src: testrc.j2
    dest: "{{ heat_osrc }}"
    mode: 0600

- name: hqe-heat-sampletests | test-resources | capture heat sample test creds
  shell: cat {{ heat_osrc }}
  register: heat_test_creds_output

- name: hqe-heat-sampletests | test-resources | show heat sample test creds debug
  debug: var=heat_test_creds_output

# test requires the following items
- name: hqe-heat-sampletests | test-resources | create heat test keypair
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack keypair create {{ sample_test_keyname }}

- name: hqe-heat-sampletests | test-resources | create heat test router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-create {{ sample_test_router }}

- name: hqe-heat-sampletests | test-resources | connect router to external network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-gateway-set {{ sample_test_router }} {{ sample_test_ext_net }}

- name: hqe-heat-sampletests | test-resources | verify heat test router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-list | grep {{ sample_test_router }} | awk '{print $2}'
  register: sample_test_router_id

- name: hqe-heat-sampletests | test-resources | verify heat test router debug
  debug: var=sample_test_router_id

- name: hqe-heat-sampletests | test-resources | create heat test private network
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack network create {{ sample_test_network }}
  register: sample_private_net

- name: hqe-heat-sampletests | test-resources | heat test private network debug
  debug: var=sample_private_net

- name: hqe-heat-sampletests | test-resources | check sample private net id
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/openstack network list |  awk '/ {{ sample_test_network }} / {print $2}'
  register: sample_private_net_id

- name: hqe-heat-sampletests | test-resources | create heat test private subnet
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron subnet-create --name {{ sample_test_subnet }} --dns-nameserver {{ tsr_dns_server_ip }} {{ sample_test_network }} {{ sample_test_cidr }}
  register: sample_private_subnet

- name: hqe-heat-sampletests | test-resources | heat test private subnet debug
  debug: var=sample_private_subnet

- name: hqe-heat-sampletests | test-resources | check sample private subnet id
  args:
    executable: /bin/bash
  shell: |
    source "{{ service_osrc }}"
    {{ common_venv_bin }}/neutron subnet-list |  awk '/ {{ sample_test_subnet }} / {print $2}'
  register: sample_private_subnet_id

- name: hqe-heat-sampletests | test-resources | add router interface
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/neutron router-interface-add {{ sample_test_router_id.stdout }} subnet={{ sample_test_subnet }}
  register: router_inteface

- name: hqe-heat-sampletests | test-resources | add router interface debug
  debug: var=router_inteface

- name: hqe-heat-sampletests | test-resources | check base image id
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack image list |  awk '/ {{ sample_test_base_image }} / {print $2}'
  register: base_image_id

- name: hqe-heat-sampletests | test-resources | create a bootable testing volume
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack volume create --image {{ sample_test_base_image }} --size {{ sample_test_vol_size }} {{ sample_test_vol_name }}

- name: hqe-heat-sampletests | test-resources | wait to ensure bootable volume is available
  ignore_errors: true
  shell: sleep "{{ heat_wait_time }}"

- name: hqe-heat-sampletests | test-resources | check bootable volume
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack volume list |  awk '/ {{ sample_test_vol_name }} / {print $2}'
  register: bootable_volume_id

- name: hqe-heat-sampletests | test-resources | check bootable volume debug
  debug: var=bootable_volume_id

- name: hqe-heat-sampletests | test-resources | create a volume snapshot
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack snapshot create --name {{ sample_test_vol_snapshot_name }} {{ sample_test_vol_name }}

- name: hqe-heat-sampletests | test-resources | wait to ensure volume snapshot is available
  ignore_errors: true
  shell: sleep "{{ heat_wait_time }}"

- name: hqe-heat-sampletests | test-resources | check volume snapshot
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack snapshot list |  awk '/ {{ sample_test_vol_snapshot_name }} / {print $2}'
  register: snapshot_volume_id

- name: hqe-heat-sampletests | test-resources | check volume snapshot debug
  debug: var=snapshot_volume_id

- name: hqe-heat-sampletests | test-resources | get image file
  shell: |
    echo "`date` : `env | grep proxy`"
    if [ -e "{{ heat_sampletests_work_folder }}/{{ sample_test_image_local }}" ]; then
        echo "Re-using existing heat test image file"
    else
        wget -O "{{ heat_sampletests_work_folder }}/{{ sample_test_image_local }}" "{{ sample_test_image_url }}"
    fi
    # just check it is there
    ls "{{ heat_sampletests_work_folder }}/{{ sample_test_image_local }}"
  register: get_image_file_log

- name: hqe-heat-sampletests | test-resources | show heat test image file get debug
  debug: var=get_image_file_log

- name: hqe-heat-sampletests | test-resources | create a sample test container
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack container create {{ sample_test_container }}

- name: hqe-heat-sampletests | test-resources | get the sample test container
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack container list | grep {{ sample_test_container }}
  register: get_sample_test_container

- name: hqe-heat-sampletests | test-resources | show the sample test container debug
  debug: var=get_sample_test_container

- name: hqe-heat-sampletests | test-resources | upload sample test image to container
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    cd {{ heat_sampletests_work_folder }}
    {{ common_venv_bin }}/openstack object create {{ sample_test_container }} {{ sample_test_image_local }}

- name: hqe-heat-sampletests | test-resources | get the sample test container object
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ sample_test_user }}"
      OS_TENANT_NAME: "{{ sample_test_project }}"
      OS_PASSWORD: "{{ sample_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
    {{ common_venv_bin }}/openstack object list {{ sample_test_container }} | grep {{ sample_test_image_local }}
  register: get_sample_test_container_object

- name: hqe-heat-sampletests | test-resources | show the sample test container object debug
  debug: var=get_sample_test_container_object

- name: hqe-heat-sampletests | test-resources | deploy heat sample env file
  template:
    src: sampletests_env.yaml
    dest: "{{ sample_test_env_file }}"
    mode: 0644

- name: hqe-heat-sampletests | test-resources | set sample test env file
  shell: |
    SWIFT_IMG_URL_NO_CREDS="$(echo {{ os_auth_url }} | sed -e 's/^https/swift/g' -e 's/^http/swift/g')/{{ sample_test_container }}/{{ sample_test_image_local }}"
    SWIFT_IMG_URL=$(echo $SWIFT_IMG_URL_NO_CREDS | sed -e "s/\/\//\/\/{{ sample_test_project }}%3A{{ sample_test_user }}:{{ sample_test_password }}@/")
    echo "    swift_img_url: $SWIFT_IMG_URL" >>{{ sample_test_env_file }}
  register: sample_test_env_log

- name: hqe-heat-sampletests | test-resources | show sample test env file debug
  debug: var=sample_test_env_log
07070100D63450000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/templates07070100D63451000081ED000003E800000064000000015B3CDC12000003A0000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/templates/sampletests_env.yamlparameters:
    key_name: {{ sample_test_keyname }}
    image: {{ base_image_id.stdout }}
    flavor: {{ sample_test_flavor }}
    public_net: {{ sample_test_ext_net }}
    public_net_id: {{ sample_public_net_id.stdout }}
    private_net_name: {{ sample_test_network }}
    private_net_cidr: {{ sample_test_cidr }}
    private_net_gateway: {{ sample_test_gateway }}
    private_net_pool_start: {{ sample_test_pool_start }}
    private_net_pool_end: {{ sample_test_pool_end }}
    private_net_id: {{ sample_private_net_id.stdout }}
    private_subnet_id: {{ sample_private_subnet_id.stdout }}
    volume_size: {{ sample_test_vol_size }}
    database_name: {{ sample_test_db_name }}
    database_user: {{ sample_test_db_user }}
    availability_zone: {{ sample_test_availability_zone }}
    bvol: {{ bootable_volume_id.stdout }}
    volume_snapshot_id: {{ snapshot_volume_id.stdout }}
    new_key_name: {{ sample_test_new_key }}

07070100D63452000081A4000003E800000064000000015B3CDC1200000174000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/templates/testrc.j2export OS_USERNAME={{ sample_test_user }}
export OS_PASSWORD={{ sample_test_password }}
export OS_TENANT_NAME={{ sample_test_project }}
export OS_CACERT={{ osrc_vars.os_ca_cert }}
export OS_IDENTITY_API_VERSION="2.0"
export OS_NO_CACHE=True
export OS_AUTH_URL={{ os_auth_url }}
export OS_ADMIN_NAME={{ os_admin_username }}
export OS_ADMIN_PASSWORD={{ os_admin_password }}
07070100D6344E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/vars07070100D6344F000081A4000003E800000064000000015B3CDC1200000988000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-heat-sampletests-run/vars/main.yml---
heat_sampletests_code_folder: "{{ code_folder }}/{{ tests_git_repo }}/{{ hqe_heat_sampletests.deploy.tests_folder }}"
heat_sampletests_work_folder: "{{ work_folder }}/{{ hqe_heat_sampletests.deploy.test_suite }}"

heat_sampletests_venv_folder: "{{ common_venv_root }}/{{ hqe_heat_sampletests.deploy.venv_folder }}"

system_python: "{{ ansible_python_interpreter }}"

run_filter: smoke
run_concurrency: 0

os_auth_url: "{{ osrc_vars.os_auth_url}}"
os_admin_username:  "{{ osrc_vars.os_username }}"
os_admin_password: "{{ osrc_vars.os_password }}"

# test account setup for testing, and clean-ed up afterwards
sample_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
sample_random_id: "{{ ['hqe_heat_sampletests', sample_random_uuid] | join('-') }}"
sample_test_user: "{{ sample_random_id }}"
sample_test_project: "{{ sample_random_id }}"
sample_test_password: "{{ sample_random_id }}"
heat_wait_time: 60
heat_osrc: "{{ heat_sampletests_work_folder }}/heat_samples.testrc"
sample_test_env_file: "{{ heat_sampletests_work_folder }}/sampletests_env.yaml"

# test resources
sample_test_router: "{{ ['heat-router', sample_random_uuid] | join('-') }}"
sample_test_network: "{{ ['heat-net', sample_random_uuid] | join('-') }}"
sample_test_subnet: "{{ ['heat-subnet', sample_random_uuid] | join('-') }}"
sample_test_cidr: "192.168.1.0/24"
sample_test_gateway: "192.168.1.1"
sample_test_pool_start: "192.168.1.2"
sample_test_pool_end: "192.168.1.233"
sample_test_db_name: "heatdb"
sample_test_db_user: "heatdbuser"
sample_test_vol_name: "{{ ['heatbtvol', sample_random_uuid] | join('-') }}"
sample_test_vol_size: 1
sample_test_vol_snapshot_name: "{{ ['heatvolsnapshot', sample_random_uuid] | join('-') }}"
sample_test_keyname: "{{ ['heat', sample_random_uuid] | join('-') }}"
sample_test_key_file: "{{ [sample_test_keyname, 'pem'] | join('.') }}"
sample_test_new_key: "new_heat_key"
tsr_dns_server_ip: "10.1.64.20"

# test suite parameters
sample_test_availability_zone: "nova"
sample_test_flavor: "m1.small"
sample_test_ext_net: "{{ hqe_group_vars.test_region_ext_net }}"
sample_test_base_image: "cirros-0.3.4-x86_64"
sample_test_image_url: "http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img"
sample_test_image_local: "heat_cirros.img"
sample_test_container: "heat_cirros"

# general keystone settings
auth_tail: "v2.0"
service_osrc: "{{ osrc_vars.service_osrc_path }}"
keystone_osrc: "{{ osrc_vars.keystone_osrc_path }}"
07070101200F91000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy07070101200F96000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/files07070101200F97000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/files/run_filters07070101200F99000081A4000003E800000064000000015B3CDC12000000DE000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/files/run_filters/parallel.txt# XXXXX includes the role name for single tests. If your test suite
# contains more than one test and you would like to make a selection
# Please include the list in a format understandable by the your test
# tool
iverify
07070101200F98000081A4000003E800000064000000015B3CDC12000000DE000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/files/run_filters/smoke.txt# XXXXX includes the role name for single tests. If your test suite
# contains more than one test and you would like to make a selection
# Please include the list in a format understandable by the your test
# tool
iverify
07070101200F9A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/tasks07070101200F9C000081A4000003E800000064000000015B3CDC1200000017000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/tasks/configure.yml---
# Configure iverify07070101200F9B000081A4000003E800000064000000015B3CDC1200000185000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/tasks/install.yml---

- name: hqe-iverify | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ iverify_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
        mode=0640

- name: hqe-iverify | install | Deploy run script
  template: >
    src=hqe-iverify.j2
    dest={{ iverify_work_folder }}/hqe-iverify
    owner={{ hqe_user }} group={{ hqe_group }}
        mode=0755
07070101200F9D000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070101200F94000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/templates07070101200F95000081A4000003E800000064000000015B3CDC1200000402000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/templates/hqe-iverify.j2#!/bin/bash

# Wrapper script to execute iverify
# within the venv, with the right parameters
#
# Usage: hqe-iverify run_filter_filename

set -o pipefail

# XXXXX  any run parameter that should be configurable post-deploy
# time should be set here
LOADVMS=${1}
RUN_FILTER=${2:-parallel.txt}

TEST_HOME={{ iverify_code_folder }}
WORK_HOME={{ iverify_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

AUTO_ID="AUTO`date +'%y%m%d%H%M%S'`"
# remember the last run id for cleanup
# NOTE(andreaf) this is running as ardanauser so it does not have access to the
# work folder

sudo -E bash -c "echo $AUTO_ID > $WORK_HOME/hqe-iverify-auto-id"
sudo -E chown {{ hqe_user }}:{{ hqe_group }} $WORK_HOME/hqe-iverify-auto-id
# Run the test
cmd="$TEST_HOME/iverify.sh -n $AUTO_ID | tee $HOME/iverify$AUTO_ID.log"

echo $cmd
$cmd

res=$?

(sudo cp $HOME/iverify_test$AUTO_ID/subunit_output {{ iverify_work_folder }}/iverify.subunit)
echo "Run completed with status $res"

exit $res
07070101200F92000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/vars07070101200F93000081A4000003E800000064000000015B3CDC12000002A4000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-deploy/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml

run_filter_file: parallel.txt

# Settings from deploy

iverify_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_iverify.deploy.tests_folder }}"
iverify_work_folder: "{{ work_folder}}/{{ hqe_iverify.deploy.test_suite }}"

07070101200E74000041ED000003E800000064000000045B3CDC1200000000000001030000000400000000000000000000004300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run07070101200E77000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run/tasks07070101200E78000081A4000003E800000064000000015B3CDC12000000DC000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-iverify | test-resources | Cleanup
  ignore_errors: true
  shell: "{{ iverify_code_folder }}/iverify.sh -n $(cat {{ iverify_work_folder }}/hqe-iverify-auto-id) -d"
07070101200E79000081A4000003E800000064000000015B3CDC120000015D000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python  }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python  }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101200E7A000081A4000003E800000064000000015B3CDC120000020B000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-iverify | run | Run the tests
  become: yes
  become_user: "{{ ardana_user }}"
  command: "{{ iverify_work_folder }}/hqe-iverify"
  register: test_output
  ignore_errors: True

- name: hqe-iverify | run | Show test output
  debug: var=test_output

07070101200E7B000081A4000003E800000064000000015B3CDC120000002E000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run/tasks/test-resources.yml---
# Setup the test account used for testing
07070101200E75000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run/vars07070101200E76000081A4000003E800000064000000015B3CDC120000028B000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-iverify-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml

run_filter_file: parallel.txt

iverify_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_iverify.deploy.tests_folder }}"
iverify_work_folder: "{{ work_folder}}/{{ hqe_iverify.deploy.test_suite }}"
07070101200EB1000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy07070101200EB6000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/files07070101200EB7000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/files/run_filters07070101200EB8000081A4000003E800000064000000015B3CDC12000000E7000001030000000400000000000000000000007600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/files/run_filters/keystone-ansible.txt# FIXME includes the role name for single tests. If your test suite
# contains more than one test and you would like to make a selection
# Please include the list in a format understandable by the your test
# tool
keystone-ansible
07070101200EBA000081A4000003E800000064000000015B3CDC12000000E7000001030000000400000000000000000000006E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/files/run_filters/parallel.txt# FIXME includes the role name for single tests. If your test suite
# contains more than one test and you would like to make a selection
# Please include the list in a format understandable by the your test
# tool
keystone-ansible
07070101200EB9000081A4000003E800000064000000015B3CDC12000000E7000001030000000400000000000000000000006E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/files/run_filters/periodic.txt# FIXME includes the role name for single tests. If your test suite
# contains more than one test and you would like to make a selection
# Please include the list in a format understandable by the your test
# tool
keystone-ansible
07070101200EBB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/tasks07070101200EBC000081A4000003E800000064000000015B3CDC12000000F4000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/tasks/install.yml---
- name: hqe-keystone-ansible-run | install | Deploy config file
  template:
    src: test_resources.j2
    dest: "{{ keystone_ansible_code_folder }}/test_resources.sh"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0644
07070101200EBD000081A4000003E800000064000000015B3CDC120000001C000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/tasks/main.yml---
- include: install.yml

07070101200EB4000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/templates07070101200EB5000081A4000003E800000064000000015B3CDC12000008A8000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/templates/test_resources.j2# NOTE(andreaf) Changes:
# install_folder -> work_folder
# SoapuiSettings -> removed
#
install_folder={{ keystone_ansible_work_folder }}
test_folder={{ keystone_ansible_code_folder }}
ks_endpoint={{ hqe_group_vars.keystone_endpoint }}
ks_endpoint_port={{ hqe_group_vars.keystone_endpoint_port }}
ks_admin_endpoint={{ hqe_group_vars.keystone_admin_endpoint }}
ks_admin_endpoint_port={{ hqe_group_vars.keystone_admin_endpoint_port }}
ks_observer_host1={{ hqe_group_vars.keystone_observer_host1 }}
ks_observer_host2={{ hqe_group_vars.keystone_observer_host2 }}
ks_observer_host3={{ hqe_group_vars.keystone_observer_host3 }}
ks_noauth_admin_token={{ hqe_token_vars.keystone_admin_token }}
ks_admin_password={{ hqe_group_vars.keystone_admin_password }}
mon_endpoint={{ hqe_group_vars.monasca_endpoint }}
mon_endpoint_port={{ hqe_group_vars.monasca_port }}
mon_user={{ hqe_group_vars.monasca_user }}
mon_password={{ hqe_group_vars.monasca_password }}
mon_cluster1={{ hqe_group_vars.monasca_cluster1 }}
mon_cluster2={{ hqe_group_vars.monasca_cluster2 }}
mon_cluster3={{ hqe_group_vars.monasca_cluster3 }}
ceilometer_user={{ hqe_group_vars.keystone_ceilometer_user }}
ceilometer_password={{ hqe_group_vars.keystone_ceilometer_password }}
ceilometer_mysql_admin_user={{ hqe_group_vars.ceilometer_mysql_admin_user }}
ceilometer_mysql_admin_password={{ hqe_group_vars.ceilometer_mysql_admin_password }}
hostname_stopstart_apache={{ hqe_group_vars.keystone_observer_host1 }}
keystone_admin_url={{ hqe_group_vars.keystone_admin_url }}
keystone_private_url={{ hqe_group_vars.keystone_private_url }}
keystone_public_url={{ hqe_group_vars.keystone_public_url }}
nova_admin_url={{ hqe_group_vars.nova_admin_url }}
nova_private_url={{ hqe_group_vars.nova_private_url }}
nova_public_url={{ hqe_group_vars.nova_public_url }}
glance_admin_url={{ hqe_group_vars.glance_admin_url }}
glance_private_url={{ hqe_group_vars.glance_private_url }}
glance_public_url={{ hqe_group_vars.glance_public_url }}
config_file={{ hqe_group_vars.config_file }}
keystone_ccn_node2={{ hqe_group_vars.keystone_ccn_node2 }}
ks_private_vip_host={{ hqe_group_vars.keystone_private_vip_host }}
controller_network_type={{ hqe_group_vars.controller_network_type }}
07070101200EB2000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/vars07070101200EB3000081A4000003E800000064000000015B3CDC12000000DA000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-deploy/vars/main.yml---
keystone_ansible_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_keystone_ansible.deploy.tests_folder }}"
keystone_ansible_work_folder: "{{ work_folder }}/{{ hqe_keystone_ansible.deploy.test_suite }}"

07070101200FBE000041ED000003E800000064000000045B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-run07070101200FC1000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-run/tasks07070101200FC2000081A4000003E800000064000000015B3CDC12000000A0000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-run/tasks/main.yml---
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101200FC3000081A4000003E800000064000000015B3CDC120000041C000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-run/tasks/run.yml---
# NOTE(andreaf) This is only mean to run on the deployer. We should restrict
# its execution on the deployer node, however the framework does not fully
# support that yet, so leaving the restriction implicit for now.

# Reports are written to the code folder as this is executed with {{ ardana_user }}

- name: hqe-keystone-ansible | run | Ensure ks-test-reports folder
  file:
    path: "{{ keystone_ansible_code_folder }}/ks-test-reports"
    state: directory
    mode: 0777
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

- name: hqe-keystone-ansible | run | Run the tests
  become: yes
  become_user: "{{ test_driver_login }}"
  command: "./Keystone-Ansible-Automation.sh {{ keystone_ansible_code_folder }}/ks-test-reports"
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_ansible_code_folder }}"

- name: hqe-keystone-ansible | run | set test report
  shell: "cat {{ keystone_ansible_code_folder }}/ks-test-reports/Keystone-Ansible-Automation_report"
  register: report

- debug: var=report.stdout_lines
07070101200FBF000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-run/vars07070101200FC0000081A4000003E800000064000000015B3CDC1200000137000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ansible-run/vars/main.yml---
test_driver_login: "{{ hqe_common.deploy.test_driver_login }}"
run_filter_file: parallel.txt

keystone_ansible_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_keystone_ansible.deploy.tests_folder }}"
keystone_ansible_work_folder: "{{ work_folder }}/{{ hqe_keystone_ansible.deploy.test_suite }}"
07070101200F0A000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy07070101200F0F000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/files07070101200F10000081A4000003E800000064000000015B3CDC1200000015000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/files/requirements.txtpython_keystoneclient07070101200F11000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/files/run_filters07070101200F12000081A4000003E800000064000000015B3CDC1200000012000001030000000400000000000000000000007000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/files/run_filters/keystone-ldap.txthqe-keystone-ldap
07070101200F14000081A4000003E800000064000000015B3CDC1200000012000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/files/run_filters/parallel.txthqe-keystone-ldap
07070101200F13000081A4000003E800000064000000015B3CDC1200000012000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/files/run_filters/periodic.txthqe-keystone-ldap
07070101200F15000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/tasks07070101200F17000081A4000003E800000064000000015B3CDC1200000022000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/tasks/configure.yml---
# Configure hqe-keystone-ldap
07070101200F16000081A4000003E800000064000000015B3CDC1200000535000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/tasks/install.yml---
- name: hqe-keystone-ldap | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-keystone-ldap | install | Create work folder {{ keystone_ldap_work_folder }}
  file:
    path: "{{ keystone_ldap_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    recurse: yes

- name: hqe-keystone-ldap | install | Install Java dependencies for SoapUI cli tests
  become: yes
  become_user: root
  package: name={{ item }} state=present
  with_items: hqe_keystone_ldap_pkgs

# NOTE(andreaf) Certs validation: https://github.com/ansible/ansible/issues/12549
- name: hqe-keystone-ldap | install | Install SoapUI
  get_url:
    force: no
    url: "{{ soapui_download_url }}"
    dest: "{{ keystone_ldap_work_folder }}/{{ soapui_download_url | basename }}"
    validate_certs: no
    timeout: 120

- name: hqe-keystone-ldap | install | Unarchive SoapUI
  unarchive:
    creates: "{{ keystone_ldap_work_folder }}/{{ soapui_install_folder }}"
    copy: no
    src: "{{ keystone_ldap_work_folder }}/{{ soapui_download_url | basename }}"
    dest: "{{ keystone_ldap_work_folder }}"

- name: hqe-keystone-ldap | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ keystone_ldap_work_folder }}/"
07070101200F18000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070101200F0B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/vars07070101200F0C000081A4000003E800000064000000015B3CDC120000002F000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/vars/debian.yml---
hqe_keystone_ldap_pkgs:
  - openjdk-8-jre

07070101200F0E000081A4000003E800000064000000015B3CDC12000000CD000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/vars/main.yml---
keystone_ldap_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_keystone_ldap.deploy.tests_folder }}"
keystone_ldap_work_folder: "{{ work_folder }}/{{ hqe_keystone_ldap.deploy.test_suite }}"
07070101200F0D000081A4000003E800000064000000015B3CDC120000003D000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-deploy/vars/suse.yml---
hqe_keystone_ldap_pkgs:
  - java-1_8_0-openjdk-headless

07070100E43A59000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run07070100E82A5B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/tasks07070100E82A5C000081A4000003E800000064000000015B3CDC1200000003000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/tasks/cleanup.yml---07070100E82A5D000081A4000003E800000064000000015B3CDC120000015A000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"07070100E82A5E000081A4000003E800000064000000015B3CDC12000004BE000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/tasks/run.yml---
- debug: var=keystone_ldap_code_folder

- name: hqe-keystone-ldap | run | Configure ldap domains in keystone
  become: yes
  become_user: "{{ ardana_user }}"
  command: >
    ./TestSuite_configure_ldap.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_ldap_code_folder }}/"


- name: hqe-keystone-ldap | run | Set test status
  set_fact:
      test_status: false
  when: test_output.rc != 0

- name: hqe-keystone-ldap | run | Run the SoapUI tests for Active Directory domain
  become: yes
  command: ./TestSuite_ldap_ad.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_ldap_code_folder }}/"

- name: hqe-keystone-ldap | run | Run the SoapUI tests for OpenLDAP domain
  become: yes
  command: ./TestSuite_ldap_openldap.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_ldap_code_folder }}/"

- name: hqe-keystone-ldap | run | Set test status
  set_fact:
      test_status: false
  when: test_output.rc != 0

# If the last test failed, RC is not 0. If a previous test failed, we set it 1
- name: hqe-keystone-ldap | run | Set overall RC for subunit
  set_fact:
      test_output.rc = 1
  when: not(test_status | bool)
07070100E82A5F000081A4000003E800000064000000015B3CDC1200000468000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/tasks/test-resources.yml---
# Get the admin token for testing
- name: hqe-keystone-ldap | test-resources | Get a domain scoped token
  keystone_v3:
    endpoint: "{{ hqe_group_vars.keystone_admin_endpoint }}:{{ hqe_group_vars.keystone_admin_endpoint_port }}/v3"
    login_username: "{{ hqe_group_vars.keystone_admin_user }}"
    login_password: "{{ hqe_group_vars.keystone_admin_password }}"
    login_user_domain_name: "{{ hqe_group_vars.keystone_default_domain }}"
    login_domain_name: "{{ hqe_group_vars.keystone_default_domain }}"
    action: "token_get"
  run_once: true
  register: domain_scoped_token

# NOTE(andreaf) Tests expect a configuration file (test_resources.sh) to live
# along with the code. As the code folder is read-only, we copy the code to the
# work folder and re-set the code folder to the new location.
#- set_fact:
#    keystone_ldap_code_folder: "{{ keystone_ldap_work_folder }}/{{ keystone_ldap_code_folder | basename }}"

# Deploy test configuration
- name: hqe-keystone-ldap | test-resources | Deploy test_resources.sh
  template:
    src: test_resources.j2
    dest: "{{ keystone_ldap_code_folder }}/test_resources.sh"07070100E636BD000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/templates07070100E636BE000081A4000003E800000064000000015B3CDC1200000451000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/templates/test_resources.j2InstallFolder={{ keystone_ldap_work_folder }}
KSENDPOINT={{ hqe_group_vars.keystone_endpoint }}
KSADMINENDPOINT={{ hqe_group_vars.keystone_admin_endpoint }}
MONENDPOINT={{ hqe_group_vars.monasca_endpoint }}
TestFolder={{ keystone_ldap_code_folder }}

HostNameForStopStartApache={{ hqe_group_vars.keystone_observer_host1 }}
observer_host1={{ hqe_group_vars.keystone_observer_host1 }}
observer_host2={{ hqe_group_vars.keystone_observer_host2 }}
observer_host3={{ hqe_group_vars.keystone_observer_host3 }}
NOAUTH_KSADMINTOKEN={{ hqe_token_vars.keystone_admin_token }}
ADMINPASSWORD={{ hqe_group_vars.keystone_admin_password }}
SoapuiSettings={{ SoapuiSettings }}
monasca_user={{ hqe_group_vars.monasca_user }}
monasca_password={{ hqe_group_vars.monasca_password }}

mrtmon_cluster1={{ hqe_group_vars.monasca_cluster1 }}
mrtmon_cluster2={{ hqe_group_vars.monasca_cluster2 }}
mrtmon_cluster3={{ hqe_group_vars.monasca_cluster3 }}

KSENDPOINTPORT={{ hqe_group_vars.keystone_endpoint_port }}
KSADMINENDPOINTPORT={{ hqe_group_vars.keystone_admin_endpoint_port }}
MONENDPOINTPORT={{ hqe_group_vars.monasca_port }}
07070100E636BB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/vars07070100E636BC000081A4000003E800000064000000015B3CDC12000002E7000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-ldap-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Setting for Keystone-soapui
SoapuiSettings: soapui-settings.xml

keystone_ldap_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_keystone_ldap.deploy.tests_folder }}"
keystone_ldap_work_folder: "{{ work_folder }}/{{ hqe_keystone_ldap.deploy.test_suite }}"

07070101201027000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy07070101220001000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/files07070101220002000081A4000003E800000064000000015B3CDC1200000015000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/files/requirements.txtpython_keystoneclient07070101220003000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/files/run_filters07070101220004000081A4000003E800000064000000015B3CDC1200000010000001030000000400000000000000000000007400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/files/run_filters/keystone-soapui.txtkeystone-soapui
07070101220006000081A4000003E800000064000000015B3CDC1200000010000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/files/run_filters/parallel.txtkeystone-soapui
07070101220005000081A4000003E800000064000000015B3CDC1200000010000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/files/run_filters/periodic.txtkeystone-soapui
07070101220007000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/tasks07070101220008000081A4000003E800000064000000015B3CDC1200000551000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/tasks/install.yml---
- name: hqe-keystone-soapui | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-keystone-soapui | install | Create work folder {{ keystone_soapui_work_folder }}
  file:
    path: "{{ keystone_soapui_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    recurse: yes

- name: hqe-keystone-soapui | install | Install Java dependencies for SoapUI cli tests
  become: yes
  become_user: root
  package: name={{ item }} state=present
  with_items: hqe_keystone_soapui_pkgs

# NOTE(andreaf) Certs validation: https://github.com/ansible/ansible/issues/12549
- name: hqe-keystone-soapui | install | Install SoapUI
  get_url:
    force: no
    url: "{{ soapui_download_url }}"
    dest: "{{ keystone_soapui_work_folder }}/{{ soapui_download_url | basename }}"
    validate_certs: no
    timeout: 120

- name: hqe-keystone-soapui | install | Unarchive SoapUI
  unarchive:
    creates: "{{ keystone_soapui_work_folder }}/{{ soapui_install_folder }}"
    copy: no
    src: "{{ keystone_soapui_work_folder }}/{{ soapui_download_url | basename }}"
    dest: "{{ keystone_soapui_work_folder }}"

- name: hqe-keystone-soapui | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ keystone_soapui_work_folder }}/"
07070101220009000081A4000003E800000064000000015B3CDC120000001B000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/tasks/main.yml---
- include: install.yml
07070101201028000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/vars07070101201029000081A4000003E800000064000000015B3CDC1200000031000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/vars/debian.yml---
hqe_keystone_soapui_pkgs:
  - openjdk-8-jre

0707010120102B000081A4000003E800000064000000015B3CDC12000000D6000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/vars/main.yml---
keystone_soapui_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_keystone_soapui.deploy.tests_folder }}"
keystone_soapui_work_folder: "{{ work_folder }}/{{ hqe_keystone_soapui.deploy.test_suite }}"

0707010120102A000081A4000003E800000064000000015B3CDC120000003F000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-deploy/vars/suse.yml---
hqe_keystone_soapui_pkgs:
  - java-1_8_0-openjdk-headless

07070101200F87000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run07070101200F8C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/tasks07070101200F8D000081A4000003E800000064000000015B3CDC1200000003000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/tasks/cleanup.yml---07070101200F8E000081A4000003E800000064000000015B3CDC120000015A000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"07070101200F8F000081A4000003E800000064000000015B3CDC12000010BC000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/tasks/run.yml---
- name: hqe-keystone-soapui-run | run | Run TestSuite_Smoke.sh
  become: yes
  command: ./TestSuite_Smoke.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_soapui_code_folder }}/"
  when: run_filter == "periodic"

#- name: hqe-template | run | Show test output - TestSuite_Smoke
#  debug: var=test_output
#  when: run_filter == "periodic"

- name: hqe-keystone-soapui-run | run | Set test status
  set_fact:
      test_status: false
  when: run_filter == "periodic" and test_output.rc != 0

- name: hqe-keystone-soapui-run | run | Run TestSuite_MonitorWithMonasca.sh
  become: yes
  command: ./TestSuite_MonitorWithMonasca.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_soapui_code_folder }}/"
  when: run_filter == "parallel"

#- name: hqe-template | run | Show test output - TestSuite_MonitorWithMonasca.sh
#  debug: var=test_output
#  when: run_filter == "parallel"

- name: hqe-keystone-soapui-run | run | Set test status
  set_fact:
      test_status: false
  when: run_filter == "parallel" and test_output.rc != 0

- name: hqe-keystone-soapui-run | run | Run TestSuite_V2.sh
  become: yes
  command: ./TestSuite_V2.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_soapui_code_folder }}/"
  when: run_filter == "parallel"

#- name: hqe-template | run | Show test output - TestSuite_V2.sh
#  debug: var=test_output
#  when: run_filter == "parallel"

- name: hqe-keystone-soapui-run | run | Set test status
  set_fact:
      test_status: false
  when: run_filter == "parallel" and test_output.rc != 0

- name: hqe-keysto soapui-run | run | Run TestSuite_v3IdentityServiceAPI-Helion-DTUG.sh
  become: yes
  command: ./TestSuite_v3IdentityServiceAPI-Helion-DTUG.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_soapui_code_folder }}/"
  when: run_filter == "parallel"

#- name: hqe-template | run | Show test output - TestSuite_v3IdentityServiceAPI-Helion-DTUG.sh
#  debug: var=test_output
#  when: run_filter == "parallel"

- name: hqe-keystone-soapui-run | run | Set test status
  set_fact:
      test_status: false
  when: run_filter == "parallel" and test_output.rc != 0

- name: hqe-keystone-soapui-run | run | Run TestSuite_v3IdentityServiceAPI-Helion-OtherObjects.sh
  become: yes
  command: ./TestSuite_v3IdentityServiceAPI-Helion-OtherObjects.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_soapui_code_folder }}/"
  when: run_filter == "parallel"

#- name: hqe-template | run | Show test output - TestSuite_v3IdentityServiceAPI-Helion-OtherObjects.sh
#  debug: var=test_output
#  when: run_filter == "parallel"

- name: hqe-keystone-soapui-run | run | Set test status
  set_fact:
      test_status: false
  when: run_filter == "parallel" and test_output.rc != 0

- name: hqe-keystone-soapui-run | run | Run TestSuite_v3IdentityServiceAPI-Helion-Privilege.sh
  become: yes
  command: ./TestSuite_v3IdentityServiceAPI-Helion-Privilege.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_soapui_code_folder }}/"
  when: run_filter == "parallel"

#- name: hqe-template | run | Show test output - TestSuite_v3IdentityServiceAPI-Helion-Privilege.sh
#  debug: var=test_output
#  when: run_filter == "parallel"

- name: hqe-keystone-soapui-run | run | Set test status
  set_fact:
      test_status: false
  when: run_filter == "parallel" and test_output.rc != 0

- name: hqe-keystone-soapui-run | run | Run TestSuite_v3IdentityServiceAPI-Helion-Token.sh
  become: yes
  command: ./TestSuite_v3IdentityServiceAPI-Helion-Token.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ keystone_soapui_code_folder }}/"
  when: run_filter == "parallel"

#- name: hqe-template | run | Show test output - TestSuite_v3IdentityServiceAPI-Helion-Token.sh
#  debug: var=test_output
#  when: run_filter == "parallel"

- name: hqe-keystone-soapui-run | run | Set test status
  set_fact:
      test_status: false
  when: run_filter == "parallel" and test_output.rc != 0

# If the last test failed, RC is not 0. If a previous test failed, we set it 1
- name: hqe-keystone-soapui-run | run | Set overall RC for subunit
  set_fact:
      test_output.rc = 1
  when: not(test_status | bool)07070101200F90000081A4000003E800000064000000015B3CDC120000047C000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/tasks/test-resources.yml---
# Get the admin token for testing
- name: hqe-keystone-soapui-run | test-resources | Get a domain scoped token
  keystone_v3:
    endpoint: "{{ hqe_group_vars.keystone_admin_endpoint }}:{{ hqe_group_vars.keystone_admin_endpoint_port }}/v3"
    login_username: "{{ hqe_group_vars.keystone_admin_user }}"
    login_password: "{{ hqe_group_vars.keystone_admin_password }}"
    login_user_domain_name: "{{ hqe_group_vars.keystone_default_domain }}"
    login_domain_name: "{{ hqe_group_vars.keystone_default_domain }}"
    action: "token_get"
  run_once: true
  register: domain_scoped_token

# NOTE(andreaf) Tests expect a configuration file (test_resources.sh) to live
# along with the code. As the code folder is read-only, we copy the code to the
# work folder and re-set the code folder to the new location.
#- set_fact:
#    keystone_soapui_code_folder: "{{ keystone_soapui_work_folder }}/{{ keystone_soapui_code_folder | basename }}"

# Deploy test configuration
- name: hqe-keystone-soapui-run | test-resources | Deploy test_resources.sh
  template:
    src: test_resources.j2
    dest: "{{ keystone_soapui_code_folder }}/test_resources.sh"07070101200F8A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/templates07070101200F8B000081A4000003E800000064000000015B3CDC1200000455000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/templates/test_resources.j2InstallFolder={{ keystone_soapui_work_folder }}
KSENDPOINT={{ hqe_group_vars.keystone_endpoint }}
KSADMINENDPOINT={{ hqe_group_vars.keystone_admin_endpoint }}
MONENDPOINT={{ hqe_group_vars.monasca_endpoint }}
TestFolder={{ keystone_soapui_code_folder }}

HostNameForStopStartApache={{ hqe_group_vars.keystone_observer_host1 }}
observer_host1={{ hqe_group_vars.keystone_observer_host1 }}
observer_host2={{ hqe_group_vars.keystone_observer_host2 }}
observer_host3={{ hqe_group_vars.keystone_observer_host3 }}
NOAUTH_KSADMINTOKEN={{ hqe_token_vars.keystone_admin_token }}
ADMINPASSWORD={{ hqe_group_vars.keystone_admin_password }}
SoapuiSettings={{ SoapuiSettings }}
monasca_user={{ hqe_group_vars.monasca_user }}
monasca_password={{ hqe_group_vars.monasca_password }}

mrtmon_cluster1={{ hqe_group_vars.monasca_cluster1 }}
mrtmon_cluster2={{ hqe_group_vars.monasca_cluster2 }}
mrtmon_cluster3={{ hqe_group_vars.monasca_cluster3 }}

KSENDPOINTPORT={{ hqe_group_vars.keystone_endpoint_port }}
KSADMINENDPOINTPORT={{ hqe_group_vars.keystone_admin_endpoint_port }}
MONENDPOINTPORT={{ hqe_group_vars.monasca_port }}
07070101200F88000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/vars07070101200F89000081A4000003E800000064000000015B3CDC12000002EE000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-keystone-soapui-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Setting for Keystone-soapui
SoapuiSettings: soapui-settings.xml

keystone_soapui_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_keystone_soapui.deploy.tests_folder }}"
keystone_soapui_work_folder: "{{ work_folder }}/{{ hqe_keystone_soapui.deploy.test_suite }}"
07070101200FC4000041ED000003E800000064000000075B3CDC1200000000000001030000000400000000000000000000004600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy07070101200FC5000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/defaults07070101200FC6000081A4000003E800000064000000015B3CDC1200000086000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/defaults/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
logging_service_name: 'logging'
07070101200FCC000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files07070101200FCD000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters07070101200FCF000081A4000003E800000064000000015B3CDC1200000105000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters/ci.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
+kronos\.centralized\.test_basic_vip.*
+kronos\.local\.test_logrotate_coverage.*
+kronos\.centralized\.test_monasca_status.*
-kronos\.centralized\.test_auditing.*
07070101200FD1000081A4000003E800000064000000015B3CDC12000001D4000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters/logging-parallel.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
+kronos\.centralized\.test_basic_vip.*
+kronos\.local\.test_logrotate_coverage.*
+kronos\.centralized\.test_monasca_status.*
+kronos\.centralized\.test_heap.*
+kronos\.centralized\.test_transaction_records.*
+kronos\.centralized\.test_monasca_log.*
+kronos\.local\.test_file_permissions.*
+kronos\.centralized\.test_mvp_validator.*
-kronos\.centralized\.test_auditing.*
07070101200FD4000081A4000003E800000064000000015B3CDC1200000085000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters/periodic-virtual.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
# For now all tests should pass CI
07070101200FD0000081A4000003E800000064000000015B3CDC1200000085000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters/periodic.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
# For now all tests should pass CI
07070101200FD2000081A4000003E800000064000000015B3CDC12000000B3000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters/smoke.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
+kronos\.centralized\.test_basic_vip.*
+kronos\.local\.test_logrotate_coverage.*
07070101200FD3000081A4000003E800000064000000015B3CDC1200000085000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters/tests-ci.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
# For now all tests should pass CI
07070101200FCE000081A4000003E800000064000000015B3CDC12000000DF000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/run_filters/upgrade.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
+kronos\.centralized\.test_basic_vip.*
+kronos\.local\.test_logrotate_coverage.*
+kronos\.centralized\.test_monasca_status.*
07070101200FD5000081A4000003E800000064000000015B3CDC120000084A000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/files/tests2skip.py#!/usr/bin/env python
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# Reads in a list of exclude regular expressions from a file and outputs a
# regex suitable to be passed into testr

import sys

"""
Whitelist is applied first. The blacklist is executed against the set of
tests returned by the whitelist.
If whitelist is empty, all available tests are fed to blacklist.
If blacklist is empty, all tests from whitelist are returned.

The syntax for white-list and black-list is as follows:
- lines starting with # or empty are ignored
- lines starting with "+" are whitelisted
- lines starting with "-" are blacklisted
- lines not matching any of the above conditions are blacklisted

The match for each line gets added a "^" in the beginning,
so the regular expression should account for that.

For example, the following scenario:

    run all the smoke tests and scenario tests,
    but exclude the api.volume tests.

is implemented as:

    +.*smoke
    +tempest\.scenario
    -tempest\.api\.volume.*
"""

whitelist = []
blacklist = []
with open(sys.argv[1]) as fp:
    for line in fp:
        line = line.strip()
        if not line or line[0] == '#':
            continue
        if line.startswith("+"):
            whitelist.append(line[1:])
        elif line.startswith("-"):
            blacklist.append(line[1:])
        else:
            blacklist.append(line)

regex = '^(?=({whitelist}))'
params = dict(whitelist="|".join(whitelist))
if blacklist:
    regex += '(?!({blacklist}))'
    params['blacklist'] = "|".join(blacklist)

print(regex.format(**params))
07070101200FD6000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/tasks07070101200FD8000081A4000003E800000064000000015B3CDC12000001C5000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/tasks/configure.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
# Configure the demo test

# The only configuration required here is the RC file with the
# credentials but that can only be created after test-resources

- name: hqe-template | configure | Set ownership of {{ logging_work_folder }} folder
  file: path={{ logging_work_folder }} owner={{ hqe_user }} group={{ hqe_group }} state=directory recurse=yes

07070101200FD7000081A4000003E800000064000000015B3CDC1200000C36000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/tasks/install.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
---

- set_fact:
    logging_venv_folder: "{{ common_venv_root }}/{{ hqe_logging.deploy.venv_folder }}"
    tempest_code_folder: "{{ code_folder }}/tempest/"
  when: build_venvs | bool
- set_fact:
    logging_venv_folder: "{{ logging_service_name | bin_dir }}/../"
    tempest_code_folder: "{{ code_folder }}/tempest/"
  when: not (build_venvs | bool)

# Install demo test dependencies
- name: hqe-logging | install | Update package cache
  install_package:
    cache: update
  when: not (build_venvs | bool)

- name: hqe-logging | install | Install the prebuilt env
  become: yes
  become_user: root
  install_package:
    name: "{{ logging_service_name }}"
    service: "{{ logging_service_name }}"
    state: present
  when: not (build_venvs | bool)

- name: hqe-logging | install | Upgrade pip
  pip:
    name: pip
    extra_args: --upgrade
    virtualenv: "{{ logging_venv_folder }}"
  when: build_venvs | bool

- name: hqe-logging | install | Install CLS requirements
  pip:
    requirements={{ logging_code_folder }}/requirements.txt
    virtualenv={{ logging_venv_folder }}
  when: build_venvs | bool

# Installing from source requires write access to the source folder
- name: hqe-logging | install | {{ hqe_group }} owns hosqatesthelper source
  become: yes
  become_user: root
  file:
    path: "{{ testhelper_code_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    recurse: yes

- name: hqe-logging | install | Install hosqatesthelper package
  pip:
    name={{ testhelper_code_folder }}
    extra_args='-e'
    virtualenv={{ logging_venv_folder }}
  when: build_venvs | bool

- name: hqe-logging | install | Pull upstream Tempest from the Gozer
  become: yes
  become_user: root
  git: repo=http://git.suse.provo.cloud/openstack/tempest
       dest={{ tempest_code_folder }}
       version=hp/master
       update=no
  when: build_venvs | bool

- name: hqe-logging | install | Install tempest
  become: yes
  become_user: root
  pip:
    name={{ tempest_code_folder }}
    extra_args='-e'
    virtualenv={{ logging_venv_folder }}
  when: build_venvs | bool

- name: hqe-logging | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ logging_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-logging | install | Deploy tests2skip.py
  copy:
    src: tests2skip.py
    dest: "{{ logging_work_folder }}/logging-tests2skip.py"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-logging | install | Deploy run script
  template: >
    src=hqe-logging.j2
    dest="{{ logging_work_folder }}/hqe-logging"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-logging | install | Deploy testr configuration
  shell: cp "{{ logging_code_folder}}/.testr.conf" "{{ logging_work_folder }}"

- name: hqe-logging | install | Fix testr configuration ownership
  file:
    path: "{{ logging_work_folder }}/.testr.conf"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755
07070101200FD9000081A4000003E800000064000000015B3CDC12000000EB000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/tasks/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
- include_vars: cls.yml
  when: hqe_group_vars.centralized_logging_available | bool
- include: install.yml
- include: configure.yml

07070101200FCA000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/templates07070101200FCB000081A4000003E800000064000000015B3CDC12000006B8000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/templates/hqe-logging.j2#!/bin/bash

# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC


# Wrapper script to execute the example test
# within the venv, with the right parameters
#
# Usage: hqe-template run_filter_filename

set -o pipefail

RUN_FILTER={{ logging_work_folder }}/run_filters/${1:-ci.txt}
TEST_HOME={{ logging_code_folder }}
WORK_HOME={{ logging_work_folder }}
VENV={{ logging_venv_folder }}
{% if hqe_group_vars.centralized_logging_available | bool %}
export ES_NODE_COUNT={{ es_servers| count }}
export ES_URL={{ es_url }}
export ES_USERNAME='kibana'
export ES_PASSWORD={{ kibana_password }}
export REGIONS={{ hqe_group_vars.hlm_regions|join(',') }}
{% endif %}
# Temporal solution, until ansible module for that is created.
TESTS_TO_SKIP_BIN="{{ logging_work_folder }}/logging-tests2skip.py"

export ANSIBLE_LOCATION={{ hlm_ansible_dir }}
export HLM_USER={{ ardana_user }}
export INVENTORY_LOCATION={{ inventory_location }}
echo TEST_HOME ${TEST_HOME}
echo WORK_HOME ${WORK_HOME}
echo VENV ${VENV}

# Activate the virtual environment
source ${VENV}/bin/activate
pip freeze
source ${WORK_HOME}/testrc
echo --- TESTRC ---
cat ${WORK_HOME}/testrc
echo --- TESTRC ---
echo ES Servers count $ES_NODE_COUNT

# HQA-1346 premake dir to allow for ansible parallel execution
if [ ! -d ~/.ansible/cp ]; then
  mkdir -p ~/.ansible/cp
fi

# Run the test
cd ${WORK_HOME}

echo Initializing testrepository
testr init
echo Running tests
# Logging tests create very small loads but have a lot of waits hence high
# concurrency would ensure fast executions in CI/CD
testr run --subunit --parallel --concurrency 20 $(python ${TESTS_TO_SKIP_BIN} ${RUN_FILTER}) | subunit-trace --no-failure-debug -f
07070101200FC7000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/vars07070101200FC8000081A4000003E800000064000000015B3CDC1200000099000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/vars/cls.yml---

kibana_password: "{{ hqe_group_vars.logging_kibana_password }}"
es_servers: "{{ hqe_group_vars.es_servers }}"
es_url: "{{ hqe_group_vars.es_url }}"
07070101200FC9000081A4000003E800000064000000015B3CDC12000001AE000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-deploy/vars/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
logging_service_name: "{{ hqe_logging.deploy.service_name }}"

logging_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_logging.deploy.tests_folder }}"
logging_work_folder: "{{ work_folder }}/{{ hqe_logging.deploy.test_suite }}"

logging_subunit_output: "{{ work_folder }}{{ hqe_logging.deploy.test_suite }}.subunit"
07070100DC333D000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run07070100E02022000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/tasks07070100E02023000081A4000003E800000064000000015B3CDC12000002B4000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/tasks/cleanup.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
- name: hqe-logging | test-resources | Delete test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ qalogging_test_user }}"
    user_domain_name: "{{ qalogging_test_domain }}"

- name: hqe-logging | test-resources | Delete test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ qalogging_test_project }}"
    project_domain_name: "{{ qalogging_test_domain }}"
07070100E02024000081A4000003E800000064000000015B3CDC12000001BD000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/tasks/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070100E02025000081A4000003E800000064000000015B3CDC12000002C0000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/tasks/run.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore erros is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-logging | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  shell: "OS_TEST_PATH={{ logging_code_folder }} ./hqe-logging {{ run_filter_file }}"
  args:
    chdir: "{{ logging_work_folder }}"
  register: test_output
  ignore_errors: True

- name: hqe-logging | run | Show test output
  debug: var=test_output

07070100E02026000081A4000003E800000064000000015B3CDC1200000BD6000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/tasks/test-resources.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
- name: hqe-logging | test-resources | Create logging project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ qalogging_test_project }}"
    project_domain_name: "{{ qalogging_test_domain }}"
    description: "Ephemeral test account for logging"

- name: hqe-logging | test-resources | Create logging user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ qalogging_test_user }}"
    user_password: "{{ qalogging_test_password }}"
    description: "Swift account for QA"
    user_domain_name: "{{ qalogging_test_domain }}"

- name: hqe-logging | test-resources | Grant member role to logging user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ qalogging_test_user }}"
    project_name: "{{ qalogging_test_project }}"
    role_name: "{{ qalogging_test_role }}"
    user_domain_name: "{{ qalogging_test_domain }}"
    project_domain_name: "{{ qalogging_test_domain }}"

- name: hqe-logging | test-resources | Grant swiftoperator role to logging user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ qalogging_test_user }}"
    project_name: "{{ qalogging_test_project }}"
    role_name: "swiftoperator"
    user_domain_name: "{{ qalogging_test_domain }}"
    project_domain_name: "{{ qalogging_test_domain }}"
  when: hqe_group_vars.swift_available | bool

- name: hqe-logging | test-resources | Grant monasca-user role to logging user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ qalogging_test_user }}"
    project_name: "{{ qalogging_test_project }}"
    role_name: "monasca-user"
    user_domain_name: "{{ qalogging_test_domain }}"
    project_domain_name: "{{ qalogging_test_domain }}"
  when: hqe_group_vars.monasca_available | bool

- name: hqe-logging | test-resources | Grant key-manager:observer role to logging user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ qalogging_test_user }}"
    project_name: "{{ qalogging_test_project }}"
    role_name: "key-manager:observer"
    user_domain_name: "{{ qalogging_test_domain }}"
    project_domain_name: "{{ qalogging_test_domain }}"
  when: hqe_group_vars.barbican_available | bool

- name: hqe-logging | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ logging_work_folder }}/testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070100DE3063000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/templates07070100DE3064000081A4000003E800000064000000015B3CDC1200000271000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/templates/testrc.j2# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_VERION=3
export OS_BASE_AUTH_URL={{ keystone_admin_endpoint }}/v3
export OS_AUTH_URL={{ keystone_admin_endpoint }}/v3
export OS_USERNAME={{ qalogging_test_user }}
export OS_PASSWORD={{ qalogging_test_password }}
export OS_PROJECT_NAME={{ qalogging_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_ENDPOINT_TYPE=internalURL
export OS_USER_DOMAIN_NAME={{ qalogging_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ qalogging_test_domain }}
export OS_CACERT={{ ca_bundle }}
07070100DE3061000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/vars07070100DE3062000081A4000003E800000064000000015B3CDC1200000579000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-logging-run/vars/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: ci.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
qalogging_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
qalogging_test_user: "{{ ['qalogging_user', demo_random_uuid] | join('-') }}"
qalogging_test_project: "{{ ['qalogging_project', demo_random_uuid] | join('-') }}"
qalogging_test_password: "{{ ['qalogging_password', demo_random_uuid] | join('-') }}"
qalogging_test_domain: Default
qalogging_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"

logging_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_logging.deploy.tests_folder }}"
logging_work_folder: "{{ work_folder }}/{{ hqe_logging.deploy.test_suite }}"

070701010C1797000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy070701010E2239000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/files07070101102F36000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/files/run_filters07070101102F37000081A4000003E800000064000000015B3CDC1200000012000001030000000400000000000000000000007800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/files/run_filters/monasca-cli-tests.txtmonasca-cli-tests
07070101102F38000081A4000003E800000064000000015B3CDC1200000012000001030000000400000000000000000000006F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/files/run_filters/parallel.txtmonasca-cli-tests
07070101102F39000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/tasks07070101102F3A000081A4000003E800000064000000015B3CDC12000002B1000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/tasks/install.yml---
- name: hqe-monasca-cli-tests | install | Create work folder {{ monasca_cli_tests_work_folder }}
  file:
    path: "{{ monasca_cli_tests_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    recurse: yes

- name: hqe-monasca-cli-tests | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ monasca_cli_tests_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-monasca-cli-tests | install | Deploy run script
  template: >
    src=hqe-monasca-cli-tests.j2
    dest={{ monasca_cli_tests_work_folder }}/hqe-monasca-cli-tests
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101102F3B000081A4000003E800000064000000015B3CDC120000001B000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/tasks/main.yml---
- include: install.yml
070701010E2237000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/templates070701010E2238000081A4000003E800000064000000015B3CDC1200000274000001030000000400000000000000000000007300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/templates/hqe-monasca-cli-tests.j2#!/bin/bash

# Wrapper script to execute monasca-cli-tests
# within the venv, with the right parameters
#
# Usage: hqe-monasca-cli-tests run_filter_filename

set -o pipefail

IMAGE_ID=$1
KEYNAME=$2
FLAVOR=$3
AZ=$4
NVMS=$5
RUN_FILTER=${6:-parallel.txt}

TEST_HOME={{ monasca_cli_tests_code_folder }}
WORK_HOME={{ monasca_cli_tests_work_folder }}
VENV={{ common_venv_folder }}
# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source {{ monasca_cli_tests_work_folder}}/hqe-monasca-cli-tests.testrc

# Run the test
cmd="python ${TEST_HOME}/test_monasca_client_details.py"

echo $cmd
$cmd


070701010C1798000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/vars070701010C1799000081A4000003E800000064000000015B3CDC12000000DD000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-deploy/vars/main.yml---
monasca_cli_tests_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_monasca_cli_tests.deploy.tests_folder }}"
monasca_cli_tests_work_folder: "{{ work_folder }}/{{ hqe_monasca_cli_tests.deploy.test_suite }}"
07070101002C97000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run070701010226A2000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/tasks070701010226A3000081A4000003E800000064000000015B3CDC1200000003000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/tasks/cleanup.yml---070701010226A4000081A4000003E800000064000000015B3CDC120000015A000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"070701010226A5000081A4000003E800000064000000015B3CDC12000003CC000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
#We will need to store the exit code somewhere for Jenkins to pick it up (TBD)
- set_fact:
      test_status: true

- name: hqe-monasca-cli-tests | run | Run the tests
  command: "{{ monasca_cli_tests_work_folder }}/hqe-monasca-cli-tests {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-monasca-cli-tests | run | Show test output
  debug: var=test_output

# The run task should also include steps required to collect the test results
# for injection into the test tracker DB.
# This simple example does not use a test runner - so the rest results are
# only produced in a log file for now.
# The hqa-common-run role will contain in future the ansible code to handle
# test result in different format, and produce subunit ready for injecttion
# into the DB.
070701010226A6000081A4000003E800000064000000015B3CDC12000000FF000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/tasks/test-resources.yml---
- name: hqe-monasca-cli-tests | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ monasca_cli_tests_work_folder }}/hqe-monasca-cli-tests.testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600070701010226A0000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/templates070701010226A1000081A4000003E800000064000000015B3CDC1200000146000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/templates/testrc.j2export OS_AUTH_URL={{ os_auth_url }}
export OS_USERNAME={{ keystone_monasca_user }}
export OS_PASSWORD={{ keystone_monasca_password }}
export OS_PROJECT_NAME={{ keystone_admin_tenant }}
export OS_CACERT={{ ca_bundle }}
# export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
# export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}
07070101002C98000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/vars07070101002C99000081A4000003E800000064000000015B3CDC1200000446000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-cli-tests-run/vars/main.yml---
# Add or remove the variables that are needed for your test suite and
# remove this line
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# General keystone settings
keystone_version: "v3"
keystone_admin_tenant: "{{ osrc_vars.os_project_name }}"

# os_auth_url

os_auth_url: "{{ osrc_vars.os_auth_url }}"

# Monasca settings

keystone_monasca_user: "{{ hqe_group_vars.monasca_user }}"
keystone_monasca_password: "{{ hqe_group_vars.monasca_password}}"

monasca_cli_tests_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_monasca_cli_tests.deploy.tests_folder }}"
monasca_cli_tests_work_folder: "{{ work_folder }}/{{ hqe_monasca_cli_tests.deploy.test_suite }}"
07070100CC245D000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy07070100CE3C02000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/files07070100CE3C03000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/files/run_filters07070100CE3C05000081A4000003E800000064000000015B3CDC120000000F000001030000000400000000000000000000007200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/files/run_filters/monasca-soapui.txtmonasca-soapui
07070100CE3C04000081A4000003E800000064000000015B3CDC120000000F000001030000000400000000000000000000006C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/files/run_filters/parallel.txtmonasca-soapui
07070100D02E29000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/tasks07070100D02E2A000081A4000003E800000064000000015B3CDC120000081F000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/tasks/install.yml---
- name: hqe-monasca-soapui | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-monasca-soapui | install | Create work folder {{ monasca_soapui_work_folder }}
  file:
    path: "{{ monasca_soapui_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    recurse: yes

- name: hqe-monasca-soapui | install | Copy code into work folder
  copy:
    src: "{{ item }}"
    dest: "{{ monasca_soapui_work_folder }}/{{ monasca_soapui_code_folder | basename }}/"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755
  with_fileglob:
    - "{{ monasca_soapui_code_folder }}/*.sh"

- name: hqe-monasca-soapui | install | Copy code into work folder
  copy:
    src: "{{ item }}"
    dest: "{{ monasca_soapui_work_folder }}/{{ monasca_soapui_code_folder | basename }}/"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
  with_fileglob:
    - "{{ monasca_soapui_code_folder }}/*"
  when: not(item | match('.*\.sh'))

- name: hqe-monasca-soapui | install | Install Java dependencies for SoapUI cli tests
  become: yes
  become_user: root
  package: name={{ item }} state=present
  with_items: hqe_monasca_soapui_pkgs

# NOTE(andreaf) Certs validation: https://github.com/ansible/ansible/issues/12549
- name: hqe-monasca-soapui | install | Install SoapUI
  get_url:
    force: no
    url: "{{ soapui_download_url }}"
    dest: "{{ monasca_soapui_work_folder }}/{{ soapui_download_url | basename }}"
    validate_certs: no
    timeout: 120

- name: hqe-monasca-soapui | install | Unarchive SoapUI
  unarchive:
    creates: "{{ monasca_soapui_work_folder }}/{{ soapui_install_folder }}"
    copy: no
    src: "{{ monasca_soapui_work_folder }}/{{ soapui_download_url | basename }}"
    dest: "{{ monasca_soapui_work_folder }}"

- name: hqe-monasca-soapui | install | change log level
  command: sed -i 's/level value="DEBUG"/level value="INFO"/g' "{{ monasca_soapui_work_folder }}/{{ soapui_install_folder }}/bin/soapui-log4j.xml"
07070100D02E2B000081A4000003E800000064000000015B3CDC120000001B000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/tasks/main.yml---
- include: install.yml
07070100CC245E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/vars07070100CC245F000081A4000003E800000064000000015B3CDC120000002F000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/vars/debian.yml---
hqe_monasca_soapui_pkgs:
  - openjdk-8-jre
07070100CC2461000081A4000003E800000064000000015B3CDC12000000D2000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/vars/main.yml---
monasca_soapui_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_monasca_soapui.deploy.tests_folder }}"
monasca_soapui_work_folder: "{{ work_folder }}/{{ hqe_monasca_soapui.deploy.test_suite }}"

07070100CC2460000081A4000003E800000064000000015B3CDC120000003D000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-deploy/vars/suse.yml---
hqe_monasca_soapui_pkgs:
  - java-1_8_0-openjdk-headless
07070101200FAB000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run07070101200FB0000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/tasks07070101200FB1000081A4000003E800000064000000015B3CDC1200000101000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101200FB2000081A4000003E800000064000000015B3CDC120000016F000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/tasks/run.yml---
- name: hqe-monasca-soapui-run | run | Test_MonascaRegression_Suite.sh
  become: yes
  command: ./Test_MonascaRegression_Suite.sh
  register: test_output
  ignore_errors: True
  args:
    chdir: "{{ monasca_soapui_code_folder }}/"

#- name: hqe-template | run | Show test output - TestSuite_Regression
#  debug: var=test_output
#  when: run_filter == "periodic"

07070101200FB3000081A4000003E800000064000000015B3CDC120000025D000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/tasks/test-resources.yml---
# NOTE(andreaf) Tests expect a configuration file (test_resources.sh) to live
# along with the code. As the code folder is read-only, we copy the code to the
# work folder and re-set the code folder to the new location.
- set_fact:
    monasca_soapui_code_folder: "{{ monasca_soapui_work_folder }}/{{ monasca_soapui_code_folder | basename }}"

# Deploy test configuration, replace any existing test resources
- name: hqe-keystone-soapui-run | test-resources | Deploy test_resources.sh
  template:
    src: test_resources.j2
    dest: "{{ monasca_soapui_code_folder }}/test_resources.sh"
    force: yes07070101200FAE000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/templates07070101200FAF000081A4000003E800000064000000015B3CDC120000019C000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/templates/test_resources.j2InstallFolder={{ monasca_soapui_work_folder }}
KSENDPOINT={{ os_auth_url }}
MONENDPOINT={{ monasca_endpoint }}
TestFolder={{ monasca_soapui_code_folder }}
monasca_user={{ keystone_monasca_user }}
monasca_password={{ keystone_monasca_password }}
monasca_version={{ monasca_api_version }}
monasca_tenant={{ keystone_admin_tenant }}
SoapuiSettings={{ SoapuiSettings }}

KSADMINENDPOINTPORT=5000
MONENDPOINTPORT=807007070101200FAC000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/vars07070101200FAD000081A4000003E800000064000000015B3CDC12000004E2000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monasca-soapui-run/vars/main.yml---
# Add or remove the variables that are needed for your test suite and
# remove this line
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml.
run_filter_file: parallel.txt

# General keystone settings
keystone_version: "v3"
keystone_admin_tenant: "{{ osrc_vars.os_project_name }}"
os_auth_url: "{{ hqe_group_vars.keystone_endpoint }}"

# Monasca settings
monasca_endpoint: "{{ hqe_group_vars.monasca_endpoint }}"
keystone_monasca_user: "{{ hqe_group_vars.monasca_user }}"
keystone_monasca_password: "{{ hqe_group_vars.monasca_password }}"
monasca_port: "{{ hqe_group_vars.monasca_port }}"
monasca_api_version: "v2.0"
SoapuiSettings: soapui_settings.xml

monasca_soapui_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_monasca_soapui.deploy.tests_folder }}"
monasca_soapui_work_folder: "{{ work_folder }}/{{ hqe_monasca_soapui.deploy.test_suite }}"
07070101200EF5000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy07070101200EFE000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files07070101200EFF000081A4000003E800000064000000015B3CDC12000001D9000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files/.testr.conf[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
             OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
             OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
             OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
             ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]*\.)*
07070101200F05000081A4000003E800000064000000015B3CDC1200000845000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files/monasca_testsrunning=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
monasca_tempest_tests.tests.api.test_alarm_definitions.TestAlarmDefinitions.test_list_alarm_definitions[gate]
monasca_tempest_tests.tests.api.test_alarm_definitions.TestAlarmDefinitions.test_list_alarm_definitions_with_dimensions[gate]
monasca_tempest_tests.tests.api.test_alarm_definitions.TestAlarmDefinitions.test_list_alarm_definitions_with_name[gate]
monasca_tempest_tests.tests.api.test_alarm_definitions.TestAlarmDefinitions.test_list_alarm_definitions_with_offset_limit[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms_by_alarm_definition_id[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms_by_lifecycle_state[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms_by_link[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms_by_metric_dimensions[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms_by_metric_name[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms_by_offset_limit[gate]
monasca_tempest_tests.tests.api.test_alarms.TestAlarms.test_list_alarms_by_state[gate]
monasca_tempest_tests.tests.api.test_measurements.TestMeasurements.test_list_measurements[gate]
monasca_tempest_tests.tests.api.test_measurements.TestMeasurements.test_list_measurements_with_dimensions[gate]
monasca_tempest_tests.tests.api.test_metrics.TestMetrics.test_list_metrics[gate]
monasca_tempest_tests.tests.api.test_metrics.TestMetrics.test_list_metrics_with_dimensions[gate]
monasca_tempest_tests.tests.api.test_notification_methods.TestNotificationMethods.test_list_notification_methods[gate]
monasca_tempest_tests.tests.api.test_versions.TestVersions.test_get_version[gate]
07070101200F00000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files/run_filters07070101200F01000081A4000003E800000064000000015B3CDC120000000F000001030000000400000000000000000000007200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files/run_filters/monascatempest.txtmonascatempest
07070101200F03000081A4000003E800000064000000015B3CDC120000000F000001030000000400000000000000000000006C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files/run_filters/parallel.txtmonascatempest
07070101200F02000081A4000003E800000064000000015B3CDC120000000F000001030000000400000000000000000000006C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files/run_filters/periodic.txtmonascatempest
07070101200F04000081A4000003E800000064000000015B3CDC120000084A000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/files/tests2skip.py#!/usr/bin/env python
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# Reads in a list of exclude regular expressions from a file and outputs a
# regex suitable to be passed into testr

import sys

"""
Whitelist is applied first. The blacklist is executed against the set of
tests returned by the whitelist.
If whitelist is empty, all available tests are fed to blacklist.
If blacklist is empty, all tests from whitelist are returned.

The syntax for white-list and black-list is as follows:
- lines starting with # or empty are ignored
- lines starting with "+" are whitelisted
- lines starting with "-" are blacklisted
- lines not matching any of the above conditions are blacklisted

The match for each line gets added a "^" in the beginning,
so the regular expression should account for that.

For example, the following scenario:

    run all the smoke tests and scenario tests,
    but exclude the api.volume tests.

is implemented as:

    +.*smoke
    +tempest\.scenario
    -tempest\.api\.volume.*
"""

whitelist = []
blacklist = []
with open(sys.argv[1]) as fp:
    for line in fp:
        line = line.strip()
        if not line or line[0] == '#':
            continue
        if line.startswith("+"):
            whitelist.append(line[1:])
        elif line.startswith("-"):
            blacklist.append(line[1:])
        else:
            blacklist.append(line)

regex = '^(?=({whitelist}))'
params = dict(whitelist="|".join(whitelist))
if blacklist:
    regex += '(?!({blacklist}))'
    params['blacklist'] = "|".join(blacklist)

print(regex.format(**params))
07070101200F06000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/tasks07070101200F08000081A4000003E800000064000000015B3CDC1200000B1F000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/tasks/configure.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
- name: hqe-monascatempest | configure | Create the work folder {{ monascatempest_work_folder }}
  file:
    path: "{{ monascatempest_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755
    state: directory

- name: hqe-monascatempest | configure | Initialise tempest work folder
  shell: ". {{ monascatempest_venv_folder }}/bin/activate; tempest init"
  args:
    chdir: "{{ monascatempest_work_folder }}"
    creates: "{{ monascatempest_work_folder }}/.testrepository"

- name: hqe-monascatempest | configure | Create the bin folder {{ monascatempest_conf_folder }}/bin
  file:
    path: "{{ monascatempest_work_folder }}/bin"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755
    state: directory

# FIXME(andreaf) this is what run_filters are for, the list of tests to be executed
# should be included in there because this way run filters are not honoured
- name: hqe-monascatempest | configure | Create list of monasca tests to be executed
  copy:
    src: monasca_tests
    dest: "{{ monascatempest_work_folder }}/monasca_tests"
    mode: 0640

- name: hqe-monascatempest | configure | Tempest {{ monascatempest_conf_folder }}/tempest.conf
  template:
    src: "tempest.conf.j2"
    dest: "{{ monascatempest_conf_folder }}/tempest.conf"
    mode: 0644
    force: yes

- name: hqe-monascatempest | configure | Deploy tests2skip.py
  copy:
    src: tests2skip.py
    dest: "{{ monascatempest_work_folder }}/tests2skip.py"
    mode: 0640

- name: hqe-monascatempest | configure | Deploy run_filters
  copy:
    src: run_filters
    dest: "{{ monascatempest_work_folder }}"
    mode: 0640

- name: hqe-monascatempest | configure | Deploy ardana-tempest script to run tests
  template: >
    src=ardana-tempest.sh.j2
    dest="{{ monascatempest_work_folder }}/bin/ardana-tempest.sh"
    mode=0700

### FIXME (nicolasbock) Create rebranding compatibility link
- name: hqe-monascatempest | configure | Deploy compat link to ardana-tempest script to run tests
  file:
      src: "{{ monascatempest_work_folder }}/bin/ardana-tempest.sh"
      dest: "helion-tempest.sh"
      state: link
### FIXME (nicolasbock) Create rebranding compatibility link
07070101200F07000081A4000003E800000064000000015B3CDC1200000A85000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/tasks/install.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
- name: hqe-monascatempest | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- name: hqe-monascatempest | install | Install binary dependencies for Tempest
  become: yes
  become_user: root
  package: name={{ item }} state=present
  with_items: hqe_monascatempest_pkgs

# FIXME(andreaf) This should not clone from an hardcoded repo/branch
- name: hqe-monascatempest | install | Pull upstream Tempest from the Gozer
  become: yes
  become_user: root
  git: repo=http://git.suse.provo.cloud/openstack/tempest
       dest={{ tempest_code_folder }}
       version=hp/master
       update=no

- name: hqe-monascatempest | install | Tempest code owned by {{ hqe_user }}
  become: yes
  become_user: root
  file:
    path: "{{ tempest_code_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

# FIXME(andreaf) This should not clone from an hardcoded repo/branch
- name: hqe-monascatempest | install | clone monasca-api
  become: yes
  become_user: root
  git: repo=https://github.com/openstack/monasca-api
       dest={{ monascatempest_code_folder }}
       version=master
       update=yes

- name: hqe-monascatempest | install | Monasca Tempest code owned by {{ hqe_user }}
  become: yes
  become_user: root
  file:
    path: "{{ monascatempest_code_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"

# FIXME(andreaf) Is this really needed?
- name: hqe-monascatempest | install | Install cffi - need to be installed separately
  pip: name=cffi
    virtualenv={{ monascatempest_venv_folder }}
    extra_args='--upgrade'

# Plugin needs to be installed first for tempest to discover
- name: hqe-monascatempest | install | Install monascaapi in venv
  pip:
    name: "{{ monascatempest_code_folder }}/"
    virtualenv: "{{ monascatempest_venv_folder }}"
    extra_args: "--pre"

- name: hqe-monascatempest | install | Install tempest
  pip:
    name: "{{ tempest_code_folder }}"
    virtualenv: "{{ monascatempest_venv_folder }}"


07070101200F09000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070101200EFA000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/templates07070101200EFB000081A4000003E800000064000000015B3CDC12000004C4000001030000000400000000000000000000006C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/templates/ardana-tempest.sh.j2#!/usr/bin/env bash
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

set -eux
set -o pipefail

# This script runs tempest against a deployed Helion OpenStack cloud
#
# Usage: [path]/ardana-tempest.sh [run-filter]

# Environment variable may be overridden by the caller
export TESTR="{{ monascatempest_venv_folder }}/bin/testr"
export PYTHON="{{ monascatempest_venv_folder }}/bin/python"
export TESTS_TO_SKIP_BIN="{{ monascatempest_work_folder }}/tests2skip.py"
export RUN_FILTER="{{ monascatempest_work_folder }}/run_filters/${1:-{{ run_filter }}}.txt"

cd {{ monascatempest_work_folder }}
${TESTR} run --load-list=monasca_tests
07070101200EFD0000A1FF000003E800000064000000015CCC2E2D00000014000001030000000400000000000000000000006C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/templates/helion-tempest.sh.j2ardana-tempest.sh.j207070101200EFC000081A4000003E800000064000000015B3CDC120000068F000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/templates/tempest.conf.j2#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Basic configuration file
# The keystone credentials and host need to be referenced here explicitly
# because of https://github.com/ansible/ansible/issues/9008

[DEFAULT]
#debug = true
log_dir = {{ monascatempest_work_folder }}/logs
log_file = tempest.log

[identity]
username = monasca
tenant_name = admin
password = {{ keystone_monasca_pwd }}
alt_username = monasca
alt_tenant_name = admin
alt_password = {{ keystone_monasca_pwd }}
admin_username = {{ osrc_vars.os_username }}
admin_tenant_name = {{ osrc_vars.os_project_name }}
admin_password = {{ osrc_vars.os_password }}
admin_domain_name = Default
disable_ssl_certificate_validation = true
uri = {{ osrc_vars.os_unversioned_auth_url | regex_replace(':5000', ":35357") }}/v2.0
uri_v3 = {{ osrc_vars.os_unversioned_auth_url | regex_replace(':5000', ":35357") }}/v3
ca_certificates_file = {{ ca_bundle }}
region = region-ccp
v2_public_endpoint_type = internalURL

#use_ssl = False
#auth_version = v3

#[identity-feature-enabled]
#api_v3 = true

[monitoring]
endpoint_type = internalURL
07070101200EF6000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/vars07070101200EF7000081A4000003E800000064000000015B3CDC1200000035000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/vars/debian.yml---
hqe_monascatempest_pkgs:
   - libmysqlclient-dev
07070101200EF9000081A4000003E800000064000000015B3CDC1200000F14000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/vars/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

tempest_auth_url: "{{ hostvars[groups['KEY-API'][0]].KEY_API.advertises.vips.admin[0].url }}"

keystone_admin_user: "{{ hostvars[groups['KEY-API'][0]].KEY_API.vars.keystone_admin_user }}"
keystone_admin_tenant: "{{ hostvars[groups['KEY-API'][0]].KEY_API.vars.keystone_admin_tenant }}"
keystone_admin_pwd: "{{ hostvars[groups['KEY-API'][0]].KEY_API.vars.keystone_admin_pwd }}"
keystone_demo_user: "{{ hostvars[groups['KEY-API'][0]].KEY_API.vars.keystone_demo_user }}"
keystone_demo_tenant: "{{ hostvars[groups['KEY-API'][0]].KEY_API.vars.keystone_demo_tenant }}"
keystone_demo_pwd: "{{ hostvars[groups['KEY-API'][0]].KEY_API.vars.keystone_demo_pwd }}"
#keystone_monasca_user: "{{ hostvars[groups['MON_API'][0]].KEY_API.vars.keystone_monasca_user }}"
#keystone_monasca_pwd: "{{ hostvars[groups['MON-API'][0]].KEY_API.vars.keystone_monasca_password }}"
keystone_monasca_user: "{{ MON_API.consumes_KEY_API.vars.keystone_monasca_user }}"
keystone_monasca_pwd: "{{ MON_API.consumes_KEY_API.vars.keystone_monasca_password }}"

# The installation directory is where the configuration files are deployed,
# e.g. .testr.conf, etc/tempest.conf
tempest_code_folder: "{{ code_folder }}/tempest"
monascatempest_code_folder: "{{ code_folder }}/{{ hqe_monascatempest.deploy.tests_folder }}"
monascatempest_work_folder: "{{ work_folder }}/{{ hqe_monascatempest.deploy.test_suite }}"
monascatempest_conf_folder: "{{ monascatempest_work_folder }}/etc"
monascatempest_venv_folder: "{{ common_venv_root }}/{{ hqe_monascatempest.deploy.venv_folder }}"

# The default run concurrency is determined by the number of the CPU cores on
# the test driver
run_concurrency: 0

# This is the file that includes the regex to filter the tests to be executed
run_filter: full

# tempest tests timeout in seconds
tempest_timeout_secs: 32400
tempest_poll_secs: 60

# Services available for test
cinder_available: true
neutron_available: true
glance_available: true
swift_available: true
nova_available: true
heat_available: true
ceilometer_available: false
horizon_available: true
sahara_available: false
ironic_available: false
trove_available: false
zaqar_available: false

# Defaults for test resources
username: helion_tempest
alt_username: helion_tempest_alt
password: helion

ext_net_cidr: "172.31.0.0/16"

# TLS vars

# Service endpoints to use

tempest_service_endpoints:
    - { section: "identity", option: "v2_public_endpoint_type", value: "internalURL" }
    - { section: "compute", option: "endpoint_type", value: "internalURL" }
    - { section: "volume", option: "endpoint_type", value: "internalURL" }
    - { section: "network", option: "endpoint_type", value: "internalURL" }
    - { section: "image", option: "endpoint_type", value: "internalURL" }
    - { section: "object-storage", option: "endpoint_type", value: "internalURL" }
    - { section: "orchestration", option: "endpoint_type", value: "internalURL" }
    - { section: "telemetry", option: "endpoint_type", value: "internalURL" }
    - { section: "data_processing", option: "endpoint_type", value: "internalURL" }
    - { section: "baremetal", option: "endpoint_type", value: "internalURL" }
    - { section: "monitoring", option: "endpoint_type", value: "internalURL" }
07070101200EF8000081A4000003E800000064000000015B3CDC1200000033000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-deploy/vars/suse.yml---
hqe_monascatempest_pkgs:
   - libmysqlclient18
07070101220034000041ED000003E800000064000000045B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-run07070101220037000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-run/tasks07070101220038000081A4000003E800000064000000015B3CDC1200000100000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"07070101220039000081A4000003E800000064000000015B3CDC1200000348000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-run/tasks/run.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

- name: hqe-monascatempest | run | Trigger ardana-tempest.sh
  command: "{{ monascatempest_work_folder }}/bin/ardana-tempest.sh {{ run_filter }}"
  register: tempest_result
  ignore_errors: True

0707010122003A000081A4000003E800000064000000015B3CDC120000065E000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-run/tasks/test-resources.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

# Monasca tempest plugins relies on an hard-coded role called "anotherrole"
# NOTE(andreaf) This role becomes visible to all users in the default domain, so
# it may affect other tests. However to my knowledge monasca-plugin is the only
# set of tests that relies on it. To avoid issues we do not clean-up the role
# at the end of the test run.
- name: hqe-monascatempest | test-resources | Create role "anotherrole" if it doesn't exist
  keystone_v3:
    action: create_role
    role_name: "{{ monascatempest_role_name }}"
    description: "Role used by tempest monasca plugin dynamic credentials"
    login_username: "{{ osrc_vars.os_username }}"
    login_password: "{{ osrc_vars.os_password }}"
    login_user_domain_name: "{{ osrc_vars.os_user_domain_name }}"
    login_username: "{{ osrc_vars.os_project_name }}"
    login_project_domain_name: "{{ osrc_vars.os_project_domain_name }}"
    login_domain_name: "{{ osrc_vars.os_domain_name }}"
    endpoint: "{{ osrc_vars.os_url }}"
07070101220035000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-run/vars07070101220036000081A4000003E800000064000000015B3CDC1200000BF1000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-monascatempest-run/vars/main.yml#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

tempest_auth_url: "{{ hqe_monascatempest.deploy.tempest_auth_url }}"

keystone_admin_user: admin
keystone_admin_tenant: admin
#keystone_admin_pwd: "{{ hqe_monascatempest.deploy.keystone_admin_pwd }}"
keystone_demo_user: demo
keystone_demo_tenant: demo
keystone_demo_pwd: demo

# The installation_directory is where the configuration files are deployed,
# e.g. .testr.conf, etc/tempest.conf
monascatempest_code_folder: "{{ code_folder }}/{{ hqe_monascatempest.deploy.tests_folder }}"
monascatempest_work_folder: "{{ work_folder }}/{{ hqe_monascatempest.deploy.test_suite }}"
monascatempest_conf_folder: "{{ code_folder }}/{{ hqe_monascatempest.deploy.tests_folder }}/etc"
monascatempest_venv_folder: "{{ common_venv_root }}/{{ hqe_monascatempest.deploy.venv_folder }}"

# The default run concurrency is determined by the number of the CPU cores on
# the test driver
run_concurrency: 0

# This is the file that includes the regex to filter the tests to be executed
run_filter: full

# tempest tests timeout in seconds
tempest_timeout_secs: 32400
tempest_poll_secs: 60

# Services available for test
cinder_available: true
neutron_available: true
glance_available: true
swift_available: true
nova_available: true
heat_available: true
ceilometer_available: false
horizon_available: true
sahara_available: false
ironic_available: false
trove_available: false
zaqar_available: false

# Defaults for test resources
username: helion_tempest
alt_username: helion_tempest_alt
password: helion

ext_net_cidr: "172.31.0.0/16"

# TLS vars

# Service endpoints to use
tempest_service_endpoints:
    - { section: "identity", option: "v2_public_endpoint_type", value: "internalURL" }
    - { section: "compute", option: "endpoint_type", value: "internalURL" }
    - { section: "volume", option: "endpoint_type", value: "internalURL" }
    - { section: "network", option: "endpoint_type", value: "internalURL" }
    - { section: "image", option: "endpoint_type", value: "internalURL" }
    - { section: "object-storage", option: "endpoint_type", value: "internalURL" }
    - { section: "orchestration", option: "endpoint_type", value: "internalURL" }
    - { section: "telemetry", option: "endpoint_type", value: "internalURL" }
    - { section: "data_processing", option: "endpoint_type", value: "internalURL" }
    - { section: "baremetal", option: "endpoint_type", value: "internalURL" }

monascatempest_role_name: anotherrole
07070101200F50000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy07070101200F56000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/files07070101200F57000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/files/run_filters07070101200F58000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/files/run_filters/ftc.txtftc
07070101200F5A000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/files/run_filters/net-dsnat.txtftc
07070101200F59000081A4000003E800000064000000015B3CDC1200000007000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/files/run_filters/public.txtpublic
07070101200F5B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/tasks07070101200F5C000081A4000003E800000064000000015B3CDC12000002EE000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/tasks/main.yml---

- name: hqe-net-dsnat | install | Create the work folder on the test driver
  file: >
    path="{{ net_dsnat_work_folder }}"
    state=directory

- name: hqe-net-dsnat | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ net_dsnat_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-net-dsnat | install | Deploy the dsnat test script
  template: >
    src=dsnat-deploy.j2
    dest={{ net_dsnat_work_folder }}/dsnat.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-dsnat | install | Deploy cleanup script
  template: >
    src=cleanup-deploy.j2
    dest={{ net_dsnat_work_folder }}/cleanup.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101200F53000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/templates07070101200F54000081A4000003E800000064000000015B3CDC120000018B000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/templates/cleanup-deploy.j2#!/bin/bash

# Wrapper script to execute the network cleaner
# within the venv, with the right parameters
#
# Usage: cleaner.sh

set -o pipefail

# Activate the virtual environment
source {{ common_venv_folder }}/bin/activate

cd {{ net_dsnat_work_folder }}
# OS credentials
. ./net-dsnat.osrc

# Run the test
cmd="python {{ net_dsnat_code_folder }}/api_scripts/cleaner.py --all"
echo $cmd
$cmd
07070101200F55000081A4000003E800000064000000015B3CDC1200000430000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/templates/dsnat-deploy.j2#!/bin/bash

# Wrapper script to execute the network dsnat.py script
# within the venv, with the right parameters
#
set -o pipefail

RUN_FILTER=${1:-ftc.txt}
RUN_FILTER_DIR={{ net_dsnat_work_folder }}/run_filters

profile=$(cat $RUN_FILTER_DIR/${RUN_FILTER})
case $profile in
ftc)
    TARGET_IP="10.1.24.18"
    TARGET_FQDN="fdc.cdl.local"
    DNS_SERVER="10.1.65.20"
    ;;
public)
    TARGET_IP="212.27.48.10"
    TARGET_FQDN="www.free.fr"
    DNS_SERVER="8.8.8.8"
    ;;
default)
    TARGET_IP="212.27.48.10"
    TARGET_FQDN="www.free.fr"
    DNS_SERVER="8.8.8.8"
    ;;
esac

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate


# Run the test
cd {{ net_dsnat_work_folder }}
. ./net-dsnat.osrc

CIRROS_IMAGE_ID=$(openstack image list | awk '/cirros-0.3/ {print $2}'  | head -n 1)
if [[ -z $CIRROS_IMAGE_ID ]]
then
    echo "No valid Cirros image"
    exit 1
fi

cmd="python {{ net_dsnat_code_folder }}/cli_scripts/dsnat.py $CIRROS_IMAGE_ID 1 --ssh_user cirros --target_ip $TARGET_IP --dns $DNS_SERVER --target_fqdn $TARGET_FQDN"
echo $cmd
$cmd
07070101200F51000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/vars07070101200F52000081A4000003E800000064000000015B3CDC12000000BD000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-deploy/vars/main.yml---
net_dsnat_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_net_dsnat.deploy.tests_folder }}"
net_dsnat_work_folder: "{{ work_folder }}/{{ hqe_net_dsnat.deploy.test_suite }}"
07070101041B5A000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run07070101063CB0000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/tasks07070101063CB1000081A4000003E800000064000000015B3CDC1200000593000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/tasks/cleanup.yml---
# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-dsnat-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-dsnat-deploy role.

- name: hqe-net-dsnat | cleanup | Cleanup all VMs and network objects
  command: "{{ net_dsnat_work_folder }}/cleanup.sh"
  register: cleanup_result
  until: cleanup_result.rc == 0
  ignore_errors: True
  retries: 5
  delay: 10

- name: hqe-net-dsnat | cleanup | Show the cleanup result
  debug: var=cleanup_result

- name : hqe-net-snat | cleanup | Delete the logs
  shell: /bin/rm -f {{ net_dsnat_work_folder }}/*.log

- name: hqe-net-dsnat | cleanup | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-dsnat | cleanup | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"

- name : hqe-net-snat | cleanup | Delete the OS credentials
  shell: /bin/rm -f {{ net_dsnat_work_folder }}/net-dsnat.osrc
07070101063CB2000081A4000003E800000064000000015B3CDC120000015D000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"

- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"

- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101063CB3000081A4000003E800000064000000015B3CDC1200000383000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-dsnat-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-dsnat-deploy role.
- name: hqe-net-dsnat | run | test of the dsnat feature
  command: "{{ net_dsnat_work_folder }}/dsnat.sh {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-net-dsnat | run | Show the test output
  debug: var=test_output

- name: hqe-net-dsnat | run | Set test status
  set_fact:
      test_status: false
  when: test_output.rc != 0
07070101063CB4000081A4000003E800000064000000015B3CDC1200000586000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-net-dsnat | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-net-dsnat | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-dsnat | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-dsnat | test-resources | Build a credential file
  template: >
    src=osrc.j2
    dest="{{ net_dsnat_work_folder }}/net-dsnat.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070101063CAE000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/templates07070101063CAF000081A4000003E800000064000000015B3CDC12000002EF000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/templates/osrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_ENDPOINT_TYPE=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}')
export OS_AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)/v2.0
export OS_ADMIN_NAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_USERNAME/ {print $2}')
export OS_ADMIN_TENANT=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PROJECT_NAME/ {print $2}')
export OS_ADMIN_PASSWORD=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PASSWORD/ {print $2}')
07070101041B5B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/vars07070101041B5C000081A4000003E800000064000000015B3CDC12000001F9000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-dsnat-run/vars/main.yml---
# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_net_dsnat', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"

# General keystone settings
service_osrc: "{{ osrc_vars.service_osrc_path }}"

net_dsnat_work_folder: "{{ work_folder}}/{{ hqe_net_dsnat.deploy.test_suite }}"
07070100C625D5000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy07070100C825B3000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/files07070100CA3EA4000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/files/run_filters07070100CA3EA7000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000007000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/files/run_filters/net-endurance.txtparallel
07070100CA3EA6000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/files/run_filters/parallel.txtparallel
07070100CA3EA5000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/files/run_filters/periodic.txtperiodic
07070100CA3EA8000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/tasks07070100CA3EA9000081A4000003E800000064000000015B3CDC120000046B000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/tasks/main.yml---
# Install net-endurance test dependencies

- name: hqe-net-endurance | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ net_endurance_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-net-endurance | install | Deploy the user creation script
  template: >
    src=user_creation.j2
    dest={{ net_endurance_work_folder }}/user_creation.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-endurance | install | Deploy endurance script
  template: >
    src=endurance-deploy.j2
    dest={{ net_endurance_work_folder }}/endurance.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-endurance | install | Deploy cleanup script
  template: >
    src=cleanup-deploy.j2
    dest={{ net_endurance_work_folder }}/cleanup.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-endurance | install | Deploy the user deletion script
  template: >
    src=user_deletion.j2
    dest={{ net_endurance_work_folder }}/user_deletion.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070100C825AE000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/templates07070100C825B0000081A4000003E800000064000000015B3CDC12000001EA000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/templates/cleanup-deploy.j2#!/bin/bash

# Wrapper script to execute the network cleaner
# within the venv, with the right parameters
#
# Usage: cleaner.sh

set -o pipefail

TEST_HOME={{ net_endurance_code_folder }}/api_scripts
WORK_HOME={{ net_endurance_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/net-endurance.osrc

# Run the test
cd $WORK_HOME
cmd="python ${TEST_HOME}/cleaner.py --all"

echo $cmd
$cmd
07070100C825AF000081A4000003E800000064000000015B3CDC120000048B000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/templates/endurance-deploy.j2#!/bin/bash

# Wrapper script to execute the network endurance test
# within the venv, with the right parameters
#
# Usage: endurance.sh image_id flavor vm_user ping_timeout run_filter_filename
set -o pipefail
set -x

FLAVOR=$1
VM_USER=$2
PING_TIMEOUT=$3
RUN_FILTER=${4:-periodic.txt}

RUN_FILTER_DIR={{ net_endurance_work_folder }}/run_filters
profile=$(cat $RUN_FILTER_DIR/$RUN_FILTER)
case $profile in
periodic)
    VM_NUMBER=10
    LOOP_NUMBER=10
    ;;
parallel)
    VM_NUMBER=20
    LOOP_NUMBER=20
    ;;
*)
    VM_NUMBER=1
    LOOP_NUMBER=1
    ;;
esac

TEST_HOME={{ net_endurance_code_folder }}/api_scripts
WORK_HOME={{ net_endurance_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/net-endurance.osrc

CIRROS_IMAGE_ID=$(openstack image list | awk '/cirros-0.3/ {print $2}' | head -n 1)
if [[ -z $CIRROS_IMAGE_ID ]]
then
    echo "No valid Cirros image"
    exit 1
fi

# Run the test
cd $WORK_HOME
cmd="python ${TEST_HOME}/endurance.py $CIRROS_IMAGE_ID $FLAVOR -v $VM_NUMBER -l $LOOP_NUMBER -u $VM_USER --ping-timeout $PING_TIMEOUT"

echo $cmd
$cmd
07070100C825B2000081A4000003E800000064000000015B3CDC120000024C000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/templates/user_creation.j2#!/bin/bash

# Wrapper script to create the net-endurance user and tenant
#
# Usage: user_creation.sh

set -o pipefail

tenant_name=$1
username=$2
password=$3

WORK_HOME={{ net_endurance_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# Activate the V2 credentials
source $WORK_HOME/net-endurance-admin.osrc

keystone tenant-create --name $tenant_name --description "net-endurance user" --enabled true
keystone user-create --name $username --tenant $tenant_name --pass $password --email $username@myhelion.test --enabled true
07070100C825B1000081A4000003E800000064000000015B3CDC12000001AC000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/templates/user_deletion.j2#!/bin/bash

# Wrapper script to delete the net-endurance user and tenant
#
# Usage: use_deletion.sh

set -o pipefail

tenant_name=$1
username=$2

WORK_HOME={{ net_endurance_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# Activate the V2 credentials
source $WORK_HOME/net-endurance-admin.osrc

keystone user-delete $tenant_name
keystone tenant-delete $tenant_name
07070100C625D6000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/vars07070100C625D7000081A4000003E800000064000000015B3CDC1200000116000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-deploy/vars/main.yml---
net_endurance_service_name: "{{ hqe_net_endurance.deploy.service_name }}"
net_endurance_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_net_endurance.deploy.tests_folder }}"
net_endurance_work_folder: "{{ work_folder}}/{{ hqe_net_endurance.deploy.test_suite }}"
070701011E2B2B000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run07070101200E44000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/tasks07070101200E45000081A4000003E800000064000000015B3CDC1200000451000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/tasks/cleanup.yml---
# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-endurance-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-endurance-deploy role.

- name: hqe-net-endurance | cleanup | Cleanup all VMs and network objects
  command: "{{ net_endurance_work_folder }}/cleanup.sh"
  register: cleanup_result
  until: cleanup_result.rc == 0
  ignore_errors: True
  retries: 5
  delay: 10

- name: hqe-net-endurance | run | Show the cleanup result
  debug: var=cleanup_result

- name: hqe-net-endurance | cleanup | remove the endurance log file
  shell: /bin/rm -f {{ net_endurance_work_folder }}/endurance_*.log

- name: hqe-net-endurance | cleanup | remove the cleaner log file
  shell: /bin/rm -f {{ net_endurance_work_folder }}/cleaner_*.log

- name: hqe-net-endurance | run | deletion of the test tenant and user
  command: "{{ net_endurance_work_folder }}/user_deletion.sh {{ demo_test_project }} {{ demo_test_user }}"
  register: test_output
  ignore_errors: True

07070101200E46000081A4000003E800000064000000015B3CDC120000015A000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"07070101200E47000081A4000003E800000064000000015B3CDC1200000340000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-endurance-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-endurance-deploy role.
- name: hqe-net-endurance | run | run the endurance test
  command: "{{ net_endurance_work_folder }}/endurance.sh 1 cirros 150 {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-net-endurance | run | Show the endurance test output
  debug: var=test_output

07070101200E48000081A4000003E800000064000000015B3CDC1200000374000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-net-endurance | test-resources | Build the user credential file
  template: >
    src=testrc.j2
    dest="{{ net_endurance_work_folder }}/net-endurance.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- name: hqe-net-endurance | test-resources | Build the admin credential file
  template: >
    src=admin-testrc.j2
    dest="{{ net_endurance_work_folder }}/net-endurance-admin.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- name: hqe-net-endurance | run | creation of the test tenant and user
  command: "{{ net_endurance_work_folder }}/user_creation.sh {{ demo_test_project }} {{ demo_test_user }} {{ demo_test_password }}"
  register: test_output
  ignore_errors: True

- name: hqe-net-endurance | run | Show the user creation result
  debug: var=test_output.stdout_lines
07070101200E41000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/templates07070101200E43000081A4000003E800000064000000015B3CDC12000002A1000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/templates/admin-testrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_PASSWORD=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PASSWORD/ {print $2}')
export OS_USERNAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_USERNAME/ {print $2}')
export OS_TENANT_NAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PROJECT_NAME/ {print $2}')
export OS_ENDPOINT_TYPE=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}')
export OS_CACERT=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_CACERT/ {print $2}')
export OS_AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)/v2.0


07070101200E42000081A4000003E800000064000000015B3CDC12000002EF000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/templates/testrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_ENDPOINT_TYPE=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}')
export OS_AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)/v2.0
export OS_ADMIN_NAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_USERNAME/ {print $2}')
export OS_ADMIN_TENANT=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PROJECT_NAME/ {print $2}')
export OS_ADMIN_PASSWORD=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PASSWORD/ {print $2}')
070701011E2B2C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/vars070701011E2B2D000081A4000003E800000064000000015B3CDC12000003DA000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-endurance-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_net_endurance', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"

# General keystone settings
service_osrc: "{{ osrc_vars.service_osrc_path }}"
net_endurance_work_folder: "{{ work_folder}}/{{ hqe_net_endurance.deploy.test_suite }}"
07070101200F3C000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy07070101200F42000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/files07070101200F43000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/files/run_filters07070101200F45000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000006E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/files/run_filters/net-fragping.txtparallel
07070101200F46000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/files/run_filters/parallel.txtparallel
07070101200F44000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/files/run_filters/periodic.txtperiodic
07070101200F47000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/tasks07070101200F48000081A4000003E800000064000000015B3CDC120000029E000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/tasks/main.yml---
# Install net-fragping test dependencies

- name: hqe-net-fragping | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ net_fragping_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-net-fragping | install | Deploy fragmented ping script
  template: >
    src=fragping-deploy.j2
    dest={{ net_fragping_work_folder }}/fragping.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-fragping | install | Deploy cleanup script
  template: >
    src=cleanup-deploy.j2
    dest={{ net_fragping_work_folder }}/cleanup.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101200F3F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/templates07070101200F41000081A4000003E800000064000000015B3CDC12000001E7000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/templates/cleanup-deploy.j2#!/bin/bash

# Wrapper script to execute the network cleaner
# within the venv, with the right parameters
#
# Usage: cleaner.sh

set -o pipefail

TEST_HOME={{ net_fragping_code_folder }}/api_scripts
WORK_HOME={{ net_fragping_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/net-fragping.osrc

# Run the test
cd $WORK_HOME
cmd="python ${TEST_HOME}/cleaner.py --all"

echo $cmd
$cmd
07070101200F40000081A4000003E800000064000000015B3CDC12000003FC000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/templates/fragping-deploy.j2#!/bin/bash

# Wrapper script to execute the network fragping
# within the venv, with the right parameters
#
# Usage: fragping.sh image_id flavor ping_timeout run_filter_filename

set -o pipefail

FLAVOR=$1
PING_TIMEOUT=$2
RUN_FILTER=${3:-periodic.txt}

RUN_FILTER_DIR={{ net_fragping_work_folder }}/run_filters
profile=$(cat $RUN_FILTER_DIR/${RUN_FILTER})
case $profile in
periodic)
    DURATION=1200
    ;;
parallel)
    DURATION=3600
    ;;
*)
    DURATION=60
    ;;
esac

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

# activate the credentials
. {{ net_fragping_work_folder }}/net-fragping.osrc

CIRROS_IMAGE_ID=$(openstack image list | awk '/cirros-0.3/ {print $2}' | head -n 1)
if [[ -z $CIRROS_IMAGE_ID ]]
then
    echo "No valid Cirros image"
    exit 1
fi

# Run the test
cd {{ net_fragping_work_folder }}
cmd="python {{ net_fragping_code_folder }}/cli_scripts/fragm_ping.py $CIRROS_IMAGE_ID $FLAVOR --ping_sequence_duration $DURATION --ping_timeout $PING_TIMEOUT"
echo $cmd
$cmd
07070101200F3D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/vars07070101200F3E000081A4000003E800000064000000015B3CDC1200000110000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-deploy/vars/main.yml---
net_fragping_service_name: "{{ hqe_net_fragping.deploy.service_name }}"
net_fragping_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_net_fragping.deploy.tests_folder }}"
net_fragping_work_folder: "{{ work_folder}}/{{ hqe_net_fragping.deploy.test_suite }}"
07070101200EA7000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run07070101200EAC000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/tasks07070101200EAD000081A4000003E800000064000000015B3CDC12000004CD000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/tasks/cleanup.yml---
# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-fragping-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-fragping-deploy role.

- name: hqe-net-fragping | cleanup | Cleanup all VMs and network objects
  command: "{{ net_fragping_work_folder }}/cleanup.sh"
  register: cleanup_result
  until: cleanup_result.rc == 0
  ignore_errors: True
  retries: 5
  delay: 10

- name: hqe-net-fragping | run | Show the cleanup result
  debug: var=cleanup_result

- name: hqe-net-fragping | test-resources | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-fragping | test-resources | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
07070101200EAE000081A4000003E800000064000000015B3CDC120000015A000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"07070101200EAF000081A4000003E800000064000000015B3CDC120000032F000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-fragping-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-fragping-deploy role.
- name: hqe-net-fragping | run | check ICMP packets fragmentation
  command: "{{ net_fragping_work_folder }}/fragping.sh 1 900 {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-net-fragping | run | Show test result
  debug: var=test_output

07070101200EB0000081A4000003E800000064000000015B3CDC120000059C000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-net-fragping | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-net-fragping | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-fragping | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-fragping | test-resources | Build the credential file
  template: >
    src=testrc.j2
    dest="{{ net_fragping_work_folder }}/net-fragping.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070101200EAA000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/templates07070101200EAB000081A4000003E800000064000000015B3CDC1200000190000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/templates/testrc.j2export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)
export OS_AUTH_URL=$AUTH_URL/v2.0
export OS_ENDPOINT_TYPE=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}')
07070101200EA8000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/vars07070101200EA9000081A4000003E800000064000000015B3CDC12000004B2000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-fragping-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_net_fragping', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"
demo_test_domain: Default
demo_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# General keystone settings
service_osrc: "{{ osrc_vars.service_osrc_path }}"
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"
net_fragping_work_folder: "{{ work_folder}}/{{ hqe_net_fragping.deploy.test_suite }}"
07070101200F49000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-deploy07070101200F4E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-deploy/tasks07070101200F4F000081A4000003E800000064000000015B3CDC1200000160000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-deploy/tasks/main.yml---

- name: hqe-net-rbac | install | Create the work folder on the test driver
  file: >
    path="{{ net_rbac_work_folder }}"
    state=directory

- name: hqe-net-rbac | install | Deploy the rbac test script
  template: >
    src=rbac-deploy.j2
    dest={{ net_rbac_work_folder }}/rbac.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101200F4C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-deploy/templates07070101200F4D000081A4000003E800000064000000015B3CDC120000015A000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-deploy/templates/rbac-deploy.j2#!/bin/bash

# Wrapper script to execute the network rbac.py script
# within the venv, with the right parameters
#
set -o pipefail

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

# Run the test
cd {{ net_rbac_work_folder }}
. ./net-rbac.osrc
cmd="python {{ net_rbac_code_folder }}/cli_scripts/rbac.py"
echo $cmd
$cmd
07070101200F4A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-deploy/vars07070101200F4B000081A4000003E800000064000000015B3CDC12000000B9000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-deploy/vars/main.yml---
net_rbac_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_net_rbac.deploy.tests_folder }}"
net_rbac_work_folder: "{{ work_folder }}/{{ hqe_net_rbac.deploy.test_suite }}"
07070101200EEC000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run07070101200EF1000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/tasks07070101200EF2000081A4000003E800000064000000015B3CDC1200000102000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"

- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101200EF3000081A4000003E800000064000000015B3CDC1200000372000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-rbac-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-rbac-deploy role.
- name: hqe-net-rbac | run | test of the RBAC feature
  command: "{{ net_rbac_work_folder }}/rbac.sh"
  register: test_output
  ignore_errors: True

- name: hqe-net-rbac | run | Show the test output
  debug: var=test_output.stdout_lines

- name: hqe-net-rbac | run | Set test status
  set_fact:
      test_status: false
  when: test_output.rc != 0
07070101200EF4000081A4000003E800000064000000015B3CDC1200000102000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-net-rbac | test-resources | Build a credential file
  template: >
    src=osrc.j2
    dest="{{ net_rbac_work_folder }}/net-rbac.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070101200EEF000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/templates07070101200EF0000081A4000003E800000064000000015B3CDC12000002EF000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/templates/osrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_ENDPOINT_TYPE=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}')
export OS_AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)/v2.0
export OS_ADMIN_NAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_USERNAME/ {print $2}')
export OS_ADMIN_TENANT=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PROJECT_NAME/ {print $2}')
export OS_ADMIN_PASSWORD=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PASSWORD/ {print $2}')
07070101200EED000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/vars07070101200EEE000081A4000003E800000064000000015B3CDC12000001F6000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-rbac-run/vars/main.yml---
# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_net_rbac', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"

# General keystone settings
service_osrc: "{{ osrc_vars.service_osrc_path }}"

net_rbac_work_folder: "{{ work_folder}}/{{ hqe_net_rbac.deploy.test_suite }}"
07070101200F6B000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy07070101200F72000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/files07070101200F73000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/files/run_filters07070101200F74000081A4000003E800000064000000015B3CDC1200000006000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/files/run_filters/light.txtlight
07070101200F77000081A4000003E800000064000000015B3CDC1200000008000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/files/run_filters/net-smoke.txtdefault
07070101200F78000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/files/run_filters/parallel.txtparallel
07070101200F76000081A4000003E800000064000000015B3CDC1200000009000001030000000400000000000000000000006700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/files/run_filters/periodic.txtperiodic
07070101200F75000081A4000003E800000064000000015B3CDC1200000006000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/files/run_filters/upgrade.txtlight
07070101200F79000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/tasks07070101200F7A000081A4000003E800000064000000015B3CDC1200000330000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/tasks/main.yml---

- name: hqe-net-smoke | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ net_smoke_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-net-smoke | install | Deploy the quota script
  template: >
    src=quota-deploy.j2
    dest={{ net_smoke_work_folder }}/quotas.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-smoke | install | Deploy the smoketest script
  template: >
    src=smoketest-deploy.j2
    dest={{ net_smoke_work_folder }}/smoketest.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-smoke | install | Deploy cleanup script
  template: >
    src=cleanup-deploy.j2
    dest={{ net_smoke_work_folder }}/cleanup.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101200F6E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/templates07070101200F71000081A4000003E800000064000000015B3CDC1200000196000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/templates/cleanup-deploy.j2#!/bin/bash

# Wrapper script to execute cleanup after network smoke
# within the venv, with the right parameters
#
# Usage: hqe-net-cleaner.sh

set -o pipefail

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

cd {{ net_smoke_work_folder }}
# OS credentials
. ./net-smoke.osrc

# Run the test
cmd="python {{ net_smoke_code_folder }}/api_scripts/cleaner.py --all"
echo $cmd
$cmd
07070101200F70000081A4000003E800000064000000015B3CDC1200000467000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/templates/quota-deploy.j2#!/bin/bash

# Wrapper script to set quotas for the net-smoke user
#
# Usage: quota.sh run_filter_filename

set -o pipefail

RUN_FILTER=${1:-default.txt}

RUN_FILTER_DIR={{ net_smoke_work_folder }}/run_filters
profile=$(cat $RUN_FILTER_DIR/${RUN_FILTER})
case $profile in
light)
    SET_QUOTA=false
    ;;
periodic)
    SET_QUOTA=true
    ;;
parallel)
    SET_QUOTA=true
    ;;
*)
    SET_QUOTA=true
    ;;
esac

if [ $SET_QUOTA == "false" ]
then
    echo "No need to set some quotas in profile $profile"
    exit 0
fi

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

# Activate the V2 credentials
. {{ net_smoke_work_folder }}/net-smoke-admin.osrc

# Retrieve the tenant name and id of tenant demo_test_user
tenant_name=$(awk 'BEGIN { FS="=" } /OS_TENANT_NAME/ {print $2}' {{ net_smoke_work_folder }}/net-smoke.osrc)
tenant_id=$(keystone tenant-get $tenant_name | awk '/id/ {print $4}')

# Set the quotas for the tenant demo_test_user
neutron quota-update --tenant-id $tenant_id --floatingip 100 --network 20 --port 150 --router 10 --subnet 30
nova quota-update $tenant_id --ram -1 --instances 100
07070101200F6F000081A4000003E800000064000000015B3CDC12000005E3000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/templates/smoketest-deploy.j2#!/bin/bash

# Wrapper script to execute the network smoketest
# within the venv, with the right parameters
#
# Usage: smoketest.sh image_id flavor vm_user ping_timeout run_filter_filename

set -o pipefail

FLAVOR=$1
VM_USER=$2
PING_TIMEOUT=$3
RUN_FILTER=${4:-default.txt}

RUN_FILTER_DIR={{ net_smoke_work_folder }}/run_filters
profile=$(cat $RUN_FILTER_DIR/${RUN_FILTER})
case $profile in
light)
    ROUTER_NUMBER=1
    NETWORK_NUMBER=1
    SUBNET_NUMBER=1
    VM_NUMBER=2
    TESTERS=1
    ;;
periodic)
    ROUTER_NUMBER=2
    NETWORK_NUMBER=2
    SUBNET_NUMBER=2
    VM_NUMBER=2
    TESTERS=8
    ;;
parallel)
    ROUTER_NUMBER=3
    NETWORK_NUMBER=3
    SUBNET_NUMBER=2
    VM_NUMBER=2
    TESTERS=18
    ;;
*)
    ROUTER_NUMBER=2
    NETWORK_NUMBER=2
    SUBNET_NUMBER=1
    VM_NUMBER=2
    TESTERS=4
    ;;
esac

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

cd {{ net_smoke_work_folder }}
# OS credentials
. ./net-smoke.osrc

CIRROS_IMAGE_ID=$(openstack image list | awk '/cirros-0.3/ {print $2}'  | head -n 1)
if [[ -z $CIRROS_IMAGE_ID ]]
then
    echo "No valid Cirros image"
    exit 1
fi

# Run the test
cmd="python {{ net_smoke_code_folder }}/api_scripts/smoketest.py $CIRROS_IMAGE_ID $FLAVOR -r $ROUTER_NUMBER -n $NETWORK_NUMBER -s $SUBNET_NUMBER -v $VM_NUMBER -u $VM_USER --ping-timeout $PING_TIMEOUT"
echo $cmd
$cmd

if $?
then
    exit 1
fi

cmd="python {{ net_smoke_code_folder }}/api_scripts/intercomm.py --cirros --no-ssh --testers $TESTERS"
echo $cmd
$cmd
07070101200F6C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/vars07070101200F6D000081A4000003E800000064000000015B3CDC12000000FE000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-deploy/vars/main.yml---
net_smoke_service_name: "{{ hqe_net_smoke.deploy.service_name }}"
net_smoke_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_net_smoke.deploy.tests_folder }}"
net_smoke_work_folder: "{{ work_folder}}/{{ hqe_net_smoke.deploy.test_suite }}"
07070101200E9C000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run07070101200EA2000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/tasks07070101200EA3000081A4000003E800000064000000015B3CDC1200000586000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/tasks/cleanup.yml---
# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-smoke-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-smoke-deploy role.

- name: hqe-net-smoke | cleanup | Cleanup all VMs and network objects
  command: "{{ net_smoke_work_folder }}/cleanup.sh"
  register: cleanup_result
  until: cleanup_result.rc == 0
  ignore_errors: True
  retries: 5
  delay: 10

- name: hqe-net-smoke | run | Show the cleanup result
  debug: var=cleanup_result

- name: hqe-net-smoke | cleanup | remove the log files
  shell: /bin/rm -f {{ net_smoke_work_folder}}/*.log

- name: hqe-net-smoke | cleanup | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-smoke | cleanup | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-smoke | cleanup | remove the osrc files
  shell: /bin/rm -f {{ net_smoke_work_folder}}/*.osrc
07070101200EA4000081A4000003E800000064000000015B3CDC120000015A000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"07070101200EA5000081A4000003E800000064000000015B3CDC1200000471000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

# The command module calls the script that has been created within the configure.yml
# playbook in the hqe-net-smoke-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-smoke-deploy role.
- name: hqe-net-smoke | run | increase some quotas for the test user
  command: "{{ net_smoke_work_folder }}/quotas.sh {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-net-smoke | run | Show the quota increase result
  debug: var=test_output.stdout_lines

- name: hqe-net-smoke | run | set-up and check external connectivity
  command: "{{ net_smoke_work_folder }}/smoketest.sh 1 cirros 150 {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-net-smoke | run | Show the external connectivity output
  debug: var=test_output.stdout_lines

07070101200EA6000081A4000003E800000064000000015B3CDC1200000678000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-net-smoke | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-net-smoke | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-smoke | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-smoke | test-resources | Build the user credential file
  template: >
    src=osrc.j2
    dest="{{ net_smoke_work_folder }}/net-smoke.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- name: hqe-net-smoke | test-resources | Build the admin credential file
  template: >
    src=admin-osrc.j2
    dest="{{ net_smoke_work_folder }}/net-smoke-admin.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070101200E9F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/templates07070101200EA0000081A4000003E800000064000000015B3CDC120000029F000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/templates/admin-osrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_PASSWORD=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PASSWORD/ {print $2}')
export OS_USERNAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_USERNAME/ {print $2}')
export OS_TENANT_NAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PROJECT_NAME/ {print $2}')
export OS_ENDPOINT_TYPE=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}')
export OS_CACERT=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_CACERT/ {print $2}')
export OS_AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)/v2.0
07070101200EA1000081A4000003E800000064000000015B3CDC12000001CB000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/templates/osrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)
export OS_AUTH_URL=$AUTH_URL/v2.0
export OS_ENDPOINT_TYPE=$(awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}' {{ service_osrc }})
07070101200E9D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/vars07070101200E9E000081A4000003E800000064000000015B3CDC12000003D0000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-smoke-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_net_smoke', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"

# General keystone settings
service_osrc: "{{ osrc_vars.service_osrc_path }}"

net_smoke_work_folder: "{{ work_folder}}/{{ hqe_net_smoke.deploy.test_suite }}"

0707010120101A000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy07070101201022000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/files07070101201023000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/files/run_filters07070101201024000081A4000003E800000064000000015B3CDC120000000D000001030000000400000000000000000000006E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/files/run_filters/transpvlan.txt# dummy file
07070101201025000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/tasks07070101201026000081A4000003E800000064000000015B3CDC120000044A000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/tasks/main.yml---

- name: hqe-net-transpvlan-deploy | main | Create the work folder on the test driver
  file: >
    path="{{ net_transpvlan_work_folder }}"
    state=directory

- name: hqe-net-transpvlan-deploy | main | deploy the user creation script
  template: >
    src=user_creation.j2
    dest={{ net_transpvlan_work_folder }}/user_creation.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-transpvlan-deploy | main | deploy the Transparent VLAN test script
  template: >
    src=transpvlan-deploy.j2
    dest={{ net_transpvlan_work_folder }}/transpvlan.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-transpvlan-deploy | main | deploy cleanup script
  template: >
    src=cleanup-deploy.j2
    dest={{ net_transpvlan_work_folder }}/cleanup.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-transpvlan-deploy | main | deploy the user deletion script
  template: >
    src=user_deletion.j2
    dest={{ net_transpvlan_work_folder }}/user_deletion.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
0707010120101D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/templates0707010120101F000081A4000003E800000064000000015B3CDC12000001E6000001030000000400000000000000000000006900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/templates/cleanup-deploy.j2#!/bin/bash

# Wrapper script to execute cleanup after network smoke
# within the venv, with the right parameters
#
# Usage: hqe-net-cleaner.sh

set -o pipefail

TEST_HOME={{ net_transpvlan_code_folder }}/api_scripts

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

# Activate the credentials
. {{ net_transpvlan_work_folder }}/net-transpvlan.osrc

# Run the test
cd {{ net_transpvlan_work_folder }}
cmd="python ${TEST_HOME}/cleaner.py --all"
echo $cmd
$cmd
0707010120101E000081A4000003E800000064000000015B3CDC120000027B000001030000000400000000000000000000006C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/templates/transpvlan-deploy.j2#!/bin/bash

# Wrapper script to execute the network transpvlan.py script
#
# Usage: transpvlan.sh

set -o pipefail

TEST_HOME={{ net_transpvlan_code_folder }}/cli_scripts

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

# activate the credentials
. {{ net_transpvlan_work_folder }}/net-transpvlan.osrc

DEBIAN_IMAGE_ID=$(glance image-list | awk '/debian/ {print $2}'  | head -n 1)
if [[ -z $DEBIAN_IMAGE_ID ]]
then
    echo "No valid Debian image"
    exit 1
fi

# Run the test
cd {{ net_transpvlan_work_folder }}
cmd="python ${TEST_HOME}/transpvlan.py $DEBIAN_IMAGE_ID 1 --ssh_user debian"
echo $cmd
$cmd
07070101201021000081A4000003E800000064000000015B3CDC120000026B000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/templates/user_creation.j2#!/bin/bash

# Wrapper script to create the test user, tenant and role
#
# Usage: user_creation.sh tenant_name username password
# The role name is similar to the tenant_name

set -o pipefail

tenant_name=$1
username=$2
password=$3

role_name=$tenant_name

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

# Use the admin credentials
. {{ keystone_osrc }}

openstack role create $role_name
openstack project create --enable $tenant_name
openstack user create --project $tenant_name --enable --password $password $username
openstack role add --project $tenant_name --user $username $role_name
07070101201020000081A4000003E800000064000000015B3CDC120000016F000001030000000400000000000000000000006800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/templates/user_deletion.j2#!/bin/bash

# Wrapper script to delete the user and tenant
#
# Usage: use_deletion.sh

set -o pipefail

tenant_name=$1
username=$2

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

# Activate the V2 credentials
. {{ keystone_osrc }}

openstack user delete $username
openstack project delete $tenant_name
openstack role delete $tenant_name
0707010120101B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/vars0707010120101C000081A4000003E800000064000000015B3CDC1200000133000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-deploy/vars/main.ymlnet_transpvlan_code_folder: "{{ code_folder }}/{{ tests_git_repo }}/{{ hqe_net_transpvlan.deploy.tests_folder }}"
net_transpvlan_work_folder: "{{ work_folder}}/{{ hqe_net_transpvlan.deploy.test_suite }}"

service_osrc: "{{ osrc_vars.service_osrc_path }}"
keystone_osrc: "{{ osrc_vars.keystone_osrc_path }}"
07070101200F32000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run07070101200F37000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/tasks07070101200F39000081A4000003E800000064000000015B3CDC120000047C000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/tasks/cleanup.yml---
# The command module calls the script that has been created within the install.yml
# playbook in the hqe-net-transpvlan-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-transpvlan-deploy role.

- name: hqe-net-transpvlan-run | cleanup | cleanup all VMs and network objects
  command: "{{ net_transpvlan_work_folder }}/cleanup.sh"
  register: cleanup_result
  until: cleanup_result.rc == 0
  ignore_errors: True
  retries: 5
  delay: 10

- name: hqe-net-transpvlan-run | cleanup | show the cleanup result
  debug: var=cleanup_result

- name: hqe-net-transpvlan-run | cleanup | remove the transpvlan log file
  shell: /bin/rm -f {{ net_transpvlan_work_folder}}/transpvlan_*.log

- name: hqe-net-transpvlan-run | cleanup | remove the cleaner log file
  shell: /bin/rm -f {{ net_transpvlan_work_folder }}/cleaner_*.log

- name: hqe-net-transpvlan-run | cleanup | deletion of the test tenant, user and role
  command: "{{ net_transpvlan_work_folder }}/user_deletion.sh {{ demo_test_project }} {{ demo_test_user }}"
  register: test_output
  ignore_errors: True
07070101200F3B000081A4000003E800000064000000015B3CDC1200000128000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/tasks/main.yml---
- include: user_creation.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"

- include: transparent_vlan_test.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"

- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101200F3A000081A4000003E800000064000000015B3CDC12000003D2000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/tasks/transparent_vlan_test.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

# The command module calls the script that has been created within the main.yml
# playbook in the hqe-net-transpvlan-deploy role.
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-transpvlan-deploy role.
- name: hqe-net-transpvlan-run | transparent_vlan_test | run the VLAN Transparency test
  command: "{{ net_transpvlan_work_folder }}/transpvlan.sh"
  register: test_output
  ignore_errors: True

- name: hqe-net-transpvlan-run | transparent_vlan_test | show the test output
  debug: var=test_output

- name: hqe-net-transpvlan-run | transparent-vlan-test | Set test status
  set_fact:
      test_status: false
  when: test_output.rc != 0
07070101200F38000081A4000003E800000064000000015B3CDC12000002A0000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/tasks/user_creation.yml---
# Setup the test account used for testing

- name: hqe-net-transpvlan-run | user_creation | build the user credential file
  template: >
    src=testrc.j2
    dest="{{ net_transpvlan_work_folder }}/net-transpvlan.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- name: hqe-net-transpvlan-run | user_creation | creation of the test tenant and user
  command: "{{ net_transpvlan_work_folder }}/user_creation.sh {{ demo_test_project }} {{ demo_test_user }} {{ demo_test_password }}"
  register: test_output
  ignore_errors: True

- name: hqe-net-transpvlan-run | user_creation | show the user creation result
  debug: var=test_output.stdout_lines
07070101200F35000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/templates07070101200F36000081A4000003E800000064000000015B3CDC12000002FB000001030000000400000000000000000000005E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/templates/testrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)
export OS_AUTH_URL=$AUTH_URL/v2.0
export OS_ENDPOINT_TYPE=$(awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}' {{ service_osrc }})
export OS_ADMIN_NAME=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_USERNAME/ {print $2}')
export OS_ADMIN_TENANT=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PROJECT_NAME/ {print $2}')
export OS_ADMIN_PASSWORD=$(cat {{ service_osrc }}  | awk 'BEGIN { FS="=" } /OS_PASSWORD/ {print $2}')
07070101200F33000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/vars07070101200F34000081A4000003E800000064000000015B3CDC1200000414000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-transpvlan-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: transpvlan.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_net_transpvlan', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"

# General playbook shortcuts
service_osrc: "{{ osrc_vars.service_osrc_path }}"
keystone_osrc: "{{ osrc_vars.keystone_osrc_path }}"
net_transpvlan_work_folder: "{{ work_folder}}/{{ hqe_net_transpvlan.deploy.test_suite }}"
07070101200FDA000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy07070101200FE0000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy/tasks07070101200FE1000081A4000003E800000064000000015B3CDC1200000227000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy/tasks/main.yml---

- name: hqe-net-vrrp | install | Create the work folder on the test driver
  file: >
    path="{{ net_vrrp_work_folder }}"
    state=directory

- name: hqe-net-vrrp | install | Deploy the vrrp script
  template: >
    src=vrrp-deploy.j2
    dest={{ net_vrrp_work_folder }}/vrrp.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755

- name: hqe-net-vrrp | install | Deploy cleanup script
  template: >
    src=cleanup-deploy.j2
    dest={{ net_vrrp_work_folder }}/cleanup.sh
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101200FDD000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy/templates07070101200FDE000081A4000003E800000064000000015B3CDC120000016E000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy/templates/cleanup-deploy.j2#!/bin/bash

# Wrapper script to execute cleanup after vrrp
# within the venv, with the right parameters
#

set -o pipefail

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

cd {{ net_vrrp_work_folder }}
# OS credentials
. ./net-vrrp.osrc

# Run the test
cmd="python {{ net_vrrp_code_folder }}/api_scripts/cleaner.py --all"
echo $cmd
$cmd
07070101200FDF000081A4000003E800000064000000015B3CDC1200000177000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy/templates/vrrp-deploy.j2#!/bin/bash

# Wrapper script to execute the network vrrp test
# within the venv, with the right parameters
#
# Usage: vrrp.sh

set -o pipefail

# Activate the virtual environment
. {{ common_venv_folder }}/bin/activate

cd {{ net_vrrp_work_folder }}
# OS credentials
. ./net-vrrp.osrc

# Run the test
cmd="bash {{ net_vrrp_code_folder }}/cli_scripts/vrrp.sh"
echo $cmd
$cmd
07070101200FDB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy/vars07070101200FDC000081A4000003E800000064000000015B3CDC12000000F8000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-deploy/vars/main.yml---
net_vrrp_service_name: "{{ hqe_net_vrrp.deploy.service_name }}"
net_vrrp_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_net_vrrp.deploy.tests_folder }}"
net_vrrp_work_folder: "{{ work_folder}}/{{ hqe_net_vrrp.deploy.test_suite }}"
07070100D83353000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run07070100DC30EB000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/tasks07070100DC30EC000081A4000003E800000064000000015B3CDC12000004FE000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/tasks/cleanup.yml---
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-vrrp-deploy role.

- name: hqe-net-vrrp | cleanup | Cleanup all VMs and network objects
  command: "{{ net_vrrp_work_folder }}/cleanup.sh"
  register: cleanup_result
  until: cleanup_result.rc == 0
  ignore_errors: True
  retries: 5
  delay: 10

- name: hqe-net-vrrp | cleanup | Show the cleanup result
  debug: var=cleanup_result

- name: hqe-net-vrrp | cleanup | remove the log files
  shell: /bin/rm -f {{ net_vrrp_work_folder}}/*.log

- name: hqe-net-vrrp | cleanup | Delete test user
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-vrrp | cleanup | Delete test project
  ignore_errors: true
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-vrrp | cleanup | remove the osrc files
  shell: /bin/rm -f {{ net_vrrp_work_folder}}/*.osrc
07070100DC30ED000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070100DC3339000081A4000003E800000064000000015B3CDC1200000246000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/tasks/run.yml---
# Run the test script
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)
# The script will then call the actual test script. This test script is set in the
# templates sub-directory of the hqe-net-vrrp-deploy role.
- name: hqe-net-vrrp | run | check the VRRP functionnality
  command: "{{ net_vrrp_work_folder }}/vrrp.sh"
  register: test_output
  ignore_errors: True

- name: hqe-net-vrrp | run | Show the external connectivity output
  debug: var=test_output.stdout_lines
07070100DC333C000081A4000003E800000064000000015B3CDC1200000582000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-net-vrrp | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-net-vrrp | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-vrrp | test-resources | Grant member role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-net-vrrp | test-resources | Build the credential file
  template: >
    src=osrc.j2
    dest="{{ net_vrrp_work_folder }}/net-vrrp.osrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070100DA250C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/templates07070100DA250D000081A4000003E800000064000000015B3CDC12000001CB000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/templates/osrc.j2unset $(env | awk 'BEGIN { FS="=" } /OS_/ { print $1 } ' | xargs)
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_TENANT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
AUTH_URL=$(grep OS_AUTH_URL {{ service_osrc }} | cut -d '/' --complement -f 4 | cut -d '=' -f 2)
export OS_AUTH_URL=$AUTH_URL/v2.0
export OS_ENDPOINT_TYPE=$(awk 'BEGIN { FS="=" } /OS_ENDPOINT_TYPE/ {print $2}' {{ service_osrc }})
07070100DA250A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/vars07070100DA250B000081A4000003E800000064000000015B3CDC12000003CC000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-net-vrrp-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_random_id: "{{ ['hqe_net_vrrp', demo_random_uuid] | join('-') }}"
demo_test_user: "{{ demo_random_id }}"
demo_test_project: "{{ demo_random_id }}"
demo_test_password: "{{ demo_random_id }}"

# General keystone settings
service_osrc: "{{ osrc_vars.service_osrc_path }}"

net_vrrp_work_folder: "{{ work_folder}}/{{ hqe_net_vrrp.deploy.test_suite }}"
07070101200E5D000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests07070101200E5E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/defaults07070101200E5F000081A4000003E800000064000000015B3CDC1200000058000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/defaults/main.yml---
scratch_dir: /var/lib/ardana/scratch/ansible/next/ardana/ansible
ardana_user: ardana07070101200E62000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks07070101200E69000081A4000003E800000064000000015B3CDC12000000D2000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks/main.yml---
- include: test-deploy.yml
  when: include_deploy
- include: test-stop.yml
  when: include_stop
- include: test-start.yml
  when: include_start
- include: test-reconfigure.yml
  when: include_reconfigure


07070101200E64000081A4000003E800000064000000015B3CDC12000004FD000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks/test-deploy.yml########## DEPLOY ##########
- name: hqe-playbooks | Test deploy
  debug:
    var: "{{ test_service }}"
    msg: "Test deploy playbooks for {{ test_service }} "

- name: hqe-playbooks | Test deploy | deploy
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-deploy.yml"
  args:
    chdir: "{{ scratch_dir }}"
  register: deploy_test_result

- name: hqe-playbooks | Test deploy | validate
  shell: |
    echo "Validation after {{ test_service }}-deploy sucess"
  when: deploy_test_result.rc == 0

- name: hqe-playbooks | Test deploy | validate
  fail: msg="Validation after {{ test_service }}-deploy failed"
  when: deploy_test_result.rc != 0

###### VALIDATE DEPLOY BY RUNNING STATUS #####
- name: hqe-playbooks | Test deploy | status play
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-status.yml"
  args:
    chdir: "{{ scratch_dir }}"
  register: status_test_result

- name: hqe-playbooks | Test deploy | status validate
  fail: msg="Status Validation after {{ test_service }}-deploy failed"
  when: status_test_result.rc != 0

###### VALIDATE DEPLOY BY RUNNING SPECIFIC SERVICE VALIDATION #####
- name: hqe-playbooks | Test deploy | validate
  include: validate.yml07070101200E63000081A4000003E800000064000000015B3CDC120000060B000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks/test-reconfigure.yml########## reconfigure ##########
- name: hqe-playbooks | Test reconfigure
  debug:
    var: "{{ test_service }}"
    msg: "Test reconfigure playbooks for {{ test_service }} "

- name: hqe-playbooks | Test reconfigure | update configuration
  include: update_config.yml

- name: hqe-playbooks | Test reconfigure | reconfigure
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-reconfigure.yml"
  args:
    chdir: "{{ scratch_dir }}"
  register: reconfigure_test_result

- name: hqe-playbooks | Test reconfigure | validate
  shell: |
    echo "Validation after {{ test_service }}-reconfigure sucess"
  when: reconfigure_test_result.rc == 0

- name: hqe-playbooks | Test reconfigure | validate
  fail: msg="Validation after {{ test_service }}-reconfigure failed"
  when: reconfigure_test_result.rc != 0

###### VALIDATE reconfigure BY RUNNING STATUS #####
- name: hqe-playbooks | Test reconfigure | status play
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-status.yml"
  args:
    chdir: "{{ scratch_dir }}"
  register: status_test_result

- name: hqe-playbooks | Test reconfigure | status validate
  fail: msg="Status Validation after {{ test_service }}-reconfigure failed"
  when: status_test_result.rc != 0

###### VALIDATE reconfigure BY RUNNING SPECIFIC SERVICE VALIDATION #####
- name: hqe-playbooks | Test reconfigure | validate
  include: validate.yml

###### ADD ADDITIONAL VALIDATION TO CHECK THE CONFIG CHANGE TOOK EFFECT #######07070101200E67000081A4000003E800000064000000015B3CDC12000004E6000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks/test-start.yml########## START ##########
- name: hqe-playbooks | Test start
  debug:
    var: "{{ test_service }}"
    msg: "Test start playbooks for {{ test_service }} "

- name: hqe-playbooks | Test start | start
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-start.yml"
  args:
    chdir: "{{ scratch_dir }}"
  register: start_test_result

- name: hqe-playbooks | Test start | validate
  shell: |
    echo "Validation after {{ test_service }}-start sucess"
  when: start_test_result.rc == 0

- name: hqe-playbooks | Test start | validate
  fail: msg="Validation after {{ test_service }}-start failed"
  when: start_test_result.rc != 0

##### VALIDATE START BY RUNNING STATUS#####
- name: hqe-playbooks | Test start | status
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-status.yml"
  args:
    chdir: "{{ scratch_dir }}"
  register: status_test_result

- name: hqe-playbooks | Test start | status validate
  fail: msg="Status Validation after {{ test_service }}-start failed"
  when: status_test_result.rc != 0

##### VALIDATE START BY RUNNING SPECIFIC SERVICE VALIDATION #####

- name: hqe-playbooks | Test start | validate
  include: validate.yml


07070101200E66000081A4000003E800000064000000015B3CDC1200000461000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks/test-stop.yml########## STOP ##########
- name: hqe-playbooks | Test stop
  debug:
    var: "{{ test_service }}"
    msg: "Test stop playbooks for {{ test_service }} "

- name: hqe-playbooks | Test stop | stop
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-stop.yml"
  args:
    chdir: "{{ scratch_dir }}"
  register: stop_test_result

- name: hqe-playbooks | Test stop | validate
  shell: |
    echo "Validation after {{ test_service }}-stop sucess"
  when: stop_test_result.rc == 0

- name: hqe-playbooks | Test stop | validate
  fail: msg="Validation after {{ test_service }}-stop failed"
  when: stop_test_result.rc != 0

##### VALIDATE STOP BY RUNNING STATUS#####

- name: hqe-playbooks | Test stop | status
  become_user: "{{ ardana_user }}"
  command: "ansible-playbook -i hosts/verb_hosts {{ test_service }}-status.yml"
  args:
    chdir: "{{ scratch_dir }}"
  ignore_errors: true
  register: status_test_result

- name: hqe-playbooks | Test stop | status validate
  fail: msg="Status Validation after {{ test_service }}-stop failed"
  when: status_test_result.rc == 0

07070101200E68000081A4000003E800000064000000015B3CDC1200000118000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks/update_config.yml- name: hqe-playbooks | Update keystone configuration
  debug:
    msg: "Update configuration - TO DO "
  when: test_service == "keystone"

- name: hqe-playbooks | Update barbican configuration
  debug:
    msg: "Update configuration - TO DO "
  when: test_service == "barbican"

07070101200E65000081A4000003E800000064000000015B3CDC1200000934000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/tasks/validate.yml- name: hqe-playbooks | Validate Keystone
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.service_osrc_path }}"
    openstack token issue | grep "| id" | awk '{print $4}'
  register: project_scoped_token
  ignore_errors: false
  when: test_service == "keystone"

- name: hqe-playbooks | Validate barbican
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack secret store
    --name test_bin_secret --payload 'gF6+lLoF3ohA9aPRpt+6bQ=='
    --algorithm 'aes' --bit-length 256
  register: barbican_secret_store
  ignore_errors: false
  when: test_service == "barbican"

- name: hqe-playbooks | Validate cinder
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack volume list
  register: cinder_volume_list
  ignore_errors: false
  when: test_service == "cinder"

- name: hqe-playbooks | Validate glance
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack image list
  register: glance_image_list
  ignore_errors: false
  when: test_service == "glance"

- name: hqe-playbooks | Validate neutron
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack network list
  register: neutron_net_list
  ignore_errors: false
  when: test_service == "neutron"

- name: hqe-playbooks | Validate nova
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack server list
  register: nova_server_list
  ignore_errors: false
  when: test_service == "nova"

- name: hqe-playbooks | Validate swift
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack container list
  register: swift_container_list
  ignore_errors: false
  when: test_service == "swift"

- name: hqe-playbooks | Validate heat
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack stack list
  register: heat_stack_list
  ignore_errors: false
  when: test_service == "heat"

- name: hqe-playbooks | Validate designate
  args:
    executable: /bin/bash
  shell: >
    source "{{ osrc_vars.service_osrc_path }}"
    openstack zone list
  register: designate_zone_list
  ignore_errors: false
  when: test_service == "designate"
07070101200E60000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/vars07070101200E61000081A4000003E800000064000000015B3CDC12000000A7000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-playbooktests/vars/main.yml---
test_service: "{{ run_filter }}"
include_deploy: True
include_stop: True
include_start: True
include_reconfigure: True
include_upgrade: True
include_restart: True
07070101200E84000041ED000003E800000064000000075B3CDC1200000000000001030000000400000000000000000000004800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding07070101200E85000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/defaults07070101200E86000081A4000003E800000064000000015B3CDC120000012A000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/defaults/main.yml---
# Destination directory where the role will get generated
role_dest: roles
# Default role name is defined here. It can be changed
# by passing role_name as an extra arg to playbook
role_name: "default_role"
# force_role when set to true overrides the current role
# if present
force_role: True
07070101200E92000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/files07070101200E95000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000006900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/files/deploy_tasks_configure.yml---
07070101200E94000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/files/deploy_tasks_main.yml---
- include: install.yml
- include: configure.yml
07070101200E97000081A4000003E800000064000000015B3CDC1200000074000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/files/run_tasks_cleanup.yml---
# FIXME: Accounts will be soon setup by the framework. Cleanup here extra test
# resources required for testing.07070101200E93000081A4000003E800000064000000015B3CDC120000015D000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/files/run_tasks_main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python  }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python  }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101200E96000081A4000003E800000064000000015B3CDC1200000070000001030000000400000000000000000000006B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/files/run_tasks_test-resources.yml---
# FIXME: Accounts will be soon setup by the framework. Add here extra test
# resources required for testing.07070101200E98000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/tasks07070101200E9A000081A4000003E800000064000000015B3CDC1200000891000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/tasks/hqe-scaffold-deploy.yml---

- name: hqe-scaffold-deploy | check if destination already exists
  stat: path={{ role_dest }}/hqe-{{ role_name }}-deploy
  register: deploy_dir_present
  changed_when: false

- name: hqe-scaffold-deploy | fail - destination already exists!!
  fail:
    msg: "{{ role_dest }}/hqe-{{ role_name }}-deploy  exists. Failing to prevent overwrite"
  when: deploy_dir_present.stat.exists and not force_role

# run_filters file for new role
- name: hqe-scaffold-deploy | run_filters
  file:
    state=directory
    path={{ role_dest }}/hqe-{{ role_name }}-deploy/files/run_filters

- name: hqe-scaffold-deploy | run_filters
  template:
    src=files_run_filter_parallel.j2
    dest={{ role_dest }}/hqe-{{ role_name }}-deploy/files/run_filters/{{ role_name }}.txt

# task files for new role
- name: hqe-scaffold-deploy | tasks/main.yml
  copy:
    src=deploy_tasks_{{ item }}.yml
    dest={{ role_dest }}/hqe-{{ role_name }}-deploy/tasks/{{ item }}.yml
  with_items:
    - main
    - configure

- name: hqe-scaffold-deploy | create configure.yml and install.yml
  template:
    src=deploy_tasks_{{item}}.j2
    dest={{ role_dest }}/hqe-{{ role_name }}-deploy/tasks/{{ item }}.yml
  with_items:
    - install

# var file for new role
- name: hqe-scaffold-deploy | create vars/main.yml
  template:
    src=deploy_vars_main.j2
    dest={{ role_dest }}/hqe-{{ role_name }}-deploy/vars/main.yml

# script template for new role
- name: hqe-scaffold-deploy | create {{ role_name }}.j2
  template:
    src=script_template.j2
    dest={{ role_dest }}/hqe-{{ role_name }}-deploy/templates/hqe-{{ role_name }}.j2

- name: hqe-scaffold-deploy | create group_vars/all/<file>
  file:
   state=touch
   path=group_vars/all/hqe_{{ role_name}}_deploy

- name: hqe-scaffold-deploy | add an entry in ardana-qa-deploy.yml
  lineinfile: "insertbefore=EOF dest=group_vars/all/hqe_{{ role_name}}_deploy line='#FIXME- Please define host_var entries for the new role using the one of the above roles as an example'"

- name: hqe-scaffold-deploy | add an entry in ardana-qa-deploy.yml
  lineinfile: "insertbefore=EOF dest=ardana-qa-deploy.yml line='    - { role: hqe-{{ role_name }}-deploy, tags: [\"{{ role_name }}\"] }'"
07070101200E99000081A4000003E800000064000000015B3CDC1200000689000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/tasks/hqe-scaffold-run.yml---

- name: hqe-scaffold-run | check if destination already exists
  stat: path={{ role_dest }}/hqe-{{ role_name }}-deploy
  register: deploy_dir_present
  changed_when: false

- name: hqe-scaffold-run | fail - destination already exists!!
  fail:
    msg: "{{ role_dest }}/hqe-{{ role_name }}-deploy  exists. Failing to prevent overwrite"
  when: deploy_dir_present.stat.exists and not force_role

# task files for new role
- name: hqe-scaffold-run | create run.yaml
  template:
    src: "run_tasks_{{ item }}.j2"
    dest: "{{ role_dest }}/hqe-{{ role_name }}-run/tasks/{{ item }}.yml"
  with_items:
    - run

- name: hqe-scaffold-run | create test-resources.yml and cleanup.yml
  copy:
    src: "run_tasks_{{ item }}.yml"
    dest: "{{ role_dest }}/hqe-{{ role_name }}-run/tasks/{{ item }}.yml"
  with_items:
    - test-resources
    - cleanup
    - main


# var file for new role
- name: hqe-scaffold-run | create vars/main.yml
  template:
    src=run_vars_main.j2
    dest={{ role_dest }}/hqe-{{ role_name }}-run/vars/main.yml

# testrc for new_role
- name: hqe-scaffold-run | create testrc template
  template:
    src: testrc.j2
    dest: "{{ role_dest }}/hqe-{{ role_name }}-run/templates/testrc.j2"

# v2 testrc for new_role
- name: hqe-scaffold-run | create testrc_v2 template
  template:
    src: testrc_v2.j2
    dest: "{{ role_dest }}/hqe-{{ role_name }}-run/templates/testrc_v2.j2"

- name: hqe-scaffold-run | add an entry in ardana-qa-run.yml
  lineinfile: "insertafter=.*hqe-common-run.* dest=ardana-qa-run.yml line='    - { role: hqe-{{ role_name }}-run, run_filter_file: {% raw %} \"{{ run_filter }}.txt\" {% endraw %},  tags: [\"{{ role_name }}\"] }'"
07070101200E9B000081A4000003E800000064000000015B3CDC1200000047000001030000000400000000000000000000005700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/tasks/main.yml---
- include: hqe-scaffold-deploy.yml
- include: hqe-scaffold-run.yml
07070101200E89000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates07070101200E8C000081A4000003E800000064000000015B3CDC1200000369000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/deploy_tasks_install.j2---
# Install {{ role_name }} test dependencies

- name: hqe-{{ role_name }} | install | Create work folder {{ '{{' }} {{ role_name }}_work_folder {{ '}}' }}
  file:
    path: "{{ '{{' }} {{ role_name }}_work_folder {{ '}}' }}"
{% raw %}
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    recurse: yes
{% endraw %}

- name: hqe-{{ role_name }} | install | Deploy run_filters
  copy:
    src: run_filters
    dest: "{{ '{{' }} {{ role_name }}_work_folder {{ '}}' }}/"
{% raw %}
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640
{% endraw %}

- name: hqe-{{ role_name }} | install | Deploy run script
  template:
    src: hqe-{{ role_name }}.j2
    dest: "{{ '{{' }} {{ role_name }}_work_folder {{ '}}' }}/hqe-{{ role_name }}"
{% raw %}
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755
{% endraw %}
07070101200E8B000081A4000003E800000064000000015B3CDC1200000363000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/deploy_vars_main.j2---
# FIXME - Add or remove the variables that are needed for your test suite and
# remove this line
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: {{ role_name }}.txt

{{ role_name }}_work_folder: "{{ '{{' }} work_folder {{ '}}' }}/{{ '{{' }} hqe_{{ role_name }}.deploy.test_suite {{ '}}' }}"
{{ role_name }}_code_folder: "{{ '{{' }} work_folder {{ '}}' }}/{{ '{{' }} tests_git_repo {{ '}}' }}/{{ '{{' }} hqe_{{ role_name }}.deploy.tests_folder {{ '}}' }}"
07070101200E91000081A4000003E800000064000000015B3CDC12000000E6000001030000000400000000000000000000006F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/files_run_filter_parallel.j2# FIXME includes the role name for single tests. If your test suite
# contains more than one test and you would like to make a selection
# Please include the list in a format understandable by the your test
# tool
{{ role_name }}
07070101200E8D000081A4000003E800000064000000015B3CDC1200000236000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/run_tasks_run.j2---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-{{ role_name }} | run | Run the tests
  sudo: yes
  {% raw %}
  become_user: "{{ hqe_user }}"
  command: FIXME - include the  command to run the test
  register: test_output
  ignore_errors: True
  {% endraw %}

- name: hqe-{{ role_name }} | run | Show test output
  debug: var=test_output

07070101200E8F000081A4000003E800000064000000015B3CDC12000005DF000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/run_vars_main.j2---
# FIXME - Add or remove the variables that are needed for your test suite and
# remove this line
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml
run_filter_file: parallel.txt

{{ role_name }}_work_folder: "{{ '{{' }} work_folder {{ '}}' }}/{{ '{{' }} hqe_{{ role_name }}.deploy.test_suite {{ '}}' }}"
{{ role_name }}_code_folder: "{{ '{{' }} work_folder {{ '}}' }}/{{ '{{' }} tests_git_repo {{ '}}' }}/{{ '{{' }} hqe_{{ role_name }}.deploy.tests_folder {{ '}}' }}"

# Test account setup for testing, and clean-ed up afterwards
{{ role_name }}_random_uuid: "{{ '{{' }} ansible_date_time.epoch | to_uuid {{ '}}' }}"
{{ role_name }}_random_id: "{{ '{{' }} ['hqe_{{ role_name }}', {{ role_name }}_random_uuid] | join('-') {{ '}}' }}"
{{ role_name }}_user: "{{ '{{' }} {{ role_name }}_random_id {{ '}}' }}"
{{ role_name }}_project: "{{ '{{' }} {{ role_name }}_random_id {{ '}}' }}"
{{ role_name }}_password: "{{ '{{' }} {{ role_name }}_random_id {{ '}}' }}"
{{ role_name }}_domain: "{{ '{{' }} osrc_vars.os_domain_name {{ '}}' }}"
{{ role_name }}_role: "{{ '{{' }} hqe_group_vars.keystone_member_role {{ '}}' }}"
07070101200E90000081A4000003E800000064000000015B3CDC12000002A8000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/script_template.j2#!/bin/bash

# Wrapper script to execute {{ role_name }}
# within the venv, with the right parameters
#
# Usage: hqe-{{ role_name }} run_filter_filename

set -o pipefail

# FIXME any run parameter that should be configurable post-deploy
# time should be set here
RUN_FILTER=${6:-parallel.txt}
TEST_HOME={{ '{{' }} {{ role_name }}_code_folder {{ '}}' }}
WORK_HOME={{ '{{' }} {{ role_name }}_work_folder {{ '}}' }}
{% raw %}
VENV={{ common_venv_folder }}
{% endraw %}
# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/{{ role_name }}.testrc

# Run the test
cmd="FIXME"

echo $cmd
$cmd 2>&1 > $WORK_HOME/{{ role_name }}.log
07070101200E8A000081A4000003E800000064000000015B3CDC120000025D000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/testrc.j2# FIXME: You may want to set or unset values as per test needs
export OS_BASE_AUTH_URL={{ '{{' }} osrc_vars.os_unversioned_auth_url {{ '}}' }}
export OS_AUTH_URL={{ '{{' }} osrc_vars.os_url {{ '}}' }}
export OS_USERNAME={{ '{{' }} {{ role_name }}_user {{ '}}' }}
export OS_PASSWORD={{ '{{' }} {{ role_name }}_password {{ '}}' }}
export OS_PROJECT_NAME={{ '{{' }} {{ role_name }}_project {{ '}}' }}
export OS_CACERT={{ '{{' }} osrc_vars.os_ca_cert {{ '}}' }}
export OS_USER_DOMAIN_NAME={{ '{{' }} {{ role_name }}_domain {{ '}}' }}
export OS_PROJECT_DOMAIN_NAME={{ '{{' }} {{ role_name }}_domain {{ '}}' }}
07070101200E8E000081A4000003E800000064000000015B3CDC12000001B7000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/templates/testrc_v2.j2# FIXME: You may want to set or unset values as per test needs
export OS_BASE_AUTH_URL={{ '{{' }} osrc.os_unversioned_auth_url {{ '}}' }}
export OS_AUTH_URL=${OS_BASE_AUTH_URL}/v2.0
export OS_USERNAME={{ '{{' }} {{ role_name }}_user {{ '}}' }}
export OS_PASSWORD={{ '{{' }} {{ role_name }}_password {{ '}}' }}
export OS_PROJECT_NAME={{ '{{' }} {{ role_name }}_project {{ '}}' }}
export OS_CACERT={{ '{{' }} osrc_vars.os_ca_cert {{ '}}' }}
07070101200E87000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/vars07070101200E88000081A4000003E800000064000000015B3CDC1200000003000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-role-scaffolding/vars/main.yml---07070101220021000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy07070101220029000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/files0707010122002A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/files/run_filters0707010122002C000081A4000003E800000064000000015B3CDC12000000C5000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/files/run_filters/ci.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
# Empty as all tests would run in CI currently
# Swift sync too slow for CI/CD
-swift\.test_sync.*
0707010122002D000081A4000003E800000064000000015B3CDC1200000112000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/files/run_filters/smoke.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC

# EC rings do not exist in canary jobs, before logic is implemented
# to skip those they will be disabled permanently.
-swift\.test_storage_policies\.SwiftErasurePolicyTest.*
0707010122002E000081A4000003E800000064000000015B3CDC1200000091000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/files/run_filters/tests-ci.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
# Empty as all tests would run in CI currently
0707010122002B000081A4000003E800000064000000015B3CDC12000000E0000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/files/run_filters/upgrade.txt# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC

# EC rings do not exist in liberty, so those test fail after upgrade
-swift\.test_storage_policies\.SwiftErasurePolicyTest.*
0707010122002F000081A4000003E800000064000000015B3CDC120000084A000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/files/tests2skip.py#!/usr/bin/env python
#
# Copyright 2013 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# Reads in a list of exclude regular expressions from a file and outputs a
# regex suitable to be passed into testr

import sys

"""
Whitelist is applied first. The blacklist is executed against the set of
tests returned by the whitelist.
If whitelist is empty, all available tests are fed to blacklist.
If blacklist is empty, all tests from whitelist are returned.

The syntax for white-list and black-list is as follows:
- lines starting with # or empty are ignored
- lines starting with "+" are whitelisted
- lines starting with "-" are blacklisted
- lines not matching any of the above conditions are blacklisted

The match for each line gets added a "^" in the beginning,
so the regular expression should account for that.

For example, the following scenario:

    run all the smoke tests and scenario tests,
    but exclude the api.volume tests.

is implemented as:

    +.*smoke
    +tempest\.scenario
    -tempest\.api\.volume.*
"""

whitelist = []
blacklist = []
with open(sys.argv[1]) as fp:
    for line in fp:
        line = line.strip()
        if not line or line[0] == '#':
            continue
        if line.startswith("+"):
            whitelist.append(line[1:])
        elif line.startswith("-"):
            blacklist.append(line[1:])
        else:
            blacklist.append(line)

regex = '^(?=({whitelist}))'
params = dict(whitelist="|".join(whitelist))
if blacklist:
    regex += '(?!({blacklist}))'
    params['blacklist'] = "|".join(blacklist)

print(regex.format(**params))
07070101220030000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/tasks07070101220032000081A4000003E800000064000000015B3CDC12000001BB000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/tasks/configure.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
# Configure the demo test

# The only configuration required here is the RC file with the
# credentials but that can only be created after test-resources

- name: hqe-swift | configure | Set ownership of {{ swift_work_folder}} folder
  file: path={{ swift_work_folder}} owner={{ hqe_user }} group={{ hqe_group }} state=directory recurse=yes
07070101220031000081A4000003E800000064000000015B3CDC1200000E44000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/tasks/install.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
---
- name: hqe-swift | install | set os-specific variables
  include_vars: "../vars/{{ ansible_os_family.split(' ')[0] | lower | replace('open', '') }}.yml"

- set_fact:
    swift_venv_folder: "{{ common_venv_root }}/{{ hqe_swift.deploy.venv_folder }}"
    tempest_code_folder: "{{ code_folder }}/tempest/"
  when: build_venvs | bool
- set_fact:
    swift_venv_folder: "{{ swift_service_name | bin_dir }}/../"
    tempest_code_folder: "{{ code_folder }}/tempest/"
  when: not (build_venvs | bool)

# Install Swift test dependencies
- name: hqe-swift | install | Update package cache
  install_package:
    cache: update
  when: not (build_venvs | bool)

- name: hqe-swift | install | Install erasure code libraries
  become: yes
  become_user: root
  package:
    name: "{{ item }}"
    state: present
  with_items: hqe_swift_pkgs


- name: hqe-swift | install | Install the prebuilt env
  become: yes
  become_user: root
  install_package:
    name: "{{ swift_service_name }}"
    service: "{{ swift_service_name }}"
    state: present
  when: not (build_venvs | bool)

- name: hqe-swift | install | Upgrade pip
  pip:
    name: pip
    extra_args: --upgrade
    virtualenv: "{{ swift_venv_folder }}"
  when: build_venvs | bool

- name: hqe-swift | install | Install requirements
  pip:
    requirements: "{{ swift_code_folder }}/requirements.txt"
    virtualenv: "{{ swift_venv_folder }}"
  when: build_venvs | bool

# Installing from source requires write access to the source folder
- name: hqe-swift | install | {{ hqe_group }} owns hosqatesthelper source
  become: yes
  become_user: root
  file:
    path: "{{ testhelper_code_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    recurse: yes

- name: hqe-swift | install | Install hosqatesthelper package
  pip:
    name: "{{ testhelper_code_folder }}"
    extra_args: '-e'
    virtualenv: "{{ swift_venv_folder }}"
  when: build_venvs | bool

- name: hqe-swift | install | Pull upstream Tempest from the git
  become: yes
  become_user: root
  git:
    repo: "http://git.suse.provo.cloud/openstack/tempest"
    dest: "{{ tempest_code_folder }}"
    version: "hp/master"
    update: no
  when: build_venvs | bool

- name: hqe-swift | install | Install tempest
  become: yes
  become_user: root
  pip:
    name: "{{ tempest_code_folder }}"
    extra_args: '-e'
    virtualenv: "{{ swift_venv_folder }}"
  when: build_venvs | bool

- name: hqe-swift | install | Deploy run_filters
  copy:
    src: run_filters
    dest: "{{ swift_work_folder }}/"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0640

- name: hqe-swift | install | Deploy tests2skip.py
  copy:
    src: tests2skip.py
    dest: "{{ swift_work_folder }}/swift-tests2skip.py"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-swift | install | Deploy run script
  template:
    src: hqe-swift.j2
    dest: "{{ swift_work_folder }}/hqe-swift"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-swift | install | Deploy ring spec file
  template:
    src: ring_specs.json.j2
    dest: "{{ swift_work_folder }}/ring_specs.json"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755

- name: hqe-swift | install | Deploy testr configuration
  shell: cp "{{ swift_code_folder}}/.testr.conf" "{{ swift_work_folder }}"

- name: hqe-swift | install | Fix testr configuration ownership
  file:
    path: "{{ swift_work_folder }}/.testr.conf"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    mode: 0755
07070101220033000081A4000003E800000064000000015B3CDC12000000F2000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/tasks/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
- include: install.yml
  when: hqe_group_vars.swift_available | bool
- include: configure.yml
  when: hqe_group_vars.swift_available | bool
07070101220026000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/templates07070101220028000081A4000003E800000064000000015B3CDC1200000444000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/templates/hqe-swift.j2#!/bin/bash

# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC


# Wrapper script to execute the example test
# within the venv, with the right parameters
#
# Usage: hqe-template run_filter_filename

set -o pipefail

RUN_FILTER={{ swift_work_folder }}/run_filters/${1:-ci.txt}
TEST_HOME={{ swift_work_folder }}
export WORK_HOME={{ swift_work_folder }}
VENV={{ swift_venv_folder }}
TESTS_TO_SKIP_BIN="{{ swift_work_folder }}/swift-tests2skip.py"

export HLM_USER={{ ardana_user }}
export INVENTORY_LOCATION={{ inventory_location }}
# Activate the virtual environment
source ${VENV}/bin/activate
pip freeze

# HQA-1346 premake dir to allow for ansible parallel execution
if [ ! -d ~/.ansible/cp ]; then
  mkdir -p ~/.ansible/cp
fi

# Run the test
source ${WORK_HOME}/testrc
echo --- TESTRC ---
cat ${WORK_HOME}/testrc
echo --- TESTRC ---

cd $WORK_HOME
echo Initializing testrepository
testr init
echo Running tests
testr run --subunit --parallel --concurrency 0 $(python ${TESTS_TO_SKIP_BIN} ${RUN_FILTER}) | subunit-trace --no-failure-debug -f
07070101220027000081A4000003E800000064000000015B3CDC1200000020000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/templates/ring_specs.json.j2{{ ring_specs | to_nice_json }}
07070101220022000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/vars07070101220023000081A4000003E800000064000000015B3CDC120000003F000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/vars/debian.yml---
hqe_swift_pkgs:
  - liberasurecode-dev
  - liberasurecode1
07070101220025000081A4000003E800000064000000015B3CDC12000001CE000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/vars/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
swift_service_name: "{{ hqe_swift.deploy.service_name }}"

swift_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_swift.deploy.tests_folder }}"
swift_work_folder: "{{ work_folder }}/{{ hqe_swift.deploy.test_suite }}"
swift_subunit_output: "{{ work_folder }}/{{ hqe_swift.deploy.test_suite }}.subunit"

ring_specs: "{{ hqe_group_vars.rings_specs }}"
07070101220024000081A4000003E800000064000000015B3CDC1200000028000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-deploy/vars/suse.yml---
hqe_swift_pkgs:
  - liberasurecode1
07070100D02E2C000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run07070100D4356D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/tasks07070100D4356E000081A4000003E800000064000000015B3CDC12000002C4000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/tasks/cleanup.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
# Cleanup the account used for testing

- name: hqe-swift | test-resources | Delete test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-swift | test-resources | Delete test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
07070100D4356F000081A4000003E800000064000000015B3CDC1200000247000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/tasks/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
  when: hqe_group_vars.swift_available | bool
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
  when: hqe_group_vars.swift_available | bool
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
  when: hqe_group_vars.swift_available | bool
07070100D43570000081A4000003E800000064000000015B3CDC12000002B6000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/tasks/run.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore erros is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-swift | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  shell: "OS_TEST_PATH={{ swift_code_folder }} ./hqe-swift {{ run_filter_file }}"
  args:
    chdir: "{{ swift_work_folder }}"
  register: test_output
  ignore_errors: True

- name: hqe-swift | run | Show test output
  debug: var=test_output

07070100D43571000081A4000003E800000064000000015B3CDC1200000994000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/tasks/test-resources.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
---
# Setup the test account used for testing

- name: hqe-swift | test-resources | Create swift project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ qaswift_test_project }}"
    project_domain_name: "{{ qaswift_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-swift | test-resources | Create swift user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ qaswift_test_user }}"
    user_password: "{{ qaswift_test_password}}"
    description: "Swift account for QA"
    user_domain_name: "{{ qaswift_test_domain }}"

- name: hqe-swift | test-resources | Grant memmber role to Swift User
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ qaswift_test_user }}"
    project_name: "{{ qaswift_test_project }}"
    role_name: "{{ qaswift_test_role }}"
    user_domain_name: "{{ qaswift_test_domain }}"
    project_domain_name: "{{ qaswift_test_domain }}"

- name: hqe-swift | test-resources | Grant swiftoperator role to Swift User
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ qaswift_test_user }}"
    project_name: "{{ qaswift_test_project }}"
    role_name: "{{ qaswift_swift_role }}"
    user_domain_name: "{{ qaswift_test_domain }}"
    project_domain_name: "{{ qaswift_test_domain }}"

- name: hqe-swift | test-resources | Grant monasca-user role to Swift user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ qaswift_test_user }}"
    project_name: "{{ qaswift_test_project }}"
    role_name: "monasca-user"
    user_domain_name: "{{ qaswift_test_domain }}"
    project_domain_name: "{{ qaswift_test_domain }}"
  when: hos_services.monasca_available | bool

- name: hqe-swift | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ swift_work_folder }}/testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600
07070100D22D09000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/templates07070100D22D0A000081A4000003E800000064000000015B3CDC1200000246000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/templates/testrc.j2# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_VERION=3
export OS_BASE_AUTH_URL={{ keystone_admin_endpoint }}/v3
export OS_AUTH_URL={{ keystone_admin_endpoint }}/v3
export OS_USERNAME={{ qaswift_test_user }}
export OS_PASSWORD={{ qaswift_test_password }}
export OS_PROJECT_NAME={{ qaswift_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_ENDPOINT_TYPE=internalURL
export OS_USER_DOMAIN_NAME={{ qaswift_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ qaswift_test_domain }}
07070100D22D07000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/vars07070100D22D08000081A4000003E800000064000000015B3CDC120000059A000001030000000400000000000000000000004F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-swift-run/vars/main.yml# (c) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml

run_filter_file: ci.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
qaswift_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
qaswift_test_user: "{{ ['hqe_swift', qaswift_random_uuid] | join('-') }}"
qaswift_test_project: "{{ ['hqe_swift', qaswift_random_uuid] | join('-') }}"
qaswift_test_password: "{{ ['hqe_swift', qaswift_random_uuid] | join('-') }}"
qaswft_test_domain: Default
qaswift_test_role: "{{ hqe_group_vars.keystone_member_role }}"
qaswift_swift_role: "swiftoperator"
qaswift_test_domain: "Default"

# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"

swift_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_swift.deploy.tests_folder }}"
swift_work_folder: "{{ work_folder }}/{{ hqe_swift.deploy.test_suite }}"
07070101200F19000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy07070101200F1C000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/files07070101200F1D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/files/run_filters07070101200F1E000081A4000003E800000064000000015B3CDC1200000553000001030000000400000000000000000000007400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/files/run_filters/add_plugin_tests.txt# Run all the compute tests
+tempest\.api\.compute\.*

# Skip the tests checking features not supported in HOS
-tempest\.api\.compute\.test_networks*
-tempest\.api\.compute\.test_tenant_networks*
-tempest\.api\.compute\.test_versions\.TestVersions\.test_get_version_details
-tempest\.api\.compute\.admin\.test_agents*
-tempest\.api\.compute\.admin\.test_floating_ips_bulk*
-tempest\.api\.compute\.admin\.test_networks*
-tempest\.api\.compute\.admin\.test_servers_negative\.ServersAdminNegativeTestJSON\.test_migrate_non_existent_server
-tempest\.api\.compute\.certificates\.test_certificates\.*
-tempest\.api\.compute\.floating_ips\.test_list_floating_ips\.FloatingIPDetailsTestJSON\.test_list_floating_ip_pools
-tempest\.api\.compute\.servers\.test_servers_negative\.ServersNegativeTestJSON\.test_force_delete_nonexistent_server_id
-tempest\.api\.compute\.servers\.test_servers_negative\.ServersNegativeTestJSON\.test_restore_nonexistent_server_id
-tempest\.api\.compute\.servers\.test_servers_negative\.ServersNegativeTestJSON\.test_restore_server_invalid_state

# Run all scenario tests (skipped for now the time to debug their failures)
#+tempest.scenario\.*

# Add tempest plugin tests for config drive and lifecycle.
+tempest_plugins\.tests\.api\.test_config_drive\.TestConfigDrive
+tempest_plugins.tests.scenario.test_server_lifecycle.TestServerLifecycle

07070101200F1F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/tasks07070101200F21000081A4000003E800000064000000015B3CDC12000003D3000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/tasks/configure.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
# Configure Tempest Plugins on the target node

- name: hqe-tempest-plugins | configure | Deploy run_filters
  become: yes
  become_user: root
  copy:
    src: "run_filters/add_plugin_tests.txt"
    dest: "{{ tempest_run_filter_folder }}/compute.txt"
    owner: "{{ tempest_user }}"
    group: "{{ tempest_group }}"
    mode: 0640
07070101200F20000081A4000003E800000064000000015B3CDC1200000395000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/tasks/install.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017-2018 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---
# Install Tempest Plugins

- name: hqe-tempest-plugins | install | Install tempest plugin
  become: yes
  become_user: root
  pip:
    name: "{{ work_folder }}/{{ tests_git_repo }}/{{ tempest_plugins }}"
    virtualenv: "{{ tempest_venv_folder }}"
    extra_args: '-e'
07070101200F22000081A4000003E800000064000000015B3CDC1200000034000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml
07070101200F1A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/vars07070101200F1B000081A4000003E800000064000000015B3CDC120000034C000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-tempest-plugin-deploy/vars/main.yml#
# (c) Copyright 2016 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
---

tempest_run_filter_folder: "/opt/stack/tempest/run_filters"
tempest_venv_folder: "/opt/stack/tempest/venv"
tempest_user: tempest
tempest_group: tempest
tempest_plugins: ardana-qa-tests/tempest-plugins0707010122000A000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy0707010122000F000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/files07070101220010000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/files/run_filters07070101220012000081A4000003E800000064000000015B3CDC120000000C000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/files/run_filters/ci.txtget_token_v307070101220013000081A4000003E800000064000000015B3CDC120000000C000001030000000400000000000000000000006300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/files/run_filters/smoke.txtget_token_v307070101220014000081A4000003E800000064000000015B3CDC120000000C000001030000000400000000000000000000006600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/files/run_filters/tests-ci.txtget_token_v307070101220011000081A4000003E800000064000000015B3CDC120000000C000001030000000400000000000000000000006500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/files/run_filters/upgrade.txtget_token_v307070101220015000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/tasks07070101220017000081A4000003E800000064000000015B3CDC1200000183000001030000000400000000000000000000005B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/tasks/configure.yml---
# Configure the demo test

# The only configuration required here is the RC file with the
# credentials but that can only be created after test-resources

- name: hqe-template | configure | Set ownership of {{ template_work_folder}} folder
  file:
    path: "{{ template_work_folder }}"
    owner: "{{ hqe_user }}"
    group: "{{ hqe_group }}"
    state: directory
    recurse: yes

07070101220016000081A4000003E800000064000000015B3CDC1200000185000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/tasks/install.yml---

- name: hqe-template | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ template_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-template | install | Deploy run script
  template: >
    src=hqe-template.j2
    dest="{{ template_work_folder }}/hqe-template"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101220018000081A4000003E800000064000000015B3CDC1200000033000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml0707010122000D000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/templates0707010122000E000081A4000003E800000064000000015B3CDC12000001FD000001030000000400000000000000000000006100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/templates/hqe-template.j2#!/bin/bash

# Wrapper script to execute the example test
# within the venv, with the right parameters
#
# Usage: hqe-template run_filter_filename

set -o pipefail

RUN_FILTER=${1:-ci.txt}
TEST_HOME={{ template_code_folder }}
WORK_HOME={{ template_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# Run the test
${TEST_HOME}/test_get_token.bash ${WORK_HOME}/testrc $(cat ${WORK_HOME}/run_filters/${RUN_FILTER}) | tee ${WORK_HOME}/test_get_token.log0707010122000B000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/vars0707010122000C000081A4000003E800000064000000015B3CDC12000000B9000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-deploy/vars/main.yml---
template_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_template.deploy.tests_folder }}"
template_work_folder: "{{ work_folder }}/{{ hqe_template.deploy.test_suite }}"
0707010120100E000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run0707010120100F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/defaults07070101201010000081A4000003E800000064000000015B3CDC1200000004000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/defaults/main.yml---
07070101201015000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/tasks07070101201016000081A4000003E800000064000000015B3CDC1200000267000001030000000400000000000000000000005600000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-template | test-resources | Delete test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_user"
    user_name: "{{ demo_test_user }}"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-template | test-resources | Delete test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "delete_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"07070101201017000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070101201018000081A4000003E800000064000000015B3CDC1200000221000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore erros is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-template | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  command: "{{ template_work_folder }}/hqe-template {{ run_filter_file }}"
  register: test_output
  ignore_errors: True

- name: hqe-template | run | Show test output
  debug: var=test_output

07070101201019000081A4000003E800000064000000015B3CDC1200000581000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-template | test-resources | Create test project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_project"
    project_name: "{{ demo_test_project }}"
    project_domain_name: "{{ demo_test_domain }}"
    description: "Ephemeral test account"

- name: hqe-template | test-resources | Create test user
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "create_user"
    user_name: "{{ demo_test_user }}"
    user_password: "{{ demo_test_password}}"
    description: "Ephemeral test account"
    user_domain_name: "{{ demo_test_domain }}"

- name: hqe-template | test-resources | Grant memmber role to Test User on Test Project
  keystone_v3:
    login_token: "{{ keystone_admin_token }}"
    endpoint: "{{ keystone_admin_endpoint }}/v3"
    action: "grant_project_role"
    user_name: "{{ demo_test_user }}"
    project_name: "{{ demo_test_project }}"
    role_name: "{{ demo_test_role }}"
    user_domain_name: "{{ demo_test_domain }}"
    project_domain_name: "{{ demo_test_domain }}"

- name: hqe-template | test-resources | Deploy the configuration file
  template: >
    src=testrc.j2
    dest="{{ template_work_folder }}/testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=060007070101201013000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/templates07070101201014000081A4000003E800000064000000015B3CDC1200000140000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/templates/testrc.j2export OS_BASE_AUTH_URL={{ keystone_admin_endpoint }}
export OS_USERNAME={{ demo_test_user }}
export OS_PASSWORD={{ demo_test_password }}
export OS_PROJECT_NAME={{ demo_test_project }}
export OS_CACERT={{ ca_bundle }}
export OS_USER_DOMAIN_NAME={{ demo_test_domain }}
export OS_PROJECT_DOMAIN_NAME={{ demo_test_domain }}07070101201011000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000004900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/vars07070101201012000081A4000003E800000064000000015B3CDC12000004F4000001030000000400000000000000000000005200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-template-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml

run_filter_file: ci.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
demo_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
demo_test_user: "{{ ['hqe_demo', demo_random_uuid] | join('-') }}"
demo_test_project: "{{ ['hqe_demo', demo_random_uuid] | join('-') }}"
demo_test_password: "{{ ['hqe_demo', demo_random_uuid] | join('-') }}"
demo_test_domain: Default
demo_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# General keystone settings
keystone_admin_token: "{{ hqe_token_vars.keystone_admin_token }}"
keystone_admin_endpoint: "{{ osrc_vars.os_unversioned_auth_url }}"

# Local Folders
template_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_template.deploy.tests_folder }}"
template_work_folder: "{{ work_folder }}/{{ hqe_template.deploy.test_suite }}"
07070101200E49000041ED000003E800000064000000065B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy07070101200E4E000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/files07070101200E4F000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/files/run_filters07070101200E51000081A4000003E800000064000000015B3CDC1200000005000001030000000400000000000000000000006D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/files/run_filters/parallel.txtsmoke07070101200E50000081A4000003E800000064000000015B3CDC1200000005000001030000000400000000000000000000007400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/files/run_filters/test-stress-run.txtsmoke07070101200E52000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/tasks07070101200E54000081A4000003E800000064000000015B3CDC12000000A0000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/tasks/configure.yml---
# Configure test-stress-run

# The only configuration required here is the RC file with the
# credentials but that can only be created after test-resources
07070101200E53000081A4000003E800000064000000015B3CDC12000001AC000001030000000400000000000000000000006000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/tasks/install.yml---
- name: hqe-test-stress-run | install | Deploy run_filters
  copy: >
    src=run_filters
    dest="{{ test_stress_run_work_folder }}/"
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0640

- name: hqe-test-stress-run | install | Deploy run script
  template: >
    src=hqe-test-stress-run.j2
    dest={{ test_stress_run_work_folder }}/hqe-test-stress-run
    owner={{ hqe_user }} group={{ hqe_group }}
    mode=0755
07070101200E55000081A4000003E800000064000000015B3CDC1200000033000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/tasks/main.yml---
- include: install.yml
- include: configure.yml07070101200E4C000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005800000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/templates07070101200E4D000081A4000003E800000064000000015B3CDC1200001898000001030000000400000000000000000000006F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/templates/hqe-test-stress-run.j2#!/bin/bash

# Wrapper script to execute test-stress-run
# within the venv, with the right parameters
#
# Usage: hqe-test-stress-run run_filter_filename

set -o pipefail

IMAGE_ID=$1
FLAVOR=$2
AZ=$3
VMUSER=$4
HTTP_PROXY=$5
LONGPING=$6
NVMS=$7
RUN_FILTER={{ test_stress_run_work_folder }}/run_filters/${8:-parallel.txt}
DNSSERVER=${9:-10.1.64.20}

TEST_HOME={{ test_stress_run_code_folder }}
WORK_HOME={{ test_stress_run_work_folder }}
VENV={{ common_venv_folder }}

# Activate the virtual environment
source ${VENV}/bin/activate

# activate the credentials
source $WORK_HOME/test_stress_run.testrc

#ip2ping=$(hostname -I | awk '{print $1}')
ip2ping=$DNSSERVER

# Run the test

KNOWN_TESTS="smoke snapshots bonnie vol_smoke vol_verif"

FILTERS=$(cat $RUN_FILTER)
echo "Filters = $FILTERS"
echo "but over-riding ..."
FILTERS=$KNOWN_TESTS

failures=0
for test in $KNOWN_TESTS; do
    if [[ $test =~ $FILTER ]]; then
        if [[ $test == "smoke" ]]; then
            ${TEST_HOME}/test_stress_run.py NOTIME NOLOAD ONESHOT JENKINS\
                                            BASEIMGID=$IMAGE_ID\
                                            AZ=$AZ\
                                            FLAVOR=$FLAVOR\
                                            IP2PING=$ip2ping\
                                            VMUSER=$VMUSER\
                                            DNS=$DNSSERVER\
                                            GUEST_HTTP_PROXY=$HTTP_PROXY\
                                            GUEST_HTTPS_PROXY=$HTTP_PROXY\
                                            LONGPING=$LONGPING\
                                            NVMS=$NVMS | tee ${WORK_HOME}/test_stress_run.log
            failed=$?
            [[ $failed > 0 ]] && echo "Smoke test failed !" || echo "Smoke test passed."
            failures=$( expr $failures + $failed )
        fi
        if [[ $test == "bonnie" ]]; then
            ${TEST_HOME}/test_stress_run.py NOTIME ONESHOT JENKINS\
                                            TEST_CHOSEN=Bonnie\
                                            BASEIMGID=$IMAGE_ID\
                                            AZ=$AZ\
                                            FLAVOR=$FLAVOR\
                                            IP2PING=$ip2ping\
                                            VMUSER=$VMUSER\
                                            DNS=$DNSSERVER\
                                            GUEST_HTTP_PROXY=$HTTP_PROXY\
                                            GUEST_HTTPS_PROXY=$HTTP_PROXY\
                                            LONGPING=$LONGPING\
                                            NVMS=$NVMS | tee ${WORK_HOME}/test_stress_run.log
            failed=$?
            [[ $failed > 0 ]] && echo "Bonnie test failed !" || echo "Bonnie test passed."
            failures=$( expr $failures + $failed )
        fi
        if [[ $test == "vol_smoke" ]]; then
            ${TEST_HOME}/test_stress_run.py NOTIME NOLOAD ONESHOT JENKINS CINDER\
                                            DEVNAME_EXPECT=vdb\
                                            BASEIMGID=$IMAGE_ID\
                                            AZ=$AZ\
                                            FLAVOR=$FLAVOR\
                                            IP2PING=$ip2ping\
                                            VMUSER=$VMUSER\
                                            DNS=$DNSSERVER\
                                            GUEST_HTTP_PROXY=$HTTP_PROXY\
                                            GUEST_HTTPS_PROXY=$HTTP_PROXY\
                                            LONGPING=$LONGPING\
                                            NVMS=$NVMS | tee ${WORK_HOME}/test_stress_run.log
            failed=$?
            [[ $failed > 0 ]] && echo "vol_smoke test failed !" || echo "vol_smoke test passed."
            failures=$( expr $failures + $failed )
        fi
        if [[ $test == "vol_verif" ]]; then
            ${TEST_HOME}/test_stress_run.py NOTIME ONESHOT JENKINS CINDER\
                                            TEST_CHOSEN=Iozone\
                                            DEVNAME_EXPECT=vdb\
                                            BASEIMGID=$IMAGE_ID\
                                            AZ=$AZ\
                                            FLAVOR=$FLAVOR\
                                            IP2PING=$ip2ping\
                                            VMUSER=$VMUSER\
                                            DNS=$DNSSERVER\
                                            GUEST_HTTP_PROXY=$HTTP_PROXY\
                                            GUEST_HTTPS_PROXY=$HTTP_PROXY\
                                            LONGPING=$LONGPING\
                                            NVMS=$NVMS | tee ${WORK_HOME}/test_stress_run.log
            failed=$?
            [[ $failed > 0 ]] && echo "vol_verif test failed !" || echo "vol_verif test passed."
            failures=$( expr $failures + $failed )
        fi
        if [[ $test == "snapshots" ]]; then
            ${TEST_HOME}/test_stress_run.py NOTIME NOLOAD ONESHOT JENKINS SNAPSHOT FILLSNAP\
                                            SNAPSHOT_FLAVOR=m1.small\
                                            SNAP_AZ=$AZ\
                                            PATIENCE=600\
                                            BASEIMGID=$IMAGE_ID\
                                            AZ=$AZ\
                                            FLAVOR=$FLAVOR\
                                            IP2PING=$ip2ping\
                                            VMUSER=$VMUSER\
                                            DNS=$DNSSERVER\
                                            GUEST_HTTP_PROXY=$HTTP_PROXY\
                                            GUEST_HTTPS_PROXY=$HTTP_PROXY\
                                            LONGPING=$LONGPING\
                                            NVMS=$NVMS | tee ${WORK_HOME}/test_stress_run.log
            failed=$?
            [[ $failed > 0 ]] && echo "Snapshots test failed !" || echo "Snapshots test passed."
            failures=$( expr $failures + $failed )
        fi
    fi
done

# Make sure the return code matches the overall test result
[[ $failures > 0 ]] && exit 1 || exit 0

07070101200E4A000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/vars07070101200E4B000081A4000003E800000064000000015B3CDC12000000D5000001030000000400000000000000000000005C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-deploy/vars/main.yml---
test_stress_run_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_test_stress_run.deploy.tests_folder }}"
test_stress_run_work_folder: "{{ work_folder }}/{{ hqe_test_stress_run.deploy.test_suite }}"
07070100E02027000041ED000003E800000064000000055B3CDC1200000000000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run07070100E43A54000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/tasks07070100E43A55000081A4000003E800000064000000015B3CDC1200000B34000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/tasks/cleanup.yml---
# Cleanup the account used for testing

- name: hqe-test-stress-run | cleanup test resources | Delete any VMs
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: |
      "for vmid in $({{ common_venv_bin }}/nova list | grep -e ACTIVE -e ERROR -e BUILD | awk '{print $2'}); do {{ common_venv_bin }}/nova delete $vmid; done"

- name: hqe-test-stress-run | cleanup test resources | wait to ensure VMs gone
  ignore_errors: true
  shell: sleep 120

- name: hqe-test-stress-run | cleanup test resources | Delete image kernel
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/glance image-delete {{ test_stress_test_image_kernel_id.stdout }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-test-stress-run | cleanup test resources | Delete image
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/glance image-delete {{ test_stress_test_image_id.stdout }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-test-stress-run | cleanup test resources | Delete router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-delete {{ test_stress_test_router }}"
  register: result
  until: result.rc == 0
  retries: 5
  delay: 10

- name: hqe-test_stress_run | cleanup test resources | delete test user
  environment:
      OS_USERNAME: admin
      OS_TENANT_NAME: admin
      OS_PASSWORD: "{{ os_admin_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/openstack user delete {{ test_stress_test_user }}"

- name: hqe-test_stress_run | cleanup test resources | delete test project
  environment:
      OS_USERNAME: admin
      OS_TENANT_NAME: admin
      OS_PASSWORD: "{{ os_admin_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/openstack project delete {{ test_stress_test_project }}"

07070100E43A56000081A4000003E800000064000000015B3CDC120000015B000001030000000400000000000000000000005A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/tasks/main.yml---
- include: test-resources.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: ../../hqe-common/tasks/common-run.yml
  vars:
    caller_role_path: "{{ role_path }}"
    ansible_python_interpreter: "{{ common_venv_python }}"
- include: cleanup.yml
  vars:
    ansible_python_interpreter: "{{ common_venv_python }}"
07070100E43A57000081A4000003E800000064000000015B3CDC1200000330000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/tasks/run.yml---
# Run the test script
#
# The test log shall be placed in a folder where it's picked up by the CI jobs
#
# Ignore errors is require to make sure the following tasks are executed
# We will need to store the exit code somewhere for Jenkins to pick it up (TBD)

- name: hqe-test-stress-run | run | Run the tests
  become: yes
  become_user: "{{ hqe_user }}"
  command: "{{ test_stress_run_work_folder }}/hqe-test-stress-run {{ test_stress_test_image_id.stdout }} {{ test_stress_test_flavor }} {{ test_stress_test_az }} {{ test_stress_test_vmuser}} {{ test_stress_test_http_proxy }} {{ test_stress_test_longping }} {{ test_stress_test_nvms }} {{ run_filter_file }} {{ tsr_dns_server_ip }}"
  register: test_output
  ignore_errors: True

- name: hqe-test-stress-run | run | Show test output
  debug: var=test_output

07070100E43A58000081A4000003E800000064000000015B3CDC1200001E85000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/tasks/test-resources.yml---
# Setup the test account used for testing

- name: hqe-test_stress_run | test-resources | get auth_url
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.service_osrc_path }}"
    "{{ common_venv_bin }}/openstack" catalog show keystone | awk '/public/ {print $4}'
  register: os_auth_url_raw

- name: hqe-test_stress_run | test-resources | set os_auth_url
  set_fact:
    os_auth_url: "{{ os_auth_url_raw.stdout }}"

- name: hqe-test_stress_run | test-resources | get admin password
  shell: |
    awk -F '=' '/OS_PASSWORD/ {print $2}' < "{{ osrc_vars.service_osrc_path }}"
  register: os_admin_password_raw

- name: hqe-test_stress_run | test-resources | set os_password value
  set_fact:
    os_admin_password: "{{ os_admin_password_raw.stdout }}"

- name: hqe-test_stress_run | test-resources | create test project
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.keystone_osrc_path }}"
    "{{ common_venv_bin }}/openstack" project create "{{ test_stress_test_project }}"
  register: project_create_output
  ignore_errors: true

- name: hqe-test_stress_run | test-resources | create test project debug
  debug: var=project_create_output

- name: hqe-test_stress_run | test-resources | create test user
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.keystone_osrc_path }}"
    "{{ common_venv_bin }}/openstack" user create --password "{{ test_stress_test_password }}" --project "{{ test_stress_test_project }}" "{{ test_stress_test_user }}"
  register: user_create_output
  ignore_errors: true

- name: hqe-test_stress_run | test-resources | create user debug
  debug: var=user_create_output

- name: hqe-test_stress_run | test-resources | show project exists
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.keystone_osrc_path }}"
    "{{ common_venv_bin }}/openstack" project list | grep test_stress_run
  register: project_list_output

- name: hqe-test_stress_run | test-resources | show project exists debug
  debug: var=project_list_output

- name: hqe-test_stress_run | test-resources | add roles
  args:
    executable: /bin/bash
  shell: |
    source "{{ osrc_vars.keystone_osrc_path }}"
    "{{ common_venv_bin }}/openstack" role add --project "{{ test_stress_test_project }}" --user "{{ test_stress_test_user }}" Member
    "{{ common_venv_bin }}/openstack" role add --project "{{ test_stress_test_project }}" --user "{{ test_stress_test_user }}" _member_
    "{{ common_venv_bin }}/openstack" role add --project "{{ test_stress_test_project }}" --user "{{ test_stress_test_user }}" swiftoperator
  register: role_add_output
  ignore_errors: true

- name: hqe-test_stress_run | test-resources | add role output
  debug: var=role_add_output

- name: hqe-test_stress_run | test-resources | Deploy the creds file
  template: >
    src=testrc.j2
    dest="{{ test_stress_run_work_folder }}/test_stress_run.testrc"
    owner={{ hqe_user }}
    group={{ hqe_group }}
    mode=0600

- name: hqe-test_stress_run | test-resources | capture creds
  shell: cat "{{ test_stress_run_work_folder }}/test_stress_run.testrc"
  register: test_stress_creds_output

- name: hqe-test_stress_run | test-resources | show creds
  debug: var=test_stress_creds_output

# test requires the following items
- name: hqe-test_stress_run | test-resources | Create router
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-create {{ test_stress_test_router }}"

- name: hqe-test_stress_run | test-resources | Connect router to ext-net
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/neutron router-gateway-set {{ test_stress_test_router }} {{ test_stress_test_ext_net }}"

- name: hqe-test_stress_run | test-resources | Get tarball name
  ignore_errors: true
  shell: basename {{ test_stress_test_test_stress_run_image_url }}
  register: image_tarball_name

- name: hqe-test_stress_run | test-resources | Get tarball name - debug
  debug: var=image_tarball_name

# NOTE(andreaf) Certs validation: https://github.com/ansible/ansible/issues/12549
- name: hqe-test_stress_run | test-resources | Get image tarball
  environment:
    http_proxy: "{{ test_stress_test_http_proxy }}"
  get_url:
    url: "{{ test_stress_test_test_stress_run_image_url }}"
    dest: "{{ test_stress_run_work_folder }}/{{ image_tarball_name.stdout }}"
    mode: 0644
    validate_certs: no
  register: get_image_tarball_log

- name: hqe_test_stress_run | test-resources | show tarball get
  debug: var=get_image_tarball_log

- name: hqe_test_stress_run | test-resources | Get image name
  ignore_errors: true
  shell: basename {{ test_stress_test_test_stress_run_image_url }} '.tar.gz'
  register: test_stress_test_image_name

- name: hqe-test_stress_run | test-resources | Get image name - debug
  debug: var=test_stress_test_image_name

- name: hqe-test_stress_run | test-resources | Extract tarball
  ignore_errors: true
  unarchive:
    src: "{{ test_stress_run_work_folder }}/{{ image_tarball_name.stdout }}"
    dest: "{{ test_stress_run_work_folder }}/"

- name: hqe-test_stress_run | test-resources | Get kernel name
  ignore_errors: true
  shell: ls | grep vmlinuz
  args:
    chdir: "{{ test_stress_run_work_folder }}"
  register: test_stress_run_kernel

- name: hqe-test_stress_run | test-resources | Upload kernel to Glance
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/glance image-create --name {{ test_stress_run_kernel.stdout }} --container-format aki --disk-format aki --file {{ test_stress_run_work_folder }}/{{ test_stress_run_kernel.stdout }} | awk '/ id / {print $4}'"
  register: test_stress_test_image_kernel_id

- name: hqe-test_stress_run | test-resources | Debug check on test_stress_test_image_kernel_id
  debug: var=test_stress_test_image_kernel_id

- name: hqe-test_stress_run | test-resources | Upload image to Glance
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/glance image-create --name {{ test_stress_test_image_name.stdout }} --container-format ami --disk-format ami --property kernel_id={{ test_stress_test_image_kernel_id.stdout }}  --file {{ test_stress_run_work_folder }}/{{ [ test_stress_test_image_name.stdout, 'img' ] | join('.') }}"

# the run script picks up the image id via similar logic
- name: hqe-test_stress_run | test-resources | Verify image exists
  ignore_errors: true
  environment:
      OS_USERNAME: "{{ test_stress_test_user }}"
      OS_TENANT_NAME: "{{ test_stress_test_project }}"
      OS_PASSWORD: "{{ test_stress_test_password }}"
      OS_CACERT: "{{ ca_bundle }}"
      OS_AUTH_URL: "{{ os_auth_url }}"
  shell: "{{ common_venv_bin }}/nova image-list | grep {{ test_stress_test_image_pattern }} | head -1 | awk '{print $2}'"
  register: test_stress_test_image_id

- name: hqe-test_stress_run | test-resources | Verify image exists - debug
  debug: var=test_stress_test_image_id
07070100E210A0000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005500000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/templates07070100E210A1000081A4000003E800000064000000015B3CDC12000000F5000001030000000400000000000000000000005F00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/templates/testrc.j2export OS_USERNAME={{ test_stress_test_user }}
export OS_TENANT_NAME={{ test_stress_test_project }}
export OS_PASSWORD={{ test_stress_test_password }}
export OS_AUTH_URL={{ os_auth_url }}
export OS_NO_CACHE=True
export OS_CACERT={{ ca_bundle }}
07070100E2109E000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005000000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/vars07070100E2109F000081A4000003E800000064000000015B3CDC1200000839000001030000000400000000000000000000005900000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/roles/hqe-test-stress-run-run/vars/main.yml---
# Filter variable must be defined in all roles to allow for
# test filtering. The test filter file contains the data to
# be able to filter which tests to be executed out of role,
# stored in the format which is more suitable for the specific role.
# Test filter files are expected under a run_filters folder.
# The file name must match the tags, for it to be selected properly
# when a specific test run is requested in ardana-qa-run.yml

run_filter_file: parallel.txt

# Settings from deploy

# Test account setup for testing, and clean-ed up afterwards
test_stress_random_uuid: "{{ ansible_date_time.epoch | to_uuid }}"
test_stress_random_id: "{{ ['hqe_test_stress_run', test_stress_random_uuid] | join('-') }}"
test_stress_test_user: "{{ test_stress_random_id }}"
test_stress_test_project: "{{ test_stress_random_id }}"
test_stress_test_password: "{{ test_stress_random_id }}"
test_stress_test_domain: Default
test_stress_test_role: "{{ hqe_group_vars.keystone_member_role }}"

# test resources
test_stress_test_router: "{{ test_stress_random_id }}"
test_stress_test_network: "{{ test_stress_random_id }}"
test_stress_test_subnet: "{{ test_stress_random_id }}"
test_stress_test_cidr: "192.168.1.0/24"
test_stress_test_keyname: "{{ test_stress_random_id }}"
test_stress_test_key_file: "{{ [test_stress_test_keyname, 'pem'] | join('.') }}"

# test suite parameters
test_stress_test_az: "nova"
test_stress_test_flavor: "m1.small"
test_stress_test_nvms: 4
test_stress_test_image_pattern: "trusty-server"
test_stress_test_vmuser: "ubuntu"
test_stress_test_longping: 16
test_stress_test_ext_net: "{{ hqe_group_vars.test_region_ext_net }}"
test_stress_test_test_stress_run_image_url: "http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64.tar.gz"
test_stress_test_http_proxy: "http://proxy.houston.hpecorp.net:8080"
tsr_dns_server_ip: "10.1.64.20"

auth_tail: ":5000/v2.0"

test_stress_run_code_folder: "{{ work_folder }}/{{ tests_git_repo }}/{{ hqe_test_stress_run.deploy.tests_folder }}"
test_stress_run_work_folder: "{{ work_folder }}/{{ hqe_test_stress_run.deploy.test_suite }}"
07070100A63315000081A4000003E800000064000000015B3CDC1200000017000001030000000400000000000000000000004300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/test-requirements.txtansible
python-subunit
07070100A82E6F000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000003300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests07070100AA480C000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000003B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library07070100AA480E000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004100000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles07070100AC1662000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000004E00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles/test_tracker07070100AC1663000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000005400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles/test_tracker/tasks07070100AC1668000081A4000003E800000064000000015B3CDC1200000073000001030000000400000000000000000000005D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles/test_tracker/tasks/main.yml---
- include: test_dependencies.yml
- include: test_name.yml
- include: test_output.yml
- include: test_status.yml07070100AC1667000081A4000003E800000064000000015B3CDC1200000264000001030000000400000000000000000000006A00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles/test_tracker/tasks/test_dependencies.yml---
# Test behaviour with missing / present dependencies

- name: dependencies | cleanup existing virtual environment
  pip:
    name: python-subunit
    state: absent
  ignore_errors: yes

- name: dependencies | test module fails
  test_tracker:
    name: no-subunit
    output: no-subunit
  register: test_result
  failed_when: "'Could not import subunit' not in test_result.msg"

- name: dependencies | Add subunit to the virtual environment
  pip:
    name: python-subunit
    state: latest

- name: setup | test module succeeds
  test_tracker:
    name: subunit
    output: /dev/null
  register: test_result07070100AC1665000081A4000003E800000064000000015B3CDC12000003E4000001030000000400000000000000000000006200000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles/test_tracker/tasks/test_name.yml---
# Test the name and run_filter parameters of the module

- name: name | test name is mandatory
  test_tracker:
    run_filter: foo
    output: foo
  register: test_result
  failed_when: "'missing required arguments: name' not in test_result.msg"

- name: name | test name in subunit
  test_tracker:
    name: "test_name_123"
    output: test.subunit

- name: name | test name in subunit | verify
  shell: subunit-ls test.subunit | grep -c test_name_123
  register: test_result
  failed_when: test_result.stdout != "1"

- name: name | cleanup
  file:
    path: test.subunit
    state: absent

- name: run_filter | test run_filter in subunit
  test_tracker:
    name: "test_name_123"
    run_filter: ci
    output: test.subunit

- name: run_filter | test run_filter in subunit | verify
  shell: subunit-ls test.subunit | grep -c 'test_name_123\[ci\]'
  register: test_result
  failed_when: test_result.stdout != "1"

- name: run_filter | cleanup
  file:
    path: test.subunit
    state: absent07070100AC1664000081A4000003E800000064000000015B3CDC1200000752000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles/test_tracker/tasks/test_output.yml---
# Test the output parameter of the module

- name: output | test output is mandatory
  test_tracker:
    name: foo
  register: test_result
  failed_when: "'missing required arguments: output' not in test_result.msg"

- name: output | test output file exists
  test_tracker:
    name: "incomplete"
    output: test.subunit

- name: output | test output file exists | verify
  shell: subunit-ls test.subunit | grep -c incomplete
  register: test_result
  failed_when: test_result.stdout != "1"

- name: output | test output file exists | cleanup
  file:
    path: test.subunit
    state: absent

- name: output | test multiple packets one test | start
  test_tracker:
    name: complete
    output: test.subunit

- name: output | test multiple packets one test | end
  test_tracker:
    name: complete
    output: test.subunit
    status: success

- name: output | test multiple packets one test | verify
  shell: subunit-ls --times test.subunit
  register: test_result | grep -c complete
  failed_when: test_result.stdout != "1"

- name: output | test multiple packets one test | cleanup
  file:
    path: test.subunit
    state: absent

- name: output | test multiple tests | start
  test_tracker:
    name: multiple1
    output: test.subunit

- name: output | test multiple tests | end
  test_tracker:
    name: multiple1
    output: test.subunit
    status: skip

- name: output | test multiple tests | start
  test_tracker:
    name: multiple2
    output: test.subunit

- name: output | test multiple tests | end
  test_tracker:
    name: multiple2
    output: test.subunit
    status: fail

- name: output | test multiple tests | verify
  shell: subunit-ls --times test.subunit | egrep -c '^multiple[12]'
  register: test_result
  failed_when: test_result.stdout != "2"

- name: output | test multiple tests | cleanup
  file:
    path: test.subunit
    state: absent07070100AC1666000081A4000003E800000064000000015B3CDC1200000A14000001030000000400000000000000000000006400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/roles/test_tracker/tasks/test_status.yml---
# Test the status and status_rc parameters of the module

- name: status | test invalid value
  test_tracker:
    name: status
    status: foo
    output: somewhere
  register: test_result
  failed_when: "'value of status must be one of:' not in test_result.msg"

- name: status-rc | test invalid value type
  test_tracker:
    name: status_rc
    status_rc: foo
    output: somewhere
  register: test_result
  failed_when: "'ValueError: invalid literal for int() with base 10' not in test_result.msg"

- name: status, status_rc | incompatible parameters
  test_tracker:
    name: status_status
    status: success
    status_rc: 0
    output: somewhere
  register: test_result
  failed_when: "'Both status=success and status_rc=0 have been specified' not in test_result.msg"

- name: status_rc | zero is success
  test_tracker:
    name: success
    status_rc: 0
    output: test.subunit

- name: status_rc | zero is success | verify
  shell: subunit-filter -s test.subunit | subunit-ls | grep -c success
  register: test_result
  failed_when: test_result.stdout != "1"

- name: status_rc | zero is success | cleanup
  file:
    path: test.subunit
    state: absent

- name: status_rc | one is failure
  test_tracker:
    name: failure
    status_rc: 1
    output: test.subunit

- name: status_rc | one is failure | verify
  shell: subunit-filter -s test.subunit | subunit-ls | grep -c failure
  register: test_result
  failed_when: test_result.stdout != "1"

- name: status_rc | one is failure | cleanup
  file:
    path: test.subunit
    state: absent

- name: status_rc | test all final statuses | success
  test_tracker:
    name: all_success
    status: success
    output: test.subunit

- name: status_rc | test all final statuses | fail
  test_tracker:
    name: all_fail
    status: fail
    output: test.subunit

- name: status_rc | test all final statuses | xfail
  test_tracker:
    name: all_xfail
    status: xfail
    output: test.subunit

- name: status_rc | test all final statuses | uxsuccess
  test_tracker:
    name: all_uxsuccess
    status: uxsuccess
    output: test.subunit

- name: status_rc | test all final statuses | skip
  test_tracker:
    name: all_skip
    status: skip
    output: test.subunit

- name: status_rc | test all final statuses | verify
  shell: subunit2pyunit test.subunit 2>&1 | egrep '^all.*\.\.\.' | awk '{ print $3 }' | tr '\n' '|'
  register: test_result
  failed_when: test_result.stdout != "ok|FAIL|expected|unexpected|skipped|"

- name: status_rc | one is failure | cleanup
  file:
    path: test.subunit
    state: absent
07070100AA480D000081A4000003E800000064000000015B3CDC1200000170000001030000000400000000000000000000004C00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tests/library/test_tracker.yml---
# This is a playbook to test the test_tracker module.
#
# The playbook can only be executed locally, and it relies on an
# existing virtual environment
#
# Usage:
#     ansible-playbook -c local -i hosts/localhost test_tracker.yml -M ../../library -e 'ansible_python_interpreter=[venv]/bin/python'
- hosts: localhost
  roles:
  - { role: test_tracker, tags: test }07070100A6331D000041ED000003E800000064000000035B3CDC1200000000000001030000000400000000000000000000003300000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tools07070100A82E70000041ED000003E800000064000000025B3CDC1200000000000001030000000400000000000000000000003700000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tools/bin07070100A82E72000081ED000003E800000064000000015B3CDC1200000761000001030000000400000000000000000000004D00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tools/bin/get_tags_runfilter.sh#!/bin/bash

#
# Called by CI to get the TAGS and RUN_FILTER to be used
# along with test-artefacts
# This script generates a properties file that need to
# be injected into the jenkins environment to be used
# in the build steps that follow

set -eu
set -o pipefail
set -x

SCRIPT_DIR=$(readlink -e $(dirname $0))
source ${SCRIPT_DIR}/libcommon.sh
run_ci=0

# Get the common file set
find $HQE_ANSIBLE_ROOT -maxdepth 1 -type f | grep -Ev "README" > common_fileset.txt
find $HQE_ANSIBLE_ROOT/roles  -type f  | grep hqe-common >> common_fileset.txt

# Get the change set
change_set=`git show --pretty=format: --name-only HEAD^..HEAD | grep -v '^$' | grep -Ev "tools|\.git|README"`

# If there are changes to common files run the minimal tests of all test suites
for file in $change_set; do
    if grep -q -F $file common_fileset.txt; then
        run_ci=1
        break
    fi
done

# Select all lines starting with 'roles/'. Remove prefix and suffix to get
# the test suite names that are modified. 'Common' will trigger template
# because it's not a valid tag, but it must still be executed if it's alone
TEST_SUITES=`git show --pretty=format: --name-only HEAD^..HEAD | \
             grep -E '^roles/' | cut -f 2 -d "/" | sed -e \
             '/^$/d;s/^hqe-//;s/-deploy$//;s/-run$//' | \
             sed -e 's/common/template/' | sort -u | tr '\n' ',' | \
             sed -e 's/,$//'`

# Create the properties file to be injected into Jenkins environment
if [[ $run_ci == 1 ]]; then
    echo "TAGS=\"ci,$TEST_SUITES\"">${WORKSPACE:-$PWD}/test_filters.properties
    echo "RUNFILTER=ci">>${WORKSPACE:-$PWD}/test_filters.properties
else
    if [[ -z "$TEST_SUITES" ]]; then
        TEST_SUITES="ci"
    fi
    echo "TAGS=\"$TEST_SUITES\"">${WORKSPACE:-$PWD}/test_filters.properties
    echo "RUNFILTER=tests-ci">>${WORKSPACE:-$PWD}/test_filters.properties
fi

rm -rf common_fileset.txt
07070100A82E73000081A4000003E800000064000000015B3CDC1200000179000001030000000400000000000000000000004400000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tools/bin/libcommon.shHQE_ANSIBLE_TOOLS=$(cd $(dirname ${BASH_SOURCE[0]})/.. ; pwd)
HQE_ANSIBLE_ROOT=$(cd $(dirname ${BASH_SOURCE[0]})/../.. ; pwd)

export PYTHONUNBUFFERED=1
export GOZER_GIT_MIRROR=${GOZER_GIT_MIRROR:-http://git.suse.provo.cloud/cgit}
export PYPI_BASE_HOST=${PYPI_BASE_HOST:-pypi.suse.provo.cloud}
export PYPI_MIRROR_URL=${PYPI_MIRROR_URL:-http://$PYPI_BASE_HOST/openstack/latest}
07070100A82E71000081ED000003E800000064000000015B3CDC12000004F6000001030000000400000000000000000000004B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/tools/bin/role_scaffolding.sh#!/bin/bash

#
# Called by test script developers to create
#  ardana-qa-ansible roles for their test suites.
# Please note that this script only builds the
# skeleton for the ansible role. The generated
# role needs to be fixed by the tester to get it
# working.
#

set -eu
set -o pipefail
set -x


if [ "$#" -ne 1 ]; then
    echo "Usage: `basename "$0"` rolename"
    exit 1
fi

SCRIPT_DIR=$(readlink -e $(dirname $0))
source ${SCRIPT_DIR}/libcommon.sh

VENV=$HQE_ANSIBLE_TOOLS/tools/venvs/ansible

# Setup venv
mkdir -p $VENV
virtualenv --no-site-packages $VENV
$VENV/bin/pip install --trusted-host $PYPI_BASE_HOST --index-url=$PYPI_MIRROR_URL ansible==1.9.2

set +u
source $VENV/bin/activate
set -u

if [[ ! -e "$HQE_ANSIBLE_ROOT" ]]; then
    HQE_ANSIBLE_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
fi
ansible-galaxy init "hqe-$1-deploy" --offline --force -p $HQE_ANSIBLE_ROOT/roles
ansible-galaxy init "hqe-$1-run" --offline --force -p $HQE_ANSIBLE_ROOT/roles
rm -rf $HQE_ANSIBLE_ROOT/roles/*$1*/README.md
rm -rf $HQE_ANSIBLE_ROOT/roles/*$1*/meta
rm -rf $HQE_ANSIBLE_ROOT/roles/*$1*/handlers
cd $HQE_ANSIBLE_ROOT
ansible-playbook -c local -i hosts/default_hosts ardana-qa-role-scaffolding.yml -e role_name="$1" -e role_dest="$HQE_ANSIBLE_ROOT/roles"
07070100A6331C000081A4000003E800000064000000015B3CDC120000146B000001030000000400000000000000000000003B00000000ardana-qa-ansible-9.0+git.1530715154.29b3e81/user_guide.mdHelion OpenStack QA Ansible User Guide
======================================

Deployment Structure
--------------------

The tests deployment architecture is made of a few different functions, which
can be mapped to one or more separate machines. Functions are:
 
1. ansible runner
2. test driver
3. HLM deployer

Connection matrix between functions:

- ansible runner -- ssh(22) --> test driver (deploy tests and data, run tests)
- ansible runner -- ssh(22) --> HLM deployer (to pull HLM data)
- test-driver -- cloud ports --> Cloud VIP (for API calls)
- test-driver -- ssh(22) --> HLM deployer, cloud nodes (for tests which require
                             access to the cloud nodes for logs, data or so)

### The ansible runner
The ansible runner (1) is the node where ansible is executed to trigger
deployment and/or execution of tests. 

In many configurations this runs on the `deployer`, i.e. the node where HLM
`deployer` is. This is convenient because the ansible playbooks for HLM are
executed from there.

For development and testing purposes, it is convenient to have the ansible
runner on the laptop or workstation where the code (ansible or tests) is
being developed.

### The test driver
The test driver (2) is the node where the tests are executed and log files and
test results written. The test driver provides a certain amount of isolation,
as it is executed with a dedicated OS user, and any file needed and produced
by it, is written under a common root folder.

In some configuration this runs on the `deployer`, as the `deployer` has the
required connectivity to all the cloud nodes. In CI the `deployer` is limited
to the internal endpoints, so there is value in using a dedicated test driver
where public and admin endpoints can be resolved.

NOTE(andreaf): Currently it is not possible to separate the ansible runner and
test driver functions into two separate hosts, because of limitations in the
ansible framework and roles. Work is in progress to remove that limitation.

### The HLM deployer 
The HLM deployer (3) is used by tests has it hosts the deployment input data,
root credentials as well as some ansible modules which are also used by tests. 
Tests targeting HLM itself also require access to the deployer to drive HLM
from there.


Tests Lifecycle
---------------

The first steps required to run the tests are:
- Identify which host will run which function. The simplest setup is the
  "all-in-one" where all functions run on the `deployer`. Sudo access is
  required on the test driver to create a new account and its home folder.
- Implement the connection matrix. This involves network connectivity as well
  as passwordless ssh for ansible, and entries in /etc/hosts on the test driver
  to resolve names of cloud hosts and endpoints in the catalogue.
- Provision ardana-qa-ansible on the ansible runner

From that point on everything is automated via ansible. Three root operations
are available:

1. pre-deploy
2. deploy
3. run

### Pre-deploy
Pre-deploy targets the anisble runner and the test driver and completes their
setup, by creating a new OS user and its home on the test driver, pulling
the required data on the test driver and extra modules from the
`deployer` on the ansible runner.
 
Pre-deploy only needs to run once per target cloud. 
It requires re-running only if:

- the target cloud is re-deployed or re-configured
- we want our tests to target a different cloud

It is possible to target different clouds from the same ansible runner, but its
not recommended to do that at once from the same ansible folder, as there may
be conflicts between the data pulled from different `deployers`. NOTE(andreaf)
we may remove this limitation in future by using isolated library folders,
each dedicated to a target cloud.

### Deploy
Deploy targets the test driver. It prepares the ground for test execution
by deploying required code and data in the work space on the test driver,
installing dependencies, setting up virtual environments.

Pre-deploy only needs to run once per target cloud. Re-running can be used to
update the test driver the tests (or the ansible code in this repo) are
modified.

### Run
Deploy targets the test driver. It prepares for test execution by provisioning
any required test resources, and it runs the tests and in finally cleans up
the provisioned test resources. Run generates test results and log files on
the test driver which can be collected and ingested in other systems for
reporting and analysis.

Inputs and folders
------------------
The framework exposes a few inputs that can be used to setup things differently
depending on the target hosts and their setup.

- The user provisioned on the test driver is `hqe_user`:`hqe_group`.
- The user home == work folder is in `work_folder` in deploy and run,
  `hqe_home` in pre-deploy.
- The ansible and test code are pre-cloned in `code_folder`.
- The python virtual environments are deployed under `venv_folder_root`.
- The user used by HLM on the `deployer` is `ardana_user`.
- The home of `ardana_user` is `ardana_home_folder` or `$HOME` for `ardana_user@deployer`.
- The name of the sudo group on the deployer is `test_driver_sudo_group` in
  pre-deploy (not needed elsewhere).

07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!1491 blocks