Exemple #1
0
 def test_extend_agents(self):
     agents_map = {
         'UU1D_master_0': {
             'id': 'UU1D_master_0',
             'mode': 'master',
             'node': 'uno',
             'slave_id': 'UU1D_slave_0'},
         'UU1D_slave_0': {
             'id': 'UU1D_slave_0',
             'master_id': 'UU1D_master_0',
             'mode': 'slave',
             'node': 'dos'},
     }
     agents = server._extend_agents(agents_map)
     self.assertDictContainsSubset(agents['UU1D_master_0']['slave'],
                                   agents['UU1D_slave_0'])
     self.assertDictContainsSubset(agents['UU1D_slave_0']['master'],
                                   agents['UU1D_master_0'])
Exemple #2
0
 def test_extend_agents(self):
     agents_map = {
         'UU1D_master_0': {
             'id': 'UU1D_master_0',
             'mode': 'master',
             'node': 'uno',
             'slave_id': 'UU1D_slave_0'},
         'UU1D_slave_0': {
             'id': 'UU1D_slave_0',
             'master_id': 'UU1D_master_0',
             'mode': 'slave',
             'node': 'dos'},
     }
     agents = server._extend_agents(agents_map)
     self.assertDictContainsSubset(agents['UU1D_master_0']['slave'],
                                   agents['UU1D_slave_0'])
     self.assertDictContainsSubset(agents['UU1D_slave_0']['master'],
                                   agents['UU1D_master_0'])
Exemple #3
0
 def test_extend_agents(self):
     agents_map = {
         'UU1D_primary_0': {
             'id': 'UU1D_primary_0',
             'mode': 'primary',
             'node': 'uno',
             'minion_id': 'UU1D_minion_0'},
         'UU1D_minion_0': {
             'id': 'UU1D_minion_0',
             'primary_id': 'UU1D_primary_0',
             'mode': 'minion',
             'node': 'dos'},
     }
     agents = server._extend_agents(agents_map)
     self.assertDictContainsSubset(agents['UU1D_primary_0']['minion'],
                                   agents['UU1D_minion_0'])
     self.assertDictContainsSubset(agents['UU1D_minion_0']['primary'],
                                   agents['UU1D_primary_0'])