Ejemplo n.º 1
0
def get_idm_version_info():
    idm_cfg = IDMConfig()

    logger.info("Get software version of the OpenIDM instance")
    headers = idm_cfg.get_admin_headers({'Content-Type': 'application/json'})
    response = get(verify=idm_cfg.ssl_verify,
                   url=idm_cfg.idm_url + '/info/version',
                   headers=headers)
    rest.check_http_status(http_result=response, expected_status=200)
    version_info = "{} (build: {}, revision: {})".format(
        response.json()['productVersion'],
        response.json()['productBuildDate'],
        response.json()['productRevision'])
    return version_info
Ejemplo n.º 2
0
    def version(self):
        """
        Return the product version information.
        :return: Dictionary
        """
        idm_cfg = IDMConfig()

        logger.info("Get software version of the OpenIDM instance")
        headers = idm_cfg.get_admin_headers(
            {'Content-Type': 'application/json'})
        response = get(verify=idm_cfg.ssl_verify,
                       url=idm_cfg.idm_url + '/info/version',
                       headers=headers)
        rest.check_http_status(http_result=response, expected_status=200)

        return {
            'TITLE': self.product_type,
            'DESCRIPTION': self.name,
            'VERSION': response.json()['productVersion'],
            'REVISION': response.json()['productRevision'],
            'DATE': response.json()['productBuildDate']
        }