BUG-2310 - widen yang model for netconf-node.
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / yang / netconf-node-topology.yang
1 module netconf-node-topology {
2     namespace "urn:opendaylight:netconf-node-topology";
3     prefix "nettop";
4
5     import network-topology { prefix nt; revision-date 2013-10-21; }
6     import yang-ext { prefix ext; revision-date "2013-07-09";}
7     import ietf-inet-types { prefix inet; revision-date "2010-09-24"; }
8
9     revision "2015-01-14" {
10         description "Initial revision of Topology model";
11     }
12
13     augment "/nt:network-topology/nt:topology/nt:topology-types" {
14         container topology-netconf {
15         }
16     }
17
18     grouping netconf-node-fields {
19         leaf connection-status {
20             type enumeration {
21                 enum connecting;
22                 enum connected;
23                 enum unable-to-connect;
24             }
25         }
26
27         leaf host {
28             type inet:host;
29         }
30
31         leaf port {
32             type inet:port-number;
33         }
34
35         leaf connected-message {
36             type string;
37         }
38
39         container available-capabilities {
40             leaf-list available-capability {
41                 type string;
42             }
43         }
44
45         container unavailable-capabilities {
46             list unavailable-capability {
47                 leaf capability {
48                     type string;
49                 }
50
51                 leaf failure-reason {
52                     type enumeration {
53                         enum missing-source;
54                         enum unable-to-resolve;
55                     }
56                 }
57             }
58         }
59
60         container pass-through {
61             when "../connection-status = connected";
62             description
63                 "When the underlying node is connected, its NETCONF context
64                 is available verbatim under this container through the
65                 mount extension.";
66         }
67     }
68
69     augment "/nt:network-topology/nt:topology/nt:node" {
70         when "../../nt:topology-types/topology-netconf";
71         ext:augment-identifier "netconf-node";
72
73         uses netconf-node-fields;
74     }
75 }