예제 #1
0
    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)
예제 #2
0
 def put(self, group_name, hostgroup):
     """Update a specific host group."""
     handler = hostgroup_handler.HostGroupHandler(pecan.request)
     handler.update(group_name, hostgroup)
예제 #3
0
 def delete(self, group_name):
     """Returns a specific host group."""
     handler = hostgroup_handler.HostGroupHandler(pecan.request)
     handler.delete(group_name)
예제 #4
0
 def get_one(self, group_name):
     """Returns a host group."""
     handler = hostgroup_handler.HostGroupHandler(pecan.request)
     hostgroup = handler.get(group_name)
     return hostgroup
예제 #5
0
 def get_all(self):
     """Returns all host groups."""
     handler = hostgroup_handler.HostGroupHandler(pecan.request)
     host_groups = handler.get_all()
     return host_groups
예제 #6
0
 def get(self):
     """Returns a host group."""
     handler = hostgroup_handler.HostGroupHandler(pecan.request)
     hostgroup = handler.get({"hostgroup_name": self._id})
     return hostgroup
예제 #7
0
 def delete(self):
     """Returns a specific host group."""
     handler = hostgroup_handler.HostGroupHandler(pecan.request)
     handler.delete({"hostgroup_name": self._id})
예제 #8
0
 def post(self, data):
     """Returns all host groups."""
     handler = hostgroup_handler.HostGroupHandler(pecan.request)
     host_groups = handler.get_all(data)
     return host_groups