'Creates a group.
:param context: the context of the caller.
:param group: the Group object of the group to be created.
:returns: model_update
model_update will be in this format: {\'status\': xxx, ......}.
If the status in model_update is \'error\', the manager will throw
an exception and it will be caught in the try-except block in the
manager. If the driver throws an exception, the manager will also
catch it in the try-except block. The group status in the db will
be changed to \'error\'.
For a successful operation, the driver can either build the
model_update and return it or return None. The group status will
be set to \'available\'.'

def create_group(self, context, group):

    if (not volume_utils.is_group_a_cg_snapshot_type(group)):
        raise NotImplementedError()
    model_update = {'status': fields.GroupStatus.ERROR}
    gid = group['id']
    with self._client.open_connection() as api:
        cgroup = api.create_replay_profile(gid)
        if cgroup:
            LOG.info('Created    group    %s', gid)
            model_update['status'] = fields.GroupStatus.AVAILABLE
    return model_update
