Skip to content
This repository has been archived by the owner on Jan 19, 2018. It is now read-only.

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrage committed Aug 4, 2016
1 parent 91386b0 commit 8ff0186
Show file tree
Hide file tree
Showing 9 changed files with 702 additions and 921 deletions.
1 change: 1 addition & 0 deletions atomicapp/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
PROVIDER_CA_KEY = "provider-cafile"

K8S_DEFAULT_API = "http://localhost:8080"
OC_DEFAULT_API = "http://localhost:8443"

# Persistent Storage Formats
PERSISTENT_STORAGE_FORMAT = ["ReadWriteOnce", "ReadOnlyMany", "ReadWriteMany"]
Expand Down
4 changes: 4 additions & 0 deletions atomicapp/providers/lib/kubeshift/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"""

from atomicapp.providers.lib.kubeshift.kubernetes import KubeKubernetesClient
from atomicapp.providers.lib.kubeshift.openshift import KubeOpenshiftClient
from atomicapp.providers.lib.kubeshift.exceptions import KubeClientError
from atomicapp.constants import LOGGER_DEFAULT
import logging
Expand All @@ -41,6 +42,9 @@ def __init__(self, config, provider):
if provider is "kubernetes":
self.connection = KubeKubernetesClient(config)
logger.debug("Using Kubernetes Provider KubeClient library")
elif provider is "openshift":
self.connection = KubeOpenshiftClient(config)
logger.debug("Using OpenShift Provider KubeClient library")
else:
raise KubeClientError("No provider by that name.")

Expand Down
Loading

0 comments on commit 8ff0186

Please sign in to comment.