Skip to content

(#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#976
vrthra wants to merge 1 commit intopuppetlabs:3.xfrom
vrthra:ticket/3.x/7175_fix_property_check

Conversation

@vrthra
Copy link
Contributor

@vrthra vrthra commented Jul 27, 2012

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.

@vrthra
Copy link
Contributor Author

vrthra commented Aug 8, 2012

@joshcooper updated the test cases with positive and negative test cases of state_name.

@joshcooper
Copy link
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 ensure values)

@vrthra
Copy link
Contributor Author

vrthra commented Aug 8, 2012

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.
@joshcooper
Copy link
Contributor

Merged in commit af762d8

@joshcooper joshcooper closed this Aug 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants