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

(GH-155) Fix CIM Instance munging in invoke_get_method for DSC Base Provider #158

Merged
merged 1 commit into from
Jun 21, 2021
Merged

(GH-155) Fix CIM Instance munging in invoke_get_method for DSC Base Provider #158

merged 1 commit into from
Jun 21, 2021

Conversation

michaeltlombardi
Copy link
Contributor

@michaeltlombardi michaeltlombardi commented Jun 21, 2021

Prior to this PR, CIM Instances were not properly munged in invoke_get_method. The keys for CIM Instance hashes were camelCased instead of downcased and top-level CIM Instance hashes included the cim_instance_type key when only nested CIM Instances should include that key.

This PR ensures that enumerables returned from DSC are appropriately munged by downcasing all hash keys and removing the cim_instance_type key from any non-nested CIM Instance properties.

It replaces the camelcase_hash_keys! method with the downcase_hash_keys! method and introduces the new munge_cim_instances! method.

Prior to this commit, CIM Instances were not properly munged in invoke_get_method.
The keys for CIM Instance hashes were camelcased instead of downcased and top-level
CIM Instance hashes included the cim_instance_type key when only nested CIM Instances
should include that key.

This commit ensures that enumerables returned from DSC are appropriately munged by
downcasing all hash keys and removing the cim_instance_type key from any non-nested
CIM Instance properties.

It replaces the camelcase_hash_keys! method with the downcase_hash_keys! method and
introduces the new munge_cim_instances! method.
@michaeltlombardi michaeltlombardi changed the title (GH-155) Fix CIM instance munging in DSC (GH-155) Fix CIM Instance munging in invoke_get_method for DSC Base Provider Jun 21, 2021
@jpogran jpogran merged commit 73f707e into puppetlabs:main Jun 21, 2021
@michaeltlombardi michaeltlombardi deleted the gh-155/main/correct-cim-munging branch June 22, 2021 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Returned values for CIM Instances is incorrect against Type Schema
2 participants