コード例 #1
0
 def load_dependencies(self):
     """Load and add all element dependencies to self.elements."""
     all_elements = element_dependencies.expand_dependencies(
         self.elements, ':'.join(self.element_paths))
     self.elements = all_elements
     os.environ['IMAGE_ELEMENT'] = ' '.join(
         [x for x in sorted(self.elements)])
     LOG.info("List of all elements and dependencies: %s" %
              ' '.join(list(self.elements)))
コード例 #2
0
ファイル: runner.py プロジェクト: openstack/instack
 def load_dependencies(self):
     """Load and add all element dependencies to self.elements."""
     all_elements = element_dependencies.expand_dependencies(
         self.elements, ':'.join(self.element_paths))
     self.elements = all_elements
     os.environ['IMAGE_ELEMENT'] = ' '.join(
         [x for x in sorted(self.elements)])
     LOG.info("List of all elements and dependencies: %s" %
              ' '.join(list(self.elements)))
コード例 #3
0
 def test_expand_dependencies_deprecated(self):
     # test the deprecated expand_dependencies call
     result = element_dependencies.expand_dependencies(
         ['foo', 'requires-foo'], self.element_dirs)
     self.assertCountEqual(['foo', 'requires-foo'], result)
コード例 #4
0
 def test_provide(self):
     result = element_dependencies.expand_dependencies(
         ['provides_virtual', 'requires_virtual'],
         elements_dir=self.element_dir)
     self.assertEqual(set(['requires_virtual', 'provides_virtual']), result)
コード例 #5
0
 def test_circular(self):
     result = element_dependencies.expand_dependencies(
         ['circular1'], elements_dir=self.element_dir)
     self.assertEqual(set(['circular1', 'circular2']), result)
コード例 #6
0
 def test_self(self):
     result = element_dependencies.expand_dependencies(
         ['self'], elements_dir=self.element_dir)
     self.assertEqual(set(['self']), result)
コード例 #7
0
 def test_transitive_deps(self):
     result = element_dependencies.expand_dependencies(
         ['requires-requires-foo'], elements_dir=self.element_dir)
     self.assertEqual(set(['requires-requires-foo',
                           'requires-foo',
                           'foo']), result)
コード例 #8
0
 def test_self(self):
     result = element_dependencies.expand_dependencies(
         ['self', 'foo'], elements_dir=self.element_dir)
     self.assertEqual(set(['self', 'foo']), result)
コード例 #9
0
 def test_transitive_deps(self):
     result = element_dependencies.expand_dependencies(
         ['requires-requires-foo'], elements_dir=self.element_dir)
     self.assertEqual(set(['requires-requires-foo',
                           'requires-foo',
                           'foo']), result)
コード例 #10
0
 def test_provide_virtual_ordering(self):
     result = element_dependencies.expand_dependencies(
         ['requires_new_virtual', 'provides_new_virtual'],
         elements_dir=self.element_dir)
     self.assertEqual(set(['requires_new_virtual', 'provides_new_virtual']),
                      result)
コード例 #11
0
 def test_circular(self):
     result = element_dependencies.expand_dependencies(
         ['circular1'], elements_dir=self.element_dir)
     self.assertEqual(set(['circular1', 'circular2']), result)
コード例 #12
0
 def test_expand_dependencies_deprecated(self):
     # test the deprecated expand_dependencies call
     result = element_dependencies.expand_dependencies(
             ['foo', 'requires-foo'], self.element_dirs)
     self.assertItemsEqual(['foo', 'requires-foo'], result)