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
F3774976: D1858.id4693.diff
Sun, Nov 24, 15:43
F3774755: D1858.diff
Sun, Nov 24, 13:41
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
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 Passed
Unit
No Test Coverage
Branch
zr
Build Status
Buildable 2865
Build 3113: arc lint + arc unit

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.