Serialize body to raw dict so apiserver can handle it :param body: kubernetes resource body, current support: Union[Dict, ResourceInstance]
(self, body)
| 93 | return namespace |
| 94 | |
| 95 | def serialize_body(self, body): |
| 96 | """Serialize body to raw dict so apiserver can handle it |
| 97 | |
| 98 | :param body: kubernetes resource body, current support: Union[Dict, ResourceInstance] |
| 99 | """ |
| 100 | # This should match any `ResourceInstance` instances |
| 101 | if callable(getattr(body, 'to_dict', None)): |
| 102 | return body.to_dict() |
| 103 | return body or {} |
| 104 | |
| 105 | def get(self, resource, name=None, namespace=None, **kwargs): |
| 106 | path = resource.path(name=name, namespace=namespace) |