Skip to content

Latest commit

 

History

History
911 lines (672 loc) · 28.9 KB

Network.md

File metadata and controls

911 lines (672 loc) · 28.9 KB

Network

Network has a function of storing an object according to an abstract model of network.
Network notifies the Event when there is a change in information.

Network Abstraction Model

Operating specifications of the Network

key value description
id <String> Unique Identifier in ODENOS.
type "Network" ObjectType
cm_id <String> Specify the componentManager.Property.id to generate an instance. (Optional)

REST APIs

  • Topology
URI GET POST PUT DELETE
<base_uri>/topology x x
<base_uri>/topology/nodes x x
<base_uri>/topology/nodes/<node_id> x x x
<base_uri>/topology/nodes/<node_id>/attributes x
<base_uri>/topology/physical_nodes/<physical_id> x x x
<base_uri>/topology/physical_nodes/<physical_id>/attributes x
<base_uri>/topology/nodes/<node_id>/ports x x
<base_uri>/topology/nodes/<node_id>/ports/<port_id> x x x
<base_uri>/topology/nodes/<node_id>/ports/<port_id>/attributes x
<base_uri>/topology/physical_ports/<physical_id> x x x
<base_uri>/topology/physical_ports/<physical_id>/attributes x
<base_uri>/topology/links x x
<base_uri>/topology/links/<link_id> x x x
<base_uri>/topology/links/<link_id>/attributes x

Here, <base_uri> is http://<hostname>:10080/<remote_object_id> such as http://localhost:10080/network1

  • Flows
URI GET POST PUT DELETE
<base_uri>/flows x x
<base_uri>/flows/<flow_id> x x x
<base_uri>/flows/<flow_id>/attributes x
  • Packets
URI GET POST PUT DELETE
<base_uri>/packets x
<base_uri>/packets/in x x x
<base_uri>/packets/in/head x x
<base_uri>/packets/in/<packet_id> x x
<base_uri>/packets/out x x x
<base_uri>/packets/out/head x x
<base_uri>/packets/out/<packet_id> x x
Object property
Topology
Node
Port
Link
Flow
Packet

get Object property.

[Request]:
  • Body : none
[Response]:

update Object property.

[Request]:
[Response]:

get topology NetworkComponent

[Request]:
  • Body : none
[Response]:

update the entire topology.

[Request]:
[Response]:

add a Node to Network.id is granted automatically. (specified id is invalid)

[Request]:
[Response]:
  • Status Code : 200
  • Body : Node

Get node List.

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : dict {Node.id, Node}

get the node. (specify the id that you want to get)

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : Node

update the node.(specify the id that you want to update)
create a new node if id does not exist.

[Request]:
[Response](Updated):
  • Status Code : 200
  • Body : Node
[Response](Created):
  • Status Code : 201
  • Body : Node

update the node without check of the version. (specify the id that you want to update) using the one before updating, if any, as values of the attributes which aren't specified.

[Request]:
  • Body : attributes dict{<String>, <String>}
[Response](Updated):
  • Status Code : 200
  • Body : Node

Delete the Node. (specify the id that you want to delete)
can not delete if the link is set to port.

[Request]:
  • Body : Node or none
  • Note : If body is none, the deleted regardless of the version.
[Response]:
  • Status Code : 200
  • Body : none
[Response](Conflict):
  • Status Code : 409
  • Body : Node or none
  • Note : failure(Version mismatch, Link exists.)

get the node. (specify the physical id that you want to get)

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : Node
  • Note : Physical ID is the only id in the system. If the same id exists, I will respond the first to found id.

update the node.(specify the physical id that you want to update)
create a new node if id does not exist.

[Response](Updated):
  • Status Code : 200
  • Body : Node
[Response](Created):
  • Status Code : 201
  • Body : Node

update the node without check of the version. (specify the physical id that you want to update) using the one before updating, if any, as values of the attributes which aren't specified.

[Request]:
  • Body : attributes dict{<String>, <String>}
[Response](Updated):
  • Status Code : 200
  • Body : Node

Delete the Node. (specify the physical id that you want to delete)
can not delete if the link is set to port.

[Request]:
  • Body : Node or none
  • Note : If body is none, the deleted regardless of the version.
[Response]:
  • Status Code : 200
  • Body : none
[Response](Conflict):
  • Status Code : 409
  • Body : Node or none
  • Note : failure(Version mismatch, Link exists.)

add a Port to Node. Port id will be generated automatically. (Port id specified by request body will be ignored)

[Request]:
[Response]:
  • Status Code : 200
  • Body : Port

Get port List.

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : dict{ Port.port_id, Port }

get the port. (specify the id that you want to get)

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : Port

update the port. (specify the id that you want to update)
create a new port if id does not exist.

[Request]:
[Response](Updated):
  • Status Code : 200
  • Body : Port
[Response](Created):
  • Status Code : 201
  • Body : Port

update the port without check of the version. (specify the id that you want to update) using the one before updating, if any, as values of the attributes which aren't specified.

[Request]:
  • Body : attributes dict{<String>, <String>}
[Response](Updated):
  • Status Code : 200
  • Body : Port

Delete the port. (specify the id that you want to delete)
can not delete if the link is set to port.

[Request]:
  • Body : Port or none
  • Note : If body is none, the deleted regardless of the version.
[Response]:
  • Status Code : 200
  • Body : none
[Response](Conflict):
  • Status Code : 409
  • Body : Port or none
  • Note : failure(Version mismatch, Link exists.)

get the port. (specify the physical id that you want to get)

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : Port
  • Note : Physical ID is the only id in the system. If the same id exists, I will respond the first to found id.

update the port.(specify the physical id that you want to update)
create a new port if id does not exist.

[Request]:
[Response](Updated):
  • Status Code : 200
  • Body : Port
[Response](Created):
  • Status Code : 201
  • Body : Port

update the port without check of the version. (specify the physical id that you want to update) using the one before updating, if any, as values of the attributes which aren't specified.

[Request]:
  • Body : attributes dict{<String>, <String>}
[Response](Updated):
  • Status Code : 200
  • Body : Port

Delete the port. (specify the physical id that you want to delete)
can not delete if the link is set to port.

[Request]:
  • Body : Port or none
  • Note : If body is none, the deleted regardless of the version.
[Response]:
  • Status Code : 200
  • Body : none
[Response](Conflict):
  • Status Code : 409
  • Body : Port or none
  • Note : failure(Version mismatch, Link exists.)

add a Link to Network.id is granted automatically. (specified id is invalid)

[Request]:
[Response]:
  • Status Code : 200
  • Body : Link

Get Link List.

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : dict{ Link.id, Link }

get the link. (specify the id that you want to get)

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : Link

update the link.(specify the id that you want to update)
create a new link if id does not exist.

[Request]:
[Response](Updated):
  • Status Code : 200
  • Body : Link
[Response](Created):
  • Status Code : 201
  • Body : Link

update the link without check of the version. (specify the id that you want to update) using the one before updating, if any, as values of the attributes which aren't specified.

[Request]:
  • Body : attributes dict{<String>, <String>}
[Response](Updated):
  • Status Code : 200
  • Body : Link

Delete the link. (specify the id that you want to delete)

[Request]:
  • Body : Link or none
  • Note : If body is none, the deleted regardless of the version.
[Response]:
  • Status Code : 200
  • Body : none
[Response](Conflict):
  • Status Code : 409
  • Body : Link or none
  • Note : failure(Version mismatch)

add a Flow to Network.id is granted automatically. (specified id is invalid)

[Request]:
[Response]:
  • Status Code : 200
  • Body : Flow
example(JSON)
{
"type": "BasicFlow",
"owner": "xxxxxxxx",
"enabled": true,
"matches": [ {...(BasicFlowMatch)...} ]
"path": ["LINK_ID1", "LINK_ID2"]
    "edge_actions": {
        "NODE_ID_1": [
            {...(BasicFlowAction)...},
            {...(BasicFlowAction)...},]    
    }    
}

Get Flow List.

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : dict<Flow.id , : Flow

get the flow. (specify the id that you want to get)

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : Flow

update the flow.(specify the id that you want to update)
create a new flow if id does not exist.

[Request]:
[Response](Updated):
  • Status Code : 200
  • Body : Flow
[Response](Created):
  • Status Code : 201
  • Body : Flow

update the flow without check of the version. (specify the id that you want to update) using the one before updating, if any, as values of the attributes which aren't specified.

[Request]:
  • Body : attributes dict{<String>, <String>}
[Response](Updated):
  • Status Code : 200
  • Body : Flow

Delete the flow. (specify the id that you want to delete)

[Request]:
  • Body : Flow or none
  • Note : If body is none, the deleted regardless of the version.
