:py:mod:`pywebui.licenses` ========================== .. py:module:: pywebui.licenses Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: pywebui.licenses.License pywebui.licenses.LicenseHistory pywebui.licenses.LicenseMethods .. py:class:: License License object. .. attribute:: active The license loaded to memory or not (1 - license loaded to memory, 0 - license didn’t load to memory). :type: int .. attribute:: activity The license type – activity licenses, for layered products such as compilers (1 - activity license type). :type: int .. attribute:: authorization The string that helps identify the license. :type: str .. attribute:: command The command, which modified the license. :type: str .. attribute:: hardwareID The identification number of the hardware on which the product is licensed. :type: str .. attribute:: issuer The name of the company that issued the PAK for the product. :type: str .. attribute:: modifiedByUser The user, which modified license. :type: str .. attribute:: modifiedOn The date, when modified license. :type: str .. attribute:: options The list of license options from a PAK. :type: str .. attribute:: pcl The license type – per core licenses (PCL), which replaces per processor licenses (PPL). This type implements the licensing model on OpenVMS Integrity server systems. The PCL model licenses a product based on the number of active processor cores on the system (1 - per core license type). :type: int .. attribute:: producer The name of the company that owns the product for which you have a license. :type: str .. attribute:: productName The name of product with a license. :type: str .. attribute:: releaseDate The product release date such that the license authorizes use of all product versions released on or before the date. :type: str .. attribute:: revisionLevel The order number of license modification. :type: int .. attribute:: status The license status. :type: str .. attribute:: terminationDate The date on which the product license terminates. :type: str .. attribute:: token The product token. :type: str .. attribute:: units The number of license units from a PAK. :type: int .. attribute:: version The version limits from a PAK of the product for which you have a license. :type: int .. py:class:: LicenseHistory License history object. Contains the same attributes as License object. .. py:class:: LicenseMethods Encapsulates methods for manage licenses. .. py:method:: get_all_licenses(self) -> List[License] Returns the list of all licenses. .. py:method:: get_active_licenses(self) -> List[License] Returns the list of active licenses. .. py:method:: get_license(self, product: str, authorization: str) -> License Returns details of selected product license (the latest record in database). :param product: The name of product with a license. :type product: str :param authorization: The string that helps identify the license. :type authorization: str .. py:method:: get_license_history(self, product: str, authorization: str) -> List[LicenseHistory] Returns the license history of selected product (records with status “Extinct”). .. py:method:: register_license(self, product: str, data: dict) -> License Adds a new license to the License Database. :param product: The name of product with a license. :type product: str :param data: License parameters. :type data: dict .. rubric:: Example :: connector.register('CSP', { "authorization": "string", "checksum": "string", "issuer": "string", "options": ["string"], "producer": "string", "termination": 1599955199, "token": "string", "units": 0 }) .. py:method:: delete_license(self, product: str, authorization: str) -> bool Deletes license for selected product. .. py:method:: delete_license_history(self, product: str, authorization: str) -> bool Deletes license history for selected product (records with status “Extinct”). .. py:method:: export_license_history(self, product: str, authorization: str) -> str Exports the license history of selected product (records with status “Extinct”) to text. .. py:method:: enable_license(self, product: str, authorization: str) -> bool Enables license. .. py:method:: disable_license(self, product: str, authorization: str) -> bool Disables license. .. py:method:: load_license(self, product: str, authorization: str) -> bool Loads license for selected product to memory (license become active). .. py:method:: unload_license(self, product: str, authorization: str) -> bool Unloads license for selected product from memory.