HP VAN SDN Controller Administrator Guide v3
Example of listing information about an application
curl --noproxy 15.255.125.107 --header “X-Auth-Token:
85f7c48b65394afc97de434b5aa8fe05” -ksSL --request GET --url
https://15.255.125.107:8443/sdn/v2.0/apps/com.hp.snd.ctl.diag
Example output:
{"app": {"uid":"com.hp.sdn.ctl.diag", "name":"Path Diagnostics",
"version":"2.1.0.SNAPSHOT", "desc":"Path Diagnostic Utility",
"vendor":"Hewlett-Packard", "state":"ACTIVE",
"deployed":"2014-02-25T00:23:17.839Z"}}
A.3.3 Getting application health status
curl --noproxy <controller_ip> --header “X-Auth-Token:<auth_token>”
-ksSL --request GET--url
“https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>/health”
Example of listing information about an application:
curl --noproxy 15.255.125.107 --header “X-Auth-Token:
85f7c48b65394afc97de434b5aa8fe05” -ksSL --request GET --url
https://15.255.125.107:8443/sdn/v2.0/apps/com.hp.snd.ctl.diag/health
Example output:
{"uid":"com.hp.sdn.ctl.diag", "name":"Path Diagnostics",
"version":"2.1.0.SNAPSHOT", "desc":"Path Diagnostic Utility",
"vendor":"Hewlett-Packard", "state":"ACTIVE",
"deployed":"2014-02-25T00:23:17.839Z", "status":"OK"}
A.3.4 Uploading an application (new or upgrade)
curl --noproxy <controller_ip> --header “X-Auth-Token:<auth_token>”
-ksSL --request POST--url https://<controller-ip>:8443/sdn/v2.0/apps/
--data-binary @<full_path_to_app_zip>
Example of uploading an application:
curl --noproxy 15.255.125.107 --header “X-Auth-Token:
85f7c48b65394afc97de434b5aa8fe05” -ksSL --request POST --url
https://15.255.125.107:8443/sdn/v2.0/apps/--data-binary
@/home/sdn/geewiz-apps-1.0.0.zip
Example output:
{"app": {"uid":"com.geewiz", "name":"GeeWiz", "version":"1.0.0",
"desc":"Gee Wiz event production", "vendor":"Gee Wiz, Inc.",
"state":"STAGED", "deployed":"1970-01-01T00:00:00.000Z"}}
Example upgrade output:
{"app": {"uid":"com.geewiz", "name":"GeeWiz", "version":"2.0.0",
"desc":"Gee Wiz event production", "vendor":"Gee Wiz, Inc.",
"state":"UPGRADE_STAGED", "deployed":"1970-01-01T00:00:00.000Z"}}
A.3.5 Install a new application
curl --noproxy <controller_ip> --header “X-Auth-Token:<auth_token>”
-ksSL --request POST--url
https://<controller_ip>:8443/sdn/v2.0/apps/<app_id>/action -d install
Example of installing a new application:
curl --noproxy 15.255.125.107 --header “X-Auth-Token:
85f7c48b65394afc97de434b5aa8fe05” -ksSL --request POST --url
https://15.255.125.107:8443/sdn/v2.0/apps/com.geewiz/action -d install
Example output:
A.3 Application Manager Actions 117