示例#1
0
    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)
示例#2
0
 def get(self):
     """Returns a service group."""
     handler = servicegroup_handler.ServiceGroupHandler(pecan.request)
     servicegroup = handler.get({"servicegroup_name": self._id})
     return servicegroup
示例#3
0
 def put(self, servicegroup):
     """Update a specific service group."""
     handler = servicegroup_handler.ServiceGroupHandler(pecan.request)
     handler.update({"servicegroup_name": self._id}, servicegroup)
示例#4
0
 def delete(self):
     """Returns a specific service group."""
     handler = servicegroup_handler.ServiceGroupHandler(pecan.request)
     handler.delete({"servicegroup_name": self._id})
示例#5
0
 def post(self, data):
     """Returns all service groups."""
     handler = servicegroup_handler.ServiceGroupHandler(pecan.request)
     service_groups = handler.get_all(data)
     return service_groups
示例#6
0
 def delete(self, group_name):
     """Returns a specific service group."""
     handler = servicegroup_handler.ServiceGroupHandler(pecan.request)
     handler.delete(group_name)
示例#7
0
 def get_one(self, group_name):
     """Returns a service group."""
     handler = servicegroup_handler.ServiceGroupHandler(pecan.request)
     servicegroup = handler.get(group_name)
     return servicegroup
示例#8
0
 def get_all(self):
     """Returns all service groups."""
     handler = servicegroup_handler.ServiceGroupHandler(pecan.request)
     service_groups = handler.get_all()
     return service_groups