Example #1
0
    def post(self, data):
        """Create a new realm.

        :param data: a realm within the request body.
        """
        handler = realm_handler.RealmHandler(pecan.request)
        handler.create(data)
Example #2
0
 def put(self, realm_name, realm):
     """Updates a specific realm."""
     handler = realm_handler.RealmHandler(pecan.request)
     handler.update(realm_name, realm)
Example #3
0
 def delete(self, realm_name):
     """Deletes a specific realm."""
     handler = realm_handler.RealmHandler(pecan.request)
     handler.delete(realm_name)
Example #4
0
 def get_one(self, realm_name):
     """Returns a specific realm."""
     handler = realm_handler.RealmHandler(pecan.request)
     realm = handler.get(realm_name)
     return realm
Example #5
0
 def get_all(self):
     """Returns all realms."""
     handler = realm_handler.RealmHandler(pecan.request)
     realms = handler.get_all()
     return realms
Example #6
0
 def get(self):
     """Returns a specific realm."""
     handler = realm_handler.RealmHandler(pecan.request)
     realm = handler.get({"realm_name": self._id})
     return realm
Example #7
0
 def delete(self):
     """Deletes a specific realm."""
     handler = realm_handler.RealmHandler(pecan.request)
     handler.delete({"realm_name": self._id})
Example #8
0
 def post(self, data):
     """Returns all realms."""
     handler = realm_handler.RealmHandler(pecan.request)
     realms = handler.get_all(data)
     return realms