diff --git a/basic-suite-master/test-scenarios/conftest.py b/basic-suite-master/test-scenarios/conftest.py index f9bdb8b8..27dcdc7f 100644 --- a/basic-suite-master/test-scenarios/conftest.py +++ b/basic-suite-master/test-scenarios/conftest.py @@ -48,6 +48,8 @@ from ost_utils.pytest.fixtures.engine import * +from ost_utils.pytest.fixtures.grafana import * + from ost_utils.pytest.fixtures.keycloak import * from ost_utils.pytest.fixtures.env import master_storage_domain_type diff --git a/basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py b/basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py index ebda96ca..8522deb7 100644 --- a/basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py +++ b/basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py @@ -735,7 +735,7 @@ def test_grafana( engine_username, engine_password, engine_webadmin_url, - engine_fqdn, + grafana_fqdn, ): ovirt_driver.get(engine_webadmin_url) @@ -754,7 +754,7 @@ def test_grafana( save_screenshot('grafana') # navigate directly to Grafana Configuration/Data Sources page - ovirt_driver.get(f'https://{engine_fqdn}/ovirt-engine-grafana/datasources') + ovirt_driver.get(f'https://{grafana_fqdn}/ovirt-engine-grafana/datasources') assert grafana.db_connection() save_screenshot('grafana-datasource-connection') diff --git a/common/deploy-scripts/setup_dwh.sh b/common/deploy-scripts/setup_dwh.sh new file mode 100644 index 00000000..1d968469 --- /dev/null +++ b/common/deploy-scripts/setup_dwh.sh @@ -0,0 +1,25 @@ +#!/bin/bash -xe + +systemctl enable firewalld +systemctl start firewalld + +systemctl enable crond +systemctl start crond + +rm -rf /dev/shm/yum /dev/shm/*.rpm +fstrim -va + +firewall-cmd --permanent --zone=public --add-interface=eth0 +firewall-cmd --reload + +# rotate logs quicker, because of the debug logs they tend to flood the root partition if they run > 15 minutes +cat > /etc/cron.d/ovirt-engine << EOF +* * * * * root logrotate /etc/logrotate.d/ovirt-engine +* * * * * root logrotate /etc/logrotate.d/ovirt-engine-dwh +EOF + +# We are using an OST image that includes the engine. We do not setup +# the engine, but install engine-setup code - thus might run it, with +# unintended side effects. Let's remove it. +# Current context: https://bugzilla.redhat.com/2126778 +dnf remove -y --noautoremove ovirt-engine diff --git a/common/init-configs/1_engine_1_dwh_2_hosts.json b/common/init-configs/1_engine_1_dwh_2_hosts.json new file mode 100644 index 00000000..c2dae4f4 --- /dev/null +++ b/common/init-configs/1_engine_1_dwh_2_hosts.json @@ -0,0 +1,117 @@ +{ +"networks": { + "management": { + "comment": "management generates DNS entries for ost-$suite-$nic, e.g. ost-basic-suite-master-engine", + "is_management": true, + "template": "common/libvirt-templates/net_template", + "nics": [ + "engine", + "dwh", + "host-0", + "host-1", + "storage" + ] + }, + "storage": { + "template": "common/libvirt-templates/net_template", + "nics": [ + "engine-storage", + "dwh-storage", + "host-0-storage", + "host-1-storage", + "storage-storage" + ] + }, + "bonding": { + "template": "common/libvirt-templates/net_template", + "nics": [ + "host-0-eth2", + "host-0-eth3", + "host-1-eth2", + "host-1-eth3" + ] + } +}, +"vms" : { + "engine": { + "template": "common/libvirt-templates/vm_template", + "memory": "3584", + "deploy-scripts": [ + "common/deploy-scripts/setup_engine.sh" + ], + "nics": { + "engine": { "template": "common/libvirt-templates/nic_template" }, + "engine-storage": { "template": "common/libvirt-templates/nic_template" } + }, + "root_disk_var": "OST_IMAGES_ENGINE_INSTALLED", + "disks": {} + }, + "dwh": { + "template": "common/libvirt-templates/vm_template", + "memory": "3584", + "deploy-scripts": [ + "common/deploy-scripts/setup_dwh.sh" + ], + "nics": { + "dwh": { "template": "common/libvirt-templates/nic_template" }, + "dwh-storage": { "template": "common/libvirt-templates/nic_template" } + }, + "root_disk_var": "OST_IMAGES_ENGINE_INSTALLED", + "disks": {} + }, + "storage": { + "template": "common/libvirt-templates/vm_template", + "memory": "2048", + "deploy-scripts": [ + "common/deploy-scripts/setup_storage.sh" + ], + "nics": { + "storage": { "template": "common/libvirt-templates/nic_template" }, + "storage-storage": { "template": "common/libvirt-templates/nic_template" } + }, + "root_disk_var": "OST_IMAGES_STORAGE_BASE", + "disks": { + "sda": { + "comment": "Main NFS device", + "template": "common/libvirt-templates/disk_template", + "size": "101G" + }, + "sdb": { + "comment": "Main iSCSI device", + "template": "common/libvirt-templates/disk_template", + "size": "191G" + } + } + }, + "host-0": { + "template": "common/libvirt-templates/vm_template", + "memory": "1792", + "deploy-scripts": [ + "common/deploy-scripts/setup_host.sh" + ], + "nics": { + "host-0": { "template": "common/libvirt-templates/nic_template" }, + "host-0-storage": { "template": "common/libvirt-templates/nic_template" }, + "host-0-eth2": { "template": "common/libvirt-templates/nic_template" }, + "host-0-eth3": { "template": "common/libvirt-templates/nic_template" } + }, + "root_disk_var": "OST_IMAGES_HOST_INSTALLED", + "disks": {} + }, + "host-1": { + "template": "common/libvirt-templates/vm_template", + "memory": "1792", + "deploy-scripts": [ + "common/deploy-scripts/setup_host.sh" + ], + "nics": { + "host-1": { "template": "common/libvirt-templates/nic_template" }, + "host-1-storage": { "template": "common/libvirt-templates/nic_template" }, + "host-1-eth2": { "template": "common/libvirt-templates/nic_template" }, + "host-1-eth3": { "template": "common/libvirt-templates/nic_template" } + }, + "root_disk_var": "OST_IMAGES_NODE", + "disks": {} + } +} +} diff --git a/ost_utils/backend/base.py b/ost_utils/backend/base.py index 2b34b78a..9797129a 100644 --- a/ost_utils/backend/base.py +++ b/ost_utils/backend/base.py @@ -138,6 +138,13 @@ def hostnames(self): def engine_hostname(self): return next(hn for hn in self.hostnames() if "engine" in hn) + @cache + def dwh_hostname(self): + # This means I can't call the suite I added this for 'separate-dwh-basic-suite-master', + # because it will collide. Already gave up on making this code more robust, so not + # adding a "to do"... + return next(hn for hn in self.hostnames() if "dwh" in hn) + @cache def hosts_hostnames(self): # The output should always be sorted, so we can refer by indices diff --git a/ost_utils/pytest/fixtures/ansible.py b/ost_utils/pytest/fixtures/ansible.py index 99312289..0e177fd0 100644 --- a/ost_utils/pytest/fixtures/ansible.py +++ b/ost_utils/pytest/fixtures/ansible.py @@ -26,6 +26,11 @@ def ansible_engine(ansible_by_hostname, backend_engine_hostname): return ansible_by_hostname(backend_engine_hostname) +@pytest.fixture(scope="session") +def ansible_dwh(ansible_by_hostname, backend_dwh_hostname): + return ansible_by_hostname(backend_dwh_hostname) + + @pytest.fixture(scope="session") def ansible_storage(ansible_by_hostname, storage_hostname): return ansible_by_hostname(storage_hostname) @@ -83,6 +88,11 @@ def ansible_engine_facts(ansible_engine): return Facts(ansible_engine) +@pytest.fixture(scope="session") +def ansible_dwh_facts(ansible_dwh): + return Facts(ansible_dwh) + + @pytest.fixture(scope="session") def ansible_storage_facts(ansible_storage): return Facts(ansible_storage) diff --git a/ost_utils/pytest/fixtures/backend.py b/ost_utils/pytest/fixtures/backend.py index 98dc7329..0e222023 100644 --- a/ost_utils/pytest/fixtures/backend.py +++ b/ost_utils/pytest/fixtures/backend.py @@ -27,6 +27,11 @@ def backend_engine_hostname(backend): return backend.engine_hostname() +@pytest.fixture(scope="session") +def backend_dwh_hostname(backend): + return backend.dwh_hostname() + + @pytest.fixture(scope="session") def all_hostnames(backend): return backend.hostnames() diff --git a/ost_utils/pytest/fixtures/grafana.py b/ost_utils/pytest/fixtures/grafana.py new file mode 100644 index 00000000..70592401 --- /dev/null +++ b/ost_utils/pytest/fixtures/grafana.py @@ -0,0 +1,12 @@ +# +# Copyright oVirt Authors +# SPDX-License-Identifier: GPL-2.0-or-later +# +# + +import pytest + + +@pytest.fixture(scope="session") +def grafana_fqdn(engine_fqdn): + return engine_fqdn diff --git a/separate-machine-basic-suite-master/ost.json b/separate-machine-basic-suite-master/ost.json new file mode 120000 index 00000000..121db09a --- /dev/null +++ b/separate-machine-basic-suite-master/ost.json @@ -0,0 +1 @@ +../common/init-configs/1_engine_1_dwh_2_hosts.json \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/__init__.py b/separate-machine-basic-suite-master/test-scenarios/__init__.py new file mode 100644 index 00000000..dbf90615 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/__init__.py @@ -0,0 +1,5 @@ +# +# Copyright oVirt Authors +# SPDX-License-Identifier: GPL-2.0-or-later +# +# diff --git a/separate-machine-basic-suite-master/test-scenarios/conftest.py b/separate-machine-basic-suite-master/test-scenarios/conftest.py new file mode 100644 index 00000000..007bca67 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/conftest.py @@ -0,0 +1,211 @@ +# -*- coding: utf-8 -*- +# +# Copyright oVirt Authors +# SPDX-License-Identifier: GPL-2.0-or-later +# + +import pytest + +from ost_utils import network_utils + +from ost_utils.pytest import pytest_collection_modifyitems + +from ost_utils.pytest.fixtures import root_password + +from ost_utils.pytest.fixtures.ansible import ansible_all +from ost_utils.pytest.fixtures.ansible import ansible_by_hostname +from ost_utils.pytest.fixtures.ansible import ansible_clean_private_dirs +from ost_utils.pytest.fixtures.ansible import ansible_collect_logs +from ost_utils.pytest.fixtures.ansible import ansible_engine +from ost_utils.pytest.fixtures.ansible import ansible_engine_facts +from ost_utils.pytest.fixtures.ansible import ansible_dwh +from ost_utils.pytest.fixtures.ansible import ansible_dwh_facts +from ost_utils.pytest.fixtures.ansible import ansible_host0_facts +from ost_utils.pytest.fixtures.ansible import ansible_host0 +from ost_utils.pytest.fixtures.ansible import ansible_host1 +from ost_utils.pytest.fixtures.ansible import ansible_hosts +from ost_utils.pytest.fixtures.ansible import ansible_inventory +from ost_utils.pytest.fixtures.ansible import ansible_storage +from ost_utils.pytest.fixtures.ansible import ansible_storage_facts + +from ost_utils.pytest.fixtures.artifacts import artifacts_dir +from ost_utils.pytest.fixtures.artifacts import collect_artifacts +from ost_utils.pytest.fixtures.artifacts import collect_vdsm_coverage_artifacts +from ost_utils.pytest.fixtures.artifacts import dump_dhcp_leases +from ost_utils.pytest.fixtures.artifacts import generate_sar_stat_plots + +from ost_utils.pytest.fixtures.backend import all_hostnames +from ost_utils.pytest.fixtures.backend import backend +from ost_utils.pytest.fixtures.backend import backend_engine_hostname +from ost_utils.pytest.fixtures.backend import backend_dwh_hostname +from ost_utils.pytest.fixtures.backend import deploy_scripts +from ost_utils.pytest.fixtures.backend import host0_hostname +from ost_utils.pytest.fixtures.backend import host1_hostname +from ost_utils.pytest.fixtures.backend import hosts_hostnames +from ost_utils.pytest.fixtures.backend import management_network_supports_ipv4 +from ost_utils.pytest.fixtures.backend import storage_hostname + +from ost_utils.pytest.fixtures.defaults import * + +from ost_utils.pytest.fixtures.deployment import deploy +from ost_utils.pytest.fixtures.deployment import run_scripts +from ost_utils.pytest.fixtures.deployment import set_sar_interval + +from ost_utils.pytest.fixtures.engine import * + +from ost_utils.pytest.fixtures.grafana import * + +from ost_utils.pytest.fixtures.keycloak import * + +from ost_utils.pytest.fixtures.env import ost_images_distro +from ost_utils.pytest.fixtures.env import root_dir +from ost_utils.pytest.fixtures.env import ssh_key_file +from ost_utils.pytest.fixtures.env import suite_dir +from ost_utils.pytest.fixtures.env import working_dir +from ost_utils.pytest.fixtures.env import master_storage_domain_type + +from ost_utils.pytest.fixtures.network import bonding_network_name +from ost_utils.pytest.fixtures.network import management_gw_ip +from ost_utils.pytest.fixtures.network import management_network_name + +from ost_utils.pytest.fixtures.node import * + +from ost_utils.pytest.fixtures.sdk import * + +from ost_utils.pytest.fixtures.storage import * + +from ost_utils.pytest.running_time import * + + +@pytest.fixture(scope="session") +def sd_iscsi_host_ip(storage_ips_for_network, storage_network_name): # pylint: disable=function-redefined + return storage_ips_for_network(storage_network_name)[0] + + +@pytest.fixture(scope="session") +def sd_nfs_host_storage_name( + storage_hostname, +): # pylint: disable=function-redefined + return storage_hostname + + +@pytest.fixture(scope="session") +def sd_iscsi_ansible_host( + ansible_storage, +): # pylint: disable=function-redefined + return ansible_storage + + +@pytest.fixture(scope="session") +def engine_db_password(): + return 'engine_db_password123' + + +@pytest.fixture(scope="session") +def dwh_fqdn(ansible_dwh_facts, suite): + return ansible_dwh_facts.get("ansible_fqdn") + + +@pytest.fixture(scope="session") +def grafana_fqdn( + dwh_fqdn, +): # pylint: disable=function-redefined + return dwh_fqdn + + +@pytest.fixture(scope="session") +def engine_answer_file_contents( + engine_password, + engine_fqdn, + engine_full_username, + engine_db_password, +): # pylint: disable=function-redefined + return ( + '# action=setup\n' + '[environment:default]\n' + 'OVESETUP_DIALOG/confirmSettings=bool:True\n' + 'OVESETUP_CONFIG/applicationMode=str:both\n' + 'OVESETUP_CONFIG/remoteEngineSetupStyle=none:None\n' + f'OVESETUP_CONFIG/adminPassword=str:{engine_password}\n' + 'OVESETUP_CONFIG/storageIsLocal=bool:False\n' + 'OVESETUP_CONFIG/firewallManager=str:firewalld\n' + 'OVESETUP_CONFIG/remoteEngineHostRootPassword=none:None\n' + 'OVESETUP_CONFIG/firewallChangesReview=none:None\n' + 'OVESETUP_CONFIG/updateFirewall=bool:True\n' + 'OVESETUP_CONFIG/remoteEngineHostSshPort=none:None\n' + f'OVESETUP_CONFIG/fqdn=str:{engine_fqdn}\n' + 'OVESETUP_CONFIG/storageType=none:None\n' + 'OSETUP_RPMDISTRO/requireRollback=none:None\n' + 'OSETUP_RPMDISTRO/enableUpgrade=bool:True\n' + 'OVESETUP_DB/database=str:engine\n' + 'OVESETUP_DB/fixDbViolations=none:None\n' + 'OVESETUP_DB/secured=bool:False\n' + 'OVESETUP_DB/host=str:localhost\n' + 'OVESETUP_DB/user=str:engine\n' + 'OVESETUP_DB/securedHostValidation=bool:False\n' + f'OVESETUP_DB/password=str:{engine_db_password}\n' + 'OVESETUP_DB/port=int:5432\n' + 'OVESETUP_ENGINE_CORE/enable=bool:True\n' + 'OVESETUP_CORE/engineStop=none:None\n' + 'OVESETUP_SYSTEM/memCheckEnabled=bool:False\n' + 'OVESETUP_SYSTEM/nfsConfigEnabled=bool:False\n' + 'OVESETUP_PKI/organization=str:Test\n' + 'OVESETUP_CONFIG/isoDomainMountPoint=none:None\n' + 'OVESETUP_CONFIG/isoDomainName=none:None\n' + 'OVESETUP_CONFIG/isoDomainACL=none:None\n' + 'OVESETUP_AIO/configure=none:None\n' + 'OVESETUP_AIO/storageDomainName=none:None\n' + 'OVESETUP_AIO/storageDomainDir=none:None\n' + 'OVESETUP_PROVISIONING/postgresProvisioningEnabled=bool:True\n' + 'OVESETUP_APACHE/configureRootRedirection=bool:True\n' + 'OVESETUP_APACHE/configureSsl=bool:True\n' + 'OVESETUP_CONFIG/websocketProxyConfig=bool:True\n' + f'OVESETUP_ENGINE_CONFIG/fqdn=str:{engine_fqdn}\n' + 'OVESETUP_CONFIG/sanWipeAfterDelete=bool:False\n' + 'OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:True\n' + 'OVESETUP_DWH_CORE/enable=bool:False\n' + 'QUESTION/1/OVESETUP_GRAFANA_ENABLE=str:no\n' + f'OVESETUP_OVN/ovirtProviderOvnUser=str:{engine_full_username}\n' + f'OVESETUP_OVN/ovirtProviderOvnPassword=str:{engine_password}\n' + 'OVESETUP_CONFIG/imageioProxyConfig=bool:True\n' + 'QUESTION/1/ovirt-cinderlib-enable=str:yes\n' + ) + + +@pytest.fixture(scope="session") +def dwh_answer_file_contents( + engine_password, + engine_fqdn, + dwh_fqdn, + root_password, + engine_db_password, + engine_full_username, +): # pylint: disable=function-redefined + return ( + '# action=setup\n' + '[environment:default]\n' + 'QUESTION/1/OVESETUP_ENGINE_ENABLE=str:no\n' + 'QUESTION/1/OVESETUP_DWH_SCALE=str:2\n' + 'QUESTION/1/OVESETUP_ENGINE_DB_DATABASE=str:engine\n' + f'QUESTION/1/OVESETUP_ENGINE_DB_HOST=str:{engine_fqdn}\n' + f'QUESTION/1/OVESETUP_ENGINE_DB_PASSWORD=str:{engine_db_password}\n' + 'QUESTION/1/OVESETUP_ENGINE_DB_PORT=str:5432\n' + 'QUESTION/1/OVESETUP_ENGINE_DB_SECURED=str:no\n' + 'QUESTION/1/OVESETUP_ENGINE_DB_USER=str:engine\n' + f'QUESTION/1/OVESETUP_NETWORK_FQDN_the_engine=str:{engine_fqdn}\n' + f'QUESTION/1/OVESETUP_NETWORK_FQDN_this=str:{dwh_fqdn}\n' + f'QUESTION/1/SSH_ACCESS_REMOTE_ENGINE_PASSWORD=str:{root_password}\n' + f'QUESTION/1/queryEnvKey_input_OVESETUP_GRAFANA_CONFIG/adminPassword=str:{root_password}\n' + f'QUESTION/1/queryEnvKey_input_second_password=str:{root_password}\n' + 'QUESTION/1/queryEnvKey_warnverify_OVESETUP_GRAFANA_CONFIG/adminPassword=str:yes\n' + 'QUESTION/1/ovirt-provider-ovn=str:no\n' + 'QUESTION/1/OVESETUP_CONFIG_WEBSOCKET_PROXY=str:no\n' + ) + + +@pytest.fixture(scope="session") +def dwh_answer_file_path(dwh_answer_file_contents, working_dir): + file_path = os.path.join(working_dir, 'dwh-answer-file') + with open(file_path, 'w') as f: + f.write(dwh_answer_file_contents) + return file_path diff --git a/separate-machine-basic-suite-master/test-scenarios/test_001_initialize_engine_and_dwh.py b/separate-machine-basic-suite-master/test-scenarios/test_001_initialize_engine_and_dwh.py new file mode 100644 index 00000000..e09ad771 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_001_initialize_engine_and_dwh.py @@ -0,0 +1,164 @@ +# +# Copyright oVirt Authors +# SPDX-License-Identifier: GPL-2.0-or-later +# +# +from __future__ import absolute_import + +import logging +import pytest +import tempfile + +from ost_utils import assert_utils +from ost_utils import shell +from ost_utils.ansible.collection import engine_setup + + +LOGGER = logging.getLogger(__name__) + + +def test_initialize_engine( + ansible_engine, + ansible_inventory, + engine_ip, + engine_hostname, + ssh_key_file, + engine_answer_file_path, +): + engine_setup( + ansible_engine, + ansible_inventory, + engine_ip, + engine_hostname, + ssh_key_path=ssh_key_file, + answer_file_path=engine_answer_file_path, + ovirt_engine_setup_offline='true', + ovirt_engine_setup_engine_configs=[ + {'key': 'VdsLocalDisksLowFreeSpace', 'value': '400'}, + {'key': 'OvfUpdateIntervalInMinutes', 'value': '10'}, + {'key': 'ServerRebootTimeout', 'value': '150'}, + ], + ) + # Work around https://gitlab.com/qemu-project/qemu/-/issues/641. + # TODO: Remove when fixed. + ansible_engine.shell( + '/usr/share/ovirt-engine/dbscripts/engine-psql.sh ' + '-c ' + "\"select fn_db_update_config_value" + "('NumOfPciExpressPorts','12','general');\"" + ) + ansible_engine.shell('ss -anp') + + ansible_engine.systemd(name='ovirt-engine-notifier', state='started') + ansible_engine.systemd(name='ovirt-engine', state='started') + + +def test_initialize_dwh( + ansible_dwh, + dwh_answer_file_path, +): + # TODO Use engine_setup? Perhaps by adapting it to not require + # all the parameters it requires now and are irrelevant for dwh? + ansible_dwh.copy( + src=dwh_answer_file_path, + dest='/root/dwh-answer-file', + ) + ansible_dwh.shell( + f'engine-setup ' + '--accept-defaults ' + '--config-append=/root/dwh-answer-file ' + '--offline ' + ) + + +@pytest.mark.parametrize( + "key_format, verification_fn", + [ + pytest.param( + 'X509-PEM-CA', + lambda path: shell.shell(["openssl", "x509", "-in", path, "-text", "-noout"]), + id="CA certificate", + ), + pytest.param( + 'OPENSSH-PUBKEY', + lambda path: shell.shell(["ssh-keygen", "-l", "-f", path]), + id="ssh pubkey", + ), + ], +) +def test_verify_engine_certs(key_format, verification_fn, engine_fqdn, engine_download): + url_template = 'http://{}/ovirt-engine/services/pki-resource?resource=ca-certificate&format={}' + url = url_template.format(engine_fqdn, key_format) + + def _verify_engine_certs_once(): + with tempfile.NamedTemporaryFile() as tmp: + try: + engine_download(url, tmp.name) + except shell.ShellError as ex: + LOGGER.debug("Certificate download failed for %s", url, exc_info=True) + return False + try: + verification_fn(tmp.name) + except shell.ShellError: + LOGGER.debug("Certificate verification failed. Certificate contents:\n") + LOGGER.debug(tmp.read()) + return False + return True + + assert assert_utils.true_within_short(_verify_engine_certs_once) + + +def test_add_dwh_to_keycloak_redirect_uris_for_grafana( + ansible_engine, + engine_fqdn, + engine_password, + dwh_fqdn, +): + def run_ansible_engine_kcadm(args): + return ansible_engine.shell( + 'KC_OPTS=-Dcom.redhat.fips=false ' + '/usr/share/ovirt-engine-wildfly/bin/kcadm.sh ' + + args + ) + + # Set truststore, so that https works + run_ansible_engine_kcadm( + 'config truststore ' + '--trustpass mypass /etc/pki/ovirt-engine/.truststore ' + ) + + # Login + run_ansible_engine_kcadm( + 'config credentials ' + f'--server https://{engine_fqdn}/ovirt-engine-auth ' + '--realm master ' + '--user admin ' + f'--password {engine_password} ' + ) + + # Get the Id of the internal client. Various hard-coded strings here + # must match relevant code/constants from ovirt-engine-keycloak. + id_res = run_ansible_engine_kcadm( + 'get clients ' + '-r ovirt-internal ' + '-q clientId=ovirt-engine-internal ' + '--fields id ' + '--format csv' + ) + id = id_res['stdout_lines'][0].strip('"') + + # Get current URIs + current_uris_res = run_ansible_engine_kcadm( + f'get clients/{id} ' + '-r ovirt-internal ' + '--fields redirectUris ' + '--format csv' + ) + current_uris = current_uris_res['stdout_lines'][0] + + # Add dwh + run_ansible_engine_kcadm( + f'update clients/{id} ' + '-r ovirt-internal ' + f'-s redirectUris=\'[{current_uris}, "https://{dwh_fqdn}*"]\'' + ) diff --git a/separate-machine-basic-suite-master/test-scenarios/test_002_bootstrap.py b/separate-machine-basic-suite-master/test-scenarios/test_002_bootstrap.py new file mode 120000 index 00000000..c05e26eb --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_002_bootstrap.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_002_bootstrap.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_003_00_metrics_bootstrap.py b/separate-machine-basic-suite-master/test-scenarios/test_003_00_metrics_bootstrap.py new file mode 120000 index 00000000..e6c334c0 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_003_00_metrics_bootstrap.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_003_00_metrics_bootstrap.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_003_basic_networking.py b/separate-machine-basic-suite-master/test-scenarios/test_003_basic_networking.py new file mode 120000 index 00000000..46ab53cc --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_003_basic_networking.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_003_basic_networking.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_004_basic_sanity.py b/separate-machine-basic-suite-master/test-scenarios/test_004_basic_sanity.py new file mode 120000 index 00000000..cd7042c4 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_004_basic_sanity.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_004_basic_sanity.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_005_network_by_label.py b/separate-machine-basic-suite-master/test-scenarios/test_005_network_by_label.py new file mode 120000 index 00000000..590ec8fb --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_005_network_by_label.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_005_network_by_label.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_006_migrations.py b/separate-machine-basic-suite-master/test-scenarios/test_006_migrations.py new file mode 120000 index 00000000..256c4c47 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_006_migrations.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_006_migrations.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_007_sd_reattach.py b/separate-machine-basic-suite-master/test-scenarios/test_007_sd_reattach.py new file mode 120000 index 00000000..85ccb1e0 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_007_sd_reattach.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_007_sd_reattach.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_098_ovirt_provider_ovn.py b/separate-machine-basic-suite-master/test-scenarios/test_098_ovirt_provider_ovn.py new file mode 120000 index 00000000..80b3fa45 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_098_ovirt_provider_ovn.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_098_ovirt_provider_ovn.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_099_aaa-ldap.py b/separate-machine-basic-suite-master/test-scenarios/test_099_aaa-ldap.py new file mode 120000 index 00000000..66852e2e --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_099_aaa-ldap.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_099_aaa-ldap.py \ No newline at end of file diff --git a/separate-machine-basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py b/separate-machine-basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py new file mode 120000 index 00000000..0d0258c5 --- /dev/null +++ b/separate-machine-basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py @@ -0,0 +1 @@ +../../basic-suite-master/test-scenarios/test_100_basic_ui_sanity.py \ No newline at end of file