Example #1
0
    def put(self, data):
        """Modify this host.

        :param data: a host within the request body.
        """
        handler = host_handler.HostHandler(pecan.request)
        handler.update(self._id, data)
Example #2
0
    def post(self, data):
        """Create a new host.

        :param data: a host within the request body.
        """
        handler = host_handler.HostHandler(pecan.request)
        handler.create(data)
Example #3
0
 def get(self):
     """Returns a specific host."""
     handler = host_handler.HostHandler(pecan.request)
     h = handler.get(self._id)
     return h
Example #4
0
 def get_all(self):
     """Returns all hosts."""
     handler = host_handler.HostHandler(pecan.request)
     hosts = handler.get_all()
     return hosts
Example #5
0
 def delete(self):
     """Delete this host."""
     handler = host_handler.HostHandler(pecan.request)
     handler.delete(self._id)
Example #6
0
 def post(self, data):
     """Returns all hosts."""
     handler = host_handler.HostHandler(pecan.request)
     hosts = handler.get_all(data)
     return hosts