Skip to content
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

Modification for attribute precedence issue #330

Merged

Conversation

Aliasgar16
Copy link

No description provided.

@Aliasgar16
Copy link
Author

For more details refer #328

@@ -824,7 +824,7 @@ def create_server_def
:groups => config[:security_groups],
:security_group_ids => locate_config_value(:security_group_ids),
:flavor_id => locate_config_value(:flavor),
:key_name => Chef::Config[:knife][:aws_ssh_key_id],
:key_name => config[:ssh_key_name] || Chef::Config[:knife][:aws_ssh_key_id],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can replace this with locate_config_value(:ssh_key_name) . locate_config_value will take care of precedence.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'locate_config_value' method accesses values from both the configs(CLI and knife) through the same name, but here the issue is that CLI option name in code is 'ssh_key_name', while on the other hand knife option name is 'aws_ssh_key_id', for other options the names are same so it works for them.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aliasgar16
Ohh Ok. Then,
I think we should change :aws_ssh_key_id option to :ssh_key_name (i.e make consistent with others option) but also support :aws_ssh_key_id with depreciation warning message, eventually we will remove support for :aws_ssh_key_id

@adamedx ^ Please comment on this!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes...I will do the required changes to make name consistency between :aws_ssh_key_id and :ssh_key_name option, along with deprecation message.

@NimishaS NimishaS force-pushed the ali/attribute_precedence_issue branch from 2ed05a6 to 05388fb Compare July 17, 2015 07:21
NimishaS pushed a commit that referenced this pull request Jul 17, 2015
…ence_issue

Modification for attribute precedence issue
@NimishaS NimishaS merged commit f70a823 into chef:master Jul 17, 2015
@NimishaS NimishaS deleted the ali/attribute_precedence_issue branch July 17, 2015 07:30
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.

4 participants