-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update VMware tests Signed-off-by: Shubham Ganar <[email protected]>
- Loading branch information
1 parent
35252d1
commit 8a3f8a4
Showing
7 changed files
with
253 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
VMWARE: | ||
# Vmware to be added as a compute resource | ||
# vmware vcenter URL, e.g. example.com | ||
# VMware to be added as a compute resource | ||
# VCENTER: vmware vcenter URL | ||
VCENTER: | ||
# Login for vmware | ||
# USERNAME: Login for vmware | ||
USERNAME: | ||
# Password for vmware | ||
# PASSWORD: Password for vmware | ||
PASSWORD: | ||
# vmware datacenter | ||
# DATACENTER: vmware datacenter | ||
DATACENTER: | ||
# cluster: vmware cluster | ||
# CLUSTER: vmware cluster | ||
CLUSTER: | ||
# Name of VM that should be used | ||
# DATASTORE: vmware datastore | ||
DATASTORE: | ||
# VM_NAME: Name of VM to power On/Off & delete | ||
VM_NAME: | ||
# mac_address: Mac address of the vm | ||
# MAC_ADDRESS: Mac address of the vm | ||
MAC_ADDRESS: | ||
# hypervisor: IP address of the hypervisor | ||
# HYPERVISOR: IP address or hostname of the hypervisor | ||
HYPERVISOR: | ||
|
||
|
||
# Vmware Compute resource image data | ||
# Operating system of the image | ||
# VMware Compute resource image data | ||
# IMAGE_OS: Operating system of the image | ||
IMAGE_OS: | ||
# Architecture of the image | ||
# IMAGE_ARCH: Architecture of the image | ||
IMAGE_ARCH: | ||
# Login to the image | ||
# IMAGE_USERNAME: Login to the image | ||
IMAGE_USERNAME: | ||
# Password of that user | ||
# IMAGE_PASSWORD: Password to the image | ||
IMAGE_PASSWORD: | ||
# Image name on the external provider | ||
# IMAGE_NAME: Image name on the external provider | ||
IMAGE_NAME: | ||
# Interface used for some tests; not required to work with provisioning, not required to be in VLAN | ||
INTERFACE: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
from fauxfactory import gen_string | ||
import pytest | ||
|
||
from robottelo.config import settings | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def module_vmware_cr(module_provisioning_sat, module_sca_manifest_org, module_location): | ||
vmware_cr = module_provisioning_sat.sat.api.VMWareComputeResource( | ||
name=gen_string('alpha'), | ||
provider='Vmware', | ||
url=settings.vmware.vcenter, | ||
user=settings.vmware.username, | ||
password=settings.vmware.password, | ||
datacenter=settings.vmware.datacenter, | ||
organization=[module_sca_manifest_org], | ||
location=[module_location], | ||
).create() | ||
return vmware_cr | ||
|
||
|
||
@pytest.fixture | ||
def module_vmware_hostgroup( | ||
module_vmware_cr, | ||
module_provisioning_sat, | ||
module_sca_manifest_org, | ||
module_location, | ||
default_architecture, | ||
module_provisioning_rhel_content, | ||
module_lce_library, | ||
default_partitiontable, | ||
module_provisioning_capsule, | ||
pxe_loader, | ||
): | ||
return module_provisioning_sat.sat.api.HostGroup( | ||
name=gen_string('alpha'), | ||
organization=[module_sca_manifest_org], | ||
location=[module_location], | ||
architecture=default_architecture, | ||
domain=module_provisioning_sat.domain, | ||
content_source=module_provisioning_capsule.id, | ||
content_view=module_provisioning_rhel_content.cv, | ||
compute_resource=module_vmware_cr, | ||
kickstart_repository=module_provisioning_rhel_content.ksrepo, | ||
lifecycle_environment=module_lce_library, | ||
root_pass=settings.provisioning.host_root_password, | ||
operatingsystem=module_provisioning_rhel_content.os, | ||
ptable=default_partitiontable, | ||
subnet=module_provisioning_sat.subnet, | ||
pxe_loader=pxe_loader.pxe_loader, | ||
group_parameters_attributes=[ | ||
# assign AK in order the hosts to be subscribed | ||
{ | ||
'name': 'kt_activation_keys', | ||
'parameter_type': 'string', | ||
'value': module_provisioning_rhel_content.ak.name, | ||
}, | ||
], | ||
).create() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.