Service Instance Update #61
1 changed files with 14 additions and 0 deletions
|
@ -651,6 +651,20 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
||||||
spec.pop("writeConnectionSecretToRef", None)
|
spec.pop("writeConnectionSecretToRef", None)
|
||||||
return spec
|
return spec
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def spec_object(self):
|
||||||
|
"""Dynamically generated CRD object."""
|
||||||
|
return self.context.django_model(
|
||||||
|
name=self.name,
|
||||||
|
organization=self.organization,
|
||||||
|
context=self.context,
|
||||||
|
spec=self.spec,
|
||||||
|
# We pass -1 as ID in order to make it clear that a) this object exists (remotely),
|
||||||
|
# and b) it’s not a normal database object. This allows us to treat e.g. update
|
||||||
|
# forms differently from create forms.
|
||||||
|
pk=-1,
|
||||||
|
)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def status_conditions(self):
|
def status_conditions(self):
|
||||||
if not self.kubernetes_object:
|
if not self.kubernetes_object:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue