-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PDB-3620) Use string 'alias' as a key in the parameters hash
In Puppet 5, Catalog#to_data_hash will only emit data types that are safe for JSON, YAML, etc, and in particular will never emit Symbols. When synthesizing an edge from any resource to an aliased resource: require => Package['my_alias'] puppetdb would fail to find the target resource in the catalog. And that was because it was looking for the `:alias` parameter in the catalog hash, which didn't exist. This commit updates the add_namevar_alias and map_aliases_to_titles to use the String form of 'alias'. It adds a unit test demonstrating the problem, and updates other tests that relied on the previous symbol behavior. Note the terminus behaves different if the resource specifying the `alias` metaparam has multiple namevars (eg Package) or not.
- Loading branch information
1 parent
022354d
commit be63412
Showing
2 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters