'POST creates a group by name'

@admin_only
@gen.coroutine
def post(self, name):

    model = self.get_json_body()
    if (model is None):
        model = {}
    else:
        self._check_group_model(model)
    existing = orm.Group.find(self.db, name=name)
    if (existing is not None):
        raise web.HTTPError(400, ('Group    %s    already    exists' % name))
    usernames = model.get('users', [])
    users = self._usernames_to_users(usernames)
    self.log.info('Creating    new    group    %s    with    %i    users', name, len(users))
    self.log.debug('Users:    %s', usernames)
    group = orm.Group(name=name, users=users)
    self.db.add(group)
    self.db.commit()
    self.write(json.dumps(self.group_model(group)))
    self.set_status(201)
