Page MenuHomeDevCentral

Ensure a valid id is provided to zr functions
ClosedPublic

Authored by dereckson on Oct 7 2018, 22:31.
Tags
None
Referenced Files
F3946074: D1858.diff
Thu, Dec 26, 12:20
Unknown Object (File)
Wed, Dec 25, 00:54
Unknown Object (File)
Thu, Dec 19, 21:18
Unknown Object (File)
Thu, Dec 19, 20:52
Unknown Object (File)
Tue, Dec 17, 13:56
Unknown Object (File)
Tue, Dec 17, 06:24
Unknown Object (File)
Mon, Dec 16, 07:13
Unknown Object (File)
Sat, Dec 7, 00:00
Subscribers
None

Details

Summary

Current behavior

If an empty string is passed as a zr method, the getcredentials utility is called.
The error message is then put in the template, and error is ignored.

Once Jinja "correctly" succeeded, YAML fails.

**Example*

- DB_USER: A positive integer id is expected.
- DB_PASSWORD: Usage: getcredentials <id> [password|username|title]    <======================

New behavior

The zr method won't call the utility without a valid key.

Test Plan

The template rendering nowfails with Pillar key not found ValueError.

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
dereckson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Oct 7 2018, 22:31
This revision was automatically updated to reflect the committed changes.