Ejemplo n.º 1
0
    def test_validate_pool_names_default(self):
        all_pools = list('ab')
        pool_names = utils.validate_pool_names([], all_pools)
        self.assertEqual(2, len(pool_names))

        pool_names = utils.validate_pool_names(None, all_pools)
        self.assertEqual(2, len(pool_names))
Ejemplo n.º 2
0
    def test_validate_pool_names_default(self):
        all_pools = list('ab')
        pool_names = utils.validate_pool_names([], all_pools)
        self.assertEqual(2, len(pool_names))

        pool_names = utils.validate_pool_names(None, all_pools)
        self.assertEqual(2, len(pool_names))
Ejemplo n.º 3
0
 def test_validate_pool_names_filter(self):
     all_pools = list('acd')
     pool_names = utils.validate_pool_names(list('abc'), all_pools)
     self.assertIn('a', pool_names)
     self.assertIn('c', pool_names)
     self.assertNotIn('b', pool_names)
     self.assertNotIn('d', pool_names)
Ejemplo n.º 4
0
 def test_validate_pool_names_filter(self):
     all_pools = list('acd')
     pool_names = utils.validate_pool_names(list('abc'), all_pools)
     self.assertIn('a', pool_names)
     self.assertIn('c', pool_names)
     self.assertNotIn('b', pool_names)
     self.assertNotIn('d', pool_names)
Ejemplo n.º 5
0
 def get_managed_pools(self):
     names = self.configured_pool_names
     array_pools = self.client.get_pools()
     valid_names = utils.validate_pool_names(names, array_pools.name)
     return {p.name: p for p in array_pools if p.name in valid_names}
Ejemplo n.º 6
0
 def f():
     all_pools = list('abc')
     utils.validate_pool_names(list('efg'), all_pools)
Ejemplo n.º 7
0
 def f():
     all_pools = list('abc')
     utils.validate_pool_names(list('efg'), all_pools)
Ejemplo n.º 8
0
 def get_managed_pools(self):
     names = self.configured_pool_names
     array_pools = self.client.get_pools()
     valid_names = utils.validate_pool_names(names, array_pools.name)
     return {p.name: p for p in array_pools if p.name in valid_names}