summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-02-28 09:49:39 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-02-28 09:49:39 -0500
commiteca2d2496bc35a77fccceda71d449bcde056841f (patch)
tree8dcbafa89201e01c45ef42a56e9e972e1a64ef87 /roles/lib_openshift/src
parent05cad0edaf365e5080b54d48ceb3f75396b78e4e (diff)
downloadopenshift-eca2d2496bc35a77fccceda71d449bcde056841f.tar.gz
openshift-eca2d2496bc35a77fccceda71d449bcde056841f.tar.bz2
openshift-eca2d2496bc35a77fccceda71d449bcde056841f.tar.xz
openshift-eca2d2496bc35a77fccceda71d449bcde056841f.zip
Updating delete/recreate with replace --force.
Diffstat (limited to 'roles/lib_openshift/src')
-rw-r--r--roles/lib_openshift/src/class/oc_route.py12
1 files changed, 4 insertions, 8 deletions
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 '''