Skip to content
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
8 changes: 8 additions & 0 deletions airgun/views/computeresource.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ class LibvirtProviderForm(View):
display_type = Select(id='compute_resource_display_type')
console_passwords = Checkbox(id='compute_resource_set_console_password')

@provider_content.register('OpenShift Virtualization')
class OCPVProviderForm(View):
hostname = TextInput(id='compute_resource_hostname')
api_port = TextInput(id='compute_resource_api_port')
namespace = TextInput(id='compute_resource_namespace')
token = TextInput(id='compute_resource_password')
ca_cert = TextInput(id='compute_resource_ca_cert')

@provider_content.register('RHEL OpenStack Platform')
class OpenStackProviderForm(View):
url = TextInput(id='compute_resource_url')
Expand Down
28 changes: 28 additions & 0 deletions airgun/views/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ class BridgeForm(View):
# Compute resource attributes
network_type = FilteredDropdown(id='_compute_attributes_type')
network = FilteredDropdown(id='_compute_attributes_bridge')
ocpv_network = FilteredDropdown(id='_compute_attributes_network')
cni_provider = FilteredDropdown(id='_compute_attributes_cni_provider')
nic_type = FilteredDropdown(id='_compute_attributes_model')

def after_fill(self, was_change):
Expand Down Expand Up @@ -391,6 +393,32 @@ class operating_system(SatTab):
image = FilteredDropdown(id='azure_rm_image_id')
root_password = TextInput(id='host_root_pass')

@provider_content.register('OpenShift Virtualization')
class OCPVResourceForm(View):
@View.nested
class virtual_machine(SatTab):
TAB_NAME = 'Virtual Machine'
cpus = TextInput(id='host_compute_attributes_cpu_cores')
memory = TextInput(id='host_compute_attributes_memory')
startup = Checkbox(id='host_compute_attributes_start')

@View.nested
class storage(SatTab):
TAB_NAME = 'Virtual Machine'
storage_volumes = (
".//fieldset[@id='storage_volumes']/div/div[contains(@class,'removable-item')]"
)
storage_class = FilteredDropdown(locator=storage_volumes)
size = TextInput(locator=f"{storage_volumes}//input[contains(@id, 'capacity')]")
bootable = Checkbox(
locator=f"{storage_volumes}//div[3]//input[contains(@onclick, 'bootableRadio(this)')]"
)

@View.nested
class operating_system(SatTab):
TAB_NAME = 'Operating System'
provision_method = Checkbox(id='host_provision_method_image')

@View.nested
class operating_system(SatTab):
TAB_NAME = 'Operating System'
Expand Down
Loading