Merge "NECONF-524 : Setting the netconf keepalive logic to be more proactive."
[netconf.git] / netconf / sal-netconf-connector / src / main / yang / netconf-keystore.yang
index d3da9f430625c3fd17c9c9ef7a78b9a971c86b45..dba3b35ba5626b41d2a5f38016f59084ebb4027f 100644 (file)
@@ -37,8 +37,45 @@ module netconf-keystore {
         }
     }
 
+    grouping private-keys {
+        list private-key {
+            key name;
+            description "A private key.";
+            leaf name {
+                type string;
+            }
+            leaf data {
+                description "Base64 encoded private key.";
+                type string;
+            }
+            leaf-list certificate-chain {
+                description "A certificate chain for this public key. Each certificate is an X.509 v3 certificate
+                             structure as specified by RFC5280, encoded using the Base64 format.";
+                type string;
+            }
+        }
+    }
+
+    grouping trusted-certificates {
+        list trusted-certificate {
+            key name;
+            description "A list of trusted certificate. These cerfitifcates can be used by a server to
+                         authenticate clients, or by clients to authenticate servers.";
+            leaf name {
+                type string;
+            }
+            leaf certificate {
+                description "An X.509 v3 certificate structure as specified by RFC5280, encoded using
+                             the Base64 format.";
+                type string;
+            }
+        }
+    }
+
     container keystore {
         uses keystore-entry;
+        uses private-keys;
+        uses trusted-certificates;
     }
 
     rpc add-keystore-entry {
@@ -57,4 +94,36 @@ module netconf-keystore {
             }
         }
     }
+
+    rpc add-private-key {
+        description "Add a list of private keys into the keystore.";
+        input {
+            uses private-keys;
+        }
+    }
+
+    rpc remove-private-key {
+        description "Remove a list of private keys from the datastore.";
+        input {
+            leaf-list name {
+                type string;
+            }
+        }
+    }
+
+    rpc add-trusted-certificate {
+        description "Add a list of trusted certificates into the keystore.";
+        input {
+            uses trusted-certificates;
+        }
+    }
+
+    rpc remove-trusted-certificate {
+        description "Remove a list of trusted certificates from the datastore.";
+        input {
+            leaf-list name {
+                type string;
+            }
+        }
+    }
 }
\ No newline at end of file