Package schrodinger :: Package application :: Package licensing :: Module flexlm :: Class Feature
[hide private]
[frames] | no frames]

Class Feature

 object --+    
          |    
LicenseLine --+
              |
             Feature

Feature objects represent FEATURE or INCREMENT lines in the license file.

The format of the FEATURE line is:

FEATURE

Instance Methods [hide private]
 
__init__(self, line=None, line_num=0)
x.__init__(...) initializes x; see help(type(x)) for signature
 
_elemkey(self)
Return the unique identifier for this line, used for recognizing duplicate lines.
 
short(self)
Return short string representation (no signatures)
 
print_fields(self)
 
matches(self, feat)
Does the given feature match this one? This is used for assigning RSA signatures to licenses.
 
alt_matches(self, feat)
Does the given feature match this one? This is used for assigning RSA signatures to licenses.
 
tokens_str(self)
Return the standard string representation of the token count.
 
expiration_str(self)
Return the standard string representation of the expiration date.
 
issued_str(self)
Return the standard string representation of the issued date.
 
start_str(self)
Return the standard string representation of the start date.
 
is_nodelocked(self)
Returns true if this license can be used on any host.
 
is_counted(self)
Returns true if only a fixed number of tokens are provided.
 
is_permanent(self)
Returns true if this license has no expiration date or if it appears to have been issued as a 10-year license.
 
is_signed(self)
Does this license line have a signature?
 
signature(self)
Return a string representing the signatures for this license line.
 
unsign(self)
 
supersedes(self, feat)
Does this FEATURE/INCREMENT line supersede the given line?
 
sort_index(self)
Get the "sort" field for this line, as an integer.
 
add_signature(self, signature)
Add the given vendor_info signature to this line.
 
set_sort_index(self, sort_index)
Set the "sort" field for this line to the specified value.
 
_parse_line(self, line)
Initialize this object using the information from the given FEATURE or INCREMENT line.

Inherited from LicenseLine: __str__, is_expired, string

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, line=None, line_num=0)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_elemkey(self)

 

Return the unique identifier for this line, used for recognizing duplicate lines.

Different identifiers are used for different types of lines: for SERVER lines, the hostid is used; for VENDOR lines, the vendor name is used; for FEATURE, INCREMENT, and PACKAGE lines, the signature is used.

Overrides: LicenseLine._elemkey
(inherited documentation)

short(self)

 

Return short string representation (no signatures)

Overrides: LicenseLine.short

print_fields(self)

 
Overrides: LicenseLine.print_fields

matches(self, feat)

 

Does the given feature match this one? This is used for assigning RSA signatures to licenses.

It currently compares only the SIGN and SIGN fields, and so can only be used for signed licenses. Assumes that it's not possible for SIGN fields to match unless SIGN2 fields also match. It doesn't insist on both SIGN and SIGN2 being present, so it'll continue to work if we manage to eliminate SIGN2.

alt_matches(self, feat)

 

Does the given feature match this one? This is used for assigning RSA signatures to licenses.

This version compares the details of each license line.

signature(self)

 

Return a string representing the signatures for this license line. This is used for recognizing duplicate lines.

When no signatures are present, the full text of the line is used.

unsign(self)

 
Overrides: LicenseLine.unsign

add_signature(self, signature)

 

Add the given vendor_info signature to this line.

If this line doesn't yet have a 'vendor_info' field, one is added to both the text attribute and the fields dict.

set_sort_index(self, sort_index)

 

Set the "sort" field for this line to the specified value.

If this line doesn't yet have a 'sort' value, the field is added to both the text attribute and the fields dict.

_parse_line(self, line)

 

Initialize this object using the information from the given FEATURE or INCREMENT line.

NOTE: FEATURE/INCREMENT lines for a package's enabling feature will have the corresponding PACKAGE line appended to them in the signature-generation output from licsign. This needs to be stripped off so the feature info can be parsed properly.