[Response]:
  • Status Code : 200
  • Body : none
[Response](Conflict):
  • Status Code : 409
  • Body : Flow
  • Note : failure(Version mismatch)

get the statistics of packets.

[Request]:
  • Body : none
[Response]:

get the statistics of InPackets.

[Request]:
  • Body : none
[Response]:

add a InPacket to network. want to add to the queue of tail.

[Request]:
[Response]:

Delete all of the InPacket.

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : none

Get InPacket of the first.

[Request]:
  • Body : none
[Response]:
[Response]:
  • Status Code : 204
  • Body : none
  • Note : InPacket Not exist.

Get InPacket and Delete OutPacket of the first.

[Request]:
  • Body : none
[Response]:
[Response]:
  • Status Code : 204
  • Body : none
  • Note : InPacket Not exist.

get the InPacket. (specify the physical id that you want to get)

[Request]:
  • Body : none
[Response]:
[Response]:
  • Status Code : 404
  • Body : none
  • Note : InPacket Not exist.

get the InPacket. and delete. (specify the physical id that you want to get)

[Request]:
  • Body : none
[Response]:
[Response]:
  • Status Code : 404
  • Body : none
  • Note : InPacket Not exist.

add a OutPacket to network. want to add to the queue of tail.

[Request]:
[Response]:

get the statistics of OutPackets.

[Request]:
  • Body : none
[Response]:

Delete all of the OutPacket.

[Request]:
  • Body : none
[Response]:
  • Status Code : 200
  • Body : none

Get OutPacket of the first.

[Request]:
  • Body : none
[Response]:
[Response]:
  • Status Code : 204
  • Body : none
  • Note : OutPacket Not exist.

Get OutPacket and Delete OutPacket of the first.

[Request]:
  • Body : none
[Response]:
[Response]:
  • Status Code : 204
  • Body : none
  • Note : OutPacket Not exist.

get the OutPacket.(specify the physical id that you want to get)

[Request]:
  • Body : none
[Response]:

get the OutPacket. and Delete. (specify the physical id that you want to get)

[Request]:
  • Body : none
[Response]:

available search function in the Get

  • Search by specifying in the query form.( ./src/example/rest_sample/rest_query.sh)
  • The search for the API, not only for REST, is also available from logic of Python and Java.
  • topology and flow and the packet is available search.
Search of topology
  • value match for key of attribute.
  • Search specify exact only.
Format
  • [GET] topology/nodes?attributes="key1=value1"&attributes="key2=value2"....
  • [GET] topology/nodes/<node_id>/ports?attributes="key1=value1"&attributes="key2=value2"....
  • [GET] topology/links?attributes="key1=value1"&attributes="key2=value2"....
Search of packet
  • value match for key of attribute.
  • Search specify exact only.
Format
  • [GET] packets/in?attributes="key1=value1"&attributes="key2=value2"....
  • [GET] packets/out?attributes="key1=value1"&attributes="key2=value2"....
Search of flow
  • In combination of the following key is searchable.
  • Searchable key
    • flow.type
    • flow.enabled
    • flow.status
    • flow.path
      • That it contains the values for the following specified key.
      • Searchable key : link_id, node_id, node_id&port_id
    • flow.matches
      • That it contains the values for the following specified key.
      • "type" is mandatory key.
    • flow.actions
      • That it contains the values for the following specified key.
      • "type" is mandatory key.Searchable type is only "OFPFlowActionOutput".
      • edge_node=node1
      • edge_node=node1,output=port1
    • flow.attributes
      • Need to specify the exact keys and values.
Format
  • [GET] flows?type=typevalue&key1=value1&key2=value2....
  • Flow.enabled
    • [GET] flows?type=value1&enabled=value2....
  • Flow.status
    • [GET] flows?type=value1&status=value2....
  • Flow.path
    • [GET] flows?type=value1&path="link_id=link1"....
    • [GET] flows?type=value1&path="node_id=node1"....
    • [GET] flows?type=value1&path="node_id=node1,port_id=port1"....
  • Flow.match
    • [GET] flows?type=value1&match="type=value2,key3=value3,key4=value4"....
  • Flow.actions
    • [GET] flows?type=value1&actions="type=OFPFlowActionOutput,edge_node=node1,edge_node=node1,output=port1"....
  • attributes
    • [GET] flows?type=value1&attributes="key1=value1"....