mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
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:
parent
fe5408e676
commit
4195a0066a
2 changed files with 18 additions and 27 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue