Network slices records usage - sonata-nfv/tng-rep GitHub Wiki
This page details the Network Slice Instance Records API.
Records are created or updated as a consequence of network slice instantiation, which creates or updates one record per each slice.
Through this endpoint GET request, the Records returns a JSON
formatted paginated list of service records.
- Request:
curl -X GET -H "Content-type:application/json" <base URL>/records/nsir/ns-instances
- Response:
[
{
"author":"Felipe Vicens (ATOS)",
"created_at":"2018-02-26T17:34:14.647+00:00",
"description":"Example Slice",
"descriptor_version":"0.9",
"name":"slice",
"network_services":[
{
"ns_id":"ns_sonata",
"ns_vendor":"eu.5gtango.slice-descriptor",
"ns_name":"5gtango-demo",
"ns_version":"0.1",
"nsr_id":"00000000-0000-0000-0000-000000000000"
}
],
"qos":{
"5qi_value":"6",
"s_nssai":{
"sst":1,
"sd":1
}
},
"updated_at":"2018-02-26T17:34:14.647+00:00",
"vendor":"eu.5gtango.slice-descriptor",
"version":"0.1",
"uuid":"33adeb1e-d981-16ec-dc44-e288e80067a1"
}
]
Through this endpoint POST request, the Records store a JSON
of service record.
- Request:
curl -X POST -H "Content-type:application/json" --data-binary @spec/fixtures/nsir-example.json <base URL>/records/nsir/ns-instances
- Response:
"author":"Felipe Vicens (ATOS)",
"created_at":"2018-02-26T17:34:14.647+00:00",
"description":"Example Slice",
"descriptor_version":"0.9",
"name":"slice",
"network_services":[
{
"ns_id":"ns_sonata",
"ns_vendor":"eu.5gtango.slice-descriptor",
"ns_name":"5gtango-demo",
"ns_version":"0.1",
"nsr_id":"00000000-0000-0000-0000-000000000000"
}
],
"qos":{
"5qi_value":"6",
"s_nssai":{
"sst":1,
"sd":1
}
},
"updated_at":"2018-02-26T17:34:14.647+00:00",
"vendor":"eu.5gtango.slice-descriptor",
"version":"0.1",
"uuid":"33adeb1e-d981-16ec-dc44-e288e80067a1"
}
Through this endpoint GET request, the Records returns a JSON
of service record requested.
- Request:
curl -X GET -H "Content-type:application/json" <base URL>/records/nsir/ns-instances/<service_instance_uuid>
- Response:
{
"author":"Felipe Vicens (ATOS)",
"created_at":"2018-02-26T17:34:14.647+00:00",
"description":"Example Slice",
"descriptor_version":"0.9",
"name":"slice",
"network_services":[
{
"ns_id":"ns_sonata",
"ns_vendor":"eu.5gtango.slice-descriptor",
"ns_name":"5gtango-demo",
"ns_version":"0.1",
"nsr_id":"00000000-0000-0000-0000-000000000000"
}
],
"qos":{
"5qi_value":"6",
"s_nssai":{
"sst":1,
"sd":1
}
},
"updated_at":"2018-02-26T17:34:14.647+00:00",
"vendor":"eu.5gtango.slice-descriptor",
"version":"0.1",
"uuid":"33adeb1e-d981-16ec-dc44-e288e80067a1"
}
Through this endpoint GET request, the Records sent as JSON
of service record will be updated.
- Request:
curl -X PUT -H "Content-type:application/json" <base URL>/records/nsir/ns-instances/<service_instance_uuid> -d '{"id":<service uuid>,"descriptor_version":<latest service descriptor version>,"version":<version>,"vendor":<vendor>,"name":<name>,"<field_to_be_updated>":<value>}'
Example:
curl -X PUT -H "Content-type:application/json" localhost:4011/records/nsir/ns-instances/32adeb1e-d981-16ec-dc44-e288e80067a1 -d '{"descriptor_version":"1","vendor":"eu.5gtango.slice-descriptor","name":"slice","version":"0.1","id":"33adeb1e-d981-16ec-dc44-e288e80067a1"}'
- Response:
{
"created_at":"2018-02-26T17:40:31.312+00:00",
"descriptor_version":"1",
"name":"slice",
"updated_at":"2018-02-26T17:40:31.312+00:00",
"vendor":"eu.5gtango.slice-descriptor",
"version":"0.1",
"uuid":"33adeb1e-d981-16ec-dc44-e288e80067a1"
}
Through this endpoint DELETE request, the uuid of the Record sent will be deleted.
curl -X DELETE <base URL>/records/nsir/ns-instances/<service_instance_uuid>
Response:
- Headers:
- Status: 200 OK
- Content-Type text/html
- Body:
- Empty
Through this endpoint GET request, the Records returns a plain text with the message pong and 200OK. It can be used as readiness probe.
- Request:
curl -X GET <base URL>/nsrs/ping
- Response:
pong