diff --git a/Containerfile b/Containerfile index a5479aa..8da2b5b 100644 --- a/Containerfile +++ b/Containerfile @@ -36,10 +36,7 @@ RUN dnf --nodocs --setopt install_weak_deps=false -y install \ && dnf clean all # TODO - this will be removed once we ship corgi_bindings to pypi -RUN pip install -e "${CORGI_BINDINGS_GITLAB_INTERNAL}#egg=corgi_bindings" - -ENV CORGI_API_URL=https://corgi-stage.prodsec.redhat.com -ENV OSIDB_API_URL=https://osidb.prodsec.redhat.com +RUN pip install pip install -e "git+https://github.com/RedHatProductSecurity/component-registry-bindings#egg=component_registry_bindings" WORKDIR /opt/app-root/src/ diff --git a/griffon/__init__.py b/griffon/__init__.py index cc812e9..eadb2e8 100644 --- a/griffon/__init__.py +++ b/griffon/__init__.py @@ -4,7 +4,7 @@ from configparser import ConfigParser from functools import partial, wraps -import corgi_bindings +import component_registry_bindings import osidb_bindings from rich.logging import RichHandler @@ -50,7 +50,9 @@ class CorgiService: def create_session(): """init corgi session""" try: - return corgi_bindings.new_session(corgi_server_uri=CORGI_API_URL) + return component_registry_bindings.new_session( + component_registry_server_uri=CORGI_API_URL + ) except: # noqa console.log(f"{CORGI_API_URL} is not accessible.") exit(1) @@ -58,12 +60,16 @@ def create_session(): @staticmethod def get_component_types(): """get component type enum""" - return corgi_bindings.bindings.python_client.models.component_type_enum.ComponentTypeEnum + return ( + component_registry_bindings.bindings.python_client.models.component_type_enum.ComponentTypeEnum # noqa + ) @staticmethod def get_component_namespaces(): """get component namespaces enum""" - return corgi_bindings.bindings.python_client.models.namespace_enum.NamespaceEnum + return ( + component_registry_bindings.bindings.python_client.models.namespace_enum.NamespaceEnum + ) @staticmethod def get_component_arches(): diff --git a/tox.ini b/tox.ini index 2fb27d1..b56f4eb 100644 --- a/tox.ini +++ b/tox.ini @@ -13,6 +13,7 @@ passenv = deps = -rrequirements/test.txt commands = + pip install pip install -e "git+https://github.com/RedHatProductSecurity/component-registry-bindings#egg=component_registry_bindings" pytest {posargs} [flake8]