Add import for netconf-node-optional
[netconf.git] / netconf / netconf-console / src / test / resources / schemas / netconf-node-topology.yang
index 07461d48d75f67327cf0c6e380a4af454fa748ee..cb1948d8f92240baeb848c3c1e5f6dd897d139ca 100644 (file)
@@ -5,6 +5,7 @@ module netconf-node-topology {
     import network-topology { prefix nt; revision-date 2013-10-21; }
     import yang-ext { prefix ext; revision-date "2013-07-09";}
     import ietf-inet-types { prefix inet; revision-date "2013-07-15"; }
+    import netconf-node-optional {prefix nno; revision-date "2019-06-14";  }
 
     revision "2015-01-14" {
         description "Initial revision of Topology model";
@@ -15,17 +16,50 @@ module netconf-node-topology {
         }
     }
 
-    grouping netconf-node-credentials {
+    grouping username-password {
+        leaf username {
+            type string;
+        }
+
+        leaf password {
+            type string;
+        }
+    }
 
+    grouping netconf-node-credentials {
         choice credentials {
             config true;
             case login-password {
-                leaf username {
-                    type string;
+                description "Deprecated way of storing credentials, unencrypted.";
+
+                status deprecated;
+                uses username-password;
+            }
+            case login-pw {
+                description "login-password credentials, encrypted.";
+
+                container login-password {
+                    uses username-password;
                 }
+            }
+            case login-pw-unencrypted {
+                description "login-password credentials, not encrypted.";
 
-                leaf password {
-                    type string;
+                container login-password-unencrypted {
+                    uses username-password;
+                }
+            }
+            case key-auth {
+                description "key-based authentication, use the id for the pair thats stored in the keystore.";
+
+                container key-based {
+                    leaf key-id {
+                        type string;
+                    }
+
+                    leaf username {
+                        type string;
+                    }
                 }
             }
         }
@@ -46,6 +80,30 @@ module netconf-node-topology {
             type boolean;
         }
 
+        container protocol {
+            config true;
+            leaf name {
+                type enumeration {
+                    enum SSH;
+                    enum TLS;
+                }
+                default SSH;
+            }
+
+            choice specification {
+                case tls-case {
+                   container tls {
+                       leaf-list excluded-versions {
+                           type string;
+                           description "A list of TLS version names provided in JDK that are not supported by the
+                                        target netconf device, eg, the netopeer2 simulator does not support the
+                                        SSLv2Hello. Most of the time, this list need not be set";
+                       }
+                   }
+                }
+            }
+        }
+
         leaf schemaless {
             type boolean;
             default false;
@@ -66,6 +124,23 @@ module netconf-node-topology {
             }
         }
 
+        container non-module-capabilities {
+            config true;
+            leaf override {
+                type boolean;
+                default false;
+                description "Whether to override or merge this list of non-module based capabilities with non-module
+                             based capabilities from device";
+            }
+
+            leaf-list capability {
+                type string;
+                description "Set a list of non-module based capabilities to override or merge non-module capabilities
+                             provided in device's hello message. Can be used for devices that do not report or
+                             incorrectly report non-module based capabilities in their hello message";
+            }
+        }
+
         leaf reconnect-on-changed-schema {
             config true;
             type boolean;
@@ -126,6 +201,24 @@ module netconf-node-topology {
             description "Limit of concurrent messages that can be send before reply messages are received.
                          If value <1 is provided, no limit will be enforced";
         }
+
+        leaf actor-response-wait-time {
+                    config true;
+                    type uint16 {
+                      range "1..max";
+                    }
+                    default 5;
+                    description "Time that slave actor will wait for response from master.";
+        }
+
+        container odl-hello-message-capabilities {
+            config true;
+            leaf-list capability {
+                type inet:uri;
+                description "Certain devices are non-accepting of ODL's hello message.  This allows specification of
+                             a custom ODL hello message based on a list of supported capabilities.";
+            }
+        }
     }
 
     grouping netconf-node-connection-status {
@@ -153,6 +246,10 @@ module netconf-node-topology {
                     }
                 }
             }
+            leaf netconf-master-node {
+                config false;
+                type string;
+            }
         }
 
         leaf connected-message {
@@ -239,13 +336,32 @@ module netconf-node-topology {
         uses netconf-node-connection-status;
 
         uses netconf-schema-storage;
+        uses nno:netconf-node-augmented-optional-fields ;
 
     }
 
+    rpc create-device {
+        input {
+            uses netconf-node-fields;
+            leaf node-id {
+                type string;
+            }
+        }
+    }
+
+    rpc delete-device {
+        input {
+            leaf node-id {
+                type string;
+            }
+        }
+    }
+
     augment "/nt:network-topology/nt:topology/nt:node" {
         when "../../nt:topology-types/topology-netconf";
         ext:augment-identifier "netconf-node";
 
         uses netconf-node-fields;
     }
+
 }