def test_hyphenated_peer_hostname(self):
        args = dict(
            peer_hostname='hn---hyphen____underscore.hmatsuda.local',
        )

        p = Parameters(params=args)
        assert p.peer_hostname == 'hn---hyphen____underscore.hmatsuda.local'
    def test_numbered_peer_hostname(self):
        args = dict(
            peer_hostname='BIG-IP_12x_ans2.example.local',
        )

        p = Parameters(params=args)
        assert p.peer_hostname == 'BIG-IP_12x_ans2.example.local'
Example #3
0
    def test_module_parameters(self):
        args = dict(peer_server='10.10.10.10',
                    peer_hostname='foo.bar.baz',
                    peer_user='******',
                    peer_password='******')

        p = Parameters(args)
        assert p.peer_server == '10.10.10.10'
        assert p.peer_hostname == 'foo.bar.baz'
        assert p.peer_user == 'admin'
        assert p.peer_password == 'secret'
Example #4
0
    def test_module_parameters_with_subordinate_type(self):
        args = dict(peer_server='10.10.10.10',
                    peer_hostname='foo.bar.baz',
                    peer_user='******',
                    peer_password='******',
                    type='subordinate')

        p = Parameters(args)
        assert p.peer_server == '10.10.10.10'
        assert p.peer_hostname == 'foo.bar.baz'
        assert p.peer_user == 'admin'
        assert p.peer_password == 'secret'
        assert p.type is False
    def test_module_parameters_with_peer_type(self):
        args = dict(peer_server='10.10.10.10',
                    peer_hostname='foo.bar.baz',
                    peer_user='******',
                    peer_password='******',
                    type='peer')

        p = Parameters(params=args)
        assert p.peer_server == '10.10.10.10'
        assert p.peer_hostname == 'foo.bar.baz'
        assert p.peer_user == 'admin'
        assert p.peer_password == 'secret'
        assert p.type is True