Skip to content

Services usage

José Bonnet edited this page Aug 29, 2017 · 4 revisions

This page details the Service-related endpoints of the SONATA Gatekeeper API.

Please note that services are created, updated or deleted only when a package containing it is created, updated or deleted.

/services

GET

Through this endpoint GET request, the Gatekeeper returns a JSON formatted paginated list of services meta-data.

  • Request:
curl <base URL>/services -H 'authorization:bearer <token>'\

Like Packages, Services are univocally identified by the trio of fields vendor, name and version, which is unique.

  • Response:
[
    {
        "created_at": "2017-08-28T15:23:31.566+00:00", 
        "md5": "c9325752fae5d79e9c417bf80d8a4914", 
        "nsd": {
            "author": "Steven Van Rossem, Ghent University", 
            "connection_points": [
                {
                    "id": "mgmt", 
                    "interface": "ipv4", 
                    "type": "management"
                }, 
                {
                    "id": "input", 
                    "interface": "ipv4", 
                    "type": "external"
                }, 
                {
                    "id": "output", 
                    "interface": "ipv4", 
                    "type": "external"
                }
            ], 
            "description": "\"The network service descriptor for the SONATA demo,\n comprising only a Virtual Traffic Classifier\"\n", 
            "descriptor_version": "1.0", 
            "forwarding_graphs": [
                {
                    "constituent_vnfs": [
                        "vnf_vtc"
                    ], 
                    "fg_id": "ns:fg01", 
                    "network_forwarding_paths": [
                        {
                            "connection_points": [
                                {
                                    "connection_point_ref": "input", 
                                    "position": 1
                                }, 
                                {
                                    "connection_point_ref": "vnf_vtc:input", 
                                    "position": 2
                                }, 
                                {
                                    "connection_point_ref": "vnf_vtc:output", 
                                    "position": 3
                                }, 
                                {
                                    "connection_point_ref": "output", 
                                    "position": 4
                                }
                            ], 
                            "fp_id": "ns:fg01:fp01", 
                            "policy": "none"
                        }
                    ], 
                    "number_of_endpoints": 2, 
                    "number_of_virtual_links": 2
                }
            ], 
            "name": "sonata-demo-vtc", 
            "network_functions": [
                {
                    "vnf_id": "vnf_vtc", 
                    "vnf_name": "vtc-vnf", 
                    "vnf_vendor": "eu.sonata-nfv", 
                    "vnf_version": "0.1"
                }
            ], 
            "service_specific_managers": [
                {
                    "description": "An empty example SSM.", 
                    "id": "ssmdumb", 
                    "image": "sonatanfv/ssmdumb", 
                    "options": [
                        {
                            "key": "myKey", 
                            "value": "myValue"
                        }
                    ]
                }
            ], 
            "vendor": "eu.sonata-nfv.service-descriptor", 
            "version": "0.1", 
            "virtual_links": [
                {
                    "connection_points_reference": [
                        "vnf_vtc:mgmt", 
                        "mgmt"
                    ], 
                    "connectivity_type": "E-LAN", 
                    "id": "mgmt"
                }, 
                {
                    "connection_points_reference": [
                        "input", 
                        "vnf_vtc:input"
                    ], 
                    "connectivity_type": "E-Line", 
                    "id": "input-2-vtc"
                }, 
                {
                    "connection_points_reference": [
                        "vnf_vtc:output", 
                        "output"
                    ], 
                    "connectivity_type": "E-Line", 
                    "id": "vtc-2-output"
                }
            ]
        }, 
        "signature": null, 
        "status": "active", 
        "updated_at": "2017-08-28T15:23:31.566+00:00", 
        "user_licence": "public", 
        "username": "sonata-1503933806", 
        "uuid": "7a81845e-ea52-446c-8d54-fd283be605b6"
    }, 
    {
        "created_at": "2017-08-28T15:23:33.817+00:00", 
        "md5": "8f734a052d8dbb405e0fe0badd314e33", 
        "nsd": {
            "author": "Steven Van Rossem, Ghent University", 
            "connection_points": [
                {
                    "id": "mgmt", 
                    "interface": "ipv4", 
                    "type": "management"
                }, 
                {
                    "id": "input", 
                    "interface": "ipv4", 
                    "type": "external"
                }, 
                {
                    "id": "output", 
                    "interface": "ipv4", 
                    "type": "external"
                }
            ], 
            "description": "\"The network service descriptor for the SONATA demo,\n comprising only a Virtual Traffic Classifier. \n This service is defined as private (licence is required)\"\n", 
            "descriptor_version": "1.0", 
            "forwarding_graphs": [
                {
                    "constituent_vnfs": [
                        "vnf_vtc"
                    ], 
                    "fg_id": "ns:fg01", 
                    "network_forwarding_paths": [
                        {
                            "connection_points": [
                                {
                                    "connection_point_ref": "input", 
                                    "position": 1
                                }, 
                                {
                                    "connection_point_ref": "vnf_vtc:input", 
                                    "position": 2
                                }, 
                                {
                                    "connection_point_ref": "vnf_vtc:output", 
                                    "position": 3
                                }, 
                                {
                                    "connection_point_ref": "output", 
                                    "position": 4
                                }
                            ], 
                            "fp_id": "ns:fg01:fp01", 
                            "policy": "none"
                        }
                    ], 
                    "number_of_endpoints": 2, 
                    "number_of_virtual_links": 2
                }
            ], 
            "licences": [
                {
                    "type": "private", 
                    "url": "https://sp.int3.sonata-nfv.eu/api/v2/licences"
                }
            ], 
            "name": "sonata-demo-private-vtc", 
            "network_functions": [
                {
                    "vnf_id": "vnf_vtc", 
                    "vnf_name": "vtc-vnf", 
                    "vnf_vendor": "eu.sonata-nfv", 
                    "vnf_version": "0.1"
                }
            ], 
            "service_specific_managers": [
                {
                    "description": "An empty example SSM.", 
                    "id": "ssmdumb", 
                    "image": "sonatanfv/ssmdumb", 
                    "options": [
                        {
                            "key": "myKey", 
                            "value": "myValue"
                        }
                    ]
                }
            ], 
            "vendor": "eu.sonata-nfv.service-descriptor", 
            "version": "0.1", 
            "virtual_links": [
                {
                    "connection_points_reference": [
                        "vnf_vtc:mgmt", 
                        "mgmt"
                    ], 
                    "connectivity_type": "E-LAN", 
                    "id": "mgmt"
                }, 
                {
                    "connection_points_reference": [
                        "input", 
                        "vnf_vtc:input"
                    ], 
                    "connectivity_type": "E-Line", 
                    "id": "input-2-vtc"
                }, 
                {
                    "connection_points_reference": [
                        "vnf_vtc:output", 
                        "output"
                    ], 
                    "connectivity_type": "E-Line", 
                    "id": "vtc-2-output"
                }
            ]
        }, 
        "signature": null, 
        "status": "active", 
        "updated_at": "2017-08-28T15:23:33.817+00:00", 
        "user_licence": "public", 
        "username": "sonata-1503933806", 
        "uuid": "16b645dc-0deb-4082-b8a8-b1f6c4c0d41e"
    }
]

