I am trying to implement a action callback as an executable. However I encounter an error when I run the command on CLI.
YANG -
container scping {
tailf:action scp {
tailf:exec "/some-path/scp.sh" {
tailf:args "-c $(context) -p $(path)";
}
input {
leaf source {
type string;
}
leaf destination {
type string;
}
}
output {
leaf filename {
type string;
}
leaf complete {
type string;
}
leaf size {
type string;
}
leaf time-taken {
type string;
}
}
}
}
scp.sh -
#!/bin/bash
echo $@
Error message -
confd Invalid result tag from external command "/some-path/scp.sh": "-c"