Example #1
0
 def _reload(self, confInfo):
     path = "%s/_reload" % self.endpoint
     response, _ = rest.simpleRequest(
         path, sessionKey=self.getSessionKey(), method="POST"
     )
     if response.status != 200:
         exc = RESTException(response.status, response.messages)
         RH_Err.ctl(-1, exc, logLevel=logging.INFO)
Example #2
0
    def move(self, confInfo, **params):
        user, app = self.user_app()
        args = self.getCallerArgs()
        if hasattr(self, "encode"):
            args = self.encode(args)

        postArgs = {"app": args["app"], "user": args["user"]}
        path = entity.buildEndpoint(
            self.endpoint, entityName=self.callerArgs.id, namespace=app, owner=user
        )
        path += "/move"

        response, _ = rest.simpleRequest(
            path, sessionKey=self.getSessionKey(), method="POST", postargs=postArgs
        )
        if response.status != 200:
            exc = RESTException(response.status, response.messages)
            RH_Err.ctl(-1, exc, logLevel=logging.INFO)