pyvcloud.system_test_framework.utils module¶
-
pyvcloud.system_test_framework.utils.
create_customized_vapp_from_template
(client, vdc, name, catalog_name, template_name, description=None, memory_size=None, num_cpu=None, disk_size=None, vm_name=None, vm_hostname=None, nw_adapter_type=None)¶ Helper method to create a customized vApp from template.
Parameters: - client (pyvcloud.vcd.client.Client) – a client that would be used to make ReST calls to vCD.
- vdc (pyvcloud.vcd.vdc.VDC) – the vdc in which the vApp will be created.
- name (str) – name of the new vApp.
- catalog_name (str) – name of the catalog.
- template_name (str) – name of the vApp template.
- description (str) – description of the new vApp.
- memory_size (int) – size of memory of the first vm.
- num_cpu (int) – number of cpus in the first vm.
- disk_size (int) – size of the first disk of the first vm.
- vm_name (str) – when provided, sets the name of the vm.
- vm_hostname (str) – when provided, sets the hostname of the guest OS.
- nw_adapter_type (str) – One of the values in pyvcloud.vcd.client.NetworkAdapterType.
Returns: href of the created vApp.
Return type: str
-
pyvcloud.system_test_framework.utils.
create_empty_vapp
(client, vdc, name, description)¶ Helper method to create an empty vApp.
Parameters: - client (pyvcloud.vcd.client.Client) – a client that would be used to make ReST calls to vCD.
- vdc (pyvcloud.vcd.vdc.VDC) – the vdc in which the vApp will be created.
- name (str) – name of the new vApp.
- description (str) – description of the new vApp.
Returns: href of the created vApp.
Return type: str
-
pyvcloud.system_test_framework.utils.
create_independent_disk
(client, vdc, name, size, description)¶ Helper method to create an independent disk in a given orgVDC.
Parameters: - client (pyvcloud.vcd.client.Client) – a client that would be used to make ReST calls to vCD.
- vdc (pyvcloud.vcd.vdc.VDC) – the vdc in which the disk will be created.
- name (str) – name of the disk to be created.
- size (str) – size of the disk to be created in bytes.
- description (str) – description of the disk to be created.
Returns: id of the created independent disk.
Return type: str
-
pyvcloud.system_test_framework.utils.
create_vapp_from_template
(client, vdc, name, catalog_name, template_name)¶ Helper method to create a vApp from template.
Parameters: - client (pyvcloud.vcd.client.Client) – a client that would be used to make ReST calls to vCD.
- vdc (pyvcloud.vcd.vdc.VDC) – the vdc in which the vApp will be created.
- name (str) – name of the new vApp.
- catalog_name (str) – name of the catalog.
- template_name (str) – name of the vApp template.
Returns: href of the created vApp.
Return type: str