OPH_MANAGE_SESSION

Description

Type

Metadata Access.

Behaviour

Request or set session data: session list, session creation date, authorized users, etc. Only session owner and administrators can submit the command.

Parameters

  • action: name of the action to be applied to session parameter; possible values are:
    • disable: disable a session (only the owner is authorized to submit the command)
    • enable: enable a session (only the owner is authorized to submit the command)
    • env: list environmental session variables
    • grant: share the session with a list of users, assigning one or more of the following roles:
      • “read”: the user can submit commands to read data and metadata from datasets
      • “write”: the user can submit commands to create new datasets
      • “execute”: the user can execute scripts
      • “admin”: the user can grant/revoke access privileges
    • list: list the session which the user can access to (default)
    • listusers: list session users with their roles
    • new: create a new session
    • remove: remove a session
    • revoke: revoke the grants to a list of users
    • setenv : set environmental session variables
  • session: link to intended session, by default it is the working session.
  • key : name of the parameter to be get/set.
  • value : value of the key set with the argument “key”.

System parameters

  • sessionid : session identifier used server-side to manage sessions and jobs. Usually, users don’t need to use/modify it, except when it is necessary to create a new session or switch to another one.
  • objkey_filter : filter on the output of the operator written to file (default=all => no filter, none => no output, manage_session_list => shows session data as text, manage_session_summary => shows a summary as text).

Examples

Get the session list:

[OPH_TERM] >>  oph_manage_session action=list;

Get the user list of current session:

[OPH_TERM] >>  oph_manage_session action=listusers;

Share the session with user “oph-test”, assigning it the role “write”:

[OPH_TERM] >>  oph_manage_session action=grant;value=oph-test:write;

Arguments

Argument name Type Mandatory Values Default Min/Max-value
action “string” “no” “disable|enable|env|grant|list|listusers|new|remove|revoke|setenv” “list”  
session “string” “no”   “this”  
key “string” “no” “active|autoremove|label|user” “user”  
value “string” “no”   “null”  
sessionid “string” “no”   “null”  
objkey_filter “string” “no” “all|none|manage_session_list|manage_session_summary” “all”