'Creates a consistency group snapshot.'

def create_cgsnapshot(self, consistencygroup_id, **kwargs):

    post_body = {'consistencygroup_id': consistencygroup_id}
    if kwargs.get('name'):
        post_body['name'] = kwargs.get('name')
    if kwargs.get('description'):
        post_body['description'] = kwargs.get('description')
    post_body = json.dumps({'cgsnapshot': post_body})
    (resp, body) = self.post('cgsnapshots', post_body)
    body = json.loads(body)
    self.expected_success(http_client.ACCEPTED, resp.status)
    return rest_client.ResponseBody(resp, body)
