Esempio n. 1
0
    def test_module_parameters_managed(self):
        args = dict(
            offering='asdf',
            key='XXXX-XXXX-XXXX-XXXX-XXXX',
            device='1.1.1.1',
            managed=True,
        )

        p = ModuleParameters(params=args)
        assert p.offering == 'asdf'
        assert p.key == 'XXXX-XXXX-XXXX-XXXX-XXXX'
        assert p.device == '1.1.1.1'
        assert p.managed is True
Esempio n. 2
0
    def test_module_parameters_unmanaged(self):
        args = dict(offering='asdf',
                    key='XXXX-XXXX-XXXX-XXXX-XXXX',
                    device='1.1.1.1',
                    managed=False,
                    device_username='******',
                    device_password='******',
                    device_port='8443')

        p = ModuleParameters(params=args)
        assert p.offering == 'asdf'
        assert p.key == 'XXXX-XXXX-XXXX-XXXX-XXXX'
        assert p.device == '1.1.1.1'
        assert p.managed is False
        assert p.device_username == 'admin'
        assert p.device_password == 'secret'
        assert p.device_port == 8443