ioctx.set_namespace(namespace)
return self.rbd_inst.group_create(ioctx, name)
+ @handle_rbd_error()
+ @EndpointDoc("Update a group",
+ parameters={
+ 'pool_name': (str, 'Name of the pool'),
+ 'group_name': (str, 'Name of the group'),
+ 'new_name': (str, 'New name for the group'),
+ },
+ responses={200: None})
+ def set(self, pool_name, group_name, new_name, namespace=None):
+ with mgr.rados.open_ioctx(pool_name) as ioctx:
+ RbdService.validate_namespace(ioctx, namespace)
+ ioctx.set_namespace(namespace)
+ if new_name == group_name:
+ return None
+ return self.rbd_inst.group_rename(ioctx, group_name, new_name)
+
@RESTController.Collection('POST', path='/{group_name}/image')
@handle_rbd_error()
@EndpointDoc("Add image to a group",
summary: Get the list of images in a group
tags:
- RbdGroup
+ put:
+ parameters:
+ - description: Name of the pool
+ in: path
+ name: pool_name
+ required: true
+ schema:
+ type: string
+ - description: Name of the group
+ in: path
+ name: group_name
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ properties:
+ namespace:
+ type: string
+ new_name:
+ description: New name for the group
+ type: string
+ required:
+ - new_name
+ type: object
+ responses:
+ '200':
+ content:
+ application/vnd.ceph.api.v1.0+json:
+ schema:
+ properties: {}
+ type: object
+ description: Resource updated.
+ '202':
+ content:
+ application/vnd.ceph.api.v1.0+json:
+ type: object
+ description: Operation is still executing. Please check the task queue.
+ '400':
+ description: Operation exception. Please check the response body for details.
+ '401':
+ description: Unauthenticated access. Please login first.
+ '403':
+ description: Unauthorized access. Please check your permissions.
+ '500':
+ description: Unexpected error. Please check the response body for the stack
+ trace.
+ security:
+ - jwt: []
+ summary: Update a group
+ tags:
+ - RbdGroup
/api/block/pool/{pool_name}/group/{group_name}/image:
delete:
parameters: