From d3d8b624e4f7056910f2639f2ed9f5e66a79307f Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Mon, 11 Sep 2017 12:37:22 +0800 Subject: leverage LFID authentication to pod creation only valid linux foundation user is allowed to create the new pod add owner field in pods to track the pod creator Change-Id: Icada07152069f7c826bfa6122cb86db8c4e3bf68 Signed-off-by: SerenaFeng --- utils/test/testapi/opnfv_testapi/resources/handlers.py | 1 + utils/test/testapi/opnfv_testapi/resources/pod_models.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'utils/test/testapi/opnfv_testapi/resources') diff --git a/utils/test/testapi/opnfv_testapi/resources/handlers.py b/utils/test/testapi/opnfv_testapi/resources/handlers.py index 757c81753..8e5dab235 100644 --- a/utils/test/testapi/opnfv_testapi/resources/handlers.py +++ b/utils/test/testapi/opnfv_testapi/resources/handlers.py @@ -75,6 +75,7 @@ class GenericApiHandler(web.RequestHandler): @web.asynchronous @gen.coroutine + @check.is_authorized @check.valid_token @check.no_body @check.miss_fields diff --git a/utils/test/testapi/opnfv_testapi/resources/pod_models.py b/utils/test/testapi/opnfv_testapi/resources/pod_models.py index 2c3ea978b..415d3d66b 100644 --- a/utils/test/testapi/opnfv_testapi/resources/pod_models.py +++ b/utils/test/testapi/opnfv_testapi/resources/pod_models.py @@ -29,13 +29,14 @@ class PodCreateRequest(models.ModelBase): class Pod(models.ModelBase): def __init__(self, name='', mode='', details='', - role="", _id='', create_date=''): + role="", _id='', create_date='', owner=''): self.name = name self.mode = mode self.details = details self.role = role self._id = _id self.creation_date = create_date + self.owner = owner @swagger.model() -- cgit 1.2.3-korg