def test_module_parameters_no_options(self): args = dict( ucs="/root/bigip.localhost.localdomain.ucs" ) p = ModuleParameters(params=args) assert p.ucs == '/root/bigip.localhost.localdomain.ucs' assert p.options is None
def test_module_parameters_false_ucs_booleans(self): args = dict(ucs="/root/bigip.localhost.localdomain.ucs", include_chassis_level_config=False, no_license=False, no_platform_check=False, reset_trust=False) p = ModuleParameters(params=args) assert p.ucs == '/root/bigip.localhost.localdomain.ucs' assert p.include_chassis_level_config is False assert p.no_license is False assert p.no_platform_check is False assert p.reset_trust is False assert p.install_command == "tmsh load sys ucs /var/local/ucs/bigip.localhost.localdomain.ucs"
def test_module_parameters_false_ucs_booleans(self): args = dict( ucs="/root/bigip.localhost.localdomain.ucs", include_chassis_level_config=False, no_license=False, no_platform_check=False, reset_trust=False ) p = ModuleParameters(params=args) assert p.ucs == '/root/bigip.localhost.localdomain.ucs' assert p.include_chassis_level_config is False assert p.no_license is False assert p.no_platform_check is False assert p.reset_trust is False assert p.options == { 'include-chassis-level-config': False, 'no-license': False, 'no-platform-check': False, 'reset-trust': False }
def test_module_parameters(self): args = dict(ucs="/root/bigip.localhost.localdomain.ucs", force=True, include_chassis_level_config=True, no_license=True, no_platform_check=True, passphrase="foobar", reset_trust=True, state='installed') p = ModuleParameters(params=args) assert p.ucs == '/root/bigip.localhost.localdomain.ucs' assert p.force is True assert p.include_chassis_level_config is True assert p.no_license is True assert p.no_platform_check is True assert p.passphrase == "foobar" assert p.reset_trust is True assert p.install_command == \ "tmsh load sys ucs /var/local/ucs/bigip.localhost.localdomain.ucs " \ "include-chassis-level-config no-license no-platform-check " \ "passphrase foobar reset-trust"
def test_module_parameters(self): args = dict( ucs="/root/bigip.localhost.localdomain.ucs", force=True, include_chassis_level_config=True, no_license=True, no_platform_check=True, passphrase="foobar", reset_trust=True, state='installed' ) p = ModuleParameters(params=args) assert p.ucs == '/root/bigip.localhost.localdomain.ucs' assert p.force is True assert p.include_chassis_level_config is True assert p.no_license is True assert p.no_platform_check is True assert p.passphrase == "foobar" assert p.reset_trust is True assert p.options == { 'include-chassis-level-config': True, 'no-license': True, 'no-platform-check': True, 'passphrase': 'foobar', 'reset-trust': True }