Last active
February 21, 2017 22:06
-
-
Save haad/b005de9bd6e7fef2d8b744de55473eab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/CentOS-PaaS-SIG/linch-pin/blob/master/library/schema_check.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Do some initial check for user_portal_data | |
assert: | |
that: | |
- "user_portal_data is defined" | |
- "user_portal_data is string" | |
- name: Install json-spec tool for json validation | |
pip: | |
state: present | |
name: json-spec | |
- name: Validate user_portal_data against schema | |
command: "json validate --document-json='{{ user_portal_data }}' --schema-file=schema/provision_tenant.json_schema" | |
changed_when: false | |
failed_when: jsonlint_result.rc != 0 | |
register: jsonlint_result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Verify input data | |
assert: | |
that: | |
- tenantId is defined | |
- tenant_status is defined | |
- tenant_status == 'FAILED' or tenant_status == 'SUCCESS' | |
- queue is defined | |
- stackstorm_execution_id is defined | |
- server_environment is defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment