05-09-2017 04:55 AM - edited 03-01-2019 03:47 AM
Hi,
I wanted to have a rest call to initiate a yang action:
container GWServiceValidation {
description "Gateway service validation";
tailf:action validate-gwservice {
tailf:info "Validate SAEGW/MME gateway standalone";
tailf:actionpoint GWService-validation-point;
input {
leaf device {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
leaf gw_type {
type enumeration {
enum SAEGW;
enum MME;
}
}
}
output {
uses action-output;
}
}
So I used a post command as follows – but get that device cannot be a child. Can anyone point me quickly to the correct syntax to provide the leaf parameters into the action?
Solved! Go to Solution.
05-09-2017 04:55 AM
I believe you need an <input> element around the parameters.
05-09-2017 04:55 AM
I believe you need an <input> element around the parameters.
05-09-2017 04:55 AM
Your request pay load on the screen shot is actually not a valid XML file since it doesn’t have root.
I can’t verify, but a valid payload may be something look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<input>
< device >mano</device>
< gw_type >MME</ gw_type >
</input>
Good luck!
05-09-2017 04:56 AM
Thanks,
[NAME] sent same and it worked!
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: