Example #1
0
 def get_server_status():
     json_response = misc.server_status(self).json()
     try:
         iserver_version = json_response["iServerVersion"][:9]
     except KeyError:
         raise exceptions.IServerException(
             "I-Server is currently unavailable. Please contact your administrator."
         )
     web_version = json_response.get("webVersion")
     web_version = web_version[:9] if web_version else None
     return iserver_version, web_version
Example #2
0
    def __check_version(self):
        """Checks version of I-Server and MicroStrategy Web."""
        json_response = misc.server_status(self).json()
        try:
            self.iserver_version = json_response["iServerVersion"][:9]
        except KeyError:
            raise exceptions.IServerException("I-Server is currently unavailable. Please contact your administrator.")
        self.web_version = json_response.get("webVersion")
        self.web_version = self.web_version[:9] if self.web_version else None
        iserver_version_ok = version.parse(self.iserver_version) >= version.parse(self.__VRCH)

        return iserver_version_ok
Example #3
0
    def __check_version(self):
        """Checks version of I-Server and MicroStrategy Web"""
        response = misc.server_status(self)

        json_response = response.json()
        self.iserver_version = json_response["iServerVersion"][:9]
        self.web_version = json_response["webVersion"][:9]

        iserver_version_ok = version.parse(
            self.iserver_version) >= version.parse(self.__VRCH)
        web_version_ok = version.parse(self.web_version) >= version.parse(
            self.__VRCH)

        return iserver_version_ok and web_version_ok
Example #4
0
 def __check_version(self):
     """Checks version of I-Server and MicroStrategy Web"""
     response = misc.server_status(self)
     if not response.ok:
         msg = 'Failed to check server status'
         self.__response_handler(response=response, msg=msg)
     else:
         json_response = response.json()
         self.__iserver_version = json_response["iServerVersion"][:9]
         self.__web_version = json_response["webVersion"][:9]
         
         iserver_version_ok = version.parse(self.__iserver_version) >= version.parse(self.__VRCH)
         web_version_ok = version.parse(self.__web_version) >= version.parse(self.__VRCH)
         
         return iserver_version_ok and web_version_ok
 def generate_server_status(self):
     res = misc.server_status(self.connection)
     return res.json()