@cli.command(help="Create new testing project")
@click.option('--pod', default='unknown', help='Name of pod under test')
-@click.option('--installer', help='OPNFV installer', required=True)
-@click.option('--master-host', help='Installer hostname', required=True)
+@click.option('--installer', help='OPNFV installer', default='manual')
+@click.option('--master-host', help='Installer hostname', default='dummy-host')
@click.option('--scenario', default='unknown', help='OPNFV scenario')
@click.argument('name')
def create(pod, installer, master_host, scenario, name):
installer_master_host: fuel-master
installer_master_group:
+ manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
qtip_cache: "{{ qtip_cache }}"
qtip_workdir: "{% raw %}{{ ansible_env.HOME }}{% endraw %}/qtip-workdir-{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}"
installer_master_group:
+ manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
localhost ansible_connection=local
+{% if installer != 'manual' %}
[{{ installer_master_group[installer] }}]
{{ installer_master_host }}
+{% else %}
+[SUT]
+# Add hosts in system under test, example::
+#
+# host-1 ansible_host=192.168.10.1 ansible_host=22 ansile_user=root
+#
+# See http://docs.ansible.com/ansible/intro_inventory.html for details
+{% endif %}
\ No newline at end of file
- { role: qtip, tasks: setup-local, tags: [setup] }
-- hosts: compute
+- hosts: SUT
roles:
# prepare environment
- { role: qtip, tasks: setup-node, tags: [setup] }
-- hosts: compute
+- hosts: SUT
roles:
# run test and collect metrics
# Prepare connection to SUT (System Under Test)
---
-
-- hosts: [fuel-masters, apex-underclouds]
+{% if installer == 'manual' %}
+- hosts: localhost
+ gather_facts: no
+ tasks:
+ - debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
+{% else %}
+- hosts: [{{ installer_master_group[installer] }}]
gather_facts: no
roles:
- { role: qtip, tasks: generate-inventory }
+{% endif %}
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-- hosts: compute
+- hosts: SUT
roles:
# teardown environment
[{{ installer_master_group[installer] }}]
{{ installer_master_host }}
-[fuel-groups:children]
+[SUT] # system under test
+compute
+
+[node-groups:children]
{% for group in hosts|sort %}
{{ group }}
{% endfor %}
-[fuel-groups:vars]
+[node-groups:vars]
ansible_ssh_common_args=-F ./ssh.cfg
{% for group in hosts|sort %}
{% endfor %}
{% endfor %}
-{% endraw %}
\ No newline at end of file
+{% endraw %}