Missing callback in NST selection
[optf/osdf.git] / apps / nst / models / api / nstSelectionRequest.py
1 # -------------------------------------------------------------------------
2 #   Copyright (c) 2020 Huawei Intellectual Property
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15 #
16 # -------------------------------------------------------------------------
17 #
18
19 from osdf.models.api.common import OSDFModel
20 from schematics.types import BaseType
21 from schematics.types.compound import DictType
22 from schematics.types.compound import ModelType
23 from schematics.types import IntType
24 from schematics.types import StringType
25 from schematics.types import URLType
26
27
28 class RequestInfo(OSDFModel):
29     """Info for northbound request from client such as SO"""
30
31     transactionId = StringType(required=True)
32     requestId = StringType(required=True)
33     callbackUrl = URLType(required=True)
34     callbackHeader = DictType(BaseType)
35     sourceId = StringType(required=True)
36     timeout = IntType()
37
38
39 class NSTSelectionAPI(OSDFModel):
40     """Request for NST selection """
41
42     requestInfo = ModelType(RequestInfo, required=True)
43     serviceProfile = DictType(BaseType)