Service Instance Update #61

Merged
rixx merged 12 commits from 29-service-instance-update into main 2025-05-21 07:39:18 +00:00
Showing only changes of commit 857105b01f - Show all commits

View file

@ -513,6 +513,19 @@ class ServiceInstance(ServalaModelMixin, models.Model):
class urls(urlman.Urls):
base = "{self.organization.urls.instances}{self.name}/"
update = "{base}update/"
def _clear_kubernetes_caches(self):
"""Clears cached properties that depend on Kubernetes state."""
attrs = self.__dict__.keys()
if "kubernetes_object" in attrs:
del self.kubernetes_object
if "spec" in attrs:
del self.spec
if "status_conditions" in attrs:
del self.status_conditions
if "connection_credentials" in attrs:
del self.connection_credentials
@classmethod
def create_instance(cls, name, organization, context, created_by, spec_data):