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)
def test_011_error_password(self): u"""错误SSH密码登录失败验证(testlink_ID:1653)""" log.debug("011") tmp = SettingsBusiness(self.s) result = tmp.get_cli_ssh_password(data_basic['7600_ip'], data_basic['sshUser'], "12345678") self.assertNotIn("12345678", result)
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)
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)
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)