Blame lenses/tests/test_cgrules.aug
|
Packit Service |
a2ae7a |
module Test_cgrules =
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let conf="#cgrules test configuration file
|
|
Packit Service |
a2ae7a |
poooeter cpu test1/
|
|
Packit Service |
a2ae7a |
% memory test2/
|
|
Packit Service |
a2ae7a |
@somegroup cpu toto/
|
|
Packit Service |
a2ae7a |
% devices toto1/
|
|
Packit Service |
a2ae7a |
% memory toto3/
|
|
Packit Service |
a2ae7a |
"
|
|
Packit Service |
a2ae7a |
test Cgrules.lns get conf =
|
|
Packit Service |
a2ae7a |
{ "#comment" = "cgrules test configuration file" }
|
|
Packit Service |
a2ae7a |
{ "user" = "poooeter"
|
|
Packit Service |
a2ae7a |
{ "cpu" = "test1/" }
|
|
Packit Service |
a2ae7a |
{ "memory" = "test2/" } }
|
|
Packit Service |
a2ae7a |
{ "group" = "somegroup"
|
|
Packit Service |
a2ae7a |
{ "cpu" = "toto/" }
|
|
Packit Service |
a2ae7a |
{ "devices" = "toto1/" }
|
|
Packit Service |
a2ae7a |
{ "memory" = "toto3/" } }
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
test Cgrules.lns put conf after
|
|
Packit Service |
a2ae7a |
set "user/cpu" "test3/";
|
|
Packit Service |
a2ae7a |
rm "user/memory";
|
|
Packit Service |
a2ae7a |
rm "group";
|
|
Packit Service |
a2ae7a |
insa "devices" "user/*[last()]";
|
|
Packit Service |
a2ae7a |
set "user/devices" "newtest/";
|
|
Packit Service |
a2ae7a |
insb "memory" "user/devices";
|
|
Packit Service |
a2ae7a |
set "user/memory" "memtest/"
|
|
Packit Service |
a2ae7a |
= "#cgrules test configuration file
|
|
Packit Service |
a2ae7a |
poooeter cpu test3/
|
|
Packit Service |
a2ae7a |
% memory memtest/
|
|
Packit Service |
a2ae7a |
% devices newtest/
|
|
Packit Service |
a2ae7a |
"
|