Beispiel #1
0
 def test_validation(self):
     file_path = os.path.join('examples',
                              'tosca-server-example-openstack.yaml')
     shell.main([
         '--template-file', file_path, '--cluster-name', 'test',
         '--validate-only'
     ])
Beispiel #2
0
 def test_translating_to_ansible_delete(self):
     file_path = os.path.join('examples',
                              'tosca-server-example-openstack.yaml')
     shell.main([
         '--template-file', file_path, '--cluster-name', 'test', '--delete',
         'false', '--provider', self.PROVIDER
     ])
Beispiel #3
0
 def test_validation(self):
     example_path = os.path.join(get_project_root_path(), 'examples',
                                 'tosca-server-example-kubernetes.yaml')
     shell.main([
         '--template-file', example_path, '--validate-only',
         '--cluster-name', 'test'
     ])
Beispiel #4
0
 def test_k8s_translate(self):
     example_path = os.path.join(get_project_root_path(), 'examples',
                                 'tosca-server-example-kubernetes.yaml')
     shell.main([
         '--template-file', example_path, '--provider', self.PROVIDER,
         '--configuration-tool', 'kubernetes', '--cluster-name', 'test'
     ])
Beispiel #5
0
 def test_delete_full_async_translating(self):
     file_path = os.path.join('examples', 'tosca-server-example.yaml')
     shell.main([
         '--template-file', file_path, '--cluster-name', 'test',
         '--provider', self.PROVIDER, '--async', '--delete', '--extra',
         'retries=3', 'async=60', 'poll=0', 'delay=1'
     ])
Beispiel #6
0
 def test_full_translating_hostedon(self):
     file_path = os.path.join('examples',
                              'tosca-server-example-hostedon.yaml')
     file_output_path = os.path.join(
         'examples', 'tosca-server-example-hostedon-output.yaml')
     shell.main([
         '--template-file', file_path, '--cluster-name', 'test',
         '--provider', self.PROVIDER, '--output-file', file_output_path
     ])
Beispiel #7
0
 def test_validate_change_wd(self):
     working_directory = os.getcwd()
     os.chdir('examples')
     try:
         shell.main([
             '--template-file', 'tosca-server-example.yaml',
             '--validate-only', '--cluster-name', 'test'
         ])
     finally:
         os.chdir(working_directory)
Beispiel #8
0
    def test_full_translating(self):
        file_path = os.path.join('examples', 'tosca-server-example.yaml')
        file_output_path = os.path.join('examples',
                                        'tosca-server-example-output.yaml')
        shell.main([
            '--template-file', file_path, '--cluster-name', 'test',
            '--provider', self.PROVIDER, '--output-file', file_output_path
        ])

        file_diff_path = os.path.join(
            'examples', 'tosca-server-example-ansible-openstack.yaml')
        self.diff_files(file_output_path, file_diff_path)
Beispiel #9
0
    def test_full_async_translating(self):
        file_path = os.path.join('examples', 'tosca-server-example.yaml')
        file_output_path = os.path.join(
            'examples', 'tosca-server-example-output-async.yaml')
        shell.main([
            '--template-file', file_path, '--cluster-name', 'test',
            '--provider', self.PROVIDER, '--async', '--extra', 'retries=3',
            'async=60', 'poll=0', 'delay=1', '--output-file', file_output_path
        ])

        file_diff_path = os.path.join(
            'examples', 'tosca-server-example-ansible-async-openstack.yaml')
        self.diff_files(file_output_path, file_diff_path)
Beispiel #10
0
 def test_full_translating(self):
     file_path = os.path.join('examples', 'tosca-server-example.yaml')
     shell.main([
         '--template-file', file_path, '--provider', self.PROVIDER,
         '--cluster-name', 'test'
     ])
Beispiel #11
0
 def test_validation(self):
     shell.main([
         '--template-file', 'examples/tosca-server-example.yaml',
         '--validate-only', '--cluster-name', 'test'
     ])
Beispiel #12
0
 def test_full_translating(self):
     shell.main([
         '--template-file', 'examples/tosca-server-example.yaml',
         '--provider', self.PROVIDER, '--cluster-name', 'test'
     ])