def validate_cluster_configuration(cluster_config):
 schema = {'$schema': 'http://json-schema.org/draft-04/schema#', 'type': 'object', 'required': ['control_node', 'agent_nodes'], 'properties': {'control_node': {'type': 'string'}, 'agent_nodes': {'type': 'array', 'items': {'type': 'object', 'required': ['public', 'private'], 'properties': {'public': {'type': 'string'}, 'private': {'type': 'string'}}}}}, 'additionalProperties': 'true'}
 v = Draft4Validator(schema, format_checker=FormatChecker())
 v.validate(cluster_config)

def validate_cluster_configuration ( cluster_config ) : schema = { '$schema' : 'http://json-schema.org/draft-04/schema#' , 'type' : 'object' , 'required' : [ 'control_node' , 'agent_nodes' ] , 'properties' : { 'control_node' : { 'type' : 'string' } , 'agent_nodes' : { 'type' : 'array' , 'items' : { 'type' : 'object' , 'required' : [ 'public' , 'private' ] , 'properties' : { 'public' : { 'type' : 'string' } , 'private' : { 'type' : 'string' } } } } } , 'additionalProperties' : 'true' } v = Draft4Validator ( schema , format_checker = FormatChecker ( ) ) v . validate ( cluster_config )
validate a provided cluster configuration .