Trees | Indices | Help |
|
---|
|
|
|||
IncompatibleLicenseError This exception is thrown from the merge operations when incompatibilities between the old and new license prevent make merging them impossible. |
|||
LicenseError This exception is thrown by the main code if asked to work with something that isn't an actual license file. |
|||
FlexlmError A FlexlmError represents an error return from FLEXlm. |
|||
License A License object represents a single FLEXlm license file. |
|||
LicenseLine A LicenseLine object represents a single line of a FLEXlm license file. |
|||
Server Server objects represent SERVER lines in the license file. |
|||
Vendor Vendor objects represent VENDOR lines in the license file. |
|||
UseServer UseServer objects represent USE_SERVER lines in the license file. |
|||
Feature Feature objects represent FEATURE or INCREMENT lines in the license file. |
|||
Package A Package object represents a single PACKAGE line in the license file. |
|||
stat_info stat_info(total, used) |
|||
error_info error_info(message, exc) |
|||
LicenseFeature A LicenseFeature object represents a particular license feature provided by a LicenseResource. |
|||
LicenseResource A LicenseResource object represents a single license file or license server (port@host). |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
fmt = logging.Formatter('%(message)s')
|
|||
log = logging.getLogger("flexlm")
|
|||
filelog = logging.getLogger("logfile")
|
|||
license_dirname =
|
|||
license_filename =
|
|||
shared_license_dir =
|
|||
job_reqs_file =
|
|||
signature_fields =
|
|||
date_fields =
|
|||
tag_order =
|
|||
ethernet_pattern = re.compile(r'
|
|||
ETHERNET_HOSTID_ORDER = 10
|
|||
IPADDR_HOSTID_ORDER = 20
|
|||
OPEN_HOSTID_ORDER = 50
|
|||
DEFAULT_HOSTID_ORDER = 100
|
|||
license_index =
|
|||
implicit_supersede = True hash(x) |
|||
sameday_replacement = True hash(x) |
|||
SCHRODINGER =
|
|||
default_license =
|
|||
__package__ =
|
|
Parse a complete FLEXlm license line into it's component parts. Duplicate lines are rejected at this stage. (To detect duplicates, we just consider the digital signature fields.) This method returns an object representing the contents of that line, This will be a Feature, Package, Server, Vendor or UseServer object. |
Parse a FLEXlm date string, which is in the format "dd-mmm-yyyy". A date object is returned. |
Parse the expiration field of a FEATURE/INCREMENT line. This can either be a standard dd-mm-yyyy date, "0", or "permanent". An expiration of "0" indicates a permanent license. A date object is returned. For a permanent license, the value returned is the maximum representable date. |
Parse the token-count field of a FEATURE/INCREMENT line. This can either be a positive interger, to indicate the number of tokens, "0", or "uncounted". A count of "0" indicates an uncounted licese. An integer is returned. For an uncounted license, 0 is returned. |
Parse the COMPONENTS field of a PACKAGE line. This is a list of features, with an optional version number and token count for each feature. A list of (feature_name, version, count) tuples is returned. |
Return a index that can be used to order license lines with the given hostid relative to other similar lines with different hostids. This is used to construct the standard sort key. Typical hostid types used in Schrodinger license are 1. ethernet address 2. IP range 3. ANY 4. none We would like more restricted licenses to be listed first in the license file. |
A comparison function, used to sort license lines. Lines are grouped into the following blocks: 1. all SERVER lines 2. all VENDOR lines 3. all uncounted licenses, ordered by name 4, the USE_SERVER lne, if any 5. all other non-suite feature/increment lines, by name 6. the GLIDE_SUITE package and feature lines 7. the SUITE package and feature lines Within a block, lines are grouped ... a) by feature name in feature/increment blocks, b) FEATURE before INCREMENT, and c) PACKAGE before FEATURE/INCREMENT, To create this sort order, we construct the sort key (Block number, hostid, name, tag_order, lne number) where tag_order is used to order FEATURE/INCREMENT and PACKAGE/non-PACKAGE lines. The hostid field is used to group lines within a block; more retricted hostids are listed before more open hostids. |
Remove the superseded licenses from the given list of license lines. This can be used both for Feature and Package lines. The input list is sorted by ISSUED date, as a side effect. |
Remove the elements from old_elems that appear in new_elems with the same issued date. This can be used both for Feature and Package lines. All input elements are assumed to have the same name. The filtered list of old elements is returned. |
Remove the expired licenses from the given list of license lines. This is really only useful for FEATURE/INCREMENT lines. The input list is sorted by ISSUED date, as a side effect. |
Report number of tokens provided by and currently available from the given license resources. Returns a dict mapping token name to stat_info tuple for each token. |
Get license usage information from a server via "lmutil lmstat". Returns a dict mapping the token name to a stat_info named tuple for that feature. A stat_info tuple has integer fields 'total' and 'used', recording the total tokens provided and the number in use. |
Execute "lmutil lmstat" for the given license server, specified as its port@host address. The raw output of the command is returned. |
Parse the output from "lmutil lmstat", provided as a list of output lines. Returns a dict mapping the feature name to a stat_info named tuple for that feature. A stat_info tuple has integer fields 'total' and 'used', recording the total tokens provided and the number in use. |
Get diagnostic information regarding one or more license resources via "lmutil lmdiag". Returns a dict with an entry for each license resource that was examined. For each resource, returns a dict mapping the feature name to a list of LicenseFeature objects, each representing the diag info for a single license line for that feature. (There may be more tan one.) |
Execute "lmutil lmdiag" for the given license resources. The argument 'locations' is a string representing a FLEXLM search path, such as $SCHROD_LICENSE_FILE. The raw output of the command is returned. |
Parse the output from "lmutil lmdiag", provided as a list of output lines. Returns a dict with an entry for each license resource that was examined. For each resource, returns a dict mapping the feature name to a list of LicenseFeature objects, each representing the diag info for a single license line for that feature. (There may be more tan one.) |
Returns the input list of lines, after joining any logical lines that were split across two (or more) physical lines, and stripping leading and trailing whitespace. A continued line is indicated by a trailing comma. |
Read a json document describing the license requirements for each job that a user could launch. The license requirements for a given job are represented as a dict, mapping the token name to the number of tokens required for that job. A job may accept more than one combination of tokens. Return a dict mapping the job type to a list of dicts, each representing an acceptable set of licenses for that job. |
Returns a list of lists of all license resources (license files or servers) that would be available to a job trying to check out a license. License resources may be specified using the environment variables $SCHROD_LICENSE_FILE $LM_LICENSE_FILE ... which can each specify a list of license files and/or license servers. License resources will also be found automatically if installed in one of the standard locations that mmlic3 is hard-wired to search. These are $SCHRODINGER/licenses/*.lic $SCHRODINGER/license{,.txt} ... and, depending on the platform, MacOSX: /Library/Application Support/Schrodinger/licenses/*.lic /Library/Application Support/Schrodinger/license{,.txt} Windows: C:\ProgramData\Schrodinger\licenses\*.lic C:\ProgramData\Schrodinger\license{,.txt} Linux /opt/schrodinger/licenses/*.lic /opt/schrodinger/license{,.txt} Returns the tuple (license_file, source) |
Get path to the file defining the license and the actual license file. This is the order of precedence: 1) $SCHROD_LICENSE_FILE 2) $LM_LICENSE_FILE 3) $SCHRODINGER_LICENSE_FALLBACK 4) $SCHRODINGER_LICENSE 5) $SCHRODINGER/license 6) /Library/Application Support/Schrodinger/license (for MacOSX) Returns the tuple (license_file, source) |
Returns the absolute path for |
Read the given license file. A License object is returned if the given file was an actual FLEXlm license file. Otherwise, a LicenseError exception is raised. |
|
tag_order
|
license_index
|
SCHRODINGER
|
default_license
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jan 10 20:54:16 2015 | http://epydoc.sourceforge.net |