Enhancement activity in admin reconciliation for handling consecutive
[openflowplugin.git] / applications / southbound-cli / src / main / yang / reconciliation.yang
1 module reconciliation {
2
3     namespace "urn:opendaylight:params:xml:ns:yang:openflowplugin:app:reconciliation:service";
4     prefix reconciliation;
5
6     import ietf-yang-types {prefix yang; revision-date "2013-07-15";}
7     revision "2018-02-27" {
8         description "Initial revision for reconciliation";
9     }
10
11     container reconciliation-counter {
12         description "Number of reconciliation triggered for openflow nodes";
13         config false;
14         list reconcile-counter {
15             key node-id;
16             leaf node-id {
17                 type uint64;
18             }
19             uses counter;
20         }
21     }
22
23     grouping counter {
24         leaf success-count {
25             type uint32;
26             default 0;
27         }
28         leaf failure-count {
29             type uint32;
30             default 0;
31         }
32         leaf last-request-time {
33              description "Timestamp when reconciliation was last requested";
34              type yang:date-and-time;
35         }
36     }
37
38     container reconciliation-state {
39          description "Reconciliation state for the given openflow nodes";
40          config false;
41          list reconciliation-state-list {
42               key node-id;
43               leaf node-id {
44                    type uint64;
45               }
46               uses node-reconcile-state;
47          }
48     }
49
50     grouping node-reconcile-state {
51          leaf state {
52               description "Current state of the node reconciliation";
53               type enumeration {
54                    enum IN_PROGRESS;
55                    enum COMPLETED;
56                    enum FAILED;
57               }
58          }
59     }
60
61     rpc reconcile {
62         description "Request the reconciliation for given device or set of devices to the controller.";
63         input {
64             leaf-list nodes {
65                 description "List of nodes to be reconciled";
66                 type uint64;
67             }
68
69             leaf reconcile-all-nodes {
70                 description "Flag to indicate that all nodes to be reconciled";
71                 type boolean;
72                 mandatory false;
73                 default false;
74             }
75         }
76
77         output {
78              leaf result {
79                  type boolean;
80              }
81
82              leaf-list inprogress-nodes {
83                  description "List of nodes currently reconciliation mode";
84                  type uint64;
85              }
86         }
87     }
88 }