# Path: sahara_tempest_plugin/tests/api/base.py
# CONF = config.CONF
# class InvalidSaharaTestConfiguration(exceptions.TempestException):
# class BaseDataProcessingTest(tempest.test.BaseTestCase):
#     def skip_checks(cls):
#     def setup_clients(cls):
#     def resource_setup(cls):
#     def resource_cleanup(cls):
#     def cleanup_resources(resource_id_list, method):
#     def create_node_group_template(cls, name, plugin_name, hadoop_version,
#                                    node_processes, flavor_id,
#                                    node_configs=None, **kwargs):
#     def create_cluster_template(cls, name, plugin_name, hadoop_version,
#                                 node_groups, cluster_configs=None, **kwargs):
#     def create_data_source(cls, name, type, url, **kwargs):
#     def create_job_binary_internal(cls, name, data):
#     def create_job_binary(cls, name, url, extra=None, **kwargs):
#     def create_job(cls, name, job_type, mains, libs=None, **kwargs):
#     def create_job_template(cls, name, job_type, mains, libs=None, **kwargs):
#     def get_node_group_template(cls, nodegroup='worker1'):
#     def get_cluster_template(cls, node_group_template_ids=None):
#     def wait_for_resource_deletion(cls, resource_id, get_resource):
#         def is_resource_deleted(resource_id):


import testtools
from testtools import testcase as tc
from tempest import config
from tempest.lib import decorators
from tempest.lib.common.utils import data_utils
from sahara_tempest_plugin.tests.api import base as dp_base
        cls.swift_job_binary_with_extra = {
            'url': 'swift://sahara-container.sahara/example.jar',
            'description': 'Test job binary',
            'extra': {
                'user': cls.os_primary.credentials.username,
                'password': cls.os_primary.credentials.password
            }
        }
        cls.s3_job_binary_with_extra = {
            'url': 's3://sahara-bucket/example.jar',
            'description': 'Test job binary',
            'extra': {
                'accesskey': cls.os_primary.credentials.username,
                'secretkey': cls.os_primary.credentials.password,
                'endpoint': 'localhost'
            }
        }
        # Create extra cls.swift_job_binary and cls.s3_job_binary variables
        # to use for comparison to job binary response body
        # because response body has no 'extra' field.
        cls.swift_job_binary = cls.swift_job_binary_with_extra.copy()
        del cls.swift_job_binary['extra']
        cls.s3_job_binary = cls.s3_job_binary_with_extra.copy()
        del cls.s3_job_binary['extra']

        name = data_utils.rand_name('sahara-internal-job-binary')
        cls.job_binary_data = 'Some script may be data'
        if not CONF.data_processing.use_api_v2:
            job_binary_internal = (
                cls.create_job_binary_internal(name, cls.job_binary_data))

# Path: sahara_tempest_plugin/tests/api/base.py
# CONF = config.CONF
# class InvalidSaharaTestConfiguration(exceptions.TempestException):
# class BaseDataProcessingTest(tempest.test.BaseTestCase):
#     def skip_checks(cls):
#     def setup_clients(cls):
#     def resource_setup(cls):
#     def resource_cleanup(cls):
#     def cleanup_resources(resource_id_list, method):
#     def create_node_group_template(cls, name, plugin_name, hadoop_version,
#                                    node_processes, flavor_id,
#                                    node_configs=None, **kwargs):
#     def create_cluster_template(cls, name, plugin_name, hadoop_version,
#                                 node_groups, cluster_configs=None, **kwargs):
#     def create_data_source(cls, name, type, url, **kwargs):
#     def create_job_binary_internal(cls, name, data):
#     def create_job_binary(cls, name, url, extra=None, **kwargs):
#     def create_job(cls, name, job_type, mains, libs=None, **kwargs):
#     def create_job_template(cls, name, job_type, mains, libs=None, **kwargs):
#     def get_node_group_template(cls, nodegroup='worker1'):
#     def get_cluster_template(cls, node_group_template_ids=None):
#     def wait_for_resource_deletion(cls, resource_id, get_resource):
#         def is_resource_deleted(resource_id):


# Path: sahara_tempest_plugin/tests/api/test_job_binaries.py
import testtools
from testtools import testcase as tc
from tempest import config
from tempest.lib import decorators
from tempest.lib.common.utils import data_utils
from sahara_tempest_plugin.tests.api import base as dp_base

        cls.swift_job_binary_with_extra = {
            'url': 'swift://sahara-container.sahara/example.jar',
            'description': 'Test job binary',
            'extra': {
                'user': cls.os_primary.credentials.username,
                'password': cls.os_primary.credentials.password
            }
        }
        cls.s3_job_binary_with_extra = {
            'url': 's3://sahara-bucket/example.jar',
            'description': 'Test job binary',
            'extra': {
                'accesskey': cls.os_primary.credentials.username,
                'secretkey': cls.os_primary.credentials.password,
                'endpoint': 'localhost'
            }
        }
        # Create extra cls.swift_job_binary and cls.s3_job_binary variables
        # to use for comparison to job binary response body
        # because response body has no 'extra' field.
        cls.swift_job_binary = cls.swift_job_binary_with_extra.copy()
        del cls.swift_job_binary['extra']
        cls.s3_job_binary = cls.s3_job_binary_with_extra.copy()
        del cls.s3_job_binary['extra']

        name = data_utils.rand_name('sahara-internal-job-binary')
        cls.job_binary_data = 'Some script may be data'
        if not CONF.data_processing.use_api_v2:
            job_binary_internal = (
                cls.create_job_binary_internal(name, cls.job_binary_data))

            cls.internal_db_job_binary = {