Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion openshift/helper/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,12 @@ def get_object(self, name, namespace=None):

def patch_object(self, name, namespace, k8s_obj):
self.logger.debug('Starting patch object')
empty_status = self.properties['status']['class']()

if 'status' in self.properties['status']:
empty_status = self.properties['status']['class']()
else:
empty_status = {}

k8s_obj.status = empty_status
k8s_obj.metadata.resource_version = None
self.__remove_creation_timestamps(k8s_obj)
Expand Down Expand Up @@ -499,6 +504,8 @@ def _wait_for_response(self, name, namespace, action):
if action == 'delete':
if not obj:
break
elif obj and not hasattr(obj, 'status'):
break
elif obj and obj.status and hasattr(obj.status, 'phase'):
if obj.status.phase == 'Active':
break
Expand Down