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

Fixes #10853 - add config_template_ids back to organization #2470

Closed

Conversation

mbacovsky
Copy link
Member

before_filter converting config_template_ids to provisioning_template_ids is missing from taxonomies which is breaking backward compatibility and hammer bats tests

@mbacovsky
Copy link
Member Author

@@ -76,6 +77,13 @@ def destroy

private

def rename_config_template
if params[taxonomy_single.to_sym] && !params[taxonomy_single.to_sym][:config_template_ids].nil?
Copy link
Member

Choose a reason for hiding this comment

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

Could you please modify params[taxonomy_single.to_sym] to params[taxonomy_single]? we don't need to convert it to symbol since params are HashWithIndifferentAccess. I know it's not related to this issue but I'd consider the same change everywhere in this controller as acceptable in this PR.

@ares
Copy link
Member

ares commented Jun 18, 2015

One more thing, we're missing :provisioning_template_ids in apipie param group.

@mbacovsky
Copy link
Member Author

@ares, .to_sym was removed and provisioning_template_ids was added into apipie doc. Note for testing: it propagates to hammer hammer organization create but not into hammer organization add-config-template which requires hammer patch

@ares
Copy link
Member

ares commented Jun 18, 2015

Except one nit it's OK. I created a hammer issue to provide add-provisioning-template command at http://projects.theforeman.org/issues/10862. During testing I found and reported one issue http://projects.theforeman.org/issues/10863 related to taxonomies.

@mbacovsky
Copy link
Member Author

@ares, present? looks better indeed. Thanks for the issues filed

@ares
Copy link
Member

ares commented Jun 18, 2015

👍 pending tests

@mbacovsky
Copy link
Member Author

[test]

@@ -20,6 +21,7 @@ module Api::V2::TaxonomiesController
param :compute_resource_ids, Array, N_("Compute resource IDs"), :required => false
param :media_ids, Array, N_("Media IDs"), :required => false
param :config_template_ids, Array, N_("Provisioning template IDs"), :required => false
param :provisioning_template_ids, Array, N_("Provisioning template IDs"), :required => false
Copy link
Member

Choose a reason for hiding this comment

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

Leave a note - deprecated or something like that

Copy link
Member

Choose a reason for hiding this comment

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

I was against custom deprecated string here, it's planned to have support for marking params as deprecated in apipie, maybe leaving a comment to easily find this later would be enough

Copy link
Member Author

Choose a reason for hiding this comment

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

@elobato I've added just a FIXME comment to locate the place. We should add support for deprecated options into Apipie first. Then this is information could be reused in docs and Hammer. I filed issue as a reminder http://projects.theforeman.org/issues/10869

@ares
Copy link
Member

ares commented Jun 22, 2015

@elobato anything that prevents this PR to be merged or can I go ahead?

@dLobatog
Copy link
Member

Merged as ebceac9, thanks @mbacovsky!

@dLobatog dLobatog closed this Jun 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants