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
Unknown Object (File)
Mon, Nov 11, 06:39
Unknown Object (File)
Sun, Nov 10, 20:06
Unknown Object (File)
Sat, Nov 9, 15:32
Unknown Object (File)
Thu, Oct 31, 04:56
Unknown Object (File)
Tue, Oct 29, 09:42
Unknown Object (File)
Oct 22 2024, 22:59
Unknown Object (File)
Oct 22 2024, 22:31
Unknown Object (File)
Oct 21 2024, 19: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.