From eca2d2496bc35a77fccceda71d449bcde056841f Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Tue, 28 Feb 2017 09:49:39 -0500 Subject: Updating delete/recreate with replace --force. --- roles/lib_openshift/src/class/oc_route.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'roles/lib_openshift/src') diff --git a/roles/lib_openshift/src/class/oc_route.py b/roles/lib_openshift/src/class/oc_route.py index 33ffdcb66..3935525f1 100644 --- a/roles/lib_openshift/src/class/oc_route.py +++ b/roles/lib_openshift/src/class/oc_route.py @@ -55,14 +55,10 @@ class OCRoute(OpenShiftCLI): def update(self): '''update the object''' - # when the host attribute is being updated, we need to delete and recreate - if self.config.host != self.route.get_host(): - import time - self.delete() - time.sleep(3) - return self.create() - - return self._replace_content(self.kind, self.config.name, self.config.data) + return self._replace_content(self.kind, + self.config.name, + self.config.data, + force=(self.config.host != self.route.get_host())) def needs_update(self): ''' verify an update is needed ''' -- cgit v1.2.3