Package schrodinger :: Package application :: Package licensing :: Module licadmin
[hide private]
[frames] | no frames]

Module licadmin

Classes [hide private]
  Status
A Status object represents the "health" of a license resource.
  MissingExecutableError
If the requested path doesn't point to a valid executable.
  stat_info
stat_info(total, used)
  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).
  LocalServerProcess
  ServerInfo
A ServerInfo object represents the information reported in the lmgrd log when a license server is started.
  UsageError
This exception is thrown when unrecognized or incompatible commandline options are used.
  NetsuiteError
This exception is raised when there's a problem obtaining a license from the NetSuite server.
Functions [hide private]
 
set_server_refresh(refresh)
This function allows you to prevent _load_tokens from actually hitting the license servers/files again.
 
_single_job_capacity(reqs, tokens)
Calculate the number of jobs that can be run, for a job with the given token requirements and the given set of available tokens.
 
healthier(health1, health2)
Return True if health1 is healthier than health2.
 
tokens(licenses)
Report number of tokens provided by and currently available from the given license resources.
 
job_capacity(resources)
Report number of jobs that can be run with the tokens available on the given license resources.
 
get_hostid()
Get the hostid for the current machine using "lmutil lmhostid".
str
get_first_hostid()
Get the hostid for the current machine using get_hostid().
 
execute_lmutil(args)
Execute the lmutil program with the given commandline arguments.
 
execute_lictest(args)
Execute the lictest program with the given commandline arguments.
 
parse_lmhostid_output(lines)
Parse the output from "lmutil lmhostid", provided as a list of output lines.
 
run_lmstat(license_file, parsefeatures=False)
Get license usage information from a server via "lmutil lmstat".
 
parse_lmstat_output(lines)
Parse the output from "lmutil lmstat", provided as a list of output lines.
 
run_lmdiag(locations)
Get diagnostic information regarding one or more license resources via "lmutil lmdiag".
 
parse_lmdiag_output(lines)
Parse the output from "lmutil lmdiag", provided as a list of output lines.
 
join_cont_lines(lines)
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.
 
parse_lmdiag_entry(lines)
Returns a LicenseFeature object, representing the information reported by lmdiag for that feature.
 
load_job_reqs(filename='')
Read a json document describing the license requirements for each job that a user could launch.
 
load_job_products(filename='')
Read a json document listing the product names under which job types should be grouped.
 
_require_job_reqs()
Return the table of license requirements for each job.
 
find_license_resources()
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.
 
_unique_resources(lics)
Filter the given list of LicenseResources to remove redundant resources.
 
resources_from_path(search_path, source='')
Parse the given search path (PATH-style) into components and return a list with the LicenseResource object for each item.
 
resources_from_list(license_list, source)
Return a list with the LicenseResource object for each item (server hostport, license file or license directory) in the given list.
 
resource_summary(resources)
Provide a condensed list of license resources.
 
hostid_is_local(lic_hostid)
Returns True if the given hostid matches the local hostid.
 
hostname_is_local(hostname)
Determine whether the given hostname refers to the current host.
 
is_ipv4_addr(addr)
Determine whether the given string is an IPv4 address.
 
server_log(licfile)
Return the standard pathname for the lmgrd log file associated with the given license file.
 
writable_server_log(licfile, prefer_logfile='')
Return the pathname for the log file to use when launching a server for the given license file.
 
can_write_file(pathname)
Returns true if the filesystem permissions appear to allow the specified file to be written.
 
create_stub_license(host, port='')
Create a stub license file, which points to a remote license server.
 
parse_lmgrd_log(filename, offset=0)
 
parse_lmgrd_lines(lines)
Parse an lmgrd log file for messages related to the health of the lmgrd and SCHROD daemons.
 
version_uptodate(version)
Returns True unless the given lmgrd version number is older than v11.12.
 
parse_lmgrd_event(eventdict, line)
 
lmgrd_lines(lines)
A generator to perform initial parsing of lmgrd logfile lines.
 
resources()
Return a list of all license resources found.
 
get_local_server()
 
local_server_resource()
Returns the first license resource found for the local license server, if any.
 
local_server_resources()
Returns the license resources that represent the local license server.
 
get_working_resources(license_resources=None)
Returns list of LicenseResources without any all-expired files.
 
refresh()
Force license-resource info to be re-loaded.
 
local_server_files(dirname)
Given the name of a license directory, return a list of the license files found therein that can be used to start a local license server.
 
