Created
July 6, 2015 10:50
-
-
Save devvesa/aa1743190bbe6944961f to your computer and use it in GitHub Desktop.
Fuel Role Validator
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
{'$schema': 'http://json-schema.org/draft-04/schema#', | |
'description': 'Serialized Role object', | |
'properties': {'id': {'type': 'integer'}, | |
'meta': {'properties': {'conflicts': {'description': 'Specify which roles conflict this one.', | |
'type': 'array'}, | |
'description': {'description': 'Short description of role functionality', | |
'type': 'string'}, | |
'has_primary': {'description': 'During orchestration this role will be splitted into primary-role and role.', | |
'type': 'boolean'}, | |
'limits': {'properties': {'condition': {'type': 'string'}, | |
'max': {'type': ['string', | |
'integer']}, | |
'min': {'type': ['string', | |
'integer']}, | |
'overrides': {'items': {'properties': {'condition': {'type': 'string'}, | |
'max': {'type': ['string', | |
'integer']}, | |
'message': {'type': 'string'}, | |
'min': {'type': ['string', | |
'integer']}, | |
'recommended': {'type': ['string', | |
'integer']}}, | |
'required': ['condition'], | |
'type': 'object'}, | |
'minItems': 1, | |
'type': 'array'}, | |
'recommended': {'type': ['string', | |
'integer']}}, | |
'type': 'object'}, | |
'name': {'description': 'Name that will be shown on UI', | |
'type': 'string'}, | |
'restrictions': {'items': {'anyOf': [{'type': 'string'}, | |
{'properties': {'action': {'type': 'string'}, | |
'condition': {'type': 'string'}, | |
'message': {'type': 'string'}}, | |
'required': ['condition'], | |
'type': 'object'}, | |
{'maxProperties': 1, | |
'minProperties': 1, | |
'type': 'object'}]}, | |
'minItems': 1, | |
'type': 'array'}, | |
'update_once': {'description': 'Specified roles will be updated if current role added to cluster first time.', | |
'type': 'array'}, | |
'update_required': {'description': 'Specified roles will be selected for deployment, when a current role is selected.', | |
'type': 'array'}}, | |
'required': ['name', 'description'], | |
'type': 'object'}, | |
'name': {'pattern': '^[a-zA-Z_-]+$', | |
'type': 'string'}, | |
'volumes_roles_mapping': {'items': {'description': 'Volume allocations for role', | |
'properties': {'allocate_size': {'enum': ['all', | |
'min', | |
'full-disk'], | |
'type': 'string'}, | |
'id': {'type': 'string'}}, | |
'required': ['allocate_size', | |
'id'], | |
'type': 'object'}, | |
'minItems': 1, | |
'type': 'array'}}, | |
'required': ['name', 'meta', 'volumes_roles_mapping'], | |
'title': 'Role', | |
'type': 'object'} | |
On instance: | |
{u'meta': {u'description': u'MidoNet Synchronization Services', | |
u'name': u'no-state-database'}, | |
u'name': u'nsdb', | |
u'volumes_rolling_mapping': [{u'allocate_size': u'min', | |
u'id': u'os'}]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment