Skip to content

REST API List of OFMStaticFlowEntryManager

jsshin edited this page Dec 5, 2014 · 9 revisions

OFMStaticFlowEntryManager API list

retrieve

retrieve all static flow entries

API: /wm/staticflowentry/list/all/json

Result:

{
	"s1":{
		"ipv4_src":"10.0.0.1",
		"instructions":[
			{
				"apply_actions":[
					{"output":"2"}
				]
			}
		],
		"priority":"101",
		"name":"s1",
		"ipv4_dst":"10.0.0.2",
		"active":"true",
		"switch":"00:00:00:00:00:00:00:01",
		"eth_type":"0x0800"
	},
	"drop":{
		"priority":"11",
		"name":"drop",
		"active":"true",
		"switch":"00:00:00:00:00:00:00:01"
	}
}

retrieve static flow entries of the specific switch

API: /wm/staticflowentry/list/{switch}/json

Result:

{
	"s1":{
		"ipv4_src":"10.0.0.1",
		"instructions":[
			{
				"apply_actions":[
					{"output":"2"}
				]
			}
		],
		"priority":"101",
		"name":"s1",
		"ipv4_dst":"10.0.0.2",
		"active":"true",
		"switch":"00:00:00:00:00:00:00:01",
		"eth_type":"0x0800"
	},
	"drop":{
		"priority":"11",
		"name":"drop",
		"active":"true",
		"switch":"00:00:00:00:00:00:00:01"
	},
	"s4":{
		"switch":"00:00:00:00:00:00:00:01",
		"name":"s4",
		"priority":"1001",
		"eth_type":"0x0806",
		"arp_spa":"10.0.0.2",
		"active":"true",
		"instructions":[
			{"apply_actions":
				[
					{"set_field":
						{"arp_spa":"10.0.0.3"}
					},
					{"output":"1"}
				]
			}
		]
	}
}

clear

clear all static flow entries

API: /wm/staticflowentry/clear/all/json

Result:

{"result":"All entries are cleared."}

clear static flow entries of the specific switch

API: /wm/staticflowentry/clear/{switch}/json

Result:

{"result":"All entries are cleared."}

add and delete

API: /wm/staticflowentry/json

add static flow entry

Example: curl -d '{"switch":"00:00:00:00:00:00:00:01","name":"s2","priority":"1001","eth_type":"0x0800","ipv4_dst":"10.0.0.2","active":"true","instructions":[{"apply_actions":[{"output":"1"}]}]}' http://{controller}:8080/wm/staticflowentry/json

Result:

{"result":"Entry pushed: s1"}

delete static flow entry

Example: curl -X DELETE -d '{"name":"s1"}' http://{controller}:8080/wm/staticflowentry/json

Example: curl http://{controller}:8080/wm/staticflowentry/delete/{name}/json

Result:

{"result":"Entry deleted: s1"}

reload

reload all static flow entries to switch

API: /wm/staticflowentry/reload/all/json

Result:

{"result":"All entries are reloaded to switches."}

reload static flow entries to the specific switch

API: /wm/staticflowentry/reload/{switch}/json

Result:

{"result":"Entries are reloaded to switch: 00:00:00:00:00:00:00:01"}

Clone this wiki locally