Use nullOrNonPositive instead of nullOrNonZero
[controller.git] / opendaylight / config / shutdown-impl / src / main / yang / shutdown-impl.yang
1 module shutdown-impl {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:shutdown:impl";
4     prefix "shutdown-impl";
5
6     import shutdown { prefix shutdown; revision-date 2013-12-18; }
7     import config { prefix config; revision-date 2013-04-05; }
8     import rpc-context { prefix rpcx; revision-date 2013-06-17; }
9
10     organization "Cisco Systems, Inc.";
11
12     description
13         "This module contains the base YANG definitions for
14          shutdown implementation.
15
16         Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
17
18         This program and the accompanying materials are made available
19         under the terms of the Eclipse Public License v1.0 which
20         accompanies this distribution, and is available at
21         http://www.eclipse.org/legal/epl-v10.html";
22
23     revision "2013-12-18" {
24         description
25             "Initial revision.";
26     }
27
28     identity shutdown {
29         base config:module-type;
30         config:provided-service shutdown:shutdown;
31     }
32
33     augment "/config:modules/config:module/config:configuration" {
34         case shutdown {
35             when "/config:modules/config:module/config:type = 'shutdown'";
36             leaf secret {
37                 type string;
38                 default "";
39             }
40         }
41     }
42
43     augment "/config:modules/config:module/config:state" {
44         case shutdown {
45             when "/config:modules/config:module/config:type = 'shutdown'";
46             rpcx:rpc-context-instance "shutdown-rpc";
47         }
48     }
49
50     identity shutdown-rpc;
51
52     rpc shutdown {
53         input {
54             uses rpcx:rpc-context-ref {
55                 refine context-instance {
56                     rpcx:rpc-context-instance shutdown-rpc;
57                 }
58             }
59             leaf input-secret {
60                 type string;
61             }
62             leaf max-wait-time {
63                 type uint32;
64                 description "Maximum time in milliseconds before process is forcibly exited. Zero or null cancels this functionality.";
65             }
66             leaf reason {
67                 type string;
68             }
69         }
70     }
71 }