[PATCH] Support for crypto_ and nodelist in lenses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
---
 conf/lenses/corosync.aug            |   18 +++++++++++++++++-
 conf/lenses/tests/test_corosync.aug |   31 +++++++++++++++++++++++++++++--
 2 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/conf/lenses/corosync.aug b/conf/lenses/corosync.aug
index 3050478..1f0b054 100644
--- a/conf/lenses/corosync.aug
+++ b/conf/lenses/corosync.aug
@@ -51,6 +51,8 @@ let totem =
     |kv "vsftype" /none|ykd/
     |kv "secauth" /on|off/
     |kv "crypto_type" /nss|aes256/
+    |kv "crypto_cipher" /none|nss|aes256/
+    |kv "crypto_hash" /none|md5|sha1|sha256|sha384|sha512/
     |kv "transport" /udp|iba/
     |kv "version" Rx.integer
     |kv "nodeid" Rx.integer
@@ -160,6 +162,20 @@ let uidgid =
    qstr /uid|gid/ in
   section "uidgid" setting
 
-let lns = (comment|empty|totem|quorum|logging|resources|service|uidgid)*
+(* The node section *)
+let node =
+  let setting =
+   qstr /ring[0-9]_addr/
+   |kv "nodeid" Rx.integer
+   |kv "quorum_votes" Rx.integer in
+  section "node" setting
+
+(* The nodelist section *)
+let nodelist =
+  let setting =
+    node in
+  section "nodelist" setting
+
+let lns = (comment|empty|totem|quorum|logging|resources|service|uidgid|nodelist)*
 
 let xfm = transform lns (incl "/etc/corosync/corosync.conf")
diff --git a/conf/lenses/tests/test_corosync.aug b/conf/lenses/tests/test_corosync.aug
index f67782f..486b543 100644
--- a/conf/lenses/tests/test_corosync.aug
+++ b/conf/lenses/tests/test_corosync.aug
@@ -5,7 +5,8 @@ module Test_corosync =
 totem {
 	version: 2
 	secauth: off
-	crypto_type: nss
+	crypto_cipher: none
+	crypto_hash: none
 	threads: 0
 	clear_node_high_bit: no
 	rrp_mode: none
@@ -70,6 +71,20 @@ resources {
 uidgid {
     uid: 0
     gid: 0
+}
+
+nodelist {
+	node {
+		ring0_addr: 192.168.122.1
+		nodeid: 1
+		quorum_votes: 2
+	}
+
+	node {
+		ring0_addr: 192.168.122.2
+		ring1_addr: 192.168.123.1
+		nodeid: 2
+	}
 }\n"
 
 test Corosync.lns get conf =
@@ -79,7 +94,8 @@ test Corosync.lns get conf =
   { "totem"
 	{ "version" = "2" }
 	{ "secauth" = "off" }
-	{ "crypto_type" = "nss" }
+	{ "crypto_cipher" = "none" }
+	{ "crypto_hash" = "none" }
 	{ "threads" = "0" }
     { "clear_node_high_bit" = "no" }
     { "rrp_mode" = "none" }
@@ -134,3 +150,14 @@ test Corosync.lns get conf =
   { "uidgid"
     { "uid" = "0" }
     { "gid" = "0" } }
+  { }
+  { "nodelist"
+    { "node"
+      { "ring0_addr" = "192.168.122.1" }
+      { "nodeid" = "1" }
+      { "quorum_votes" = "2" } }
+    { }
+    { "node"
+      { "ring0_addr" = "192.168.122.2" }
+      { "ring1_addr" = "192.168.123.1" }
+      { "nodeid" = "2" } } }
-- 
1.7.1

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux