Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
prep for move from corgi-bindings to component-registry-bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
JimFuller-RedHat committed Feb 16, 2023
1 parent 7896d5f commit ba0f567
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
5 changes: 1 addition & 4 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
14 changes: 10 additions & 4 deletions griffon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -50,20 +50,26 @@ 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)

@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():
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit ba0f567

Please sign in to comment.