Page MenuHomePhabricator

Cumin: add support for role/profile shortcuts in PuppetDB backend
Closed, ResolvedPublic

Description

As the roles and profiles paradigm is becoming quite standard in the Puppet world, see for example https://puppet.com/docs/pe/2017.3/overview/pe_user_guide.html , we should simplify the way to query roles and profiles in the PuppetDB backend.

The proposed solution is to expand the current PuppetDB backend grammar to add P (for profiles) and O (for roles, as R is already taken for resources) so that they can be queried via shortcuts with O:Module::Name for roles and P:Module::Name for profiles.
The special syntax for fields (@field) and parameters (%param) will also be supported. When querying for P:Module::Name%param = value, the query will automatically include two subqueries in AND between them, one for the class title and the other for the class parameter.

Event Timeline

Change 384547 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/cumin@master] PuppetDB backend: support for Roles and Profiles

https://gerrit.wikimedia.org/r/384547

Change 384547 merged by jenkins-bot:
[operations/software/cumin@master] PuppetDB backend: Class, Roles and Profiles shortcuts

https://gerrit.wikimedia.org/r/384547

Volans triaged this task as Medium priority.
Volans removed a project: Patch-For-Review.