Esempio n. 1
0
 def test_parse_rommon_file_location_should_fail_for_non_tftp_protocol(
         self):
     with pytest.raises(ValueError) as ex:
         AbstractFtdPlatform.parse_rommon_file_location(
             'http://1.2.3.4/boot/rommon-boot.foo')
     assert 'The ROMMON image must be downloaded from TFTP server' in str(
         ex)
Esempio n. 2
0
 def test_supports_ftd_model_should_return_false_for_non_supported_models(
         self):
     assert not AbstractFtdPlatform.supports_ftd_model(FtdModel.FTD_2120)
     assert not Ftd2100Platform.supports_ftd_model(FtdModel.FTD_ASA5508_X)
     assert not FtdAsa5500xPlatform.supports_ftd_model(FtdModel.FTD_2120)
Esempio n. 3
0
 def test_parse_rommon_file_location(self):
     server, path = AbstractFtdPlatform.parse_rommon_file_location(
         'tftp://1.2.3.4/boot/rommon-boot.foo')
     assert '1.2.3.4' == server
     assert '/boot/rommon-boot.foo' == path
Esempio n. 4
0
 def test_install_ftd_image_raise_error_on_abstract_class(self):
     with pytest.raises(NotImplementedError):
         AbstractFtdPlatform().install_ftd_image(
             dict(DEFAULT_MODULE_PARAMS))