Attempt netconf remount regardless of error-type
[netconf.git] / netconf / sal-netconf-connector / src / main / yang / netconf-node-optional.yang
1 module netconf-node-optional {
2     namespace "urn:opendaylight:netconf-node-optional";
3     prefix "netnopt";
4
5     import network-topology { prefix nt; revision-date 2013-10-21; }
6     import yang-ext { prefix ext; revision-date "2013-07-09";}
7
8     revision "2019-06-14" {
9         description "Initial revision of Node Optional model";
10     }
11
12     grouping netconf-node-augmented-optional-fields {
13         container ignore-missing-schema-sources {
14             description "Allows mount point to reconnect on the 'missing schema sources' error.
15                 WARNING - enabling the reconnection on the 'missing schema sources' error can lead
16                 to unexpected errors at runtime.";
17             leaf allowed {
18                 type boolean;
19                 default false;
20                 description "Allows reconnection of the mount point. Default false.";
21             }
22             leaf reconnect-time {
23                 type uint32;
24                 default 5000;
25                 description "Time for reconnection - in units milliseconds. Default 5000 ms.";
26             }
27         }
28     }
29
30     container netconf-node-fields-optional {
31         description "Allows to create node's optional value with the path mapping according to
32             the network-topology -> topology -> node";
33         list topology {
34             key topology-id;
35             leaf topology-id {
36                 type nt:topology-id;
37                 description "The name of node's topology";
38             }
39             list node {
40                 key node-id;
41                 leaf node-id {
42                     type nt:node-id;
43                     description "The identifier of a node in the topology";
44                 }
45                 // Containers allow to create specific data-change-listener directly on a node's optional value.
46                 // In the future, it'll be easy to extend the node by optional node fields in this way. Do not create
47                 // direct leafs here, please.
48                 container datastore-lock {
49                     description "Allows to ignore lock/unlock node's datastare.";
50                     leaf datastore-lock-allowed {
51                         type boolean;
52                         default true;
53                         description "The operation allows the client to lock the entire configuration datastore
54                             system of a device.
55                             WARNING - With blocking the lock/unlock operations, the user is coming to operate
56                             in a manner which is not supported. It must not exist any concurrent access to
57                             the data store - it may interfere with data consistency.";
58                     }
59                 }
60             }
61         }
62     }
63
64     augment "/nt:network-topology/nt:topology/nt:node/" {
65         when "../../nt:topology-types/topology-netconf";
66         ext:augment-identifier "netconf-node-augmented-optional";
67         uses netconf-node-augmented-optional-fields;
68     }
69 }