Trees | Indices | Help |
|
---|
|
object --+ | LicenseResource
A LicenseResource object represents a single license file or license server (port@host). The object records how the resource was found and what the licenses it provides.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
LEAK_VERSIONS =
|
|
|||
|
The location may be either a pathname or the port@host address of a license server. The source should be the name of the environment variable that specified this resource, or the pathname of the directory where it was found.
|
repr(x)
|
The pathname for the license file. If the license file location isn't known, return the empty string. |
The license pathnames to use if we're starting a license server for this license file. If the file is in a licenses/ directory, we start the server using all of the server license files for this machine in the directory, not just this one. The pathnames are returned as a single string, with pathnames separated by the system path separator, e.g., "/licenses/server1.lic:/licenses/license2.lic". |
Returns the list of hostnames for this license server. If we have a license file, the hostnames from the SERVER lines in that file are returned, in an arbitrary order. If we have a port@host address, the list will just include the host name from that address. |
Returns the list of hostids from the SERVER lines in the license file. The order in which the hostids is returned is arbitrary, and shouldn't be expected to match the order of SERVER lines in the file. |
Returns the set of hostid for the SERVER line in the license file. If there's more than one SERVER line, one of them is arbitrarily chosen, which probably isn't what we want. |
Returns the hostname and port number for the server as a tuple (host, port). (Both values are strings.) The port number may be an empty string, if it's not specified in the license. The host name will be empty if this license resource doesn't represent a server. |
Returns the port number for the SCHROD daemon, as a string. The empty string may be returned if the port number isn't specified in the license, or if this license resource doesn't represent a server. |
Returns the license object's canonical base filename If the filename already matches the canonical pattern, return it. |
Run lmdiag for this license resource. This is mainly useful for debugging. The raw output from the command is returned. |
Run lmstat for this license resource, if it represents a license server. This is mainly useful for debugging. The raw output from the command is returned. |
Try to check out the specified token from this license resource. A version number and token count can be specified, as well, but this shouldn't be necessary for most purposes. If the exists argument is True, then an existence check is done instead of a checkout. Returns True if the checkout succeeded, otherwise False. |
Return a status code indicating the general "health" of this resource. RESOURCE_OK means the resource can provide licenses. RESOURCE_PROBLEMS means all licenses that should be available aren't. RESOURCE_UNAVAILABLE means this resource is unable to provide licenses. Because this evaluation requires executing lmdiag and lmstat, it may take a few seconds. |
Return an identifier that can be used to decide whether two license resources are really the same. Two server-based licenses are considered the same if the server hostnames are the same. (There can only be one server per host.) All non-server-based license files are considered unique. |
Return a priority score for this resource. (Lower numbers indicate higher priority, with zero the highest priority.) |
Load the information about the total number of tokens available and the number currently in use. For server based licenses, this will query the server. The info is recorded in the tokens attribute, a dict that maps feature names to stat_info tuples. |
Get license usage information from a server via "lmutil lmstat". A dict mapping the token name to a named tuple recording the total tokens provided by this resource and the number currently checked out. |
Get license feature information via "lmutil lmdiag". A dict mapping the feature name to a list of LicenseFeature objects for that feature is stored in self._features. Errors in the found features are recorded in the list self._errors. |
Check the results returned from lmdiag and record errors if there are expired fatures or similar problems. TODO: distinguish between a resource that offers some features and one which is completely unusable. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue May 2 06:33:15 2017 | http://epydoc.sourceforge.net |