f9a1160839dd8ab8655d5b01708c1da45201d305
[netconf.git] / restconf / restconf-nb-rfc8040 / src / test / resources / restconf / parser / deserializer / example-actions.yang
1 module example-actions {
2   yang-version 1.1;
3   namespace "https://example.com/ns/example-actions";
4   prefix "act";
5
6   organization "Example, Inc.";
7   contact "support at example.com";
8   description "Example Actions Data Model Module.";
9
10   revision "2016-07-07" {
11     description "Initial version.";
12     reference "example.com document 2-9973.";
13   }
14
15   container interfaces {
16     description "System interfaces.";
17
18     list interface {
19       key name;
20       description "One interface entry.";
21       leaf name {
22         type string;
23         description "Interface name.";
24       }
25
26       action reset {
27         description "Reset an interface.";
28         input {
29           leaf delay {
30             type uint32;
31             units "seconds";
32             default 0;
33             description
34               "Number of seconds to wait before starting the
35                interface reset.";
36           }
37         }
38       }
39     }
40
41     choice protocol {
42       case protocol-type {
43         container udp {
44           action reboot {
45             description "Reboot operation.";
46             input {
47               leaf delay {
48                 type uint32;
49                 units "seconds";
50                 description  "Number of seconds to wait before initiating the reboot operation.";
51               }
52               leaf message {
53                 type string;
54                 description  "Log message to display when reboot is started.";
55               }
56             }
57           }
58         }
59       }
60     }
61
62     choice interface-type {
63       container typeA-gigabyte {
64         list interface {
65           key name;
66           description "One interface entry.";
67           leaf name {
68             type string;
69             description "Interface name.";
70           }
71
72           action reboot {
73             description "Reboot operation.";
74             input {
75               leaf delay {
76                 type uint32;
77                 units "seconds";
78                 description  "Number of seconds to wait before initiating the reboot operation.";
79               }
80               leaf message {
81                 type string;
82                 description  "Log message to display when reboot is started.";
83               }
84             }
85           }
86         }
87       }
88     }
89   }
90 }