mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Added an example CLI-specific env command
This commit is contained in:
@@ -97,6 +97,21 @@ class console(frontend.Application):
|
||||
)
|
||||
|
||||
|
||||
class env(frontend.Application):
|
||||
"""
|
||||
Show environment variables.
|
||||
"""
|
||||
|
||||
def run(self):
|
||||
return tuple(
|
||||
(key, self.api.env[key]) for key in self.api.env
|
||||
)
|
||||
|
||||
def output_for_cli(self, ret):
|
||||
for (key, value) in ret:
|
||||
print '%s = %r' % (key, value)
|
||||
|
||||
|
||||
|
||||
class show_api(text_ui):
|
||||
'Show attributes on dynamic API object'
|
||||
@@ -183,6 +198,7 @@ cli_application_commands = (
|
||||
console,
|
||||
show_api,
|
||||
plugins,
|
||||
env,
|
||||
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user