(go to: table of contents, index, list of vms_sys, next: ADD_IDENT)
None
Arguments:
ADD_HOLDER - Add Holder Record to Rights Database
Adds a specified holder record to a target identifier.
27-SEP-1998 ZE.
Format:
vms_sys.add_holder (id, holder [,attrib])
Returns:
Examples:
The Python function only accepts a tuple of 2 integers - not a quadword
represented by a Python long integer. For OpenVMS V6.1 the first element is the
holder's UIC identifier, the second element must be 0. Check the system services
reference manual for your version of OpenVMS.
UAF> show /identifier /full ID_1
Name Value Attributes
ID_1 %X80010011 RESOURCE
UAF> show /identifier /full ID_2
Name Value Attributes
ID_2 %X80010012 DYNAMIC
UAF> ! identifiers are not granted to any user
>>> import vms_sys
>>> import vms_kgbdef
>>> id_1 = 0x80010011
>>> id_2 = 0x80010012
>>> uic_system = 0x10004
>>> attributes = vms_kgbdef.KGB_M_DYNAMIC + vms_kgbdef.KGB_M_RESOURCE
>>> vms_sys.add_holder (id_1, (uic_system,0), attributes)
>>> # nothing is returned - system service succeded
UAF> show /identifier /full ID_1
Name Value Attributes
ID_1 %X80010011 RESOURCE
Holder Attributes
SYSTEM RESOURCE
UAF> ! DYNAMIC attribute not available !!!
>>> # no attributes to be assigned - argument 3 = (0 or None)
>>> vms_sys.add_holder (id_2, (uic_system,0), None)
UAF> show /identifier /full ID_2
Name Value Attributes
ID_2 %X80010012 DYNAMIC
Holder Attributes
SYSTEM
UAF> ! empty ------------------------!!!!!!!!
>>> # identifier has already been assigned and argument 3 left off
>>> vms_sys.add_holder (id_1, (uic_system,0) )
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (8748, '%SYSTEM-F-DUPIDENT, duplicate identifier')
>>>
>>> id_x = 0x80012345 # identifier value has no text assigned
>>> vms_sys.add_holder (id_x, (uic_system,0), attributes)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (8684, '%SYSTEM-F-NOSUCHID, unknown rights identifier')
>>>
>>> uic_x = 0x300003 # UIC has no text assigned
>>> vms_sys.add_holder (id_1, (uic_x,0), attributes)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_sys.error: (8684, '%SYSTEM-F-NOSUCHID, unknown rights identifier')
>>>
>>> vms_sys.add_holder (id_1, uic_system, attributes)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 2: holder - must be a tuple of 2 integers
>>> vms_sys.add_holder (id_1, (uic_system,0,0), attributes)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 2: holder - must be a tuple of 2 integers
>>> vms_sys.add_holder (id_1, ('X',0), attributes)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 2: holder - tuple-element:0 is not an integer
>>> vms_sys.add_holder (id_1, (uic_system,'X'), attributes)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: argument 2: holder - tuple-element:1 is not an integer
>>>
(go to: table of contents,
index,
list of vms_sys,
next: ADD_IDENT)