FIWARE-OFNIC Open Specification

DATE: 4 September 2015

Editors

All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the publisher, addressed “Attention: Permissions Coordinator,” at the address below.


Abstract

This specification defines the FIWARE-OFNIC v1 REST ful API. Such API exposes network status information and it enables a certain level of programmability within the network.

Status of this document

This is a work in progress and is changing on a daily basis. First major release 4 will be released by the end of September 2015

This specification is licensed under the FIWARE Open Specification License.



FIWARE OFNIC

The NetIC Restful API API is intended to access network status information and to allow a pre-defined level of programmability within the network. This programmability may also enable network virtualization, i. e., the abstraction of the physical network resources as well as their control by a virtual network provider. This is a RESTful, resource-oriented API accessed via HTTP that uses JSON-based representations for information interchange. It should be noted that the exposition of specific capabilities via the northbound interface depends on the capabilities and the technology of the underlying network. Users of the API will be able to explore the functionalities, by navigating this API in a RESTful fashion.

Allowed HTTPs requests:

  • PUT : To create resource
  • POST : Update resource
  • GET : Get a resource or list of resources
  • DELETE : To delete resource

Description Of Usual Server Responses:

  • 200 OK - the request was successful (some API calls may return 201 instead).
  • 201 Created - the request was successful and a resource was created.
  • 204 No Content - the request was successful but there is no representation to return (i.e. the response is empty).
  • 400 Bad Request - the request could not be understood or was missing required parameters.
  • 401 Unauthorized - authentication failed or user doesn't have permissions for requested operation.
  • 403 Forbidden - access denied.
  • 404 Not Found - resource was not found.
  • 405 Method Not Allowed - requested method is not supported for resource.

Authentication

Each HTTP request against the NetIC RESTful API requires the inclusion of specific authentication credentials. The specific implementation of this API may support multiple authentication schemes (OAuth, Basic Auth, Token) and will be determined by the specific provider that implements the GE. Please contact with it to determine the best way to authenticate against this API. Remember that some authentication schemes may require that the API operate using SSL over HTTP (HTTPS).

NetIC API core

This API exposes a set of commands on the NetIC GE that enables information retrieval from and some level of control of the underlying network. This is done through manipulating different objects, like:

  • Network
  • Node
  • Port
  • Link
  • VirtualPath

API Operations

In this section we go in depth for each operation. The API operations are divided into three groups of functionalities:

  • Synchronize
  • Virtualpaths
  • Monitor

The next subsections will provide an insight of all the possible commands of each group.


API Specification

Synchronize

Synchronize commands allow the users of the NetIC API to retrieve information about network topology, node configuration, port status, etc.

[/netic.v1/OFNIC/synchronize/network]

- GET /netic.v1/OFNIC/synchronize/network

Get list of nodes and virtual paths.

Response 200 (application/json)

[/netic.v1/OFNIC/synchronize/network/node/{nodeID}]

- GET /netic.v1/OFNIC/synchronize/network/node/{nodeID}

Retrieve information about the node with id: nodeID

Parameters

  • nodeID (string) - OpenFlow Node ID
Response 200 (application/json)

[/netic.v1/OFNIC/synchronize/network/node/{nodeID}/port/{portID}]

- GET /netic.v1/OFNIC/synchronize/network/node/{nodeID}/port/{portID}

Retrieve all available information about the port with id: nodeID located in the node with id: portID

Parameters

  • nodeID (string) - OpenFlow Node ID

  • portID (string) - OpenFlow Node port's number

Response 200 (application/json)

Virtual paths

[/netic.v1/OFNIC/virtualpath]

- GET /netic.v1/OFNIC/virtualpath

List all created virtual paths in the network.

Response 200 (application/json)

[/netic.v1/OFNIC/virtualpath/create]

- POST /netic.v1/OFNIC/virtualpath/create

Create a new virtual path in the network.

Request (application/json)

Body's Parameters

  • nw_src (String | required) - IPv4 first node addresses

  • nw_dst (String | required) - IPv4 last node addresses

  • dp_src (String | optional) - first node ID (OpenFlow ID) - Mandatory if hosts don't announce their link layer info with LLDP

  • dp_dst (String | optional) - last node ID (OpenFlow ID) - Mandatory parameter Mandatory if hosts don't announcetheir link layer info with LLDP

  • dl_src (String | optional) - first node mac address - Mandatory if hosts don't announce their link layer info with LLDP

  • dl_dst (String | optional) - last node mac address - Mandatory if hosts don't announce their link layer info with LLDP

  • tp_src (String | optional) - first node tcp/udp port - Optional

  • tp_dst (String | optional) - last node tcp/udp port - Optional

  • bandwidth (String | optional) - bandwidth on path (kbps) - Optional

  • bidirectional (String | required) - bidirectional flows

  • first_port (String | optional) - ingress port on first node - Mandatory if hosts don't announce their link layer info with LLDP

  • last_port (String | optional) - exit port on last node - Mandatory if hosts don't announce their link layer info with LLDP

  • etherType (String | optional) - etherType content - Optional

  • protocol (String | optional) - protocol content - Optional

Create VirtualPath Request (application/json)

{
    "nw_src":"10.0.0.1",
    "nw_dst":"10.0.0.3",
    "dp_src":"",
    "dp_dst":"",
    "dl_src":"",
    "dl_dst":"",
    "tp_src":"",
    "tp_dst":"",
    "bandwidth":"",
    "bidirectional":"1",
    "first_port":"",
    "last_port":"",
    "etherType":"",
    "protocol":""
}
Response 201 (application/json)

