IETF-TEAS-WG / ietf-teas-yang-path-computation

0 stars 4 forks source link

RPC paths #76

Closed italobusi closed 4 years ago

italobusi commented 4 years ago

The are some issues with RPC XPaths

The following code is accepted by pyang 1.75 but not by pyang 2.1:

                type leafref {
                  path "/te:tunnels-path-compute/te:input/"
                     + "te:path-compute-info/"
                     + "te-pc:tunnel-attributes/te-pc:tunnel-name";
                }

The following code instead is accepted by pyang 2.1 but not by pyang 1.7.5:

              leaf tunnel-attributes-ref {
                type leafref {
                  path "/te:tunnels-path-compute/"
                     + "te:path-compute-info/"
                     + "te-pc:tunnel-attributes/te-pc:tunnel-name";
                }

Moreover the following when statement, which is quite useful to constraint which information is provided by the RPC output based on some attributes in the RPC input, is accepted by pyang 1.7.5 but not accepted by pyang 2.1;

  augment "/te:tunnels-actions/te:output" {
    description
      "Augment Tunnels Action RPC input with path delete result";

    container path-computed-delete-result {
      when "derived-from-or-self(../../te:input/te:action-info/"
         + "te:action, 'tunnel-action-path-compute-delete')";
      description "Path Delete RPC output";
      leaf-list path-compute-transaction-id {
        type string;
        description
          "The list of the transaction-id values of the
           transient states that have been successfully deleted";
      }
    }   // container path-computed-delete-result
  }   // path-delete rpc output
italobusi commented 4 years ago

As discussed during the TEAS WG session in IETF 108, this issue has been raised on pyang github: https://github.com/mbj4668/pyang/issues/662