job_capacity_by_product(res_list=None)
Return a dict of lists of tuples, reporting the number of jobs of each type that can be run, grouped by product.
 
license_directory()
Return the pathname of the directory into which license files should be installed.
 
parse_args(args)
Parse the commandline arguments for the licadmin utility.
 
handle_start_action(opts)
Start a local license server.
 
handle_stop_action(opts)
Stop a local license server.
 
handle_stat_action(opts)
Execute "lmutil lmstat -a" for the specified license.
 
handle_diag_action(opts)
Execute "lmutil lmdiag -n" for the specified license.
 
handle_ver_action(opts)
Execute "lmutil lmver" for the specified executable.
 
handle_list_action(opts)
List all known license resources.
 
handle_check_action(opts)
Report the status of all known license resources.
 
handle_verify_action(opts)
Verify the signatures in the specified license file, using lictest.
 
handle_generic_action(action, opts)
Execute the lmutil subcommand for the given action.
 
handle_install_action(opts)
Install a license in the license directory.
 
install_netsuite_license(key)
Download a license from Netsuite using the given key, and install it in the license directory.
 
get_netsuite_license(key)
Download a license from Netsuite, using the given key.
 
download_server_license(key, hostname=None, hostid=None, lmgrdport=27008, schrodport=53000)
Retrieves the server license corresponding to the key and saves it to disk, in the license directory.
 
download_nodelocked_license(key, hostname=None, hostid=None)
Retrieves the license corresponding to the key and saves it to disk, in the licenses directory.
 
install_license_text(text)
Install the given text as a license file, with the canonical filename.
 
install_license(filename)
Copy the given license file to the standard licenses directory and give it its canonical filename.
 
installed_pathname(filename)
Check whether the given license file is already installed in the licenses directory under a different name.
 
file_dirname(pathname)
Return the name of the directory containing the given file.
 
write_file(filename, contents)
Writes the given content into a file in the CWD.
 
working_directory(*args, **kwds)
Change the CWD within some limited context
 
temporary_directory(*args, **kwds)
Create a temporary directory and make that the current directory in this context.
 
handle_info_action(opts)
Create an archive of information for troubleshooting license issues.
 
options_file(licfile='')
Return the pathname of the FLEXlm options file associated with the given license.
 
system_hosts_file()
Return the pathname of the /etc/hosts file, or its equivalent.
 
get_machid_output()
Return the output of the machid utility
 
get_network_info()
Return network configuration info from ifconfig.
 
get_mmshare_listing()
Return info about the mmshare directory.
 
get_schrod_file_listing()
Return info about license-related files installed under $SCHRODINGER.
 
get_shared_file_listing()
Return info about files installed in the shared license directory.
 
get_server_processes()
Return info about any running lmgrd and SCHROD processes.
 
process_attributes(proc, attrs)
Return a dict containing the specified attributes for the given psutil.Process object.
 
copy_license_files(subdir='.')
Copy license files to the specified subdirectory.
 
copy_server_logs(subdir='.')
Copy license server logs to the current directory.
 
_find_server_logs(licenses)
Return a list of all server logfiles found on the standard search path.
 
create_archive_file(archive_file, archive_dir)
Create a zip archive with the contents of archive_dir
 
shorthost(hostname)
Return the short hostname for the given hostname, without the domain name.
 
get_flexlm_search_path()
Execute "lmutil lmpath" to determine the actual search path used for license checkouts.
 
has_license_file_suffix(filename)
 
eth0_is_missing()
 
install_schrod_plist()
Install FLEXlm plist to /Library/LaunchDaemons which allow to autostart lmgrd and SCHROD on boot.
 
main(args)
 
run(args)
Variables [hide private]
  fmt = logging.Formatter('%(message)s')
  log = logging.getLogger("licadmin")
  console_handler = logging.StreamHandler(stream= sys.stdout)
  SCHRODINGER = '/scr/buildbot/savedbuilds/2017-2/NB/build-142'
  MMSHARE_EXEC = '/scr/buildbot/savedbuilds/2017-2/NB/build-142/...
  MMSHARE_DATA = '/scr/buildbot/savedbuilds/2017-2/NB/build-142/...
  SCHROD_DAEMON_CHECK_TIMEOUT = 60
  LICENSE_DIRNAME = 'licenses'
  LICENSE_FILENAME = 'license'
  LMGRD_LOG = 'lmgrd.log'
  LMGRD_ALTLOG = 'lmgrd.buildbot.log'
  VERSION_UNKNOWN = 'Unknown'
  SHARED_LICENSE_DIR = '/opt/schrodinger'
  JOB_REQS_FILE = '/scr/buildbot/savedbuilds/2017-2/NB/build-142...
  JOB_PRODUCTS_FILE = '/scr/buildbot/savedbuilds/2017-2/NB/build...
  SCHROD_DAEMON_NOT_STARTED = 'License server machine is down'
  EXPIRED_MESSAGE = 'License has expired'
  REQUIRED_MAJOR_VERSION = 11
  REQUIRED_MINOR_VERSION = 13
  TEMPORARY_LICENSE = 'downloaded.lic'
  UNCOUNTED = -1
  _resources = None
