1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
17 # The variables that are used in the monitoring tests
18 db_vim_collection
= "vim_accounts"
19 vim_type
= "openstack"
20 ro_task_collection
= "ro_tasks"
21 plugin_name
= "rovim_openstack"
22 mac1_addr
= "d0:94:66:ed:fc:e2"
23 mac2_addr
= "fa:16:3e:0b:84:08"
24 ip1_addr
= "192.168.22.13"
25 vm1_id
= "ebd39f37-e607-4bce-9f10-ea4c5635f726"
26 vm2_id
= "f4404a39-51d5-4cf8-9058-95001e69fdb3"
27 vim1_id
= target_id
= "55b2219a-7bb9-4644-9612-980dada84e83"
28 vim2_id
= "77b2219a-8bb9-9644-9612-680dada84e83"
29 vim3_id
= "33b2219a-7bb9-4644-9612-280dada84e83"
30 vim4_id
= "f239ed93-756b-408e-89f8-fcbf47a9d8f7"
31 file_name
= "/app/osm_ro/certs/55b2219a-7bb9-4644-9612-980dada84e83:23242"
32 net1_id
= "21ea5d92-24f1-40ab-8d28-83230e277a49"
33 vnfr_id
= "35c034cc-8c5b-48c4-bfa2-17a71577ef19"
34 db_vim_cacert
= "/app/osm_ro/certs/55b2219a-7bb9-4644-9612-980dada84e83:23242/ca_cert"
37 vim_info_path
= "vdur.0.vim_info.vim:f239ed93-756b-408e-89f8-fcbf47a9d8f7"
39 "admin_state_up": "true",
40 "binding:host_id": "nfvisrv11",
41 "binding:profile": {},
42 "binding:vif_type": "ovs",
43 "binding:vnic_type": "normal",
44 "created_at": "2023-02-22T05:35:46Z",
46 deleted_externally
= {
47 "vim_status": "DELETED",
48 "vim_message": "Deleted externally",
53 interface_with_binding
= {
55 "physical_network": "physnet1",
56 "pci_slot": "0000:86:17.4",
58 "binding:vif_details": {
62 target_record
= "vnfrs:35c034cc-8c5b-48c4-bfa2-17a71577ef19:vdur.0.vim_info.vim:f239ed93-756b-408e-89f8-fcbf47a9d8f7"
63 target_record2
= "vnfrs:41e16909-a519-4897-b481-f386e5022425:vdur.0.vim_info.vim:f239ed93-756b-408e-89f8-fcbf47a9d8f7"
64 serialized_server_info
= "{admin_state_up: true, binding:host_id: nfvisrv11, binding:profile: {}, binding:vif_type: ovs, binding:vnic_type: normal, created_at: 2023-02-22T05:35:46Z}"
65 serialized_interface_info
= "{fixed_ips: [{ip_address: 192.168.22.13}], mac_address: 'd0:94:66:ed:fc:e2', network_id: 21ea5d92-24f1-40ab-8d28-83230e277a49}"
70 "refresh_image": "3600 * 10",
74 "database": {"driver": "mongo", "uri": "mongodb://mongo:27017", "name": "osm"},
75 "storage": {"driver": "None", "path": "/app/storage", "loglevel": "DEBUG"},
78 "vim_info": "{admin_state_up: true, allowed_address_pairs: [], 'binding:host_id': nfvisrv12, 'binding:profile': {}, 'binding:vif_details': {bridge_name: br-int, connectivity: l2, datapath_type: system, ovs_hybrid_plug: true, port_filter: true}, 'binding:vif_type': ovs, 'binding:vnic_type': normal,\n created_at: '2023-02-18T21:28:52Z', description: '', device_id: ebd39f37-e607-4bce-9f10-ea4c5635f726, device_owner: 'compute:nova', extra_dhcp_opts: [], fixed_ips: [{ip_address: 192.168.251.15, subnet_id: bf950890-8d50-40cc-81ba-afa35db69a19}], id: 4d081f50-e13a-4306-a67e-1edb28d76013,\n mac_address: 'fa:16:3e:85:6c:02', name: vdu-eth0, network_id: 327f5e8e-a383-47c9-80a3-ed45b71d24ca, port_security_enabled: true, project_id: 71c7971a7cab4b72bd5c10dbe6617f1e, revision_number: 4, security_groups: [1de4b2c2-e4be-4e91-985c-d887e2715949], status: ACTIVE,\n tags: [], tenant_id: 71c7971a7cab4b72bd5c10dbe6617f1e, updated_at: '2023-02-18T21:28:59Z'}\n",
79 "mac_address": "fa:16:3e:85:6c:02",
80 "vim_net_id": "327f5e8e-a383-47c9-80a3-ed45b71d24ca",
81 "vim_interface_id": "4d081f50-e13a-4306-a67e-1edb28d76013",
82 "compute_node": "nfvisrv12",
85 "ip_address": "192.168.251.15",
86 "mgmt_vnf_interface": True,
87 "mgmt_vdu_interface": True,
90 "mgmt_vdu_interface": True,
91 "mgmt_vnf_interface": True,
94 "fixed_ips": [{"ip_address": ip1_addr
}],
95 "mac_address": mac2_addr
,
96 "network_id": net1_id
,
102 "interfaces_backup": [
104 "vim_info": "{admin_state_up: true, allowed_address_pairs: [], 'binding:host_id': nfvisrv12, 'binding:profile': {}, 'binding:vif_details': {bridge_name: br-int, connectivity: l2, datapath_type: system, ovs_hybrid_plug: true, port_filter: true}, 'binding:vif_type': ovs, 'binding:vnic_type': normal,\n created_at: '2023-02-18T21:28:52Z', description: '', device_id: ebd39f37-e607-4bce-9f10-ea4c5635f726, device_owner: 'compute:nova', extra_dhcp_opts: [], fixed_ips: [{ip_address: 192.168.251.15, subnet_id: bf950890-8d50-40cc-81ba-afa35db69a19}], id: 4d081f50-e13a-4306-a67e-1edb28d76013,\n mac_address: 'fa:16:3e:85:6c:02', name: vdu-eth0, network_id: 327f5e8e-a383-47c9-80a3-ed45b71d24ca, port_security_enabled: true, project_id: 71c7971a7cab4b72bd5c10dbe6617f1e, revision_number: 4, security_groups: [1de4b2c2-e4be-4e91-985c-d887e2715949], status: ACTIVE,\n tags: [], tenant_id: 71c7971a7cab4b72bd5c10dbe6617f1e, updated_at: '2023-02-18T21:28:59Z'}\n",
105 "mac_address": "fa:16:3e:85:6c:02",
106 "vim_net_id": "327f5e8e-a383-47c9-80a3-ed45b71d24ca",
107 "vim_interface_id": "4d081f50-e13a-4306-a67e-1edb28d76013",
108 "compute_node": "nfvisrv12",
111 "ip_address": "192.168.251.15",
112 "mgmt_vnf_interface": True,
113 "mgmt_vdu_interface": True,
116 "vim_details": "{'OS-DCF:diskConfig': MANUAL, 'OS-EXT-AZ:availability_zone': nova, 'OS-EXT-SRV-ATTR:host': nfvisrv12, 'OS-EXT-SRV-ATTR:hypervisor_hostname': nfvisrv12, 'OS-EXT-SRV-ATTR:instance_name': instance-000400a6, 'OS-EXT-STS:power_state': 1, 'OS-EXT-STS:task_state': null,\n 'OS-EXT-STS:vm_state': active, 'OS-SRV-USG:launched_at': '2023-02-18T21:28:59.000000', 'OS-SRV-USG:terminated_at': null, accessIPv4: '', accessIPv6: '', addresses: {mgmtnet: [{'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:85:6c:02', 'OS-EXT-IPS:type': fixed, addr: 192.168.251.15,\n version: 4}]}, config_drive: '', created: '2023-02-18T21:28:54Z', flavor: {id: 367fc1eb-bd22-40f8-a519-ed2fb4e5976b, links: [{href: 'http://172.21.247.1:8774/flavors/367fc1eb-bd22-40f8-a519-ed2fb4e5976b', rel: bookmark}]}, hostId: e72dec159231b67a5d4fa37fae67e97051ce9aee003516dadb6a25e4,\n id: ebd39f37-e607-4bce-9f10-ea4c5635f726, image: {id: 919fc71a-6acd-4ee3-8123-739a9abbc2e7, links: [{href: 'http://172.21.247.1:8774/images/919fc71a-6acd-4ee3-8123-739a9abbc2e7', rel: bookmark}]}, key_name: null, links: [{href: 'http://172.21.247.1:8774/v2.1/servers/ebd39f37-e607-4bce-9f10-ea4c5635f726',\n rel: self}, {href: 'http://172.21.247.1:8774/servers/ebd39f37-e607-4bce-9f10-ea4c5635f726', rel: bookmark}], metadata: {}, name: test7-vnf-hackfest_basic-VM-000000, 'os-extended-volumes:volumes_attached': [], progress: 0, security_groups: [{name: default}],\n status: ACTIVE, tenant_id: 71c7971a7cab4b72bd5c10dbe6617f1e, updated: '2023-02-19T21:09:09Z', user_id: f043c84f940b4fc8a01a98714ea97c80}\n",
117 "vim_id": "ebd39f37-e607-4bce-9f10-ea4c5635f726",
118 "vim_message": "Interface 4d081f50-e13a-4306-a67e-1edb28d76013 status: DOWN",
119 "vim_status": "ACTIVE",
120 "vim_name": "test7-vnf-hackfest_basic-VM-000000",
123 "_id": "35c034cc-8c5b-48c4-bfa2-17a71577ef19",
124 "id": "35c034cc-8c5b-48c4-bfa2-17a71577ef19",
125 "nsr-id-ref": "ee46620f-cba3-4245-b8be-183ff483bb7e",
126 "created-time": 1676755692.20987,
127 "vnfd-ref": "hackfest_basic-vnf",
128 "vnfd-id": "f1401992-83f4-43cc-ac37-1ad7c1370d03",
129 "vim-account-id": vim4_id
,
133 "_id": "faa21fc1-7f27-4a95-93dd-87535ce6b59c",
134 "additionalParams": {
137 "member_vnf_index": "vnf",
138 "ns_id": "ee46620f-cba3-4245-b8be-183ff483bb7e",
140 "hackfest_basic-VM-0": {
142 "interfaces": {"vdu-eth0": {"name": "vdu-eth0"}},
143 "vdu_id": "hackfest_basic-VM",
146 "vdu_id": "hackfest_basic-VM",
147 "vim_account_id": vim4_id
,
148 "vnf_id": "35c034cc-8c5b-48c4-bfa2-17a71577ef19",
149 "vnfd_id": "f1401992-83f4-43cc-ac37-1ad7c1370d03",
150 "vnfd_ref": "hackfest_basic-vnf",
153 "affinity-or-anti-affinity-group-id": [],
155 "id": "faa21fc1-7f27-4a95-93dd-87535ce6b59c",
158 "external-connection-point-ref": "vnf-cp0-ext",
159 "internal-connection-point-ref": "vdu-eth0-int",
160 "mgmt-interface": True,
163 "ns-vld-id": "mgmtnet",
165 "compute_node": "nfvisrv12",
166 "ip-address": "192.168.251.15",
167 "mac-address": "fa:16:3e:85:6c:02",
172 "internal-connection-point": [
174 "connection-point-id": "vdu-eth0-int",
175 "id": "vdu-eth0-int",
176 "name": "vdu-eth0-int",
179 "ip-address": "192.168.251.15",
182 "vdu-id-ref": "hackfest_basic-VM",
183 "vdu-name": "hackfest_basic-VM",
184 "vim_info": {"vim:f239ed93-756b-408e-89f8-fcbf47a9d8f7": sample_vim_info
},
185 "virtual-storages": [
186 {"id": "hackfest_basic-VM-storage", "size-of-storage": "10"}
189 "vim-id": "ebd39f37-e607-4bce-9f10-ea4c5635f726",
190 "name": "test7-vnf-hackfest_basic-VM-000000",
193 "connection-point": [
195 "name": "vnf-cp0-ext",
196 "connection-point-id": "vdu-eth0-int",
197 "connection-point-vdu-id": "hackfest_basic-VM",
201 "ip-address": "192.168.251.15",
204 "created": 1676755692.21059,
205 "modified": 1676755692.21059,
206 "projects_read": ["9a61dad6cbc744879344e5b84d842578"],
207 "projects_write": ["9a61dad6cbc744879344e5b84d842578"],
208 "nsState": "INSTANTIATED",
214 "name": "openstackETSI1",
215 "vim_type": "openstack",
219 "name": "openstackETSI2",
220 "vim_type": "openstack",
225 "name": "openstackETSI1",
226 "vim_type": "openstack",
228 "vim_url": "http://172.21.223.1:5000/v3",
229 "vim_user": "myuser",
230 "vim_password": "mypassword",
231 "vim_tenant_name": "mytenant",
233 "created": 1675758291.0110583,
234 "modified": 1675758291.0110583,
235 "operationalState": "ENABLED",
236 "current_operation": None,
237 "detailed-status": "",
239 "schema_version": "1.11",
240 "admin": {"current_operation": 0},
243 "_id": "6659675b-b6a4-4c0c-ad40-47dae476a961:3",
244 "target_id": f
"vim:{vim1_id}",
247 "created_items": {"port:4d081f50-e13a-4306-a67e-1edb28d76013": True},
249 "vim_name": "test7-vnf-hackfest_basic-VM-0",
250 "vim_status": "ACTIVE",
254 "mac_address": "fa:16:3e:85:6c:02",
255 "vim_net_id": "327f5e8e-a383-47c9-80a3-ed45b71d24ca",
256 "vim_interface_id": "4d081f50-e13a-4306-a67e-1edb28d76013",
257 "compute_node": "nfvisrv12",
260 "ip_address": "192.168.251.15",
261 "mgmt_vnf_interface": True,
262 "mgmt_vdu_interface": True,
265 "interfaces_vim_ids": ["4d081f50-e13a-4306-a67e-1edb28d76013"],
267 "modified_at": 1676755752.49715,
268 "created_at": 1676755693.91547,
272 "action_id": "6659675b-b6a4-4c0c-ad40-47dae476a961",
273 "nsr_id": "ee46620f-cba3-4245-b8be-183ff483bb7e",
274 "task_id": "6659675b-b6a4-4c0c-ad40-47dae476a961:3",
278 "target_record": target_record
,
279 "mgmt_vnf_interface": 0,
284 "_id": "7b05fd30-f128-4486-a1ba-56fcf7387967:3",
285 "target_id": f
"vim:{vim2_id}",
289 "port:4d2faa64-3f10-42ec-a5db-0291600d0692": True,
292 "vim_name": "test7-vnf-hackfest_basic-VM-0",
293 "vim_status": "ACTIVE",
297 "mac_address": "fa:16:3e:2c:2d:21",
298 "vim_net_id": "327f5e8e-a383-47c9-80a3-ed45b71d24ca",
299 "vim_interface_id": "4d2faa64-3f10-42ec-a5db-0291600d0692",
300 "compute_node": "nfvisrv12",
303 "ip_address": "192.168.251.197",
304 "mgmt_vnf_interface": True,
305 "mgmt_vdu_interface": True,
308 "interfaces_vim_ids": ["4d2faa64-3f10-42ec-a5db-0291600d0692"],
310 "modified_at": 1676839542.4801,
311 "created_at": 1676839494.78525,
315 "action_id": "7b05fd30-f128-4486-a1ba-56fcf7387967",
316 "nsr_id": "ddf8c820-4cfa-47fb-8de3-e0afbe039efb",
317 "task_id": "7b05fd30-f128-4486-a1ba-56fcf7387967:3",
321 "target_record": "vnfrs:41e16909-a519-4897-b481-f386e5022425:vdur.0.vim_info.vim:f239ed93-756b-408e-89f8-fcbf47a9d8f7",
322 "mgmt_vnf_interface": 0,
327 "_id": "6659675b-b6a4-4c0c-ad40-47dae476a961:3",
328 "target_id": "vim:f239ed93-756b-408e-89f8-fcbf47a9d8f7",
331 "id": "4d081f50-e13a-4306-a67e-1edb28d76013",
332 "network_id": net1_id
,
333 "tenant_id": "34a71bb7d82f4ec691d8cc11045ae83e",
334 "mac_address": mac2_addr
,
335 "admin_state_up": True,
338 "device_owner": "compute:nova",
342 "id": "5d081f50-e13a-4306-a67e-1edb28d76013",
343 "network_id": net1_id
,
344 "tenant_id": "34a71bb7d82f4ec691d8cc11045ae83e",
345 "mac_address": mac2_addr
,
346 "admin_state_up": True,
349 "device_owner": "compute:nova",