(#7175) ensure ensurable uses symbols in zone#976
Closed
vrthra wants to merge 1 commit intopuppetlabs:3.xfrom
vrthra:ticket/3.x/7175_fix_property_check
Closed
(#7175) ensure ensurable uses symbols in zone#976vrthra wants to merge 1 commit intopuppetlabs:3.xfrom vrthra:ticket/3.x/7175_fix_property_check
vrthra wants to merge 1 commit intopuppetlabs:3.xfrom
vrthra:ticket/3.x/7175_fix_property_check
Conversation
Contributor
Author
|
@joshcooper updated the test cases with positive and negative test cases of state_name. |
Contributor
|
@vrthra also puppet has the capability to define aliases for parameter values, e.g. the file type does: newparam(:replace, :boolean => true) do
...
newvalues(:true, :false)
aliasvalue(:yes, :true)
aliasvalue(:no, :false)
defaultto :true
end
This may simplify the different states that you are trying to alias (assuming the states are possible |
Contributor
Author
|
Postponing the newparam work (and other issues) to 15886 |
zone provider when asked to ensure the state to running/install or any thing tries to find the value in state_index however, state_index values stores keys as string. This is wrong. The root cause is that ensurable returns values as string rather than symbols. This inturn is caused by state_name checking for string value in state_alias which is a symbol to symbol map, and not finding any, and returning itself.
Contributor
|
Merged in commit af762d8 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zone provider when asked to ensure the state to running/install or any
thing tries to find the value in state_index however, state_index values
stores keys as string. This is wrong. The root cause is that
ensurable returns values as string rather than symbols. This inturn is
caused by state_name checking for string value in state_alias which is a
symbol to symbol map, and not finding any, and returning itself.