コード例 #1
0
 def test_update_single_host_resource(self):
     page = HostResourcePage(self.driver)
     page.into_host_resource()
     page.select_host_click_sub_menu(HOST_NAME)
     page.click_update_menu()
     page.input_hostname(hostname=NEW_HOST_NAME, clear=True)
     page.select_vpool(pool_name=NEW_POOL_NAME)
     page.select_host_type(host_type_name=NEW_HOST_TYPE_NAME)
     page.click_save()
     page.assert_result(action='update')
コード例 #2
0
 def test_batch_add_host_resource(self):
     page = HostResourcePage(self.driver)
     page.into_host_resource()
     page.click_sub_menu()
     page.click_add_menu(batch=True)
     page.select_vpool(POOL_NAME)
     page.select_host_type(HOST_TYPE_NAME)
     page.input_start_and_end_ip(start_ip=START_IP_ADDR, end_ip=END_IP_ADDR)
     page.click_scan()
     page.click_save()
     page.assert_result(action='batch_add')
コード例 #3
0
 def test_add_single_host_resource(self):
     page = HostResourcePage(self.driver)
     page.into_host_resource()
     page.click_sub_menu()
     page.click_add_menu()
     page.input_ip_addr(IP_ADDR)
     page.input_hostname(HOST_NAME)
     page.select_vpool(POOL_NAME)
     page.select_host_type(HOST_TYPE_NAME)
     page.click_save()
     page.assert_result(action='add')
コード例 #4
0
 def test_add_virtul_adapter(self):
     page = HostResourcePage(self.driver)
     page.into_host_resource()
     page.select_host_click_sub_menu(HOST_NAME)
     page.click_virtul_adapter_menu()
     page.click_sub_menu()
     page.click_add_menu()
     page.select_nic(VIRTUL_NIC_NAME_LIST)
     page.input_ipv4_addr(IPV4_ADDR)
     page.input_ipv4_subnet_mask(IPV4_SUBNET_MASK)
     page.select_nic_type(VIRTUL_NIC_TYPE)
     page.click_save()
     try:
         self.driver.get_text_element("div", "创建虚拟网卡成功")
     except Exception as e:
         page.final_assert(e)
     else:
         page.final_assert(True)