Exemple #1
0
 def test_012_reboot_ap_check_ssh_password(self):
     u"""设备重启后,SSH登录验证(testlink_ID:1657)"""
     log.debug("012")
     tmp = SettingsBusiness(self.s)
     #获取默认ssh password
     default_ssh_password = tmp.get_ssh_pwd()
     #修改ssh 密码为纯数字
     tmp.set_setting({'sshPassword':"******"})
     time.sleep(60)
     tmp1 = APSBusiness(self.s)
     tmp1.reboot_many_aps(data_ap['7610_mac'], data_ap['7600_mac'], data_ap['7600lr_mac'])
     time.sleep(420)
     #在AP CLI下查看国家默认配置
     result1 = tmp.get_cli_ssh_password(data_basic['7600_ip'],
             data_basic['sshUser'], "abcdefgh")
     result2 = tmp.get_cli_ssh_password(data_basic['7600lr_ip'],
             data_basic['sshUser'], "abcdefgh")
     result3 = tmp.get_cli_ssh_password(data_basic['7610_ip'],
             data_basic['sshUser'], "abcdefgh")
     #把ssh 密码为默认
     tmp.set_setting({'sshPassword':default_ssh_password,
                      'countryDomain':"US"})
     time.sleep(60)
     self.assertIn("abcdefgh", result1)
     self.assertIn("abcdefgh", result2)
     self.assertIn("abcdefgh", result3)
Exemple #2
0
 def test_007_offline_ap_check_timezone(self):
     u"""AP离线时配置时区(testlink_ID:1643)"""
     log.debug("007")
     #重启7600
     tmp1 = APSBusiness(self.s)
     tmp1.reboot_one_ap(data_ap['7600_mac'])
     time.sleep(100)
     #修改时区为GWT
     tmp = SettingsBusiness(self.s)
     tmp.set_setting({'timezone':"Etc/GMT"})
     time.sleep(320)
     #获取ap cli的时区
     ssh_pwd = tmp.get_ssh_pwd()
     result = tmp.get_cli_timezone(data_basic['7600_ip'],
             data_basic['sshUser'], ssh_pwd)
     self.assertIn("+0000", result)
Exemple #3
0
 def test_003_change_country_setting(self):
     u"""验证修改国家配置是否生效(testlink_ID:1624)"""
     log.debug("003")
     tmp = SettingsBusiness(self.s)
     #修改国家为中国
     tmp.set_setting({'countryDomain':"CN"})
     time.sleep(60)
     #在AP CLI下查看国家默认配置
     ssh_pwd = tmp.get_ssh_pwd()
     result1 = tmp.get_cli_country(data_basic['7600_ip'],
             data_basic['sshUser'], ssh_pwd)
     result2 = tmp.get_cli_ath0_country(data_basic['7600_ip'],
             data_basic['sshUser'], ssh_pwd)
     result3 = tmp.get_cli_ath1_country(data_basic['7600_ip'],
             data_basic['sshUser'], ssh_pwd)
     self.assertIn("156", result1)
     self.assertIn("156", result2)
     self.assertIn("156", result3)
Exemple #4
0
 def test_006_reboot_ap_check_timezone(self):
     u"""重启AP之后查看时区(testlink_ID:1642)"""
     log.debug("006")
     #7600再添加回cloud
     tmp1 = APSBusiness(self.s)
     tmp1.add_ap_2_local_cloud(data_basic['7600_ip'], data_ap['7600_mac'], "autotest_7600")
     #修改时区为北京
     tmp = SettingsBusiness(self.s)
     tmp.set_setting({'timezone':"Asia/Shanghai"})
     time.sleep(60)
     #然后重启7600
     tmp1.reboot_one_ap(data_ap['7600_mac'])
     time.sleep(420)
     #获取ap cli的时区
     ssh_pwd = tmp.get_ssh_pwd()
     result = tmp.get_cli_timezone(data_basic['7600_ip'],
             data_basic['sshUser'], ssh_pwd)
     self.assertIn("+0800", result)
Exemple #5
0
 def test_010_sshPassword_letter_and_digital(self):
     u"""字母和数字组合SSH密码检测(testlink_ID:1648,1651)"""
     log.debug("010")
     tmp = SettingsBusiness(self.s)
     #获取默认ssh password
     default_ssh_password = tmp.get_ssh_pwd()
     #修改ssh 密码为纯数字
     tmp.set_setting({'sshPassword':"******"})
     time.sleep(60)
     #在AP CLI下查看国家默认配置
     result1 = tmp.get_cli_ssh_password(data_basic['7600_ip'],
             data_basic['sshUser'], "abcd1234")
     result2 = tmp.get_cli_ssh_password(data_basic['7600lr_ip'],
             data_basic['sshUser'], "abcd1234")
     result3 = tmp.get_cli_ssh_password(data_basic['7610_ip'],
             data_basic['sshUser'], "abcd1234")
     #把ssh 密码为默认
     tmp.set_setting({'sshPassword':default_ssh_password})
     time.sleep(60)
     self.assertIn("abcd1234", result1)
     self.assertIn("abcd1234", result2)
     self.assertIn("abcd1234", result3)
Exemple #6
0
 def test_009_sshPassword_letter(self):
     u"""纯字母SSH密码检测(testlink_ID:1647,1650)"""
     log.debug("009")
     tmp = SettingsBusiness(self.s)
     #获取默认ssh password
     default_ssh_password = tmp.get_ssh_pwd()
     #修改ssh 密码为纯数字
     tmp.set_setting({'sshPassword':"******"})
     time.sleep(60)
     #在AP CLI下查看国家默认配置
     result1 = tmp.get_cli_ssh_password(data_basic['7600_ip'],
             data_basic['sshUser'], "abcdefgh")
     result2 = tmp.get_cli_ssh_password(data_basic['7600lr_ip'],
             data_basic['sshUser'], "abcdefgh")
     result3 = tmp.get_cli_ssh_password(data_basic['7610_ip'],
             data_basic['sshUser'], "abcdefgh")
     #把ssh 密码为默认
     tmp.set_setting({'sshPassword':default_ssh_password})
     time.sleep(60)
     self.assertIn("abcdefgh", result1)
     self.assertIn("abcdefgh", result2)
     self.assertIn("abcdefgh", result3)
Exemple #7
0
 def test_008_sshPassword_digital(self):
     u"""纯数字SSH密码检测(testlink_ID:1646,1649)"""
     log.debug("008")
     tmp = SettingsBusiness(self.s)
     #获取默认ssh password
     default_ssh_password = tmp.get_ssh_pwd()
     #修改ssh 密码为纯数字
     tmp.set_setting({'sshPassword':"******"})
     time.sleep(60)
     #在AP CLI下查看国家默认配置
     result1 = tmp.get_cli_ssh_password(data_basic['7600_ip'],
             data_basic['sshUser'], "12345678")
     result2 = tmp.get_cli_ssh_password(data_basic['7600lr_ip'],
             data_basic['sshUser'], "12345678")
     result3 = tmp.get_cli_ssh_password(data_basic['7610_ip'],
             data_basic['sshUser'], "12345678")
     #把ssh 密码为默认
     tmp.set_setting({'sshPassword':default_ssh_password})
     time.sleep(60)
     self.assertIn("12345678", result1)
     self.assertIn("12345678", result2)
     self.assertIn("12345678", result3)