OPTIONS

Through this endpoint OPTIONS request, the Gatekeeper returns the set of headers defined to answer this kind of request.

  • Request:
curl <base URL>/services -X OPTIONS -H 'authorization:bearer <token>'\
  • Response:

/services/<service_uuid>

GET

Through this endpoint GET request, the Gatekeeper returns the JSON formatted service meta-data.

  • Request:
curl <base URL>/services -H 'authorization:bearer <token>'\

Like Packages, Services are univocally identified by the trio of fields vendor, name and version, which is unique.

  • Response:
{
    "created_at": "2017-08-28T15:23:33.817+00:00", 
    "md5": "8f734a052d8dbb405e0fe0badd314e33", 
    "nsd": {
        "author": "Steven Van Rossem, Ghent University", 
        "connection_points": [
            {
                "id": "mgmt", 
                "interface": "ipv4", 
                "type": "management"
            }, 
            {
                "id": "input", 
                "interface": "ipv4", 
                "type": "external"
            }, 
            {
                "id": "output", 
                "interface": "ipv4", 
                "type": "external"
            }
        ], 
        "description": "\"The network service descriptor for the SONATA demo,\n comprising only a Virtual Traffic Classifier. \n This service is defined as private (licence is required)\"\n", 
        "descriptor_version": "1.0", 
        "forwarding_graphs": [
            {
                "constituent_vnfs": [
                    "vnf_vtc"
                ], 
                "fg_id": "ns:fg01", 
                "network_forwarding_paths": [
                    {
                        "connection_points": [
                            {
                                "connection_point_ref": "input", 
                                "position": 1
                            }, 
                            {
                                "connection_point_ref": "vnf_vtc:input", 
                                "position": 2
                            }, 
                            {
                                "connection_point_ref": "vnf_vtc:output", 
                                "position": 3
                            }, 
                            {
                                "connection_point_ref": "output", 
                                "position": 4
                            }
                        ], 
                        "fp_id": "ns:fg01:fp01", 
                        "policy": "none"
                    }
                ], 
                "number_of_endpoints": 2, 
                "number_of_virtual_links": 2
            }
        ], 
        "licences": [
            {
                "type": "private", 
                "url": "https://sp.int3.sonata-nfv.eu/api/v2/licences"
            }
        ], 
        "name": "sonata-demo-private-vtc", 
        "network_functions": [
            {
                "vnf_id": "vnf_vtc", 
                "vnf_name": "vtc-vnf", 
                "vnf_vendor": "eu.sonata-nfv", 
                "vnf_version": "0.1"
            }
        ], 
        "service_specific_managers": [
            {
                "description": "An empty example SSM.", 
                "id": "ssmdumb", 
                "image": "sonatanfv/ssmdumb", 
                "options": [
                    {
                        "key": "myKey", 
                        "value": "myValue"
                    }
                ]
            }
        ], 
        "vendor": "eu.sonata-nfv.service-descriptor", 
        "version": "0.1", 
        "virtual_links": [
            {
                "connection_points_reference": [
                    "vnf_vtc:mgmt", 
                    "mgmt"
                ], 
                "connectivity_type": "E-LAN", 
                "id": "mgmt"
            }, 
            {
                "connection_points_reference": [
                    "input", 
                    "vnf_vtc:input"
                ], 
                "connectivity_type": "E-Line", 
                "id": "input-2-vtc"
            }, 
            {
                "connection_points_reference": [
                    "vnf_vtc:output", 
                    "output"
                ], 
                "connectivity_type": "E-Line", 
                "id": "vtc-2-output"
            }
        ]
    }, 
    "signature": null, 
    "status": "active", 
    "updated_at": "2017-08-28T15:23:33.817+00:00", 
    "username": "sonata-1503933806", 
    "uuid": "16b645dc-0deb-4082-b8a8-b1f6c4c0d41e"
}

Clone this wiki locally