hash(x)
  _local_server = None
hash(x)
  _job_reqs = {}
  _job_products = []
  _tokens_loaded = defaultdict(<type 'dict'>, {})
  _features_loaded = defaultdict(<type 'dict'>, {})
  _server_refresh = True
hash(x)
  RESOURCE_OK = License OK
  RESOURCE_PROBLEMS = License may have problems
  RESOURCE_HAS_FUTURE_START = License has start date in the future
  RESOURCE_UNAVAILABLE = License is unusable
  LMGRD_EVENTS = OrderedDict([('LMGRD_PRE_START', (0, <_sre.SRE_...
  SCHROD_EVENTS = OrderedDict([('SCHROD_START', (0, <_sre.SRE_Pa...
  NSERROR_GET_FAILED = 'Failed to retrieve license'
  NSERROR_BAD_KEY_TYPE = 'Unexpected key type: %s'
  NSERROR_KEY_EXHAUSTED = 'The key you entered has already been ...
  NSERROR_KEY_USED = 'The server key you entered has already bee...
  parser = None
hash(x)
  GENERIC_ACTIONS = ('CKSUM', 'NEWLOG', 'REREAD', 'REMOVE', 'SWI...
  LICENSE_ACTIONS = ('CKSUM', 'DIAG', 'INFO', 'NEWLOG', 'REREAD'...
  GENERAL_INFO_FILE = 'general-info.txt'
  GENERAL_INFO_TEMPLATE = Template("""Gene...
  server_ps_attrs = ['pid', 'ppid', 'name', 'exe', 'memory_info'...
  server_ps_head_fmt = '%-6s %-8s %6s %6s %4s %4s %6s %7s %s'
  server_ps_body_fmt = '{name:<6s} {username:<8s} {pid:6d} {ppid...
  LMGRD_ERROR = 1
  LMGRD_INFO = 0
hash(x)
  SCHROD_ERROR = 1
  SCHROD_INFO = 0
hash(x)
  __package__ = 'schrodinger.application.licensing'
Function Details [hide private]

set_server_refresh(refresh)

 

This function allows you to prevent _load_tokens from actually hitting the license servers/files again. This is dangerous unless you're sure you're the only user of licadmin.py, and you really don't want to reload the tokens. PANEL-5146

Parameters:
  • refresh (bool) - Whether to refresh tokens when _load_tokens is called

_single_job_capacity(reqs, tokens)

 

Calculate the number of jobs that can be run, for a job with the given token requirements and the given set of available tokens. Returns -1 if an unlimited number of jobs can be run.

The requirements are a dict, mapping token name to the number required. The tokens are also a dict, mapping token names to the number of available tokens. A token count of -1 indicates an unlimited number of tokens.

tokens(licenses)

 

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.

job_capacity(resources)

 

Report number of jobs that can be run with the tokens available on the given license resources.

Returns a dict mapping the jobtype to the number of jobs that can be run, with licenses available from the given resources.

get_hostid()

 

Get the hostid for the current machine using "lmutil lmhostid". Generally, this will be the MAC address(es) for the ethernet interface.

Returns the hostid string reported for the current host.

get_first_hostid()

 

Get the hostid for the current machine using get_hostid(). This will always return the first MAC address found by 'lmutil lmhostid' for the current host.

Returns: str
first host id given by get_hostid()

execute_lmutil(args)

 

Execute the lmutil program with the given commandline arguments. The arguments must be specified as list.

The raw output of the command is returned.

If the exit code is non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, the output in the output attribute, and the command in the cmd attribute.

If lmutil cannot be executed, raises a MissingExecutableError or an OSError.

execute_lictest(args)

 

Execute the lictest program with the given commandline arguments. The arguments must be specified as list.

The raw output of the command is returned.

If the exit code is non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, the output in the output attribute, and the command in the cmd attribute.

parse_lmhostid_output(lines)

 

Parse the output from "lmutil lmhostid", provided as a list of output lines.

Returns the hostid string for the current host.

run_lmstat(license_file, parsefeatures=False)

 

Get license usage information from a server via "lmutil lmstat".

@type license_file: str
@param license_file
    Path to the license file to use with 'lmutil lmstat'.

@type parsefeatures: bool
@param parsefeatures:
    If set to True, the returned dict will have a mapping of the token
    name to a stat_info named tuple for each license feature.
    A stat_info tuple has integer fields 'total' and 'used', recording
    the total tokens provided and the number in use.

@returntpe: dict
@return:
    Dictionary containing the metadata of license server and
    vendor daemon corresponding to the given license file.

parse_lmstat_output(lines)

 

Parse the output from "lmutil lmstat", provided as a list of output lines.

@type lines: list
@param lines:
    Output of 'lmutil lmstat'.

@returntype: dict
@return:
    Dictionary of license server, vendor daemon metadata containing the
    following information -

    "address"           port@host address of the license server.
    "server_version"    lmgrd version number, e.g., "v11.10.2" or
                        VERSION_UNKNOWN if indeterminate. This is only
                        returned in the case of
                        running lmstat on a remote server.
    "server_up"         True, if lmgrd is UP; else, False.
    "version"           SCHROD daemon version number or VERSION_UNKNOWN if
                        indeterminate.
    "schrod_up"         True, if SCHROD is up; False if down.
    "tokens"            tokens dict is a mapping of 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. If the output lines doesn't
                        have users of feature(s), this will be empty.

run_lmdiag(locations)

 

Get diagnostic information regarding one or more license resources via "lmutil lmdiag".

The argument 'locations' is a string representing a FLEXLM search path, such as $SCHROD_LICENSE_FILE.

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 than one.)

parse_lmdiag_output(lines)

 

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 than one.)

join_cont_lines(lines)

 

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.

load_job_reqs(filename='')

 

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.

If the file can't be loaded, an exception will be thrown.

load_job_products(filename='')

 

Read a json document listing the product names under which job types should be grouped.

Returns a list of product names.

If the file can't be loaded, an exception will be thrown.

_require_job_reqs()

 

Return the table of license requirements for each job.

The requirements are returned as a dict. The keys are the full internal job names. The license requirements for each job are recorded as a list of dicts, where each list item describes a set of requirements. A set of requirements is a dict mapping a license token name to the number of tokens required for that job.

find_license_resources()

 

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)

_unique_resources(lics)

 

Filter the given list of LicenseResources to remove redundant resources.

Rules:
1. If both a port@host reference and license file are found for the same
   server, we keep the license file.
2. If we have both a port@host and an @host reference to a server, keep
   the port@host reference.
3. If a stub license and a full license file are found, keep the full
   license file.
4. If there's more than one full license file for a given server, all
   are kept.

resource_summary(resources)

 

Provide a condensed list of license resources. Each license server is listed, but the existence of node-locked licenses. The health of each listed resource is indicated with a status code, which will be one of RESOURCE_OK, RESOURCE_PROBLEMS, RESOURCE_UNAVAILABLE.

server_log(licfile)

 

Return the standard pathname for the lmgrd log file associated with the given license file.

If the license is just a port@host server address, the empty string is returned, because we have no idea where the logs would be.

writable_server_log(licfile, prefer_logfile='')

 

Return the pathname for the log file to use when launching a server for the given license file. The returned pathname will be writable by the current user.

This differs from server_log() in that it will check for alternative locations and filenames if the standard lmgrd.log file can't be written.

A suggested logfile pathname can be specified. If this file is writable, it will be returned.

parse_lmgrd_lines(lines)

 

Parse an lmgrd log file for messages related to the health of the lmgrd and SCHROD daemons. The log file is supplied as a list of lines.

A ServerInfo object is returned

lmgrd_lines(lines)

 

A generator to perform initial parsing of lmgrd logfile lines.

A sequence of tuples (timestamp, prog, text) is returned. Lines for any prog other than "lmgrd" or "SCHROD" are discarded.

local_server_resource()

 

Returns the first license resource found for the local license server, if any. There may be multiple license servers, but only one that can run on the current machine. Only a local license server can be started or stopped by the user. Returns None if no local license server is found.

NOTE: To start or stop a local license server, you'll need all of the license files for that server - there may be more than one. Use the local_server_resources() function to get the complete list.

local_server_resources()

 

Returns the license resources that represent the local license server. There may be multiple license servers, but only one that can run on the current machine. Only a local license server can be started or stopped by the user. Returns the empty list if no local license server files are found.

get_working_resources(license_resources=None)

 

Returns list of LicenseResources without any all-expired files.
This is useful for user-facing presentation.

@param license_resources list of license resource, if none specified
                         search all available
@type license_resources list of LicenseResource objects

local_server_files(dirname)

 

Given the name of a license directory, return a list of the license files found therein that can be used to start a local license server. Because the directory is a license directory, license files need to have a .lic suffix.

job_capacity_by_product(res_list=None)

 

Return a dict of lists of tuples, reporting the number of
jobs of each type that can be run, grouped by product.

The structure of the return value is

{ <product1>: [ (<jobtype1>, <number of jobs>),
                (<jobtype2>, <number of jobs>),
              ... ],
  <product2>: [ (<jobtype1>, <number of jobs>),
                (<jobtype2>, <number of jobs>),
              ... ],
}

By default, checks all available resources, but the res_list parameter can
be used to restrict the report to a specified collection of resources.

license_directory()

 

Return the pathname of the directory into which license files
should be installed.

The first writable directory found among the following will be
returned:
1. the shared license directory,
2. $SCHRODINGER/licenses, and
3. $HOME/licenses

The returned license directory will be created, as a side effect, if it
doesn't already exist.

parse_args(args)

 

Parse the commandline arguments for the licadmin utility.

If incompatible options are specified a UsageError is thrown.

Returns a namespace object with the values of the commandline options. The subcommand ("START", "INFO", etc.) is returned as the "action" attribute of the namespace object.

handle_ver_action(opts)

 

Execute "lmutil lmver" for the specified executable. Lines containing "lmutil" are stripped from the result.

handle_install_action(opts)

 

Install a license in the license directory. If a license key is given, download the license from Netsuite, first.

get_netsuite_license(key)

 

Download a license from Netsuite, using the given key.

Returns the pathname of the downloaded file. A NetsuiteError is raised if there's a problem using the given license key.

download_server_license(key, hostname=None, hostid=None, lmgrdport=27008, schrodport=53000)

 

Retrieves the server license corresponding to the key and saves it to disk, in the license directory. The lmgrd and SCHROD ports to use in the license may be specified.

Returns the pathname of the downloaded file. A NetsuiteError is raised if there's a problem using the given license key.

Parameters:
  • hostid (str) - If more than one host id is given, this value must be a string of comma-separated host ids. Otherwise NetSuite will throw an error.

download_nodelocked_license(key, hostname=None, hostid=None)

 

Retrieves the license corresponding to the key and saves it to disk, in the licenses directory.

Returns the pathname of the downloaded file. A NetsuiteError is raised if there's a problem using the given license key.

Parameters:
  • hostid (str) - If more than one host id is given, this value must be a string of comma-separated host ids. Otherwise NetSuite will throw an error.

install_license_text(text)

 

Install the given text as a license file, with the canonical filename. If it's already installed, nothing is done. The pathname of the installed license is returned.

install_license(filename)

 

Copy the given license file to the standard licenses directory and give it its canonical filename. If it's already in the licenses directory, it's just renamed. If its name already matches the canonical pattern, it is not renamed.

installed_pathname(filename)

 

Check whether the given license file is already installed in the licenses directory under a different name. Return the pathname of the installed license, if it's found there, otherwise, return None.

write_file(filename, contents)

 

Writes the given content into a file in the CWD. The full pathname of the written file is returned.

working_directory(*args, **kwds)

 

Change the CWD within some limited context

Decorators:
  • @contextmanager

temporary_directory(*args, **kwds)

 

Create a temporary directory and make that the current directory in this context. When the context is exited, chdir back to the original directory and delete the temporary directory.

Decorators:
  • @contextmanager

process_attributes(proc, attrs)

 

Return a dict containing the specified attributes for the given psutil.Process object.

Make sure that filler values for unavailable data are of the correct type (LIC-548)

copy_license_files(subdir='.')

 

Copy license files to the specified subdirectory. All licenses found on the standard search path are copied.

If a subdir is specified, the files are copied to that subdirectory, which will be created if necessary.

copy_server_logs(subdir='.')

 

Copy license server logs to the current directory. All server logs found on the standard search path are copied.

If a subdir is specified, the files are copied to that subdirectory, which will be created if necessary.

_find_server_logs(licenses)

 

Return a list of all server logfiles found on the standard search path.

The standard search path includes...
1. Any directory in which a license is installed
2. The parent directory of a licenses/ directory in which a license is installed
3. The user's home directory
4. The current directory

shorthost(hostname)

 

Return the short hostname for the given hostname, without the domain name. If hostname is an IP address, it is returned unmodified.

install_schrod_plist()

 

Install FLEXlm plist to /Library/LaunchDaemons which allow to autostart lmgrd and SCHROD on boot. This require root privilege to install to the location.


Variables Details [hide private]

MMSHARE_EXEC

Value:
'/scr/buildbot/savedbuilds/2017-2/NB/build-142/mmshare-v3.8/bin/Linux-\
x86_64'

MMSHARE_DATA

Value:
'/scr/buildbot/savedbuilds/2017-2/NB/build-142/mmshare-v3.8/data'

JOB_REQS_FILE

Value:
'/scr/buildbot/savedbuilds/2017-2/NB/build-142/mmshare-v3.8/data/licen\
se_reqs.json'

JOB_PRODUCTS_FILE

Value:
'/scr/buildbot/savedbuilds/2017-2/NB/build-142/mmshare-v3.8/data/job_p\
roducts.json'

LMGRD_EVENTS

Value:
OrderedDict([('LMGRD_PRE_START', (0, <_sre.SRE_Pattern object at 0x7f1\
a15b3a6e8>)), ('LMGRD_START', (0, <_sre.SRE_Pattern object at 0x7648d5\
0>)), ('LMGRD_FILE', (0, <_sre.SRE_Pattern object at 0x7f1a15dcde70>))\
, ('LMGRD_FILE2', (0, <_sre.SRE_Pattern object at 0x7f1a15b73510>)), (\
'LMGRD_PORT', (0, <_sre.SRE_Pattern object at 0x7f1a165de8d0>)), ('LMG\
RD_SCHROD_START', (0, <_sre.SRE_Pattern object at 0x6b813d0>)), ('LMGR\
D_SCHROD_EXIT', (1, <_sre.SRE_Pattern object at 0x99b0210>)), ('LMGRD_\
BAD_HOST', (1, <_sre.SRE_Pattern object at 0x7f1a15b04030>)), ('LMGRD_\
...

SCHROD_EVENTS

Value:
OrderedDict([('SCHROD_START', (0, <_sre.SRE_Pattern object at 0x7f1a15\
ae11c0>)), ('SCHROD_HOST', (0, <_sre.SRE_Pattern object at 0x7f1a164dd\
bf0>)), ('SCHROD_BAD_KEY', (1, <_sre.SRE_Pattern object at 0x7f1a15b31\
3a0>)), ('SCHROD_EXITING', (1, <_sre.SRE_Pattern object at 0x7f1a16230\
f08>)), ('SCHROD_SHUTDOWN', (1, <_sre.SRE_Pattern object at 0x99a29e0>\
)), ('SCHROD_EXIT', (1, <_sre.SRE_Pattern object at 0x7f1a15dc6828>)),\
 ('SCHROD_FEATURE_FUTURE_START_DATE', (0, <_sre.SRE_Pattern object at \
0x8a91cc0>))])

NSERROR_KEY_EXHAUSTED

Value:
'The key you entered has already been used %d times and cannot be used\
 again.'

NSERROR_KEY_USED

Value:
'The server key you entered has already been used to generate a licens\
e file.'

GENERIC_ACTIONS

Value:
('CKSUM', 'NEWLOG', 'REREAD', 'REMOVE', 'SWITCHR')

LICENSE_ACTIONS

Value:
('CKSUM',
 'DIAG',
 'INFO',
 'NEWLOG',
 'REREAD',
 'REMOVE',
 'START',
 'STAT',
...

GENERAL_INFO_TEMPLATE

Value:
Template("""General
-------
hostname: $HOST
username: $USER
curdir:  $CWD

Hostid
------
...

server_ps_attrs

Value:
['pid',
 'ppid',
 'name',
 'exe',
 'memory_info',
 'memory_percent',
 'cpu_percent',
 'username',
...

server_ps_body_fmt

Value:
'{name:<6s} {username:<8s} {pid:6d} {ppid:6d} {cpu_percent:4.1f} {memo\
ry_percent:4.1f} {rss:>6s} {vms:>7s} {cmdstr}'