Closed djberg96 closed 6 years ago
@miq-bot add_label blocker
@djberg96 can you add the gaprindashvili/yes label if this can be backported.
@JPrause Cannot apply the following label because they are not recognized: blocker
@JPrause This wouldn't be directly backported. I would release a new version of the gem, then submit a gemspec update to the azure provider repo. That PR would then be tagged.
lib/azure/armrest.rb
lib/azure/armrest/resource_group_based_service.rb
spec/resource_group_based_service_spec.rb
spec/template_deployment_service_spec.rb
In version 0.8.2 we added the ability to allow either
lower_case
orcamelCase
options for thecreate
method. This convenience was handy and consistent with our model generation methods.However, this caused a bug in the
TemplateDeploymentService#create
method where you don't actually want to transform keys in templates, but keep them as-is, because they aren't interchangeable.This PR fixes the issue by updating the
ResourceGroupBasedService
andTemplateDeploymentService
. From now on it will use the private methodtransform_keys?
internally to check to see if the keys should be transformed first. Individual subclasses can override this method simply by redefining it to returnfalse
.Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1568009
Update: as per Bill's request, the method was altered so that subclasses have more granular control over which keys are transformed.