# Path: sahara_tempest_plugin/tests/cli/cluster_templates.py
# class SaharaClusterTemplateCLITest(base.ClientTestBase):
#     def openstack_cluster_template_list(self):
#     def openstack_cluster_template_create(self, ng_master, ng_worker):
#     def openstack_cluster_template_show(self, cluster_template_name):
#     def openstack_cluster_template_update(self, cluster_template_name):
#     def openstack_cluster_template_delete(self, cluster_template_name):
# 
# Path: sahara_tempest_plugin/tests/cli/images.py
# class SaharaImageCLITest(base.ClientTestBase):
#     def openstack_image_list(self):
#     def openstack_image_register(self, name_to_register, username):
#     def openstack_image_show(self, image_name):
#     def openstack_image_tags_add(self, image_name):
#     def openstack_image_tags_set(self, image_name):
#     def openstack_image_tags_remove(self, image_name):
#     def openstack_image_unregister(self, image_name):
#     def negative_unregister_not_existing_image(self, image_name):
# 
# Path: sahara_tempest_plugin/tests/cli/plugins.py
# class SaharaPluginCLITest(base.ClientTestBase):
#     def openstack_plugin_list(self):
#     def openstack_plugin_show(self):
#     def openstack_plugin_configs_get(self):
#     def openstack_plugin_update(self):
#     def _update_with_json_file(self, update_dict):
# 
# Path: sahara_tempest_plugin/tests/cli/job_binaries.py
# class SaharaJobBinaryCLITest(base.ClientTestBase):
#     def openstack_job_binary_list(self):
#     def openstack_job_binary_create(self, job_internal=True):
#     def openstack_job_binary_download(self, job_binary_name,
#                                       original_file=None):
#     def openstack_job_binary_show(self, job_binary_name):
#     def openstack_job_binary_update(self, job_binary_name, flag=None):
#     def openstack_job_binary_delete(self, job_binary_name):
#     def negative_delete_removed_job_binary(self, job_binary_name):
#     def negative_try_to_update_protected_jb(self, job_binary_name):
#     def filter_job_binaries_in_list(self):
# 
# Path: sahara_tempest_plugin/tests/cli/jobs.py
# DELETE_RES = '''\
# job "%s" deletion has been started.
# '''
# class SaharaJobCLITest(base.ClientTestBase):
#     def openstack_job_list(self):
#     def openstack_job_execute(self, cluster_name, job_template_name, input,
#                               output):
#     def openstack_job_show(self, job_id):
#     def openstack_job_update(self, job_id):
#     def openstack_job_delete(self, job_id):
# 
# Path: sahara_tempest_plugin/tests/cli/job_templates.py
# class SaharaJobTemplateCLITest(base.ClientTestBase):
#     def openstack_job_template_list(self):
#     def openstack_job_template_create(self, job_binary_name):
#     def openstack_job_template_show(self, job_template_name):
#     def openstack_job_template_update(self, job_template_name):
#     def openstack_job_template_delete(self, job_template_name):
# 
# Path: sahara_tempest_plugin/tests/cli/data_sources.py
# class SaharaDataSourceCLITest(base.ClientTestBase):
#     def openstack_data_source_list(self):
#     def openstack_data_source_create(self):
#     def openstack_data_source_show(self, data_source_name):
#     def openstack_data_source_update(self, data_source_name):
#     def openstack_data_source_delete(self, data_source_name):


import testtools
from tempest import config
from tempest.lib import decorators
from sahara_tempest_plugin.tests.cli import clusters
from sahara_tempest_plugin.tests.cli import cluster_templates
from sahara_tempest_plugin.tests.cli import images
from sahara_tempest_plugin.tests.cli import node_group_templates
from sahara_tempest_plugin.tests.cli import plugins
from sahara_tempest_plugin.tests.cli import job_binaries
from sahara_tempest_plugin.tests.cli import jobs
from sahara_tempest_plugin.tests.cli import job_templates
from sahara_tempest_plugin.tests.cli import data_sources
from sahara_tempest_plugin.tests.cli import job_types
                                                  ram=512, vcpus=1, disk=4,
                                                  id=20)['flavor']
        self.addCleanup(flavors_client.delete_flavor, flavor_ref['id'])
        self.addCleanup(self.openstack_image_unregister, image_name)

        ng_master = self.openstack_node_group_template_create('cli-cluster'
                                                              '-master',
                                                              'sahara-flavor')
        ng_worker = self.openstack_node_group_template_create('cli-cluster'
                                                              '-worker',
                                                              'sahara-flavor')
        self.addCleanup(self.delete_resource, 'node group template',
                        ng_master)
        self.addCleanup(self.delete_resource, 'node group template',
                        ng_worker)

        cluster_template_name = (
            self.openstack_cluster_template_create(ng_master, ng_worker))
        self.addCleanup(self.delete_resource, 'cluster template',
                        cluster_template_name)

        cluster_name = (
            self.openstack_cluster_create(cluster_template_name, image_name))
        self.addCleanup(self.delete_resource, 'cluster',
                        cluster_name)

        self._run_job_on_cluster(cluster_name)
        self.openstack_cluster_list()
        self.openstack_cluster_show(cluster_name)
        self.openstack_cluster_update(cluster_name)

# Path: sahara_tempest_plugin/tests/cli/cluster_templates.py
# class SaharaClusterTemplateCLITest(base.ClientTestBase):
#     def openstack_cluster_template_list(self):
#     def openstack_cluster_template_create(self, ng_master, ng_worker):
#     def openstack_cluster_template_show(self, cluster_template_name):
#     def openstack_cluster_template_update(self, cluster_template_name):
#     def openstack_cluster_template_delete(self, cluster_template_name):
# 
# Path: sahara_tempest_plugin/tests/cli/images.py
# class SaharaImageCLITest(base.ClientTestBase):
#     def openstack_image_list(self):
#     def openstack_image_register(self, name_to_register, username):
#     def openstack_image_show(self, image_name):
#     def openstack_image_tags_add(self, image_name):
#     def openstack_image_tags_set(self, image_name):
#     def openstack_image_tags_remove(self, image_name):
#     def openstack_image_unregister(self, image_name):
#     def negative_unregister_not_existing_image(self, image_name):
# 
# Path: sahara_tempest_plugin/tests/cli/plugins.py
# class SaharaPluginCLITest(base.ClientTestBase):
#     def openstack_plugin_list(self):
#     def openstack_plugin_show(self):
#     def openstack_plugin_configs_get(self):
#     def openstack_plugin_update(self):
#     def _update_with_json_file(self, update_dict):
# 
# Path: sahara_tempest_plugin/tests/cli/job_binaries.py
# class SaharaJobBinaryCLITest(base.ClientTestBase):
#     def openstack_job_binary_list(self):
#     def openstack_job_binary_create(self, job_internal=True):
#     def openstack_job_binary_download(self, job_binary_name,
#                                       original_file=None):
#     def openstack_job_binary_show(self, job_binary_name):
#     def openstack_job_binary_update(self, job_binary_name, flag=None):
#     def openstack_job_binary_delete(self, job_binary_name):
#     def negative_delete_removed_job_binary(self, job_binary_name):
#     def negative_try_to_update_protected_jb(self, job_binary_name):
#     def filter_job_binaries_in_list(self):
# 
# Path: sahara_tempest_plugin/tests/cli/jobs.py
# DELETE_RES = '''\
# job "%s" deletion has been started.
# '''
# class SaharaJobCLITest(base.ClientTestBase):
#     def openstack_job_list(self):
#     def openstack_job_execute(self, cluster_name, job_template_name, input,
#                               output):
#     def openstack_job_show(self, job_id):
#     def openstack_job_update(self, job_id):
#     def openstack_job_delete(self, job_id):
# 
# Path: sahara_tempest_plugin/tests/cli/job_templates.py
# class SaharaJobTemplateCLITest(base.ClientTestBase):
#     def openstack_job_template_list(self):
#     def openstack_job_template_create(self, job_binary_name):
#     def openstack_job_template_show(self, job_template_name):
#     def openstack_job_template_update(self, job_template_name):
#     def openstack_job_template_delete(self, job_template_name):
# 
# Path: sahara_tempest_plugin/tests/cli/data_sources.py
# class SaharaDataSourceCLITest(base.ClientTestBase):
#     def openstack_data_source_list(self):
#     def openstack_data_source_create(self):
#     def openstack_data_source_show(self, data_source_name):
#     def openstack_data_source_update(self, data_source_name):
#     def openstack_data_source_delete(self, data_source_name):


# Path: sahara_tempest_plugin/tests/cli/test_scenario.py
import testtools
from tempest import config
from tempest.lib import decorators
from sahara_tempest_plugin.tests.cli import clusters
from sahara_tempest_plugin.tests.cli import cluster_templates
from sahara_tempest_plugin.tests.cli import images
from sahara_tempest_plugin.tests.cli import node_group_templates
from sahara_tempest_plugin.tests.cli import plugins
from sahara_tempest_plugin.tests.cli import job_binaries
from sahara_tempest_plugin.tests.cli import jobs
from sahara_tempest_plugin.tests.cli import job_templates
from sahara_tempest_plugin.tests.cli import data_sources
from sahara_tempest_plugin.tests.cli import job_types

                                                  ram=512, vcpus=1, disk=4,
                                                  id=20)['flavor']
        self.addCleanup(flavors_client.delete_flavor, flavor_ref['id'])
        self.addCleanup(self.openstack_image_unregister, image_name)

        ng_master = self.openstack_node_group_template_create('cli-cluster'
                                                              '-master',
                                                              'sahara-flavor')
        ng_worker = self.openstack_node_group_template_create('cli-cluster'
                                                              '-worker',
                                                              'sahara-flavor')
        self.addCleanup(self.delete_resource, 'node group template',
                        ng_master)
        self.addCleanup(self.delete_resource, 'node group template',
                        ng_worker)

        cluster_template_name = (
            self.openstack_cluster_template_create(ng_master, ng_worker))
        self.addCleanup(self.delete_resource, 'cluster template',
                        cluster_template_name)

        cluster_name = (
            self.openstack_cluster_create(cluster_template_name, image_name))
        self.addCleanup(self.delete_resource, 'cluster',
                        cluster_name)

        self._run_job_on_cluster(cluster_name)
        self.openstack_cluster_list()
        self.openstack_cluster_show(cluster_name)
        self.openstack_cluster_update(cluster_name)

        self.openstack_cluster_verification_show(cluster_name)