Subject: [Netconf] Restconf list operation examples

From: "MALLI (VENKATAMALLIKARJUNARAO) KOSURI" <[email-masked]>
Date: Wed, 6 Apr 2016 10:22:06 +0000

Hello,

Could you let me know, how to write GET, POST, PUT operations fallowing YANG model

container interfaces {
    list interface {
      key name;
      leaf name { type string; }

      action reset {
        input {
          leaf delay {
            units seconds;
            type uint32;
            default 0;
          }
        }
      }

Thanks
Malli

---

From: Andy Bierman <[email-masked]>
Date: Wed, 6 Apr 2016 04:04:18 -0700

Hi,

RESTCONF only allows POST for an operation resource (e.g., action-stmt).

https://tools.ietf.org/html/draft-ietf-netconf-restconf-10#section-3.6

Andy

On Wed, Apr 6, 2016 at 3:22 AM, MALLI (VENKATAMALLIKARJUNARAO) KOSURI <
[email-masked]> wrote:

> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
>
>

---

From: "MALLI (VENKATAMALLIKARJUNARAO) KOSURI" <[email-masked]>
Date: Wed, 6 Apr 2016 12:35:09 +0000

Thank you very much Andy,  I am trying to GET operation below container to list key elements

container interfaces {
    list interface {
      key name;
      list speed {
        leaf gig { type string;}
        leaf eth { type string;}
      }
    }
}

When I tried below queries, I was sucessed here
GET restconf/exp-interface-interfaces/interface
200

Failed here
GET restconf/exp-interface-interfaces/interface/name
400 Bad request

How to access all list-instances elements from given list in yang model

-Malli

From: Andy Bierman [mailto:[email-masked]]
Sent: 06 April 2016 16:34
To: MALLI (VENKATAMALLIKARJUNARAO) KOSURI
Cc: [email-masked]
Subject: Re: [Netconf] Restconf list operation examples

Hi,

Andy

On Wed, Apr 6, 2016 at 3:22 AM, MALLI (VENKATAMALLIKARJUNARAO) KOSURI <[email-masked]<mailto:[email-masked]>> wrote:
Hello,

container interfaces {
    list interface {
      key name;

      action reset {
        input {
          leaf delay {
            units seconds;
            type uint32;
            default 0;
          }
        }
      }

Thanks
Malli

_______________________________________________
Netconf mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/netconf