-
Notifications
You must be signed in to change notification settings - Fork 18
Records usage
This page details the Records-related endpoints of the SONATA Gatekeeper API.
Records are created or updated as a consequence of service instantiation, which creates or updates one record per each service and function instance.
Through this endpoint GET request, the Gatekeeper returns a JSON
formatted paginated list of service records.
- Request:
curl <base URL>/records/services -H 'authorization:bearer <token>'
- Response:
[
{
"created_at": "2017-08-30T14:34:43.512+00:00",
"descriptor_reference": "9df6a98f-9e11-4cb7-b3c0-b1375e7ca1a1",
"descriptor_version": "nsr-schema-01",
"forwarding_graphs": [
{
"constituent_vnfs": [
"vnf_vtc_test",
"vnf_vbar",
"vnf_vfoo"
],
"fg_id": "fg01",
"network_forwarding_paths": [
{
"connection_points": [
{
"connection_point_ref": "input",
"position": 1
},
{
"connection_point_ref": "vnf_vbar:input",
"position": 2
},
{
"connection_point_ref": "vnf_vbar:output",
"position": 3
},
{
"connection_point_ref": "vnf_vfoo:input",
"position": 4
},
{
"connection_point_ref": "vnf_vfoo:output",
"position": 5
},
{
"connection_point_ref": "output",
"position": 6
}
],
"fp_id": "fg01:fp01",
"policy": "none"
}
],
"number_of_endpoints": 2,
"number_of_virtual_links": 3
}
],
"network_functions": [
{
"vnfr_id": "27155554-02d7-46a9-a7bb-4f4162b3ac19"
},
{
"vnfr_id": "52f9e7e6-f2ca-4361-abcd-3c4e746e06b5"
}
],
"status": "normal operation",
"updated_at": "2017-08-30T14:34:43.512+00:00",
"uuid": "95e9b668-5726-4998-8ed4-d8d7e7fd2225",
"version": "1",
"virtual_links": [
{
"connection_points_reference": [
"vnf_vbar:mgmt",
"vnf_vfoo:mgmt",
"mgmt"
],
"connectivity_type": "E-LAN",
"id": "mgmt"
},
{
"connection_points_reference": [
"input",
"vnf_vbar:input"
],
"connectivity_type": "E-Line",
"id": "input-2-fw"
},
{
"connection_points_reference": [
"vnf_vbar:output",
"vnf_vfoo:input"
],
"connectivity_type": "E-Line",
"id": "vbar-2-vfoo"
},
{
"connection_points_reference": [
"vnf_vfoo:output",
"output"
],
"connectivity_type": "E-Line",
"id": "vfoo-2-out"
}
]
}
]
Through this endpoint GET request, the Gatekeeper returns a JSON
formatted paginated list of service records.
Note: this endpoint will soon become a request, like the service instantiation or termination requests.
- Request:
curl -X PUT <base URL>/records/services/<service uuid> -H 'authorization:bearer <token>' \
-d '{"nsd_id":<service uuid>,"latest_nsd_id":<latest service descriptor version>}'
- Response:
{
"created_at": "2017-08-29T11:04:48.100Z",
"id": "0da4fbc4-97bd-48ed-94ba-5ae4fd8fcb82",
"request_type": "UPDATE",
"service_instance_uuid": null,
"service_uuid": "e6d0fbd6-74be-43c6-959d-667f3ace1cb4",
"status": "NEW",
"updated_at": "2017-08-29T11:04:48.100Z"
}
This operation with the MANO Framework is asynchronous: the field status
is updated to INSTANTIATED
or ERROR
when the update is finished on the MANO Framework's side.
Through this endpoint GET request, the Gatekeeper returns the JSON
formatted service record.
- Request:
curl <base URL>/records/services/95e9b668-5726-4998-8ed4-d8d7e7fd2225 \
-H 'authorization:bearer <token>'
- Response:
{
"created_at": "2017-08-30T14:34:43.512+00:00",
"descriptor_reference": "9df6a98f-9e11-4cb7-b3c0-b1375e7ca1a1",
"descriptor_version": "nsr-schema-01",
"forwarding_graphs": [
{
"constituent_vnfs": [
"vnf_vtc_test",
"vnf_vbar",
"vnf_vfoo"
],
"fg_id": "fg01",
"network_forwarding_paths": [
{
"connection_points": [
{
"connection_point_ref": "input",
"position": 1
},
{
"connection_point_ref": "vnf_vbar:input",
"position": 2
},
{
"connection_point_ref": "vnf_vbar:output",
"position": 3
},
{
"connection_point_ref": "vnf_vfoo:input",
"position": 4
},
{
"connection_point_ref": "vnf_vfoo:output",
"position": 5
},
{
"connection_point_ref": "output",
"position": 6
}
],
"fp_id": "fg01:fp01",
"policy": "none"
}
],
"number_of_endpoints": 2,
"number_of_virtual_links": 3
}
],
"network_functions": [
{
"vnfr_id": "27155554-02d7-46a9-a7bb-4f4162b3ac19"
},
{
"vnfr_id": "52f9e7e6-f2ca-4361-abcd-3c4e746e06b5"
}
],
"status": "normal operation",
"updated_at": "2017-08-30T14:34:43.512+00:00",
"uuid": "95e9b668-5726-4998-8ed4-d8d7e7fd2225",
"version": "1",
"virtual_links": [
{
"connection_points_reference": [
"vnf_vbar:mgmt",
"vnf_vfoo:mgmt",
"mgmt"
],
"connectivity_type": "E-LAN",
"id": "mgmt"
},
{
"connection_points_reference": [
"input",
"vnf_vbar:input"
],
"connectivity_type": "E-Line",
"id": "input-2-fw"
},
{
"connection_points_reference": [
"vnf_vbar:output",
"vnf_vfoo:input"
],
"connectivity_type": "E-Line",
"id": "vbar-2-vfoo"
},
{
"connection_points_reference": [
"vnf_vfoo:output",
"output"
],
"connectivity_type": "E-Line",
"id": "vfoo-2-out"
}
]
}
Through this endpoint GET request, the Gatekeeper returns a JSON
formatted paginated list of function records.
- Request:
curl <base URL>/records/functions -H 'authorization:bearer <token>'
- Response:
[
{
"created_at": "2017-08-30T14:34:43.391+00:00",
"descriptor_reference": "6a15313f-cb0a-4540-baa2-77cc6b3f1010",
"descriptor_version": "vnfr-schema-01",
"status": "normal operation",
"updated_at": "2017-08-30T14:34:43.391+00:00",
"uuid": "27155554-02d7-46a9-a7bb-4f4162b3ac19",
"version": "2",
"virtual_deployment_units": [
{
"id": "vdu01",
"number_of_instances": 1,
"resource_requirements": {
"cpu": {
"vcpus": 1
},
"memory": {
"size": 512,
"size_unit": "MB"
},
"storage": {
"size": 1,
"size_unit": "GB"
}
},
"vdu_reference": "vfoo-vnf:vdu01",
"vm_image": "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img",
"vnfc_instance": [
{
"connection_points": [
{
"id": "eth0",
"interface": {
"address": "10.100.32.243",
"hardware_address": "fa:16:3e:2f:76:d4"
},
"type": "management"
},
{
"id": "eth1",
"interface": {
"address": "172.16.0.7",
"hardware_address": "fa:16:3e:57:50:e0",
"netmask": "255.255.255.248"
},
"type": "external"
},
{
"id": "eth2",
"interface": {
"address": "172.16.0.8",
"hardware_address": "fa:16:3e:cf:a5:4a",
"netmask": "255.255.255.248"
},
"type": "external"
},
{
"id": "eth3",
"interface": {
"address": "172.16.0.36",
"hardware_address": "fa:16:3e:6a:f3:a3",
"netmask": "255.255.255.248"
},
"type": "internal"
}
],
"id": "0",
"vc_id": "da65a620-1e1a-47f0-9bd3-f4b849fe3fbb",
"vim_id": "1111-22222222-33333333-4444"
}
]
},
{
"id": "vdu02",
"number_of_instances": 1,
"resource_requirements": {
"cpu": {
"vcpus": 1
},
"memory": {
"size": 512,
"size_unit": "MB"
},
"storage": {
"size": 1,
"size_unit": "GB"
}
},
"vdu_reference": "vfoo-vnf:vdu02",
"vm_image": "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img",
"vnfc_instance": [
{
"connection_points": [
{
"id": "eth0",
"interface": {
"address": "10.100.32.237",
"hardware_address": "fa:16:3e:ba:c0:9c"
},
"type": "management"
},
{
"id": "eth1",
"interface": {
"address": "172.16.0.35",
"hardware_address": "fa:16:3e:05:2e:d3",
"netmask": "255.255.255.248"
},
"type": "internal"
}
],
"id": "0",
"vc_id": "59d03f15-e2dd-432d-87ce-f7b73c3a71dd",
"vim_id": "1111-22222222-33333333-4444"
}
]
}
],
"virtual_links": [
{
"connection_points_reference": [
"vdu01:eth0",
"vdu02:eth0",
"mgmt"
],
"connectivity_type": "E-LAN",
"id": "mgmt"
},
{
"connection_points_reference": [
"vdu01:eth1",
"input"
],
"connectivity_type": "E-Line",
"id": "input"
},
{
"connection_points_reference": [
"vdu01:eth2",
"output"
],
"connectivity_type": "E-Line",
"id": "output"
},
{
"connection_points_reference": [
"vdu01:eth3",
"vdu02:eth1"
],
"connectivity_type": "E-LAN",
"id": "internal"
}
]
},
{
"created_at": "2017-08-30T14:34:43.445+00:00",
"descriptor_reference": "9df6a98f-9e11-4cb7-b3c0-b1375e7ca1a9",
"descriptor_version": "vnfr-schema-01",
"status": "normal operation",
"updated_at": "2017-08-30T14:34:43.445+00:00",
"uuid": "52f9e7e6-f2ca-4361-abcd-3c4e746e06b5",
"version": "2",
"virtual_deployment_units": [
{
"id": "vdu01",
"number_of_instances": 1,
"resource_requirements": {
"cpu": {
"vcpus": 1
},
"memory": {
"size": 512,
"size_unit": "MB"
},
"storage": {
"size": 1,
"size_unit": "GB"
}
},
"vdu_reference": "vbar-vnf:vdu01",
"vm_image": "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img",
"vnfc_instance": [
{
"connection_points": [
{
"id": "eth0",
"interface": {
"address": "10.100.32.233",
"hardware_address": "fa:16:3e:e2:0d:c9"
},
"type": "management"
},
{
"id": "eth1",
"interface": {
"address": "172.16.0.5",
"hardware_address": "fa:16:3e:26:1c:10",
"netmask": "255.255.255.248"
},
"type": "external"
},
{
"id": "eth2",
"interface": {
"address": "172.16.0.4",
"hardware_address": "fa:16:3e:44:74:b8",
"netmask": "255.255.255.248"
},
"type": "external"
}
],
"id": "0",
"vc_id": "8e2bec3f-3f71-4197-81d6-647928bb52cb",
"vim_id": "1111-22222222-33333333-4444"
}
]
}
],
"virtual_links": [
{
"connection_points_reference": [
"vdu01:eth0",
"mgmt"
],
"connectivity_type": "E-LAN",
"id": "mgmt"
},
{
"connection_points_reference": [
"vdu01:eth1",
"input"
],
"connectivity_type": "E-Line",
"id": "input"
},
{
"connection_points_reference": [
"vdu01:eth2",
"output"
],
"connectivity_type": "E-Line",
"id": "output"
}
]
}
]
Through this endpoint GET request, the Gatekeeper returns the JSON
formatted function record.
- Request:
curl <base URL>/records/functions/27155554-02d7-46a9-a7bb-4f4162b3ac19 \
-H 'authorization:bearer <token>'
- Response:
{
"created_at": "2017-08-30T14:34:43.391+00:00",
"descriptor_reference": "6a15313f-cb0a-4540-baa2-77cc6b3f1010",
"descriptor_version": "vnfr-schema-01",
"status": "normal operation",
"updated_at": "2017-08-30T14:34:43.391+00:00",
"uuid": "27155554-02d7-46a9-a7bb-4f4162b3ac19",
"version": "2",
"virtual_deployment_units": [
{
"id": "vdu01",
"number_of_instances": 1,
"resource_requirements": {
"cpu": {
"vcpus": 1
},
"memory": {
"size": 512,
"size_unit": "MB"
},
"storage": {
"size": 1,
"size_unit": "GB"
}
},
"vdu_reference": "vfoo-vnf:vdu01",
"vm_image": "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img",
"vnfc_instance": [
{
"connection_points": [
{
"id": "eth0",
"interface": {
"address": "10.100.32.243",
"hardware_address": "fa:16:3e:2f:76:d4"
},
"type": "management"
},
{
"id": "eth1",
"interface": {
"address": "172.16.0.7",
"hardware_address": "fa:16:3e:57:50:e0",
"netmask": "255.255.255.248"
},
"type": "external"
},
{
"id": "eth2",
"interface": {
"address": "172.16.0.8",
"hardware_address": "fa:16:3e:cf:a5:4a",
"netmask": "255.255.255.248"
},
"type": "external"
},
{
"id": "eth3",
"interface": {
"address": "172.16.0.36",
"hardware_address": "fa:16:3e:6a:f3:a3",
"netmask": "255.255.255.248"
},
"type": "internal"
}
],
"id": "0",
"vc_id": "da65a620-1e1a-47f0-9bd3-f4b849fe3fbb",
"vim_id": "1111-22222222-33333333-4444"
}
]
},
{
"id": "vdu02",
"number_of_instances": 1,
"resource_requirements": {
"cpu": {
"vcpus": 1
},
"memory": {
"size": 512,
"size_unit": "MB"
},
"storage": {
"size": 1,
"size_unit": "GB"
}
},
"vdu_reference": "vfoo-vnf:vdu02",
"vm_image": "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img",
"vnfc_instance": [
{
"connection_points": [
{
"id": "eth0",
"interface": {
"address": "10.100.32.237",
"hardware_address": "fa:16:3e:ba:c0:9c"
},
"type": "management"
},
{
"id": "eth1",
"interface": {
"address": "172.16.0.35",
"hardware_address": "fa:16:3e:05:2e:d3",
"netmask": "255.255.255.248"
},
"type": "internal"
}
],
"id": "0",
"vc_id": "59d03f15-e2dd-432d-87ce-f7b73c3a71dd",
"vim_id": "1111-22222222-33333333-4444"
}
]
}
],
"virtual_links": [
{
"connection_points_reference": [
"vdu01:eth0",
"vdu02:eth0",
"mgmt"
],
"connectivity_type": "E-LAN",
"id": "mgmt"
},
{
"connection_points_reference": [
"vdu01:eth1",
"input"
],
"connectivity_type": "E-Line",
"id": "input"
},
{
"connection_points_reference": [
"vdu01:eth2",
"output"
],
"connectivity_type": "E-Line",
"id": "output"
},
{
"connection_points_reference": [
"vdu01:eth3",
"vdu02:eth1"
],
"connectivity_type": "E-LAN",
"id": "internal"
}
]
}