Skip to content

Commit 5eb4ee5

Browse files
author
lijianguo
committed
feat(controller):add drycc resource cmd
1 parent cfe2217 commit 5eb4ee5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rootfs/api/models/resource.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def unbind(self, *args, **kwargs):
131131
self._scheduler.servicecatalog.get_binding(self.app.id, self.name)
132132
self._scheduler.servicecatalog.delete_binding(self.app.id, self.name)
133133
self.binding = None
134+
self.data = {}
134135
self.save()
135136
except KubeException as e:
136137
raise ServiceUnavailable("Could not unbind resource {} for application {}".format(self.name, self.app_id)) from e # noqa
@@ -175,6 +176,7 @@ def retrieve(self, *args, **kwargs):
175176
self.app.id, self.name).json()
176177
self.status = resp_i.get('status', {}).\
177178
get('lastConditionState')
179+
self.options = resp_i.get('spec', {}).get('parameters', {})
178180
update_flag = True
179181
except KubeException as e:
180182
logger.info("retrieve instance info error: {}".format(e))
@@ -185,7 +187,6 @@ def retrieve(self, *args, **kwargs):
185187
self.app.id, self.name).json()
186188
self.binding = resp_b.get('status', {}).\
187189
get('lastConditionState')
188-
self.options = resp_b.get('spec', {}).get('parameters', {})
189190
update_flag = True
190191
secret_name = resp_b.get('spec', {}).get('secretName')
191192
if secret_name:

0 commit comments

Comments
 (0)