# Path: sahara_tempest_plugin/tests/clients/base.py
# TEMPEST_CONF = config.CONF
# CLUSTER_STATUS_ACTIVE = "Active"
# CLUSTER_STATUS_ERROR = "Error"
# class ClusterErrorException(exceptions.TempestException):
# class BaseDataProcessingTest(tempest.test.BaseTestCase):
#     def resource_setup(cls):
#     def get_floating_ip_pool_id_for_neutron(cls):
#     def get_private_network_id(cls):
#     def _find_network_by_name(cls, network_name):
#     def get_image_id(cls, image_name):
#     def get_plugin(cls):
#     def create_node_group_template(self, name, **kwargs):
#     def create_cluster_template(self, name, **kwargs):
#     def create_data_source(self, name, url, description, type,
#                            credentials=None):
#     def create_job_binary(self, name, url, description, extra=None):
#     def create_job_binary_internal(self, name, data):
#     def create_job(self, name, job_type, mains, libs=None, description=None):
#     def create_cluster(self, name, **kwargs):
#     def check_cluster_active(self, cluster_id):
#     def create_job_execution(self, **kwargs):
#     def create_container(self, name):
#     def delete_resource(self, resource_client, resource_id):
#     def delete_timeout(
#             self, resource_client, resource_id,
#             timeout=TEMPEST_CONF.data_processing.cluster_timeout):
#     def delete_swift_container(self, container):


from tempest import config
from tempest.lib.common.utils import data_utils
from sahara_tempest_plugin.tests.clients import base
        self.assertIn((template_id, template_name), templates_info)

    def _check_cluster_template_get(self, template_id, template_name):
        # check cluster template fetch by id
        template = self.client.cluster_templates.get(
            template_id)
        self.assertEqual(template_name, template.name)
        self.assertDictContainsSubset(self.cluster_template, template.__dict__)

    def _check_cluster_template_update(self, template_id):
        values = {
            'name': data_utils.rand_name('updated-sahara-ct'),
            'description': 'description',
        }

        # check updating of cluster template
        template = self.client.cluster_templates.update(
            template_id, **values)
        self.assertDictContainsSubset(values, template.__dict__)

    def _check_cluster_template_delete(self, template_id):
        # delete cluster template by id
        self.client.cluster_templates.delete(
            template_id)

        # check that cluster template really deleted
        templates = self.client.cluster_templates.list()
        self.assertNotIn(template_id, [template.id for template in templates])

    def test_cluster_templates(self):

# Path: sahara_tempest_plugin/tests/clients/base.py
# TEMPEST_CONF = config.CONF
# CLUSTER_STATUS_ACTIVE = "Active"
# CLUSTER_STATUS_ERROR = "Error"
# class ClusterErrorException(exceptions.TempestException):
# class BaseDataProcessingTest(tempest.test.BaseTestCase):
#     def resource_setup(cls):
#     def get_floating_ip_pool_id_for_neutron(cls):
#     def get_private_network_id(cls):
#     def _find_network_by_name(cls, network_name):
#     def get_image_id(cls, image_name):
#     def get_plugin(cls):
#     def create_node_group_template(self, name, **kwargs):
#     def create_cluster_template(self, name, **kwargs):
#     def create_data_source(self, name, url, description, type,
#                            credentials=None):
#     def create_job_binary(self, name, url, description, extra=None):
#     def create_job_binary_internal(self, name, data):
#     def create_job(self, name, job_type, mains, libs=None, description=None):
#     def create_cluster(self, name, **kwargs):
#     def check_cluster_active(self, cluster_id):
#     def create_job_execution(self, **kwargs):
#     def create_container(self, name):
#     def delete_resource(self, resource_client, resource_id):
#     def delete_timeout(
#             self, resource_client, resource_id,
#             timeout=TEMPEST_CONF.data_processing.cluster_timeout):
#     def delete_swift_container(self, container):


# Path: sahara_tempest_plugin/tests/clients/test_cluster_templates.py
from tempest import config
from tempest.lib.common.utils import data_utils
from sahara_tempest_plugin.tests.clients import base

        self.assertIn((template_id, template_name), templates_info)

    def _check_cluster_template_get(self, template_id, template_name):
        # check cluster template fetch by id
        template = self.client.cluster_templates.get(
            template_id)
        self.assertEqual(template_name, template.name)
        self.assertDictContainsSubset(self.cluster_template, template.__dict__)

    def _check_cluster_template_update(self, template_id):
        values = {
            'name': data_utils.rand_name('updated-sahara-ct'),
            'description': 'description',
        }

        # check updating of cluster template
        template = self.client.cluster_templates.update(
            template_id, **values)
        self.assertDictContainsSubset(values, template.__dict__)

    def _check_cluster_template_delete(self, template_id):
        # delete cluster template by id
        self.client.cluster_templates.delete(
            template_id)

        # check that cluster template really deleted
        templates = self.client.cluster_templates.list()
        self.assertNotIn(template_id, [template.id for template in templates])

    def test_cluster_templates(self):

        template_id, template_name = self._check_create_cluster_template()