def find_schema(gluster_enabled=False): try: schema = vdsmapi.Schema.vdsm_api(strict_mode=False, with_gluster=gluster_enabled) except vdsmapi.SchemaNotFound as e: raise client.MissingSchemaError(e) return schema
def find_schema(): try: schema_paths = [vdsmapi.find_schema()] schema = vdsmapi.Schema(schema_paths, False) except vdsmapi.SchemaNotFound as e: raise client.MissingSchemaError(e) return schema
def find_schema(gluster_enabled=False): try: schema_paths = [vdsmapi.find_schema()] if gluster_enabled: schema_paths.append(vdsmapi.find_schema('vdsm-api-gluster')) schema = vdsmapi.Schema(schema_paths, False) except vdsmapi.SchemaNotFound as e: raise client.MissingSchemaError(e) return schema