diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-09-11 12:37:22 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2017-09-12 14:23:18 +0800 |
commit | d3d8b624e4f7056910f2639f2ed9f5e66a79307f (patch) | |
tree | 9e87f8818c1a1d0d0d0adc2600be2d70fc5921e5 /utils/test/testapi/opnfv_testapi/resources | |
parent | 02e8765db17f2a28ef04aa28d10a3b28ad5eeb3f (diff) |
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 <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/resources')
-rw-r--r-- | utils/test/testapi/opnfv_testapi/resources/handlers.py | 1 | ||||
-rw-r--r-- | utils/test/testapi/opnfv_testapi/resources/pod_models.py | 3 |
2 files changed, 3 insertions, 1 deletions
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() |