7 lines
No EOL
354 B
Python
7 lines
No EOL
354 B
Python
|
|
from ops.data import OpsClass, OpsField, DszObject, DszCommandObject, cmd_definitions
|
|
import dsz
|
|
if ('whoami' not in cmd_definitions):
|
|
dszwhoami = OpsClass('user', {'name': OpsField('name', dsz.TYPE_STRING)}, DszObject)
|
|
whoamicommand = OpsClass('whoami', {'user': dszwhoami}, DszCommandObject)
|
|
cmd_definitions['whoami'] = whoamicommand |