def post(self, data): """Create a new host group. :param data: a host group within the request body. """ handler = hostgroup_handler.HostGroupHandler(pecan.request) handler.create(data)
def put(self, group_name, hostgroup): """Update a specific host group.""" handler = hostgroup_handler.HostGroupHandler(pecan.request) handler.update(group_name, hostgroup)
def delete(self, group_name): """Returns a specific host group.""" handler = hostgroup_handler.HostGroupHandler(pecan.request) handler.delete(group_name)
def get_one(self, group_name): """Returns a host group.""" handler = hostgroup_handler.HostGroupHandler(pecan.request) hostgroup = handler.get(group_name) return hostgroup
def get_all(self): """Returns all host groups.""" handler = hostgroup_handler.HostGroupHandler(pecan.request) host_groups = handler.get_all() return host_groups
def get(self): """Returns a host group.""" handler = hostgroup_handler.HostGroupHandler(pecan.request) hostgroup = handler.get({"hostgroup_name": self._id}) return hostgroup
def delete(self): """Returns a specific host group.""" handler = hostgroup_handler.HostGroupHandler(pecan.request) handler.delete({"hostgroup_name": self._id})
def post(self, data): """Returns all host groups.""" handler = hostgroup_handler.HostGroupHandler(pecan.request) host_groups = handler.get_all(data) return host_groups