Skip to content

Commit 5c112bc

Browse files
committed
Removing support for the 'export' verb since it has been deprecated
1 parent d1ceabc commit 5c112bc

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

ansible/rebuild_module.digest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9e3a2032926346b3a612b88a2b31945a -
1+
99af72adf07a64b3145f1d95b6e9f270 -

ansible/roles/openshift_client_python/library/openshift_client_python.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/openshift/selector.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,10 @@ def count_existing(self):
351351
"""
352352
return len(self._query_names())
353353

354-
def object_json(self, exportable=False, ignore_not_found=False):
354+
def object_json(self, ignore_not_found=False):
355355
"""
356356
Returns all objects selected by the receiver as a JSON string. If multiple objects are
357357
selected, an OpenShift List kind will be returned.
358-
:param exportable: Set to True if the export verb should be used.
359358
:param ignore_not_found: If True, no error will result if receiver tries to select objects which are not present
360359
:return: Returns all selected objects marshalled as an OpenShift JSON representation.
361360
"""
@@ -369,7 +368,7 @@ def object_json(self, exportable=False, ignore_not_found=False):
369368
"items": []
370369
})
371370

372-
verb = "export" if exportable else "get"
371+
verb = "get"
373372

374373
cmd_args = ["-o=json",
375374
self._selection_args()]
@@ -378,8 +377,7 @@ def object_json(self, exportable=False, ignore_not_found=False):
378377
cmd_args.append("--ignore-not-found")
379378

380379
r = Result(verb)
381-
r.add_action(oc_action(self.context, verb, all_namespaces=self.all_namespaces,
382-
cmd_args=cmd_args))
380+
r.add_action(oc_action(self.context, verb, all_namespaces=self.all_namespaces, cmd_args=cmd_args))
383381
r.fail_if("Unable to read object")
384382

385383
# --ignore-not-found returns an empty string instead of an error if nothing is found
@@ -393,16 +391,15 @@ def object_json(self, exportable=False, ignore_not_found=False):
393391

394392
return r.out()
395393

396-
def object(self, exportable=False, ignore_not_found=False):
394+
def object(self, ignore_not_found=False):
397395
"""
398396
Returns a single APIObject that represents the selected resource. If multiple
399397
resources are being selected an exception will be thrown (use objects() when
400398
there is a possibility of selecting multiple objects).
401-
:param exportable: Whether export should be used instead of get.
402399
:param ignore_not_found: If True and no object exists, None will be returned instead of an exception.
403400
:return: A Model of the selected resource.
404401
"""
405-
objs = self.objects(exportable)
402+
objs = self.objects()
406403
if len(objs) == 0:
407404
if ignore_not_found:
408405
return None
@@ -412,17 +409,16 @@ def object(self, exportable=False, ignore_not_found=False):
412409

413410
return objs[0]
414411

415-
def objects(self, exportable=False, ignore_not_found=True):
412+
def objects(self, ignore_not_found=True):
416413
"""
417414
Returns a python list of APIObject objects that represent the selected resources. An
418415
empty is returned if nothing is selected.
419-
:param exportable: Whether export should be used instead of get.
420416
:param ignore_not_found: If true, missing named resources will not raise an exception.
421417
:return: A list of Model objects representing the receiver's selected resources.
422418
"""
423419
from .apiobject import APIObject
424420

425-
obj = json.loads(self.object_json(exportable, ignore_not_found=ignore_not_found))
421+
obj = json.loads(self.object_json(ignore_not_found=ignore_not_found))
426422
return APIObject(obj).elements()
427423

428424
def start_build(self, cmd_args=None):

0 commit comments

Comments
 (0)