MCPcopy Index your code
hub / github.com/kubernetes-client/python / get

Method get

kubernetes/base/dynamic/resource.py:175–185  ·  view source on GitHub ↗
(self, body, name=None, namespace=None, **kwargs)

Source from the content-addressed store, hash-verified

173 }
174
175 def get(self, body, name=None, namespace=None, **kwargs):
176 if name:
177 raise ValueError('Operations on ResourceList objects do not support the `name` argument')
178 resource_list = self._items_to_resources(body)
179 response = copy.deepcopy(body)
180
181 response['items'] = [
182 item['resource'].get(name=item['name'], namespace=item['namespace'] or namespace, **kwargs).to_dict()
183 for item in resource_list['items']
184 ]
185 return ResourceInstance(self, response)
186
187 def delete(self, body, name=None, namespace=None, **kwargs):
188 if name:

Callers 6

base_resourceMethod · 0.45
_items_to_resourcesMethod · 0.45
_item_to_resourceMethod · 0.45
createMethod · 0.45
__getitem__Method · 0.45
__getattr__Method · 0.45

Calls 3

_items_to_resourcesMethod · 0.95
ResourceInstanceClass · 0.85
to_dictMethod · 0.45

Tested by

no test coverage detected