Пример #1
0
    def test_access_docker_resource_via_compute_profile(self):
        """@Test: Try to access docker compute resource via compute profile
        (1-Small) screen

        @Feature: Compute Resource

        @Assert: The Compute Resource created and opened successfully

        """
        name = gen_string('alpha')
        with Session(self.browser) as session:
            make_resource(
                session,
                name=name,
                provider_type=FOREMAN_PROVIDERS['docker'],
                parameter_list=[['URL', get_external_docker_url(), 'field']],
            )
            self.assertIsNotNone(self.compute_profile.select_resource(
                '1-Small', name, 'Docker'))
Пример #2
0
from random import randint, shuffle
from requests.exceptions import HTTPError
from robottelo import entities
from robottelo.common.constants import DOCKER_REGISTRY_HUB
from robottelo.common.decorators import (data, run_only_on, skip_if_bug_open,
                                         stubbed)
from robottelo.common.helpers import (
    get_external_docker_url,
    get_internal_docker_url,
    get_server_credentials,
)
from robottelo.test import APITestCase
# (too-many-public-methods) pylint:disable=R0904

DOCKER_PROVIDER = 'Docker'
EXTERNAL_DOCKER_URL = get_external_docker_url()
INTERNAL_DOCKER_URL = get_internal_docker_url()
STRING_TYPES = ['alpha', 'alphanumeric', 'cjk', 'utf8', 'latin1']


def _create_repository(prod_id, name=None, upstream_name=None):
    """Creates a Docker-based repository.

    :param str name: Name for the repository. If ``None`` then a random
        value will be generated.
    :param str upstream_name: A valid name for an existing Docker image.
        If ``None`` then defaults to ``busybox``.

    :return: A dictionary representing the created repository.

    """
Пример #3
0
from robottelo.cli.repository import Repository
from robottelo.common.constants import DOCKER_REGISTRY_HUB
from robottelo.common.decorators import (
    data,
    run_only_on,
    skip_if_bug_open,
    stubbed,
)
from robottelo.common.helpers import (
    get_external_docker_url,
    get_internal_docker_url,
)
from robottelo.test import CLITestCase
# (too-many-public-methods) pylint:disable=R0904

EXTERNAL_DOCKER_URL = get_external_docker_url()
INTERNAL_DOCKER_URL = get_internal_docker_url()
STRING_TYPES = ['alpha', 'alphanumeric', 'cjk', 'utf8', 'latin1']

REPO_CONTENT_TYPE = 'docker'
REPO_UPSTREAM_NAME = 'busybox'


def _make_docker_repo(product_id, name=None, upstream_name=None):
    """Creates a Docker-based repository.

    :param product_id: ID of the ``Product``.
    :param str name: Name for the repository. If ``None`` then a random
        value will be generated.
    :param str upstream_name: A valid name for an existing Docker image.
        If ``None`` then defaults to ``busybox``.