New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dev.icinga.com #13273] support-for-functions-as-parameters #151
Comments
Updated by lbetz on 2016-11-22 08:58:16 +00:00
|
Updated by bsheqa on 2016-11-23 13:00:26 +00:00
|
Updated by bsheqa on 2016-11-23 13:07:30 +00:00 David on Github:
|
Updated by bsheqa on 2016-11-23 13:28:39 +00:00
|
Updated by kwisatz on 2016-11-23 16:53:56 +00:00 For the record, the regex I suggested was
And the test that went with it:
What it didn't test is function bodies that contain operators such as the plus sign, as mentioned in the comment above. In that case, the first regex
already matches and we never even get to the one I suggested. So this entire section needs to be rethought. (I actually need this to work in our infrastructure quite soon if I don't want to rewrite the entire thing using resource exports.) |
Updated by bsheqa on 2016-11-23 17:28:09 +00:00 This state can also be found in the branch feature/support-for-functions-as-parameters-13273 Is it sufficient for you to use the file ressource and tag it with @ icinga2::config::file@? |
Updated by kwisatz on 2016-11-24 09:24:11 +00:00 bsheqa wrote:
Haven't tried it yet, but I will. Taking that into account, are you still considering adding support for function parameters to the Object resource or not? I have made some progress with modified parse() and value_types() methods that only fail on two test cases, one of which I don't understand and the other I haven't looked into yet: Here I don't see the difference between expected and actual, really (Note that this is a spec I added):
And this one I haven't yet looked into in detail:
|
Updated by kwisatz on 2016-11-24 09:37:38 +00:00 bsheqa wrote:
This works for me, yes. But of course it relies on me for syntax checks ;) |
Updated by kwisatz on 2016-11-24 16:08:58 +00:00 OK, the second failing test now passed, I had removed a condition to be able to test this offline (where the specs only run when connected to the Internet…) but the first is still baffling and I'll continue looking. |
Updated by kwisatz on 2016-11-24 18:02:23 +00:00 OK, I don't get those tests, sorry. Here's the code I came up with, I'm sure it can be refactored to be more concise. For now I will focus on finishing our set-up using the custom configuration files, but I'll try to be of as much help as possible in the future.
|
Updated by lbetz on 2016-12-10 11:23:31 +00:00
|
Updated by bsheqa on 2016-12-29 07:44:54 +00:00
|
Updated by bsheqa on 2017-01-09 10:07:45 +00:00
|
Honestly, I think that stressing that "very complex" behavior in host or service objects should not be realized in Puppet but using tagged files instead. Ok, you're losing the syntax checks puppet offers, but icinga2 will catch those kind of errors. |
I agree with that. I will close this issue and remove the branch. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13273
Created by lbetz on 2016-11-22 08:33:33 +00:00
Assignee: lbetz
Status: New
Target Version: (none)
Last Update: 2017-01-09 10:07:45 +00:00 (in Redmine)
fct(a,b) use © {...}
We could maybe have % [ $1.split().map ], but not for $2 or $3, since that would defeat the purpose of this...
The text was updated successfully, but these errors were encountered: