1 # Copyright (C) 2021 Wind River Systems, Inc.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 from flask_restx import Namespace, fields
20 api = Namespace("Ocloud", description='Ocloud related operations.')
22 ocloud_list = api.model(
25 'oCloudId': fields.String(required=True),
26 'globalCloudId': fields.String,
27 'name': fields.String,
28 'description': fields.String,
29 'infrastructureManagementServiceEndpoint': fields.String,
34 class ResourceTypeDTO:
37 "ResourceType", description='Resource type related operations.')
39 resource_type_get = api.model(
40 "Get ResourceType object",
42 'resourceTypeId': fields.String(required=True,
43 description='Resource type ID'),
44 'name': fields.String,
45 'vendor': fields.String,
46 'version': fields.String,
47 'description': fields.String,
52 class ResourcePoolDTO:
55 "ResourcePool", description='Resource pool related operations.')
57 resource_pool_get = api.model(
58 "Get ResourcePool object",
60 'resourcePoolId': fields.String(required=True,
61 description='Resource pool ID'),
62 'name': fields.String,
63 'globalLocationId': fields.String,
64 'location': fields.String,
65 'description': fields.String,
72 api = Namespace("Resource", description='Resource related operations.')
74 resource_list = api.model(
75 "List Resource object",
77 'resourceId': fields.String(required=True,
78 description='Resource ID'),
79 'resourceTypeId': fields.String,
80 'resourcePoolId': fields.String,
81 'parentId': fields.String,
82 'description': fields.String,
86 resource_get = api.model(
87 "Get Resource object",
89 'resourceId': fields.String(required=True,
90 description='Resource ID'),
91 'resourceTypeId': fields.String,
92 'resourcePoolId': fields.String,
93 'parentId': fields.String,
94 'description': fields.String,
99 class DeploymentManagerDTO:
101 api = Namespace("DeploymentManager",
102 description='Deployment manager related operations.')
104 deployment_manager_get = api.model(
105 "Get DeploymentManager object",
107 'deploymentManagerId': fields.String(
109 description='Deployment manager ID'),
110 'name': fields.String,
111 'description': fields.String,
112 'deploymentManagementServiceEndpoint': fields.String,
113 'supportedLocations': fields.String,
114 'capabilities': fields.String,
115 'capacity': fields.String,
120 class SubscriptionDTO:
123 "Subscription", description='Subscription related operations.')
125 subscription_get = api.model(
126 "Get Subscription object",
128 'subscriptionId': fields.String(required=True,
129 description='Subscription ID'),
130 'callback': fields.String,
131 'consumerSubscriptionId': fields.String,
132 'filter': fields.String,