(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of vms_sys, prev: DISMOU, next: DLCEFC)


DISPLAY_PROXY - Display Proxy Information


Format:
    proxy_node, proxy_user, default_user, \
    (local_users), context = vms_sys.display_proxy \
        (rem_node, rem_user, flags [,context])\n\
Returns:
proxy_node
Node name of a proxy matching the remote node name specified by the rem_node argument and the remote user name specified by the rem_user argument.
proxy_user
User name of a matching proxy.
default_user
The default user of a matching proxy.
(local_users)
A tuple of all local user names associated with a matching proxy. If there aren't any, then 'None' is returned.
context
Context information between calls of SYS$DISPLAY_PROXY. Note that contexts become invalid after one-half hour of non-use.
Arguments:
rem_node
Remote node name.
rem_user
Remote username.
flags
Functional specification and type of local_user (NOdefault). The bitmasks are not available from a separate module ($PRXDEF).
context
Context information between calls of SYS$DISPLAY_PROXY. Supply a 0 to initialize a new context. Note that contexts become invalid after one-half hour of non-use.
Examples:
>>> import vms_sys

>>> vms_sys.add_proxy ('REMNOD', 'REMUSR1', 'NOPRIV')
>>> vms_sys.add_proxy ('REMNOD', 'REMUSR1', 'SYSTEM')
>>> vms_sys.add_proxy ('REMNOD', 'REMUSR2', 'NOPRIV')
>>> vms_sys.add_proxy ('REMNOD', 'REMUSR3', 'SYSTEM')

UAF> show /proxy r*::*

 Default proxies are flagged with (D)

REMNOD::REMUSR3
    SYSTEM

REMNOD::REMUSR1
    NOPRIV                                 SYSTEM

REMNOD::REMUSR2
    NOPRIV
UAF>

>>> import vms_sys

>>> l_context = 0
>>> proxy_node, proxy_user, default_user, \
... local_users, context = vms_sys.display_proxy \
...     ('REMNOD', 'REMUSR1', 0, l_context)
>>>
>>> proxy_node, proxy_user, default_user, \
... local_users, context
('REMNOD', 'REMUSR1', '', ('NOPRIV', 'SYSTEM'), 0)
>>>

>>> l_context = 0
... while (1):
...   proxy_node, proxy_user, default_user, \
...   local_users, context_out = vms_sys.display_proxy \
...     ('REMNOD', 'R*', 0, l_context)
...   print proxy_node, proxy_user, default_user, \
...     local_users, context_out
...   l_context = context_out
... #-while:
... 
REMNOD REMUSR3  ('SYSTEM',) 231
REMNOD REMUSR1  ('NOPRIV', 'SYSTEM') 231
REMNOD REMUSR2  ('NOPRIV',) 231
Traceback (innermost last):
  File "<stdin>", line 2, in ?
vms_sys.error: (1777, '%SYSTEM-S-NOMOREITEMS, no more items to be\
 returned')
>>>

>>>

(go to: table of contents, index, list of vms_sys, prev: DISMOU, next: DLCEFC)

21-JAN-1999 ZE.