Manila/design/manila-liberty-consistency-groups/api-schema
Contents
Resource schemas
Simple CG
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group (CG)", "description": "A resource representing a group of shares that can be snapshotted in unison", "type": "object", "properties": { "id": { "description": "The unique identifier for a product", "type": "integer" }, "name": { "description": "A non-unique name for a CG", "type": "string" }, }, "required": ["id", "name"] }
Detailed CG
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group (CG)", "description": "A resource representing a group of shares that can be snapshotted in unison", "type": "object", "properties": { "id": { "description": "The unique identifier for a product", "type": "integer", 'pattern': ('^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}' '-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$'), }, "name": { "description": "A non-unique name for a CG", "type": "string", 'maxLength': 255, }, "description": { "description": "A short description of the CG", "type": "string" }, "created_at": { "description": "The time at which the CG was created", "type": "string" }, "status": { "description": "Status of the CG", "type": "string", "enum": ["creating", "available", "deleting", "error"] }, "project_id": { "description": "The owner of the CG", "type": "string" }, "host": { "description": "The backend where the CG lives", "type": "string" }, "source_cgsnapshot_id": { "description": "The uuid of the cgsnapshot from which this CG was created.", "type": ['null', 'string'], }, "share_types": { "description": "The share types that shares in the CG are allowed to be a part of", "type": "array", "items": { "type": "string" }, }, }, "required": ["id", "name", "description", "created_at", "status", "project_id", "host"] }
Simple CG Snapshot
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group Snapshot", "description": "A resource representing a snapshot of a group of shares", "type": "object", "properties": { "id": { "description": "The unique identifier for a product", "type": "integer" }, "name": { "description": "A non-unique name for a CGsnapshot", "type": "string" }, }, "required": ["id", "name"] }
Detailed CG Snapshot
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group Snapshot", "description": "A resource representing a snapshot of a group of shares", "type": "object", "properties": { "id": { "description": "The unique identifier for a product", "type": "integer", 'pattern': ('^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}' '-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$'), }, "name": { "description": "A non-unique name for a CG snapshot", "type": "string", 'maxLength': 255, }, "description": { "description": "A short description of the CG snapshot", "type": "string" }, "created_at": { "description": "The time at which the CG snapshot was created", "type": "string" }, "status": { "description": "Status of the CG snapshot", "type": "string", "enum": ["creating", "available", "deleting", "error"] }, "project_id": { "description": "The owner of the CG snapshot", "type": "string" }, "consistency_group_id": { "description": "The uuid of the consistency group from which this CG snapshot was created.", "type": ['null', 'string'], }, }, "required": ["id", "name", "description", "created_at", "status", "project_id", "host"] }
Request schemas
POST /os-consistency-groups
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group (CG)", "description": "A resource representing a group of shares that can be snapshotted in unison", "type": "object", "properties": { "name": { "description": "A non-unique name for a CG", "type": "string", 'maxLength': 255, }, "description": { "description": "A short description of the CG", "type": "string" }, "source_cgsnapshot_id": { "description": "The uuid of the cgsnapshot from which this CG was created. Cannot be supplied when 'share_types' is provided.", "type": ['null', 'string'], }, "share_types": { "description": "The share types that shares in the CG are allowed to be a part of. Cannot be supplied when 'source_cgsnapshot_id' is provided.", "type": "string" }, }, "required": [] }
Response: detailed CG
GET /os-consistency-groups
Response: Simple CG
GET /os-consistency-groups/detail
Response: Detailed CG
GET /os-consistency-groups/<id>
Response: Detailed CG
PUT /os-consistency-groups/<id>
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group (CG)", "description": "A resource representing a group of shares that can be snapshotted in unison", "type": "object", "properties": { "name": { "description": "A non-unique name for a CG", "type": "string", 'maxLength': 255, }, "description": { "description": "A short description of the CG", "type": "string" }, "required": [] }
Response: Detailed CG
POST /os-cgsnapshots
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group Snapshot", "description": "A resource representing a snapshot of a group of shares", "type": "object", "properties": { "name": { "description": "A non-unique name for a CG", "type": "string", 'maxLength': 255, }, "description": { "description": "A short description of the CG", "type": "string" }, "consistency_group_id": { "description": "The uuid of the CG from which to create this CG snapshot.", "type": 'string', }, }, "required": [] }
Response: detailed CG
PUT /os-cgsnapshots/<id>
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Consistency Group Snapshot", "description": "A resource representing a snapshot of a group of shares", "type": "object", "properties": { "name": { "description": "A non-unique name for a CG", "type": "string", 'maxLength': 255, }, "description": { "description": "A short description of the CG", "type": "string" }, "required": [] }
Response: Detailed CG