openshift-client 2.0.5__tar.gz → 2.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {openshift_client-2.0.5 → openshift_client-2.0.6}/PKG-INFO +4 -3
  2. {openshift_client-2.0.5 → openshift_client-2.0.6}/README.md +1 -1
  3. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/__init__.py +1 -1
  4. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/action.py +1 -1
  5. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/base_verbs.py +24 -11
  6. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client.egg-info/PKG-INFO +4 -3
  7. {openshift_client-2.0.5 → openshift_client-2.0.6}/LICENSE +0 -0
  8. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/ansible.py +0 -0
  9. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/apiobject.py +0 -0
  10. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/config.py +0 -0
  11. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/context.py +0 -0
  12. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/decorators.py +0 -0
  13. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/model.py +0 -0
  14. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/naming.py +0 -0
  15. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/result.py +0 -0
  16. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/selector.py +0 -0
  17. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/status.py +0 -0
  18. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/test_apiobject.py +0 -0
  19. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/test_model.py +0 -0
  20. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/test_selector.py +0 -0
  21. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/test_util.py +0 -0
  22. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client/util.py +0 -0
  23. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client.egg-info/SOURCES.txt +0 -0
  24. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client.egg-info/dependency_links.txt +0 -0
  25. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client.egg-info/requires.txt +0 -0
  26. {openshift_client-2.0.5 → openshift_client-2.0.6}/packages/openshift_client.egg-info/top_level.txt +0 -0
  27. {openshift_client-2.0.5 → openshift_client-2.0.6}/pyproject.toml +0 -0
  28. {openshift_client-2.0.5 → openshift_client-2.0.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: openshift-client
3
- Version: 2.0.5
3
+ Version: 2.0.6
4
4
  Summary: OpenShift python client
5
5
  Author-email: Justin Pierce <jupierce@redhat.com>
6
6
  Maintainer-email: Brad Williams <brawilli@redhat.com>
@@ -216,6 +216,7 @@ Requires-Dist: six
216
216
  Requires-Dist: pyyaml
217
217
  Provides-Extra: ssh
218
218
  Requires-Dist: paramiko; extra == "ssh"
219
+ Dynamic: license-file
219
220
 
220
221
  # Openshift Python Client
221
222
 
@@ -806,7 +807,7 @@ Establishing explicit contexts within an application will override these environ
806
807
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_OC_PATH` - default path to use when invoking `oc`
807
808
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CONFIG_PATH` - default `--kubeconfig` argument
808
809
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_API_SERVER` - default `--server` argument
809
- - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CA_CERT_PATH` - default `--cacert` argument
810
+ - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CA_CERT_PATH` - default `--certificate-authority` argument
810
811
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_PROJECT` - default `--namespace` argument
811
812
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_OC_LOGLEVEL` - default `--loglevel` argument
812
813
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_SKIP_TLS_VERIFY` - default `--insecure-skip-tls-verify`
@@ -587,7 +587,7 @@ Establishing explicit contexts within an application will override these environ
587
587
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_OC_PATH` - default path to use when invoking `oc`
588
588
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CONFIG_PATH` - default `--kubeconfig` argument
589
589
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_API_SERVER` - default `--server` argument
590
- - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CA_CERT_PATH` - default `--cacert` argument
590
+ - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CA_CERT_PATH` - default `--certificate-authority` argument
591
591
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_PROJECT` - default `--namespace` argument
592
592
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_OC_LOGLEVEL` - default `--loglevel` argument
593
593
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_SKIP_TLS_VERIFY` - default `--insecure-skip-tls-verify`
@@ -12,7 +12,7 @@ from . import config
12
12
  from .ansible import ansible
13
13
 
14
14
  # Single source for module version
15
- __VERSION__ = '2.0.5'
15
+ __VERSION__ = '2.0.6'
16
16
 
17
17
  null = None # Allow scripts to specify null in object definitions
18
18
 
@@ -246,7 +246,7 @@ def oc_action(context, verb, cmd_args=None, all_namespaces=False, no_namespace=F
246
246
  cmds.append('--token={}'.format(context.get_token()))
247
247
 
248
248
  if context.get_ca_cert_path() is not None:
249
- cmds.append('--cacert={}'.format(context.get_ca_cert_path()))
249
+ cmds.append('--certificate-authority={}'.format(context.get_ca_cert_path()))
250
250
 
251
251
  if all_namespaces:
252
252
  cmds.append("--all-namespaces")
@@ -1,24 +1,25 @@
1
- from __future__ import print_function
2
1
  from __future__ import absolute_import
2
+ from __future__ import print_function
3
3
 
4
- import os
5
4
  import base64
6
5
  import io
6
+ import json
7
+ import os
7
8
  import sys
8
- import traceback
9
9
  import time
10
- import json
11
- import yaml
10
+ import traceback
11
+
12
12
  import six
13
+ import yaml
13
14
 
14
- from .selector import Selector, selector
15
+ from . import naming
16
+ from . import util
15
17
  from .action import oc_action
16
- from .context import cur_context, project, no_tracking
17
- from .result import Result
18
18
  from .apiobject import APIObject
19
+ from .context import cur_context, project, no_tracking
19
20
  from .model import Model, Missing, OpenShiftPythonException
20
- from . import util
21
- from . import naming
21
+ from .result import Result
22
+ from .selector import Selector, selector
22
23
 
23
24
 
24
25
  def eprint(*args, **kwargs):
@@ -86,6 +87,18 @@ def whoami(cmd_args=None):
86
87
  return r.out().strip()
87
88
 
88
89
 
90
+ def api_url(cmd_args=None):
91
+ """
92
+ :param cmd_args: An optional list of additional arguments to pass on the command line
93
+ :return: The current server's REST API url
94
+ """
95
+
96
+ r = Result("whoami")
97
+ r.add_action(oc_action(cur_context(), "whoami", cmd_args=['--show-server', cmd_args]))
98
+ r.fail_if("Unable to determine current server's REST API url")
99
+ return r.out().strip()
100
+
101
+
89
102
  def get_auth_token(cmd_args=None):
90
103
  """
91
104
  :param cmd_args: An optional list of additional arguments to pass on the command line
@@ -1059,7 +1072,7 @@ def build_imagestream_simple(imagestream_name,
1059
1072
 
1060
1073
  spec = {
1061
1074
  'lookupPolicy': {
1062
- 'local': local_lookup_policy
1075
+ 'local': local_lookup_policy
1063
1076
  }
1064
1077
  }
1065
1078
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: openshift-client
3
- Version: 2.0.5
3
+ Version: 2.0.6
4
4
  Summary: OpenShift python client
5
5
  Author-email: Justin Pierce <jupierce@redhat.com>
6
6
  Maintainer-email: Brad Williams <brawilli@redhat.com>
@@ -216,6 +216,7 @@ Requires-Dist: six
216
216
  Requires-Dist: pyyaml
217
217
  Provides-Extra: ssh
218
218
  Requires-Dist: paramiko; extra == "ssh"
219
+ Dynamic: license-file
219
220
 
220
221
  # Openshift Python Client
221
222
 
@@ -806,7 +807,7 @@ Establishing explicit contexts within an application will override these environ
806
807
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_OC_PATH` - default path to use when invoking `oc`
807
808
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CONFIG_PATH` - default `--kubeconfig` argument
808
809
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_API_SERVER` - default `--server` argument
809
- - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CA_CERT_PATH` - default `--cacert` argument
810
+ - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CA_CERT_PATH` - default `--certificate-authority` argument
810
811
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_PROJECT` - default `--namespace` argument
811
812
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_OC_LOGLEVEL` - default `--loglevel` argument
812
813
  - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_SKIP_TLS_VERIFY` - default `--insecure-skip-tls-verify`