move the json stuff into utils - I guess we will need functionality like

this not just for openflow at some point of time.
This commit is contained in:
Johanna Amann 2015-04-07 10:43:36 -07:00
parent fe5408e676
commit 4195a0066a
2 changed files with 18 additions and 27 deletions

View file

@ -1,7 +1,7 @@
@load base/frameworks/openflow
@load base/frameworks/openflow/utils/json
@load base/utils/exec
@load base/utils/active-http
@load base/utils/exec
@load base/utils/json
module OpenflowRyu;
@ -129,7 +129,7 @@ function flow_mod(state: Openflow::ControllerState, flow_mod: Openflow::ofp_flow
local request: ActiveHTTP::Request = ActiveHTTP::Request(
$url=cat("http://", cat(state$host), ":", cat(state$host_port), RYU_FLOWENTRY_PATH, command_type),
$method="POST",
$client_data=OpenflowJSON::convert(_flow_mod)
$client_data=to_json(_flow_mod)
);
# Execute call to Ryu's ReST API
when(local result = ActiveHTTP::request(request))