def put(self, data): """Create a new service group. :param data: a service group within the request body. """ handler = servicegroup_handler.ServiceGroupHandler(pecan.request) handler.create(data)
def get(self): """Returns a service group.""" handler = servicegroup_handler.ServiceGroupHandler(pecan.request) servicegroup = handler.get({"servicegroup_name": self._id}) return servicegroup
def put(self, servicegroup): """Update a specific service group.""" handler = servicegroup_handler.ServiceGroupHandler(pecan.request) handler.update({"servicegroup_name": self._id}, servicegroup)
def delete(self): """Returns a specific service group.""" handler = servicegroup_handler.ServiceGroupHandler(pecan.request) handler.delete({"servicegroup_name": self._id})
def post(self, data): """Returns all service groups.""" handler = servicegroup_handler.ServiceGroupHandler(pecan.request) service_groups = handler.get_all(data) return service_groups
def delete(self, group_name): """Returns a specific service group.""" handler = servicegroup_handler.ServiceGroupHandler(pecan.request) handler.delete(group_name)
def get_one(self, group_name): """Returns a service group.""" handler = servicegroup_handler.ServiceGroupHandler(pecan.request) servicegroup = handler.get(group_name) return servicegroup
def get_all(self): """Returns all service groups.""" handler = servicegroup_handler.ServiceGroupHandler(pecan.request) service_groups = handler.get_all() return service_groups