Ejemplo n.º 1
0
 def test_002_newNetwork_add_ap(self):
     u"""新建的网络组添加ap"""
     log.debug("002")
     tmp = NetworkListBusiness(self.s)
     #选择进入group1网络组
     tmp.goin_network("group1")
     #将ap复位,并将ap的hosts替换,指向本地cloud,然后将该ap添加到cloud中
     tmp1 = APSBusiness(self.s)
     tmp1.add_ap_2_local_cloud(data_basic['7610_ip'], data_ap['7610_mac'], "autotest_7610")
     time.sleep(60)
     #获取ap列表ap的网络组名
     tmp2 = AllApListBusiness(self.s)
     network_name = tmp2.get_ap_info(data_ap['7610_mac'])['network']
     self.assertEqual(network_name, "group1")
Ejemplo n.º 2
0
 def test_005_remove_ap2(self):
     u"""移动ap-从group1移动到default"""
     log.debug("005")
     #获取default的id
     tmp = NetworkListBusiness(self.s)
     network_id = tmp.get_network_id("default")
     #选择进入group1网络组
     tmp.goin_network("group1")
     #移动该ap到group1中
     tmp1 = APSBusiness(self.s)
     tmp1.move_aps(data_ap['7600lr_mac'].upper(), network_id)
     time.sleep(60)
     #获取ap列表ap的网络组名
     tmp2 = AllApListBusiness(self.s)
     network_name = tmp2.get_ap_info(data_ap['7600lr_mac'])['network']
     self.assertEqual(network_name, "default")
Ejemplo n.º 3
0
 def test_004_remove_ap1(self):
     u"""移动ap-从default移动到group1"""
     log.debug("004")
     #获取group1的id
     tmp = NetworkListBusiness(self.s)
     network_id = tmp.get_network_id("group1")
     #将ap复位,并将ap的hosts替换,指向本地cloud,然后将该ap添加到cloud中
     tmp1 = APSBusiness(self.s)
     tmp1.add_ap_2_local_cloud(data_basic['7600lr_ip'], data_ap['7600lr_mac'], "autotest_7600lr")
     time.sleep(60)
     #移动该ap到group1中
     tmp1.move_aps(data_ap['7600lr_mac'].upper(), network_id)
     time.sleep(60)
     #获取ap列表ap的网络组名
     tmp2 = AllApListBusiness(self.s)
     network_name = tmp2.get_ap_info(data_ap['7600lr_mac'])['network']
     self.assertEqual(network_name, "group1")
Ejemplo n.º 4
0
 def test_056_ap_list_7600lr(self):
     u"""检查ap_list中7600lr的设备类型,固件版本,网络是否正确"""
     log.debug("056")
     tmp = AllApListBusiness(self.s)
     ap_type,ap_network,ap_ip,ap_version = tmp.\
                             get_ap_detail(data_ap['7600lr_mac'])
     self.assertEqual("GWN7600LR", ap_type)
     self.assertEqual(data_basic['7600lr_ip'], ap_ip)
     self.assertEqual("group2", ap_network)
     self.assertEqual(ap_version, data_basic['7600_new_version'])
Ejemplo n.º 5
0
 def test_053_ap_list_7610(self):
     u"""检查ap_list中7610的设备类型,固件版本,网络是否正确"""
     log.debug("053")
     tmp = AllApListBusiness(self.s)
     ap_type,ap_network,ap_ip,ap_version = tmp.\
                             get_ap_detail(data_ap['7610_mac'])
     self.assertEqual("GWN7610", ap_type)
     self.assertEqual(data_basic['7610_ip'], ap_ip)
     self.assertEqual("default", ap_network)
     self.assertEqual(ap_version, data_basic['7610_new_version'])
Ejemplo n.º 6
0
 def test_007_remove_many_aps2(self):
     u"""移动多ap-从group1移动到default"""
     log.debug("007")
     #获取default的id
     tmp = NetworkListBusiness(self.s)
     network_id = tmp.get_network_id("default")
     #选择进入group1网络组
     tmp.goin_network("group1")
     #移动三个ap(7600,7600lr,7610)到group1中
     tmp1 = APSBusiness(self.s)
     tmp1.move_aps(data_ap['7600lr_mac'].upper(), network_id)
     tmp1.move_aps(data_ap['7600_mac'].upper(), network_id)
     tmp1.move_aps(data_ap['7610_mac'].upper(), network_id)
     time.sleep(60)
     #获取ap列表ap的网络组名
     tmp2 = AllApListBusiness(self.s)
     network_name_7600lr = tmp2.get_ap_info(data_ap['7600lr_mac'])['network']
     network_name_7600 = tmp2.get_ap_info(data_ap['7600_mac'])['network']
     network_name_7610 = tmp2.get_ap_info(data_ap['7610_mac'])['network']
     self.assertEqual(network_name_7600lr, "default")
     self.assertEqual(network_name_7600, "default")
     self.assertEqual(network_name_7610, "default")