Trigger subscription in nslcm.
[vfc/nfvo/lcm.git] / lcm / ns_vnfs / tests / const.py
1 # Copyright 2018 ZTE Corporation.
2 #
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
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
15 GRANT_DATA = {
16     'vnfInstanceId': '1',
17     'vnfLcmOpOccId': '2',
18     'vnfdId': '3',
19     'flavourId': '4',
20     'operation': 'INSTANTIATE',
21     'isAutomaticInvocation': True,
22     'instantiationLevelId': '5',
23     'addResources': [
24         {
25             'id': '1',
26             'type': 'COMPUTE',
27             'vduId': '2',
28             'resourceTemplateId': '3',
29             'resourceTemplate': {
30                 'vimConnectionId': '4',
31                 'resourceProviderId': '5',
32                 'resourceId': '6',
33                 'vimLevelResourceType': '7'
34             }
35         }
36     ],
37     'placementConstraints': [
38         {
39             'affinityOrAntiAffinity': 'AFFINITY',
40             'scope': 'NFVI_POP',
41             'resource': [
42                 {
43                     'idType': 'RES_MGMT',
44                     'resourceId': '1',
45                     'vimConnectionId': '2',
46                     'resourceProviderId': '3'
47                 }
48             ]
49         }
50     ],
51     'vimConstraints': [
52         {
53             'sameResourceGroup': True,
54             'resource': [
55                 {
56                     'idType': 'RES_MGMT',
57                     'resourceId': '1',
58                     'vimConnectionId': '2',
59                     'resourceProviderId': '3'
60                 }
61             ]
62         }
63     ],
64     'additionalParams': {},
65     '_links': {
66         'vnfLcmOpOcc': {
67             'href': '1'
68         },
69         'vnfInstance': {
70             'href': '2'
71         }
72     }
73 }
74
75 VNF_LCM_OP_OCC_NOTIFICATION_DATA = {
76     'id': 'string',
77     'notificationType': 'VnfLcmOperationOccurrenceNotification',
78     'subscriptionId': 'string',
79     'timeStamp': 'string',
80     'notificationStatus': 'START',
81     'operationState': 'STARTING',
82     'vnfInstanceId': 'string',
83     'operation': 'INSTANTIATE',
84     'isAutomaticInvocation': True,
85     'vnfLcmOpOccId': 'string',
86     'affectedVnfcs': [{
87         'id': 'string',
88         'vduId': 'string',
89         'changeType': 'ADDED',
90         'computeResource': {
91             'vimConnectionId': 'string',
92             'resourceProviderId': 'string',
93             'resourceId': 'string',
94             'vimLevelResourceType': 'string'
95         },
96         'metadata': {},
97         'affectedVnfcCpIds': [],
98         'addedStorageResourceIds': [],
99         'removedStorageResourceIds': [],
100     }],
101     'affectedVirtualLinks': [{
102         'id': 'string',
103         'virtualLinkDescId': 'string',
104         'changeType': 'ADDED',
105         'networkResource': {
106             'vimConnectionId': 'string',
107             'resourceProviderId': 'string',
108             'resourceId': 'string',
109             'vimLevelResourceType': 'network',
110         }
111     }],
112     'affectedVirtualStorages': [{
113         'id': 'string',
114         'virtualStorageDescId': 'string',
115         'changeType': 'ADDED',
116         'storageResource': {
117             'vimConnectionId': 'string',
118             'resourceProviderId': 'string',
119             'resourceId': 'string',
120             'vimLevelResourceType': 'network',
121         },
122         'metadata': {}
123     }],
124     'changedInfo': {
125         'vnfInstanceName': 'string',
126         'vnfInstanceDescription': 'string',
127         'vnfConfigurableProperties': {
128             'additionalProp1': 'string',
129             'additionalProp2': 'string',
130             'additionalProp3': 'string'
131         },
132         'metadata': {
133             'additionalProp1': 'string',
134             'additionalProp2': 'string',
135             'additionalProp3': 'string'
136         },
137         'extensions': {
138             'additionalProp1': 'string',
139             'additionalProp2': 'string',
140             'additionalProp3': 'string'
141         },
142         'vimConnectionInfo': [{
143             'id': 'string',
144             'vimId': 'string',
145             'vimType': 'string',
146             'interfaceInfo': {
147                 'additionalProp1': 'string',
148                 'additionalProp2': 'string',
149                 'additionalProp3': 'string'
150             },
151             'accessInfo': {
152                 'additionalProp1': 'string',
153                 'additionalProp2': 'string',
154                 'additionalProp3': 'string'
155             },
156             'extra': {
157                 'additionalProp1': 'string',
158                 'additionalProp2': 'string',
159                 'additionalProp3': 'string'
160             }
161         }],
162         'vnfPkgId': 'string',
163         'vnfdId': 'string',
164         'vnfProvider': 'string',
165         'vnfProductName': 'string',
166         'vnfSoftwareVersion': 'string',
167         'vnfdVersion': 'string'
168     },
169     'changedExtConnectivity': [{
170         'id': 'string',
171         'resourceHandle': {
172             'vimConnectionId': 'string',
173             'resourceProviderId': 'string',
174             'resourceId': 'string',
175             'vimLevelResourceType': 'string'
176         },
177         'extLinkPorts': [{
178             'id': 'string',
179             'resourceHandle': {
180                 'vimConnectionId': 'string',
181                 'resourceProviderId': 'string',
182                 'resourceId': 'string',
183                 'vimLevelResourceType': 'string'
184             },
185             'cpInstanceId': 'string'
186         }]
187     }],
188     'error': {
189         'type': 'string',
190         'title': 'string',
191         'status': 0,
192         'detail': 'string',
193         'instance': 'string'
194     },
195     '_links': {
196         'vnfInstance': {'href': 'string'},
197         'subscription': {'href': 'string'},
198         'vnfLcmOpOcc': {'href': 'string'}
199     }
200 }
201
202 VNF_IDENTIFIER_CREATION_NOTIFICATION_DATA = {
203     'id': 'Identifier of this notification',
204     'notificationType': 'VnfIdentifierCreationNotification',
205     'subscriptionId': 'Identifier of the subscription',
206     'timeStamp': '2018-9-12T00:00:00',
207     'vnfInstanceId': '2',
208     '_links': {
209         'vnfInstance': {'href': 'URI of the referenced resource'},
210         'subscription': {'href': 'URI of the referenced resource'},
211         'vnfLcmOpOcc': {'href': 'URI of the referenced resource'}
212     }
213 }
214
215 VNF_IDENTIFIER_DELETION_NOTIFICATION_DATA = {
216     'id': 'Identifier of this notification',
217     'notificationType': 'VnfIdentifierDeletionNotification',
218     'subscriptionId': 'Identifier of the subscription',
219     'timeStamp': '2018-9-12T00:00:00',
220     'vnfInstanceId': '2',
221     '_links': {
222         'vnfInstance': {'href': 'URI of the referenced resource'},
223         'subscription': {'href': 'URI of the referenced resource'},
224         'vnfLcmOpOcc': {'href': 'URI of the referenced resource'}
225     }
226 }