aboutsummaryrefslogtreecommitdiffstats
path: root/keystone-moon/keystone/common/wsgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'keystone-moon/keystone/common/wsgi.py')
-rw-r--r--keystone-moon/keystone/common/wsgi.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/keystone-moon/keystone/common/wsgi.py b/keystone-moon/keystone/common/wsgi.py
index 0dee954b..8b99c87d 100644
--- a/keystone-moon/keystone/common/wsgi.py
+++ b/keystone-moon/keystone/common/wsgi.py
@@ -660,7 +660,8 @@ class RoutersBase(object):
get_action=None, head_action=None, get_head_action=None,
put_action=None, post_action=None, patch_action=None,
delete_action=None, get_post_action=None,
- path_vars=None, status=json_home.Status.STABLE):
+ path_vars=None, status=json_home.Status.STABLE,
+ new_path=None):
if get_head_action:
getattr(controller, get_head_action) # ensure the attribute exists
mapper.connect(path, controller=controller, action=get_head_action,
@@ -697,10 +698,10 @@ class RoutersBase(object):
resource_data = dict()
if path_vars:
- resource_data['href-template'] = path
+ resource_data['href-template'] = new_path or path
resource_data['href-vars'] = path_vars
else:
- resource_data['href'] = path
+ resource_data['href'] = new_path or path
json_home.Status.update_resource_data(resource_data, status)