Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[WIPTEST] Update miq_version imports #10153

Merged
merged 3 commits into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfme/test_framework/sprout/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import attr
import requests
from miq_version import LATEST_DOWN_STREAM
from miq_version.constants import LATEST_DOWN_STREAM

from cfme.utils.appliance import IPAppliance
from cfme.utils.conf import credentials
Expand Down
16 changes: 12 additions & 4 deletions cfme/utils/template/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,22 @@ def check_appliance_init(client_args):
delay=5,
timeout=300,
message='Waiting for appliance-initialization to complete')

for service in upstream_services:
self.execute_ssh_command(f'{service}', client_args=client_args)
service_result = self.execute_ssh_command(f'{service}', client_args=client_args)
assert service_result
for cleanup in upstream_cleanup:
self.execute_ssh_command(f'rm -rf {cleanup}', client_args=client_args)
file_result = self.execute_ssh_command(f'rm -rf {cleanup}', client_args=client_args)
assert file_result

files_after_cleanup = self.execute_ssh_command(f'ls -lh {cleanup.rstrip("*")}',
client_args=client_args)
logger.info(f'Files after MIQ cleanup: \n{files_after_cleanup.output}\n')

check_pgsql = self.execute_ssh_command('ls /var/lib/pgsql/data/', client_args=client_args)
check_pgsql = self.execute_ssh_command('ls -lh /var/lib/pgsql/data/',
client_args=client_args)

if not check_pgsql.output:
if 'total 0' in check_pgsql.output:
logger.info('Finished cleaning out the default setup of a ManageIQ appliance')
return True
else:
Expand Down
7 changes: 2 additions & 5 deletions cfme/utils/template/rhevm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
"""
NOT TESTED YET
"""
import re

from cfme.utils.conf import cfme_data
Expand Down Expand Up @@ -53,7 +50,7 @@ def import_template_from_glance(self):
@log_wrap('Deploy template to vm - before templatizing')
def deploy_vm_from_template(self):
"""Deploy a VM from the raw template with resource limits set from yaml"""
stream_hardware = cfme_data.template_upload.hardware[self.stream]
stream_hardware = cfme_data.template_upload.hardware[self.stream.split('-')[0]]
self.mgmt.get_template(self.temp_template_name).deploy(
vm_name=self.temp_vm_name,
cluster=self.provider_data.template_upload.cluster,
Expand Down Expand Up @@ -128,7 +125,7 @@ def run(self):
self.add_glance_to_provider()
self.import_template_from_glance()
self.deploy_vm_from_template()
if self.stream == 'upstream':
if 'upstream' in self.stream:
self.manageiq_cleanup()
self.add_disk_to_vm()
self.templatize_vm()
Expand Down
4 changes: 2 additions & 2 deletions cfme/utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from miq_version import get_version
from miq_version import LATEST # noqa: F401
from miq_version import LOWEST # noqa: F401
from miq_version import SPTuple # noqa: F401
from miq_version import UPSTREAM # noqa: F401
from miq_version import Version
from miq_version import version_stream_product_mapping # noqa: F401
from miq_version.constants import SPTuple # noqa: F401
from miq_version.constants import version_stream_product_mapping # noqa: F401
from widgetastic.utils import VersionPick
from widgetastic.widget import Widget

Expand Down
34 changes: 34 additions & 0 deletions conf/cfme_data.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -1045,3 +1045,37 @@ vm_console:
city: Durham
organization: CFME
organizational_unit: QE

template_upload:
automatic_name_strategy: True
stream:
provider_type:
provider_version:
tool_client:
hostname: <template upload tool host>
credentials: host_cred_key
template_upload_vsphere:
template: True
upload: True
disk: True
ovf_tool_client: <template upload tool host>
ovf_tool_creds: host_cred_key
template_upload_rhevm:
disk_size: 5000000000
disk_format: cow
disk_interface: VIRTIO
template_upload_rhos:
template_upload_openshift:
upload_folder: /exports/builds
template_upload_ec2:
aws_cli_tool_client: <template upload tool host>
aws_cli_tool_creds: host_cred_key
hardware:
downstream:
cores: 4
sockets: 1
memory: 12
upstream:
cores: 4
sockets: 1
memory: 6
2 changes: 1 addition & 1 deletion requirements/frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ lxml==4.5.0
manageiq-client==0.6.1
MarkupSafe==1.1.1
mccabe==0.6.1
miq-version==0.3.0
miq-version==0.4.0
mistune==0.8.4
mock==2.0.0
more-itertools==7.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/frozen_docs.py3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ layered-yaml-attrdict-config==18.12.3
lxml==4.3.3
MarkupSafe==1.1.1
mccabe==0.6.1
miq-version==0.2
miq-version==0.4.0
mistune==0.8.4
mock==2.0.0
msgpack==0.6.1
Expand Down