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')
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')
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)