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

Method create

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

Source from the content-addressed store, hash-verified

248
249 #TODO(fabianvf): Determine proper way to handle differences between resources + subresources
250 def create(self, body=None, name=None, namespace=None, **kwargs):
251 name = name or body.get('metadata', {}).get('name')
252 body = self.parent.client.serialize_body(body)
253 if self.parent.namespaced:
254 namespace = self.parent.client.ensure_namespace(self.parent, namespace, body)
255 path = self.path(name=name, namespace=namespace)
256 return self.parent.client.request('post', path, body=body, **kwargs)
257
258 @property
259 def urls(self):

Callers

nothing calls this directly

Calls 5

serialize_bodyMethod · 0.80
ensure_namespaceMethod · 0.80
getMethod · 0.45
pathMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected