Browse Source

Make slashes optional on tenant & instances routes

Change-Id: I57c5ee275c0521ed1820e0a91faa04bc54b041ac
Blake Covarrubias 2 years ago
parent
commit
b38b97f446
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      mors/mors_wsgi.py

+ 3
- 4
mors/mors_wsgi.py View File

@@ -43,8 +43,7 @@ app.json_encoder = CustomJSONEncoder
43 43
 lease_manager = None
44 44
 
45 45
 @enforce(required=['admin'])
46
-@app.route("/v1/tenant", methods=['GET'])
47
-@app.route("/v1/tenant/", methods=['GET'])
46
+@app.route("/v1/tenant/", methods=['GET'], strict_slashes=False)
48 47
 @error_handler
49 48
 def get_all_tenants():
50 49
     all_tenants = lease_manager.get_tenant_leases(get_context())
@@ -81,10 +80,10 @@ def delete_tenant_lease(tenant_id):
81 80
     lease_manager.delete_tenant_lease(get_context(), tenant_id)
82 81
     return jsonify({'success': True}), 200, {'ContentType': 'application/json'}
83 82
 
84
-#-- Instnace - tenant related
83
+#-- Instance - tenant related
85 84
 
86 85
 @enforce(required=['_member_'])
87
-@app.route("/v1/tenant/<tenant_id>/instances/", methods=['GET'])
86
+@app.route("/v1/tenant/<tenant_id>/instances/", methods=['GET'], strict_slashes=False)
88 87
 @error_handler
89 88
 def get_tenant_and_instances(tenant_id):
90 89
     instances = lease_manager.get_tenant_and_associated_instance_leases(get_context(), tenant_id)

Loading…
Cancel
Save