def setUpClass(cls): """Create class-wide variables.""" cls.cfg = config.get_config() cls.client = gen_python_client() configuration = Configuration() configuration.username = '******' configuration.password = '******' configuration.host = 'http://{}:24817'.format(socket.gethostname()) configuration.safe_chars_for_path_param = '/' cls.core_client = CoreApiClient(configuration)
def setUpClass(cls): """ Create all the client instances needed to communicate with Pulp. """ configuration = Configuration() configuration.username = '******' configuration.password = '******' configuration.host = 'http://pulp' configuration.safe_chars_for_path_param = '/' core_client = CoreApiClient(configuration) file_client = FileApiClient(configuration) migration_client = MigrationApiClient(configuration) # Create api clients for all resource types cls.file_repo_api = RepositoriesFileApi(file_client) cls.file_repo_versions_api = RepositoriesFileVersionsApi(file_client) cls.file_content_api = ContentFilesApi(file_client) cls.tasks_api = TasksApi(core_client) cls.migration_plans_api = MigrationPlansApi(migration_client)