Split out odl-netconf-device.yang
[netconf.git] / netconf / 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 netconf-node-optional { prefix nno; revision-date "2019-06-14"; }
8     import odl-netconf-device { prefix ond; }
9
10     revision 2022-12-25 {
11         description "Refactored into odl-netconf-device";
12     }
13
14     revision "2015-01-14" {
15         description "Initial revision of Topology model";
16     }
17
18     grouping netconf-node-fields {
19       uses ond:credentials;
20       uses ond:connection-parameters;
21       uses ond:netconf-schema-storage;
22     }
23
24     rpc create-device {
25         input {
26             uses netconf-node-fields;
27             uses nno:netconf-node-augmented-optional-fields;
28             leaf node-id {
29                 type string;
30             }
31         }
32     }
33
34     rpc delete-device {
35         input {
36             leaf node-id {
37                 type string;
38             }
39         }
40     }
41
42     augment "/nt:network-topology/nt:topology/nt:topology-types" {
43         container topology-netconf {
44             presence "The presence of the container node indicates a network
45                       of NETCONF devices";
46         }
47     }
48
49     augment "/nt:network-topology/nt:topology/nt:node" {
50         when "../../nt:topology-types/topology-netconf";
51         ext:augment-identifier "netconf-node";
52
53         uses netconf-node-fields;
54         uses ond:connection-oper;
55         uses nno:netconf-node-augmented-optional-fields;
56         ext:mount;
57     }
58 }