Blame SOURCES/0032-Add-other-valid-controllers-to-cgconfig-lens.patch

ab36df
From 341c2c039d0f34a0a304e5be84f925cbfd5bf2a6 Mon Sep 17 00:00:00 2001
ab36df
From: Andy Grimm <agrimm@redhat.com>
ab36df
Date: Mon, 23 Jun 2014 12:51:35 -0400
ab36df
Subject: [PATCH] Add other valid controllers to cgconfig lens
ab36df
ab36df
(cherry picked from commit 45ed30e0a48e56091c5c43aefef46984dde142df)
ab36df
ab36df
Conflicts:
ab36df
	NEWS
ab36df
---
ab36df
 AUTHORS                        |  1 +
ab36df
 lenses/cgconfig.aug            |  2 +-
ab36df
 lenses/tests/test_cgconfig.aug | 41 +++++++++++++++++++++++++++++++++++++++++
ab36df
 3 files changed, 43 insertions(+), 1 deletion(-)
ab36df
ab36df
diff --git a/AUTHORS b/AUTHORS
ab36df
index 5f646eb..514ad45 100644
ab36df
--- a/AUTHORS
ab36df
+++ b/AUTHORS
ab36df
@@ -34,6 +34,7 @@ Contributions by:
ab36df
   Michal Filka                <michal.filka@suse.cz>
ab36df
   Marc Fournier               <marc.fournier@camptocamp.com>
ab36df
   Davide Guerri               <davide.guerri@gmail.com>
ab36df
+  Andy Grimm                  <agrimm@redhat.com>
ab36df
   Travis Groth                <tgroth@gmail.com>
ab36df
   Adam Helms                  <helms.adam@gmail.com>
ab36df
   Harald Hoyer                <harald@redhat.com>
ab36df
diff --git a/lenses/cgconfig.aug b/lenses/cgconfig.aug
ab36df
index 9f960d2..0180a99 100644
ab36df
--- a/lenses/cgconfig.aug
ab36df
+++ b/lenses/cgconfig.aug
ab36df
@@ -28,7 +28,7 @@ module Cgconfig =
ab36df
 
ab36df
    let id        = /[a-zA-Z0-9_\/.-]+/
ab36df
    let name      = /[^#= \n\t{}\/]+/
ab36df
-   let cont_name = /(cpuacct|cpu|devices|ns|cpuset|memory|freezer|net_cls)/
ab36df
+   let cont_name = /(cpuacct|cpu|devices|ns|cpuset|memory|freezer|net_cls|blkio|hugetlb|perf_event)/
ab36df
    let role_name = /(admin|task)/
ab36df
    let id_name   = /(uid|gid)/
ab36df
    let address   = /[^#; \n\t{}]+/
ab36df
diff --git a/lenses/tests/test_cgconfig.aug b/lenses/tests/test_cgconfig.aug
ab36df
index 458e074..42b0848 100644
ab36df
--- a/lenses/tests/test_cgconfig.aug
ab36df
+++ b/lenses/tests/test_cgconfig.aug
ab36df
@@ -257,3 +257,44 @@ test Cgconfig.lns get group4 =
ab36df
 test Cgconfig.lns put "group tst {memory {}}" after
ab36df
   set "/group" "tst2"
ab36df
 = "group tst2 {memory {}}"
ab36df
+
ab36df
+let group5="
ab36df
+group user {
ab36df
+	cpuacct {}
ab36df
+        cpu {}
ab36df
+        cpuset {}
ab36df
+        devices {}
ab36df
+        freezer {}
ab36df
+        memory {}
ab36df
+        net_cls {}
ab36df
+        blkio {}
ab36df
+        hugetlb {}
ab36df
+        perf_event {}
ab36df
+}"
ab36df
+
ab36df
+test Cgconfig.lns get group5 =
ab36df
+  {  }
ab36df
+  { "group" = "user"
ab36df
+    {  }
ab36df
+    { "controller" = "cpuacct" }
ab36df
+    {  }
ab36df
+    { "controller" = "cpu" }
ab36df
+    {  }
ab36df
+    { "controller" = "cpuset" }
ab36df
+    {  }
ab36df
+    { "controller" = "devices" }
ab36df
+    {  }
ab36df
+    { "controller" = "freezer" }
ab36df
+    {  }
ab36df
+    { "controller" = "memory" }
ab36df
+    {  }
ab36df
+    { "controller" = "net_cls" }
ab36df
+    {  }
ab36df
+    { "controller" = "blkio" }
ab36df
+    {  }
ab36df
+    { "controller" = "hugetlb" }
ab36df
+    {  }
ab36df
+    { "controller" = "perf_event" }
ab36df
+    {  }
ab36df
+  }
ab36df
+