Skip to content

Commit

Permalink
better UX for importin K8s and OpenShift backend
Browse files Browse the repository at this point in the history
  • Loading branch information
rpitonak committed Oct 17, 2018
1 parent bad1675 commit 8a86f22
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 15 deletions.
6 changes: 6 additions & 0 deletions conu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
DockerImage, S2IDockerImage, DockerImagePullPolicy, DockerImageViaArchiveFS
)

# k8s backend
from conu.backend.k8s.backend import K8sBackend, K8sCleanupPolicy

# OpenShift
from conu.backend.origin.backend import OpenshiftBackend

# utils
from conu.utils.filesystem import Directory
from conu.utils.probes import Probe, ProbeTimeout, CountExceeded
Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/k8s_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"""
import logging

from conu.backend.k8s.backend import K8sBackend
from conu import K8sBackend
from conu.backend.k8s.deployment import Deployment
from conu.utils import get_oc_api_token

Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples/k8s_pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import logging

from conu.backend.k8s.backend import K8sBackend
from conu.backend.docker.backend import DockerBackend
from conu import K8sBackend, \
DockerBackend
from conu.backend.k8s.pod import PodPhase
from conu.utils import get_oc_api_token

Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples/openshift/openshift_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import logging

from conu.backend.origin.backend import OpenshiftBackend
from conu.backend.docker.backend import DockerBackend
from conu import OpenshiftBackend, \
DockerBackend
from conu.backend.origin.registry import login_to_registry
from conu.utils import get_oc_api_token

Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples/openshift/openshift_s2i_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import logging

from conu.backend.origin.backend import OpenshiftBackend
from conu.backend.docker.backend import DockerBackend
from conu import OpenshiftBackend, \
DockerBackend
from conu.backend.origin.registry import login_to_registry
from conu.utils import get_oc_api_token

Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples/openshift/openshift_s2i_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import logging

from conu.backend.origin.backend import OpenshiftBackend
from conu.backend.docker.backend import DockerBackend
from conu import OpenshiftBackend, \
DockerBackend
from conu.backend.origin.registry import login_to_registry
from conu.utils import get_oc_api_token

Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples/openshift/openshift_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import logging

from conu.backend.origin.backend import OpenshiftBackend
from conu.backend.docker.backend import DockerBackend
from conu import OpenshiftBackend, \
DockerBackend
from conu.backend.origin.registry import login_to_registry
from conu.utils import get_oc_api_token

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import urllib3
import pytest

from conu import DockerBackend
from conu.backend.k8s.backend import K8sBackend, K8sCleanupPolicy
from conu import DockerBackend, \
K8sBackend, K8sCleanupPolicy
from conu.backend.k8s.pod import PodPhase
from conu.backend.k8s.service import Service
from conu.backend.k8s.deployment import Deployment
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_openshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import logging
import pytest

from conu.backend.origin.backend import OpenshiftBackend
from conu.backend.docker.backend import DockerBackend
from conu import OpenshiftBackend, \
DockerBackend
from conu.backend.origin.registry import login_to_registry
from conu.utils import get_oc_api_token, oc_command_exists, is_oc_cluster_running
from ..constants import CENTOS_MARIADB_10_2, CENTOS_PYTHON_3, MY_PROJECT, OC_CLUSTER_USER, \
Expand Down

0 comments on commit 8a86f22

Please sign in to comment.