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, Mar 3, 12:10
Unknown Object (File)
Mon, Mar 3, 11:54
Unknown Object (File)
Sun, Feb 16, 10:57
Unknown Object (File)
Sat, Feb 15, 17:45
Unknown Object (File)
Sat, Feb 15, 17:21
Unknown Object (File)
Jan 29 2025, 17:07
Unknown Object (File)
Jan 28 2025, 10:48
Unknown Object (File)
Jan 28 2025, 10:48
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.