schrodinger.application.licensing.netsuiteapi module

schrodinger.application.licensing.netsuiteapi.get_license_request_info(netsuite_license_hash_key, url=None)

This is an API call to the Schrodinger NetSuite instance in order to get the database data associated with a Schrodinger License Request Hash Key.

NetSuite allows its customers to write custom code and deploy it within the NetSuite domain/environment. Therefore, we can construct and support arbitrary API calls within forms.netsuite.com. On the NetSuite side, we are simply reading Licensing data stored in our database (the same database currently used to track, store, and modify Licenses issued to customers of Schrodinger).

Parameters

netsuite_license_hash_key (str) – The unique NetSuite License Request hash key associated with a License Request stored in the Schrodinger NetSuite database.

Returns

A dict (parsed from JSON) containing the meta-data for a license, or more specifically the corresponding License Request record fields and values stored in NetSuite.

Raises

requests.exceptions.RequestException

Raises

ValueError if the response is not JSON

schrodinger.application.licensing.netsuiteapi.retrieve_license_file(netsuite_license_hash_key, machine_name_list, host_id_list, lmgrdport=None, schrodport=None, *, url=None)

FlexLM-only!

This is an API call to the Schrodinger NetSuite instance in order to process a License Key Retrieval request associated with a License Request Hash Key using machine data input provided from the user.

Args:

netsuite_license_hash_key (str): The unique NetSuite License Request hash key associated with a License Request stored in the Schrodinger NetSuite database. machine_name_list (str list): The machine names describing the computers which will be running the FlexLM software. host_id_list (str list): The 12 digit hexadecimal Host ID/MAC address strings for the servers or nodes which will be running the FlexLM software. lmgrdport (int): Port specified in generated license file for convenience. schrodport (int): Port specified in generated license file for convenience.

Returns:

str: A string containing the license key generated by the Licensing Server and processed through NetSuite for the given License Request and parameters.

Raises:

requests.exceptions.RequestException: If the request to NetSuite fails for any reason. ValueError: If the response is not JSON.

schrodinger.application.licensing.netsuiteapi.retrieve_licserver_license_file(netsuite_license_hash_key, *, tls_hostnames: list[str], machine_ids: list[str], tls_public_key: str | None = None, url=None) dict[str, Any]

licserver-only!

This is an API call to the Schrodinger NetSuite instance in order to process a License Key Retrieval request associated with a License Request Hash Key using machine data input provided from the user.

Args:

netsuite_license_hash_key: The unique NetSuite License Request hash key associated with a License Request stored in the Schrodinger NetSuite database.

tls_hostnames: Hostnames that the created TLS certificate is valid for. Unused for generating local-entitlement licenses.

machine_ids: List of machine ids that the license is valid for.

tls_public_key: The public key that will be signed by the Licensing Server to create a TLS certificate. If None, the Licensing Server will generate a new key pair. TODO: tls_public_key JSON representation needs to be formalized, so is not yet supported as an API. This is a placeholder in python only for manual testing; we expect the canonical implementation to be the lictool CLI.

Returns:

JSON licensing response

Raises:

requests.exceptions.RequestException: If the request to NetSuite fails for any reason. ValueError: If any parameters are invalid, or the response is not JSON.