forked from Normation/rudder
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
279 additions
and
13 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
rudder-lang/tests/test_files/tester/parameters/technique.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "parameters", | ||
"description": "technique using parameters", | ||
"version": "1.0", | ||
"parameter": [ | ||
{ | ||
"name": "paramtest", | ||
"id": "d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60", | ||
"constraints": { | ||
"allow_whitespace_string": false, | ||
"allow_empty_string": false, | ||
"max_length": 16384 | ||
}, | ||
"type": "string" | ||
} | ||
], | ||
"bundle_name": "parameters", | ||
"bundle_args": [ | ||
"paramtest" | ||
], | ||
"method_calls": [ | ||
{ | ||
"class_context": "any", | ||
"component": "Package absent", | ||
"method_name": "package_absent", | ||
"args": [ | ||
"vpn", | ||
"", | ||
"", | ||
"" | ||
] | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
rudder-lang/tests/test_files/tester/parameters/technique.rl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file has been generated with rltranslate | ||
@format=0 | ||
|
||
@name="parameters" | ||
@description="technique using parameters" | ||
@version="1.0" | ||
@parameters=[{"constraints":{"allow_empty_string":false,"allow_whitespace_string":false,"max_length":16384},"id":"d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60","name":"paramtest","type":"string"}] | ||
|
||
resource parameters(paramtest) | ||
|
||
parameters state technique() { | ||
@component = "Package absent" | ||
package("vpn").absent("","","") as package_absent_vpn | ||
} |
14 changes: 14 additions & 0 deletions
14
rudder-lang/tests/test_files/tester/parameters/technique.rl.cf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# generated by rudder-lang | ||
# @name parameters | ||
# @description technique using parameters | ||
# @version 1.0 | ||
# @parameter { "name": "paramtest", "id": "d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60", "constraints": { "allow_whitespace_string":1,"max_length":16384,"allow_empty_string":1 } } | ||
|
||
bundle agent parameters_technique(paramtest) | ||
{ | ||
vars: | ||
"resources_dir" string => "${this.promise_dirname}/resources"; | ||
methods: | ||
"Package absent_${report_data.directive_id}_0" usebundle => _method_reporting_context("Package absent", ""); | ||
"Package absent_${report_data.directive_id}_0" usebundle => package_absent("vpn", "", "", ""); | ||
} |
34 changes: 34 additions & 0 deletions
34
rudder-lang/tests/test_files/tester/parameters/technique.rl.cf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "parameters", | ||
"description": "technique using parameters", | ||
"version": "1.0", | ||
"parameter": [ | ||
{ | ||
"name": "paramtest", | ||
"id": "d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60", | ||
"constraints": { | ||
"allow_whitespace_string": false, | ||
"allow_empty_string": false, | ||
"max_length": 16384 | ||
}, | ||
"type": "string" | ||
} | ||
], | ||
"bundle_name": "parameters_technique", | ||
"bundle_args": [ | ||
"paramtest" | ||
], | ||
"method_calls": [ | ||
{ | ||
"class_context": "any", | ||
"component": "Package absent", | ||
"method_name": "package_absent", | ||
"args": [ | ||
"vpn", | ||
"", | ||
"", | ||
"" | ||
] | ||
} | ||
] | ||
} |
45 changes: 45 additions & 0 deletions
45
rudder-lang/tests/test_files/tester/parameters_mult/technique.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "parameters mult", | ||
"description": "technique using multiple parameters", | ||
"version": "1.0", | ||
"parameter": [ | ||
{ | ||
"name": "paramtest", | ||
"id": "d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60", | ||
"constraints": { | ||
"allow_whitespace_string": false, | ||
"allow_empty_string": false, | ||
"max_length": 16384 | ||
}, | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "12", | ||
"id": "6e82d276-1181-4596-8fd8-bc3c007ae9ff", | ||
"constraints": { | ||
"allow_whitespace_string": false, | ||
"allow_empty_string": false, | ||
"max_length": 16384 | ||
}, | ||
"type": "string" | ||
} | ||
], | ||
"bundle_name": "parameters_mult", | ||
"bundle_args": [ | ||
"paramtest", | ||
"12" | ||
], | ||
"method_calls": [ | ||
{ | ||
"class_context": "any", | ||
"component": "Package absent", | ||
"method_name": "package_absent", | ||
"args": [ | ||
"vpn", | ||
"", | ||
"", | ||
"" | ||
] | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
rudder-lang/tests/test_files/tester/parameters_mult/technique.rl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# This file has been generated with rltranslate | ||
@format=0 | ||
|
||
@name="parameters mult" | ||
@description="technique using multiple parameters" | ||
@version="1.0" | ||
@parameters=[{"constraints":{"allow_empty_string":false,"allow_whitespace_string":false,"max_length":16384},"id":"d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60","name":"paramtest","type":"string"},{"constraints":{"allow_empty_string":false,"allow_whitespace_string":false,"max_length":16384},"id":"6e82d276-1181-4596-8fd8-bc3c007ae9ff","name":"12","type":"string"}] | ||
|
||
resource parameters_mult(paramtest,12) | ||
|
||
parameters_mult state technique() { | ||
@component = "Package absent" | ||
package("vpn").absent("","","") as package_absent_vpn | ||
} |
15 changes: 15 additions & 0 deletions
15
rudder-lang/tests/test_files/tester/parameters_mult/technique.rl.cf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# generated by rudder-lang | ||
# @name parameters mult | ||
# @description technique using multiple parameters | ||
# @version 1.0 | ||
# @parameter { "name": "paramtest", "id": "d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60", "constraints": { "allow_empty_string":1,"max_length":16384,"allow_whitespace_string":1 } } | ||
# @parameter { "name": "12", "id": "6e82d276-1181-4596-8fd8-bc3c007ae9ff", "constraints": { "allow_empty_string":1,"allow_whitespace_string":1,"max_length":16384 } } | ||
|
||
bundle agent parameters_mult_technique(paramtest,12) | ||
{ | ||
vars: | ||
"resources_dir" string => "${this.promise_dirname}/resources"; | ||
methods: | ||
"Package absent_${report_data.directive_id}_0" usebundle => _method_reporting_context("Package absent", ""); | ||
"Package absent_${report_data.directive_id}_0" usebundle => package_absent("vpn", "", "", ""); | ||
} |
45 changes: 45 additions & 0 deletions
45
rudder-lang/tests/test_files/tester/parameters_mult/technique.rl.cf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "parameters mult", | ||
"description": "technique using multiple parameters", | ||
"version": "1.0", | ||
"parameter": [ | ||
{ | ||
"name": "paramtest", | ||
"id": "d74a03dd-5b0b-4b06-8dcf-b4e0cb387c60", | ||
"constraints": { | ||
"allow_whitespace_string": false, | ||
"allow_empty_string": false, | ||
"max_length": 16384 | ||
}, | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "12", | ||
"id": "6e82d276-1181-4596-8fd8-bc3c007ae9ff", | ||
"constraints": { | ||
"allow_whitespace_string": false, | ||
"allow_empty_string": false, | ||
"max_length": 16384 | ||
}, | ||
"type": "string" | ||
} | ||
], | ||
"bundle_name": "parameters_mult_technique", | ||
"bundle_args": [ | ||
"paramtest", | ||
"12" | ||
], | ||
"method_calls": [ | ||
{ | ||
"class_context": "any", | ||
"component": "Package absent", | ||
"method_name": "package_absent", | ||
"args": [ | ||
"vpn", | ||
"", | ||
"", | ||
"" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters