-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement scoped parameters #115
Comments
i want this done badly enough to start working on it :) |
Let's talk at some point about the config vs param divide and whether the two sets of data should be handled the same way. I'm slightly worried that moving our config management out of the Cement library could break things in the future. We should either subclass our config handler from the Cement IConfig handler or make a clean break. |
so, i think that a must-have feature of parameters is that they be organized in a hierarchy (i.e. this feature). given that iirc IConfig wants to write flat ini-files, i think that's an argument for putting config in IConfig and implementing our own parameter handling with a YAML backend. |
That’s kinda the point of the current config implementation. |
I think keeping CLI/app config separate from scoped parameters makes sense. It should't be a very big or disruptive change at this point, and it keeps the params hierarchy cleaner. The only downside I see is if it becomes confusing to decide what is a config vs a parameter. But I don't really think that modifying the config via the app is necessary, just modify the config file. Params, on the other hand, do make sense to be modifiable by the app. |
Actually, I don’t agree with you about modifying the configs via the app. I think it’s a very useful capability to allow this, and one which the IAM folks were interested in. In particular, for setting up there own registry URLs and repos that aren’t on github. Separating them into two separate files is fine, but I don’t see the driving reason for it. On November 15, 2013 at 3:33:30 PM, Daniel Silverman ([email protected]) wrote: I think keeping CLI/app config separate from scoped parameters makes sense. It should't be a very big or disruptive change at this point, and it keeps the params hierarchy cleaner. The only downside I see is if it becomes confusing to decide what is a config vs a parameter. But I don't really think that modifying the config via the app is necessary, just modify the config file. Params, on the other hand, do make sense to be modifiable by the app. — |
i'm with @robparrott on this one; for the Stewies of the world, modifying a text file can be scary and fraught with peril (fun with line endings, anyone?), and so i think it behooves us to give them a way to do all the configuration they need via the app. i think the driving force is the idea that Cement's native config manager is way more robust than anything that we're going to implement in any short period of time, and so we should leverage it as much as possible. our only configuration-related use case where it's not a good fit is the parameters, since we need them to be hierarchical; thus, we should use the native config management as much as possible, and then do something with YAML for the parameters. |
Ok, so we will:
|
We want a user to be able to set a parameter on a provider, a cloudlet or specific blueprint, as well as the current options which are "global" and "this session".
Suggest command line looks like:
I suggest implementing by structuring the parameters dictionary as
Given that YAML <----> dict() is robust, coding this up should be straightforward. We'll want to be sure to cleanup unneeded dicts()
The text was updated successfully, but these errors were encountered: