#!/app/python3/bin/python3
import openshift as oc
import kubernetes
from kubernetes import client
from kubernetes.dynamic import DynamicClient
from openshift.helper.userpassauth import OCPLoginConfiguration
from getpass import getpass
import sys
password = getpass()
apihost = api
username = user
password = password
kubeConfig = OCPLoginConfiguration(ocp_username=username, ocp_password=password)
kubeConfig.host = apihost
kubeConfig.verify_ssl = True
kubeConfig.ssl_ca_cert = './ocp.pem' # use a certificate bundle for the TLS validation
#kubeConfig.verify_ssl = False
kubeConfig.get_token()
#print('Auth token: {0}'.format(kubeConfig.api_key))
#print('Token expires: {0}'.format(kubeConfig.api_key_expires))