[/netic.v1/OFNIC/virtualpath/{pathID}]

- GET /netic.v1/OFNIC/virtualpath/{pathID}

List all created virtual paths in the network.

Parameters

  • pathID (String) = Virtual path id
Response 200 (application/json)

[/netic.v1/OFNIC/virtualpath/{pathId}]

- DELETE /netic.v1/OFNIC/virtualpath/{pathId}

Remove a virtual path

Parameters

  • pathID (String) = Virtual path id
Response 200 (application/json)

Monitor

Monitor group of commands provides the APIs to retrieve collected network statistics about ports of network nodes. Parameters collected are amount of bytes transmitted per unit of time, number of packets transmitted per unit of time and others. The Monitor commands are explained below.

[/netic.v1/statistics/node/{nodeID}/port/{portID}]

- GET /netic.v1/statistics/node/{nodeID}/port/{portID}

Retrieve all available statistics about port with id: portID on node with id: nodeID

Parameters

  • nodeID (String) = OpenFlow node ID

  • portID (String) = OpenFlow node's port number

Response 200 (application/json)

[/netic.v1/statistics/virtualpath/{pathID}]

- GET /netic.v1/statistics/virtualpath/{pathID}

Retrieve all available statistics about the virtual path with id: pathID

Parameters

  • pathID (String) = Virtual path id
Response 200 (application/json)

Examples

Synchronize

[/netic.v1/OFNIC/synchronize/network]

- GET /netic.v1/OFNIC/synchronize/network

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[   
    {
        "paths":[],
        "nodes":[
            "00:00:00:00:00:00:00:02",
            "00:00:00:00:00:00:00:01",
            "00:00:00:00:00:00:00:03"
            ]
    }
]

[/netic.v1/OFNIC/synchronize/network/node/{nodeID}]

- GET /netic.v1/OFNIC/synchronize/network/node/{nodeID}

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "id":"2",
        "type":"OF"
    },
    {   
        "id":"1",
        "type":"OF"
    },
    {
        "id":"0",
        "type":"SW"
    }
]

[/netic.v1/OFNIC/synchronize/network/node/{nodeID}/port/{portID}]

- GET /netic.v1/OFNIC/synchronize/network/node/{nodeID}/port/{portID}

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        "properties":{
            "name":"s1-eth2",
            "state":"1",
            "type":"OF",
            "bandwidth":"10000000000"},
            "link":{
                "port":"2",
                "nodeId":"00:00:00:00:00:00:00:02"
            }
        }
    }
]

Virtual paths

[/netic.v1/OFNIC/virtualpath]

- GET /netic.v1/OFNIC/virtualpath

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
    "resultCode": 0, 
    "displayError": "No error", 
    "result": {
        "Paths": [
            "7a8b",
            "dc6b"
        ]
    }
]

[/netic.v1/OFNIC/virtualpath/create]

- POST /netic.v1/OFNIC/virtualpath/create

Response 201 (application/json)

Headers

Content-Type: application/json

Body

{
    directPathName: "81133498"
    reversPathName: "16472338"
} 

[/netic.v1/OFNIC/virtualpath/{pathID}]

- GET /netic.v1/OFNIC/virtualpath/{pathID}

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
        pathName: "81133498"
        flow: {
            nw_src: "10.0.0.1"
            nw_dst: "10.0.0.3"
            dp_src: "00:00:00:00:00:00:00:01"
            dp_dst: "00:00:00:00:00:00:00:03"
            dl_src: ""
            dl_dst: ""
            tp_src: ""
            tp_dst: ""
            bandwidth: ""
            bidirectional: "1"
            first_port: "1"
            last_port: "1"
            etherType: "0x800"
            tosBits: ""
            priority: "200"
            protocol: ""
        }
        edgeList: [2]
        0:  {
            headNode: "00:00:00:00:00:00:00:01"
            tailNode: "00:00:00:00:00:00:00:02"
            headPort: "2"
            tailPort: "2"
        }
        1:  {
            headNode: "00:00:00:00:00:00:00:02"
            tailNode: "00:00:00:00:00:00:00:03"
            headPort: "3"
            tailPort: "2"
        }
    }
]

[/netic.v1/OFNIC/virtualpath/{pathId}]

- DELETE /netic.v1/OFNIC/virtualpath/{pathId}

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[
    {
    ok
    }
]

Monitor

[/netic.v1/statistics/node/{nodeID}/port/{portID}]

- GET /netic.v1/statistics/node/{nodeID}/port/{portID}

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[   
    {
        receiveFrameError: "0"
        receiveCrcError: "0"
        receiveDrops: "0"
        receiveBytes: "1328"
        receiveErrors: "0"
        receiveOverRunError: "0"
        transmitBytes: "797295"
        transmitDrops: "0"
        transmitErrors: "0"
        transmitPackets: "5152"
        collisionCount: "0"
    }
]

[/netic.v1/statistics/virtualpath/{pathID}]

- GET /netic.v1/statistics/virtualpath/{pathID}

Response 200 (application/json)

Headers

Content-Type: application/json

Body

[   
    {
        packetCount: "0"
        durationSeconds: "839"
        byteCount: "0"
        durationNanoseconds: "496000000"
    }
]

References