def test_module_parameters_members(self):
     args = dict(
         partition='Common',
         members=[
             dict(
                 server='foo',
                 virtual_server='bar'
             )
         ]
     )
     p = ModuleParameters(params=args)
     assert len(p.members) == 1
     assert p.members[0] == '/Common/foo:bar'
Exemple #2
0
 def test_module_parameters(self):
     args = dict(name='foo',
                 preferred_lb_method='topology',
                 alternate_lb_method='ratio',
                 fallback_lb_method='fewest-hops',
                 fallback_ip='10.10.10.10',
                 type='a')
     p = ModuleParameters(params=args)
     assert p.name == 'foo'
     assert p.preferred_lb_method == 'topology'
     assert p.alternate_lb_method == 'ratio'
     assert p.fallback_lb_method == 'fewest-hops'
     assert p.fallback_ip == '10.10.10.10'
     assert p.type == 'a'