Exemple #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', '--debug'
     ])
Exemple #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, '--debug'
     ])
Exemple #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'
     ])
Exemple #4
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)
Exemple #5
0
 def test_validation(self):
     # Public address is not supported in AWS
     file_path = os.path.join('examples',
                              'tosca-server-example-amazon.yaml')
     shell.main([
         '--template-file', file_path, '--validate-only', '--cluster-name',
         'test'
     ])
Exemple #6
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
     ])
Exemple #7
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',
         '--debug'
     ])
Exemple #8
0
    def test_delete_full_translating(self):
        file_path = os.path.join('examples', 'tosca-server-example.yaml')
        file_output_path = os.path.join(
            'examples', 'tosca-server-example-output-delete.yaml')
        shell.main([
            '--template-file', file_path, '--cluster-name', 'test',
            '--provider', self.PROVIDER, '--delete', '--output-file',
            file_output_path, '--debug'
        ])

        file_diff_path = os.path.join(
            'examples', 'tosca-server-example-ansible-delete-openstack.yaml')
        self.diff_files(file_output_path, file_diff_path)
Exemple #9
0
 def test_translating_to_ansible(self):
     shell.main([
         '--template-file', 'examples/tosca-server-example-amazon.yaml',
         '--provider', self.PROVIDER, '--cluster-name', 'test'
     ])
Exemple #10
0
 def test_validation(self):
     shell.main(['--template-file', 'examples/tosca-server-example.yaml', '--validate-only', '--cluster-name', 'test'])