Beispiel #1
0
import pnc_cli.user_config as uc
import requests

api_client = uc.user.get_api_client()

# BuildConfigurations
configs_api = BuildconfigurationsApi(api_client)
sets_api = BuildconfigurationsetsApi(api_client)

envs_api = EnvironmentsApi(api_client)

projects_api = ProjectsApi(api_client)

# Product related APIs
products_api = ProductsApi(api_client)
versions_api = ProductversionsApi(api_client)
milestones_api = ProductmilestonesApi(api_client)
releases_api = ProductreleasesApi(api_client)

# Build Configuration Set Records
bcsr_api = BuildconfigsetrecordsApi(api_client)

# Build Records
records_api = BuildrecordsApi(api_client)
license_api = LicensesApi(api_client)

# Licenses API
licenses_api = LicensesApi(api_client)

# Running build records Api
running_api = RunningbuildrecordsApi(api_client)
import pnc_cli.common as common
import pnc_cli.cli_types as types
from pnc_cli import swagger_client
from pnc_cli import utils
from pnc_cli.swagger_client import BuildconfigurationsApi
from pnc_cli.swagger_client import EnvironmentsApi
from pnc_cli.swagger_client import ProductsApi
from pnc_cli.swagger_client import ProductversionsApi
from pnc_cli.swagger_client import ProjectsApi
import pnc_cli.user_config as uc

projects_api = ProjectsApi(uc.user.get_api_client())
configs_api = BuildconfigurationsApi(uc.user.get_api_client())
envs_api = EnvironmentsApi(uc.user.get_api_client())
versions_api = ProductversionsApi(uc.user.get_api_client())
products_api = ProductsApi(uc.user.get_api_client())


def create_build_conf_object(**kwargs):
    created_build_configuration = swagger_client.BuildConfigurationRest()
    for key, value in kwargs.items():
        setattr(created_build_configuration, str(key), value)
    return created_build_configuration


def get_build_configuration_id_by_name(name):
    """
    Returns the id of the build configuration matching name
    :param name: name of build configuration
    :return: id of the matching build configuration, or None if no match found
Beispiel #3
0
 def product_versions(self):
     if not self._product_versions:
         self._product_versions = ProductversionsApi(
             self.user.get_api_client())
     return self._product_versions