From ae86aeae248ba6af94588c674ff625362a7eee28 Mon Sep 17 00:00:00 2001 From: Marshall Margenau Date: Thu, 30 Nov 2017 15:49:03 -0600 Subject: [PATCH] fix(api): Update old endpoint to /validatedesign - Updating old /validate endpoints to reference the new endpoint at /validatedesign. - Update docs to reflect /validatedesign and fix error in description. Change-Id: Ie1fa4e4584c81373fe193b2b2f83cd96ff571437 --- armada/api/server.py | 1 - armada/common/client.py | 2 +- armada/common/policies/service.py | 2 +- docs/source/operations/guide-api.rst | 6 +++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/armada/api/server.py b/armada/api/server.py index 9883a0ee..d0e09a5f 100644 --- a/armada/api/server.py +++ b/armada/api/server.py @@ -64,7 +64,6 @@ def create(enable_middleware=CONF.middleware): ('status', Status()), ('tests', Tests()), ('test/{release}', Test()), - ('validate', Validate()), ('validatedesign', Validate()), ) diff --git a/armada/common/client.py b/armada/common/client.py index 21217b15..a074ffb0 100644 --- a/armada/common/client.py +++ b/armada/common/client.py @@ -53,7 +53,7 @@ class ArmadaClient(object): def post_validate(self, manifest=None): - endpoint = self._set_endpoint('1.0', 'validate') + endpoint = self._set_endpoint('1.0', 'validatedesign') # TODO(sh8121att) Look to update the UCP convention to # allow a list of hrefs req_body = {'href': manifest} diff --git a/armada/common/policies/service.py b/armada/common/policies/service.py index 5bb7d363..4b8bffd4 100644 --- a/armada/common/policies/service.py +++ b/armada/common/policies/service.py @@ -25,7 +25,7 @@ armada_policies = [ name=base.ARMADA % 'validate_manifest', check_str=base.RULE_ADMIN_REQUIRED, description='validate installed manifest', - operations=[{'path': '/api/v1.0/validate/', 'method': 'POST'}]), + operations=[{'path': '/api/v1.0/validatedesign/', 'method': 'POST'}]), policy.DocumentedRuleDefault( name=base.ARMADA % 'test_release', check_str=base.RULE_ADMIN_REQUIRED, diff --git a/docs/source/operations/guide-api.rst b/docs/source/operations/guide-api.rst index b44cf649..0c693323 100644 --- a/docs/source/operations/guide-api.rst +++ b/docs/source/operations/guide-api.rst @@ -113,14 +113,14 @@ Unable to Authorize or Permission Failed to perform action -GET ``/validate`` +POST ``/validatedesign`` ----------------- Summary +++++++ -Get tiller releases +Validates Armada manifest Request @@ -133,7 +133,7 @@ Responses **200** ^^^^^^^ -obtain all running releases +obtain valid status true/false **Example:**