Why I keep getting rpc error when I send action xml request?

My yang model defines an action :

container service
{
    container session-management
    {
     action set-ip-attributes {
            description "Change a particular attribute value for a particular session IP address";
            tailf:info "Change a particular attribute value for a particular session IP address";
            tailf:exec "/usr/local/cli/data/a.py" {
              tailf:args "-c $(context) -p $(path)";
            }
            tailf:cli-mount-point "set";
            input {
              leaf ip {
                type inet:ip-address;
                mandatory true;
                description "IP Address of the session";
                tailf:info "IP Address of the session";
              }
              leaf value {
                type string;
                mandatory true;
                description "Attribute value to be set";
                tailf:info "Attribute value to be set";
              }
            }
            output {
              uses session-attribute;         
            }
          }
    }
}      

I try to send an xml action request as :

1.1.1.1 svadmin

But I always get the rpc error.

error-application : application
error-tag : unknown-element
error-path : /nc:rpc/yangns:action/service:service/service:session-management

I can’t figure out why this is an unknow-element. The action has been verified in confd_cli, which works as expected :

set service session-management set-ip-attributes
Possible completions:
ip - IP Address of the session
value - Attribute value to be set

Any idea why action xml request doesn’t work ?

Thanks.

Ok, I figured out that it is caused by namespace. My container service and session-management are in different namespaces.

1 Like