request_form = tabstrip.TabStripForm(tab_fields=OrderedDict( [('Catalog', [ ('num_instances', web_ui.Select('//select[@id="service__number_of_vms"]')), ('instance_name', '//input[@name="service__vm_name"]'), ('instance_description', '//textarea[@id="service__vm_description"]'), ('catalog_name', web_ui.Table('//div[@id="prov_vm_div"]/table')), ]), ('Environment', [ ('automatic_placement', '//input[@id="environment__placement_auto"]'), ('availability_zone', web_ui.Select( '//select[@id="environment__placement_availability_zone"]')), ('security_groups', prov.select_security_group), ('public_ip_address', web_ui.Select('//select[@id="environment__floating_ip_address"]')), ]), ('Properties', [ ('instance_type', web_ui.Select('//select[@id="hardware__instance_type"]')), ('guest_keypair', web_ui.Select('//select[@id="hardware__guest_access_key_pair"]')), ('hardware_monitoring', web_ui.Select('//select[@id="hardware__monitoring"]')), ]), ('Customize', [ ('specification', web_ui.Select('//select[@id="customize__sysprep_enabled"]')), ('specification_name', web_ui.Table('//div[@id="prov_vc_div"]/table')), ('computer_name', '//input[@id="customize__linux_host_name"]'), ('domain_name', '//input[@id="customize__linux_domain_name"]'), ('dns_servers', '//input[@id="customize__dns_servers"]'), ('dns_suffixes', '//input[@id="customize__dns_suffixes"]'), ]), ('Schedule', [ ('schedule_type', web_ui.Radio('schedule__schedule_type')), ('provision_date', web_ui.Calendar('miq_date_1')), ('provision_start_hour', web_ui.Select('//select[@id="start_hour"]')), ('provision_start_min', web_ui.Select('//select[@id="start_min"]')), ('power_on', '//input[@id="schedule__vm_auto_start"]'), ('retirement', web_ui.Select('//select[@id="schedule__retirement"]')), ('retirement_warning', web_ui.Select('//select[@id="schedule__retirement_warn"]')), ])]))
provisioning_form = tabstrip.TabStripForm( fields=[('submit_button', '//*[@id="form_buttons"]/li[1]/img'), ('cancel_button', '//*[@id="form_buttons"]/li[2]/img')], tab_fields=OrderedDict([ ('Request', [('email', '//input[@name="requester__owner_email"]'), ('first_name', '//input[@id="requester__owner_first_name"]'), ('last_name', '//input[@id="requester__owner_last_name"]'), ('notes', '//textarea[@id="requester__request_notes"]'), ('manager_name', '//input[@id="requester__owner_manager"]')]), ('Purpose', [('apply_tags', ui.Tree('//div[@id="all_tags_treebox"]//table'))]), ('Catalog', [ ('num_instances', ui.Select('//select[@id="service__number_of_vms"]')), ('instance_name', '//input[@name="service__vm_name"]'), ('instance_description', '//textarea[@id="service__vm_description"]'), ('catalog_name', ui.Table('//div[@id="prov_vm_div"]/table')), ]), ('Environment', [ ('automatic_placement', '//input[@id="environment__placement_auto"]'), ('availability_zone', ui.Select( '//select[@id="environment__placement_availability_zone"]')), ('security_groups', select_security_group), ('public_ip_address', ui.Select('//select[@id="environment__floating_ip_address"]')), ]), ('Properties', [ ('instance_type', ui.Select('//select[@id="hardware__instance_type"]')), ('guest_keypair', ui.Select('//select[@id="hardware__guest_access_key_pair"]')), ('hardware_monitoring', ui.Select('//select[@id="hardware__monitoring"]')), ]), ('Customize', [ ('specification', ui.Select('//select[@id="customize__sysprep_enabled"]')), ('specification_name', ui.Table('//div[@id="prov_vc_div"]/table')), ('computer_name', '//input[@id="customize__linux_host_name"]'), ('domain_name', '//input[@id="customize__linux_domain_name"]'), ('dns_servers', '//input[@id="customize__dns_servers"]'), ('dns_suffixes', '//input[@id="customize__dns_suffixes"]'), ]), ('Schedule', [ ('schedule_type', ui.Radio('schedule__schedule_type')), ('provision_date', ui.Calendar('miq_date_1')), ('provision_start_hour', ui.Select('//select[@id="start_hour"]')), ('provision_start_min', ui.Select('//select[@id="start_min"]')), ('power_on', '//input[@id="schedule__vm_auto_start"]'), ('retirement', ui.Select('//select[@id="schedule__retirement"]')), ('retirement_warning', ui.Select('//select[@id="schedule__retirement_warn"]')), ]) ]))
provisioning_form = tabstrip.TabStripForm( fields=[('submit_button', form_buttons.FormButton("Submit")), ('submit_copy_button', form_buttons.FormButton("Submit this provisioning request")), ('cancel_button', form_buttons.cancel), ('host_submit_button', form_buttons.host_provision_submit), ('host_cancel_button', form_buttons.host_provision_cancel)], tab_fields=OrderedDict([ ('Request', [('email', ui.Input('requester__owner_email')), ('first_name', ui.Input('requester__owner_first_name')), ('last_name', ui.Input('requester__owner_last_name')), ('notes', ui.Input('requester__request_notes')), ('manager_name', ui.Input('requester__owner_manager'))]), ('Purpose', [('apply_tags', { version.LOWEST: ui.CheckboxTree('//div[@id="all_tags_treebox"]//ul'), '5.7': ui.BootstrapTreeview('all_tags_treebox') })]), ( 'Catalog', [ # Cloud ('num_instances', AngularSelect('service__number_of_vms')), ('instance_name', '//input[@name="service__vm_name"]'), ('instance_description', ui.Input('service__vm_description')), # Infra ('vm_filter', AngularSelect('service__vm_filter')), ('num_vms', AngularSelect('service__number_of_vms')), ('vm_name', '//input[@name="service__vm_name"]'), ('vm_description', ui.Input('service__vm_description')), ('catalog_name', ui.Table('//div[@id="prov_vm_div"]/table')), ('provision_type', AngularSelect('service__provision_type')), ('linked_clone', ui.Input('service__linked_clone')), ('pxe_server', AngularSelect('service__pxe_server_id')), ('pxe_image', ui.Table('//div[@id="prov_pxe_img_div"]/table')), ('iso_file', ui.Table('//div[@id="prov_iso_img_div"]/table')) ]), ( 'Environment', [ ('automatic_placement', ui.Input('environment__placement_auto')), # Cloud ('cloud_tenant', AngularSelect('environment__cloud_tenant')), ('availability_zone', AngularSelect('environment__placement_availability_zone')), ('virtual_private_cloud', AngularSelect('environment__cloud_network')), ('cloud_network', AngularSelect('environment__cloud_network')), ('cloud_subnet', AngularSelect('environment__cloud_subnet')), ('security_groups', AngularSelect('environment__security_groups')), ('resource_groups', AngularSelect('environment__resource_group')), ('public_ip_address', AngularSelect('environment__floating_ip_address')), # Infra ('provider_name', AngularSelect('environment__placement_ems_name')), ('datacenter', AngularSelect('environment__placement_dc_name')), ('cluster', AngularSelect('environment__placement_cluster_name')), ('resource_pool', AngularSelect('environment__placement_rp_name')), ('folder', AngularSelect('environment__placement_folder_name')), ('host_filter', AngularSelect('environment__host_filter')), ('host_name', ui.Table('//div[@id="prov_host_div"]/table')), ('datastore_create', '#environment__new_datastore_create'), ('datastore_filter', AngularSelect('environment__ds_filter')), ('datastore_name', ui.Table('//div[@id="prov_ds_div"]/table')), ]), ('Hardware', [ ('num_sockets', AngularSelect('hardware__number_of_sockets')), ('cores_per_socket', AngularSelect('hardware__cores_per_socket')), ('num_cpus', AngularSelect('hardware__number_of_cpus')), ('memory', AngularSelect('hardware__vm_memory')), ('disk_format', ui.Radio('hardware__disk_format')), ('vm_limit_cpu', ui.Input('hardware__cpu_limit')), ('vm_limit_memory', ui.Input('hardware__memory_limit')), ('vm_reserve_cpu', ui.Input('hardware__cpu_reserve')), ('vm_reserve_memory', ui.Input('hardware__memory_reserve')), ]), # Infra ('Network', [ ('vlan', AngularSelect('network__vlan')), ]), # Cloud ( 'Properties', [ ('instance_type', AngularSelect('hardware__instance_type')), ('guest_keypair', AngularSelect('hardware__guest_access_key_pair', none={ '5.4': "<None>", version.LOWEST: "<No Choices Available>" })), ('hardware_monitoring', AngularSelect('hardware__monitoring')), ('boot_disk_size', AngularSelect('hardware__boot_disk_size')), # GCE ('is_preemtible', { version.LOWEST: None, '5.7': ui.Input('hardware__is_preemptible') }) ]), ( 'Customize', [ # Common ('dns_servers', ui.Input('customize__dns_servers')), ('dns_suffixes', ui.Input('customize__dns_suffixes')), ('specification', AngularSelect('customize__sysprep_enabled')), ('customize_type', AngularSelect('customize__sysprep_enabled')), ('specification_name', ui.Table('//div[@id="prov_vc_div"]/table')), # Cloud ('computer_name', ui.Input('customize__linux_host_name')), ('domain_name', ui.Input('customize__linux_domain_name')), # Azure ('admin_username', ui.Input('customize__root_username')), ('admin_password', ui.Input('customize__root_password')), # Infra ('linux_host_name', ui.Input('customize__linux_host_name')), ('linux_domain_name', ui.Input('customize__linux_domain_name')), ('prov_host_name', ui.Input('customize__hostname')), ('ip_address', ui.Input('customize__ip_addr')), ('subnet_mask', ui.Input('customize__subnet_mask')), ('gateway', ui.Input('customize__gateway')), ('custom_template', ui.Table('//div[@id="prov_template_div"]/table')), ('root_password', ui.Input('customize__root_password')), ('vm_host_name', ui.Input('customize__hostname')), ]), ( 'Schedule', [ # Common ('schedule_type', ui.Radio('schedule__schedule_type')), ('provision_date', ui.Calendar('miq_date_1')), ('provision_start_hour', AngularSelect('start_hour')), ('provision_start_min', AngularSelect('start_min')), ('power_on', ui.Input('schedule__vm_auto_start')), ('retirement', AngularSelect('schedule__retirement')), ('retirement_warning', AngularSelect('schedule__retirement_warn')), # Infra ('stateless', ui.Input('schedule__stateless')), ]) ]))
request_form = tabstrip.TabStripForm(tab_fields=OrderedDict( [('Catalog', [ ('vm_filter', Select('//select[@id="service__vm_filter"]')), ('catalog_name', Table('//div[@id="prov_vm_div"]/table')), ('vm_name', '//input[@name="service__vm_name"]'), ('provision_type', Select('//select[@id="service__provision_type"]')), ('linked_clone', Input("service__linked_clone")), ('pxe_server', Select('//select[@id="service__pxe_server_id"]')), ('pxe_image', Table('//div[@id="prov_pxe_img_div"]/table')), ('iso_file', Table('//div[@id="prov_iso_img_div"]/table')), ]), ('Environment', [ ('automatic_placement', Input("environment__placement_auto")), ('datacenter', Select('//select[@id="environment__placement_dc_name"]')), ('cluster', Select('//select[@id="environment__placement_cluster_name"]')), ('resource_pool', Select('//select[@id="environment__placement_rp_name"]')), ('folder', Select('//select[@id="environment__placement_folder_name"]')), ('host_filter', Select('//select[@id="environment__host_filter"]')), ('host_name', Table('//div[@id="prov_host_div"]/table')), ('datastore_create', Input("environment__new_datastore_create")), ('datastore_filter', Select('//select[@id="environment__ds_filter"]')), ('datastore_name', Table('//div[@id="prov_ds_div"]/table')), ]), ('Hardware', [ ('num_sockets', Select('//select[@id="hardware__number_of_sockets"]')), ('cores_per_socket', Select('//select[@id="hardware__cores_per_socket"]')), ('memory', Select('//select[@id="hardware__vm_memory"]')), ('disk_format', Radio('hardware__disk_format')), ('vm_limit_cpu', Input("hardware__cpu_limit")), ('vm_limit_memory', Input("hardware__memory_limit")), ('vm_reserve_cpu', Input("hardware__cpu_reserve")), ('vm_reserve_memory', Input("hardware__memory_reserve")), ]), ('Network', [ ('vlan', Select('//select[@id="network__vlan"]')), ]), ('Customize', [ ('customize_type', Select('//select[@id="customize__sysprep_enabled"]')), ('specification_name', Table('//div[@id="prov_vc_div"]/table')), ('linux_host_name', Input("customize__linux_host_name")), ('linux_domain_name', Input("customize__linux_domain_name")), ('dns_servers', Input("customize__dns_servers")), ('dns_suffixes', Input("customize__dns_suffixes")), ('custom_template', Table('//div[@id="prov_template_div"]/table')), ('root_password', Input("customize__root_password")), ('vm_host_name', Input("customize__hostname")), ]), ('Schedule', [ ('power_on_vm', Input("schedule__vm_auto_start")), ('retirement', Select('//select[@id="schedule__retirement"]')), ('retirement_warning', Select('//select[@id="schedule__retirement_warn"]')), ])]))
provisioning_form = tabstrip.TabStripForm( fields=[('submit_button', submit_button), ('cancel_button', form_buttons.cancel)], tab_fields=OrderedDict([ ('Request', [ ('email', '//input[@name="requester__owner_email"]'), ('first_name', '//input[@id="requester__owner_first_name"]'), ('last_name', '//input[@id="requester__owner_last_name"]'), ('notes', '//textarea[@id="requester__request_notes"]'), ('manager_name', '//input[@id="requester__owner_manager"]'), ]), ('Purpose', [ ('apply_tags', Tree('//div[@id="all_tags_treebox"]//table')), ]), ('Catalog', [('vm_filter', Select('//select[@id="service__vm_filter"]')), ('catalog_name', Table('//div[@id="prov_vm_div"]/table')), ('num_vms', Select('//select[@id="service__number_of_vms"]')), ('vm_name', '//input[@name="service__vm_name"]'), ('vm_description', '//textarea[@id="service__vm_description"]'), ('provision_type', Select('//select[@id="service__provision_type"]')), ('linked_clone', '//input[@id="service__linked_clone"]'), ('pxe_server', Select('//select[@id="service__pxe_server_id"]')), ('pxe_image', Table('//div[@id="prov_pxe_img_div"]/table')), ('iso_file', Table('//div[@id="prov_iso_img_div"]/table'))]), ('Environment', [ ('automatic_placement', '//input[@id="environment__placement_auto"]'), ('datacenter', Select('//select[@id="environment__placement_dc_name"]')), ('cluster', Select('//select[@id="environment__placement_cluster_name"]')), ('resource_pool', Select('//select[@id="environment__placement_rp_name"]')), ('folder', Select('//select[@id="environment__placement_folder_name"]')), ('host_filter', Select('//select[@id="environment__host_filter"]')), ('host_name', Table('//div[@id="prov_host_div"]/table')), ('datastore_create', '//*[@id="environment__new_datastore_create"]'), ('datastore_filter', Select('//select[@id="environment__ds_filter"]')), ('datastore_name', Table('//div[@id="prov_ds_div"]/table')), ]), ('Hardware', [ ('num_sockets', Select('//select[@id="hardware__number_of_sockets"]')), ('cores_per_socket', Select('//select[@id="hardware__cores_per_socket"]')), ('memory', Select('//select[@id="hardware__vm_memory"]')), ('disk_format', Radio('hardware__disk_format')), ('vm_limit_cpu', '//input[@id="hardware__cpu_limit"]'), ('vm_limit_memory', '//input[@id="hardware__memory_limit"]'), ('vm_reserve_cpu', '//input[@id="hardware__cpu_reserve"]'), ('vm_reserve_memory', '//input[@id="hardware__memory_reserve"]'), ]), ('Network', [ ('vlan', Select('//select[@id="network__vlan"]')), ]), ('Customize', [ ('customize_type', Select('//select[@id="customize__sysprep_enabled"]')), ('specification_name', Table('//div[@id="prov_vc_div"]/table')), ('linux_host_name', '//input[@id="customize__linux_host_name"]'), ('linux_domain_name', '//input[@id="customize__linux_domain_name"]'), ('dns_servers', '//input[@id="customize__dns_servers"]'), ('dns_suffixes', '//input[@id="customize__dns_suffixes"]'), ('custom_template', Table('//div[@id="prov_template_div"]/table')), ('root_password', '//input[@id="customize__root_password"]'), ('vm_host_name', '//input[@id="customize__hostname"]'), ]), ('Schedule', [ ('schedule_type', Radio('schedule__schedule_type')), ('provision_date', Calendar('miq_date_1')), ('provision_start_hour', Select('//select[@id="start_hour"]')), ('provision_start_min', Select('//select[@id="start_min"]')), ('retirement', Select('//select[@id="schedule__retirement"]')), ('retirement_warning', Select('//select[@id="schedule__retirement_warn"]')), ]) ]))