@@ -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