Bug 895559
| Summary: | PRD34 - [RFE] [RHEVM-CLI] Add CLI invocation capabilities | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Barak Dagan <bdagan> |
| Component: | ovirt-engine-cli | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Barak Dagan <bdagan> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.4.0 | CC: | aberezin, acathrow, amedeo, anande, bazulay, iheim, jkt, juan.hernandez, oramraz, pstehlik, Rhev-m-bugs, rmcswain |
| Target Milestone: | --- | Keywords: | FutureFeature, Reopened |
| Target Release: | 3.4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | infra | ||
| Fixed In Version: | ovirt-3.4.0-alpha1 | Doc Type: | Enhancement |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-01-27 10:56:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 823515 | ||
| Bug Blocks: | 854519 | ||
|
Comment 1
Michael Pasternak
2013-01-15 14:43:52 UTC
[bdagan@bdagan ~]$ export TERM=/dev/tty
[bdagan@bdagan ~]$ echo $TERM
/dev/tty
[bdagan@bdagan ~]$ ssh fire-vdc1.qa.lab.tlv.redhat.com -lroot "rhevm-shell -c"
Traceback (most recent call last):
File "/usr/bin/rhevm-shell", line 9, in <module>
load_entry_point('rhevm-shell==3.1.1.2-SNAPSHOT', 'console_scripts', 'rhevm-shell')()
File "/usr/lib/python2.6/site-packages/ovirtcli/main.py", line 27, in main
context = OvirtCliExecutionContext(sys.argv, parser)
File "/usr/lib/python2.6/site-packages/ovirtcli/context.py", line 45, in __init__
super(OvirtCliExecutionContext, self).__init__(args=args, option_parser=option_parser)
File "/usr/lib/python2.6/site-packages/cli/context.py", line 69, in __init__
self.terminal = create(self.Terminal)
File "/usr/lib/python2.6/site-packages/cli/object.py", line 26, in create
obj = cls(sys.stdin, sys.stdout, sys.stderr, **kwargs)
File "/usr/lib/python2.6/site-packages/cli/platform/posix/terminal.py", line 36, in __init__
self._tty = os.open('/dev/tty', os.O_RDWR)
OSError: [Errno 6] No such device or address: '/dev/tty'
Did you try ssh ... -t ... ? (In reply to comment #0) > Expected results: > > get the results of the requested command, like: > ssh root@myhost "psql -U xxx -d engine -c '\d'" > > public | vm_pool_map_view | view | engine > public | vm_pools | table | engine > public | vm_pools_full_view | view | engine > public | vm_pools_view | view | engine > public | vm_static | table | engine > public | vm_statistics | table | engine > public | vm_templates_storage_domain | view | engine > public | vm_templates_view | view | engine > public | vm_templates_with_plug_info | view | engine > public | vms | view | engine > public | vms_for_disk_view | view | engine > public | vms_with_plug_info | view | engine > public | vms_with_tags | view | engine > (162 rows) > > > > Additional info: even if you'll work out your env. issues and will invoke shell remotely, script output won't be redirected to the linux console i/o stream as rhevm-shell doesn't have cli invocation capabilities. *** This bug has been marked as a duplicate of bug 823515 *** implemented by -E/--execute-command option, e.g: [mpastern@laptop ~]$ ovirt-shell --execute-command "list vms;list clusters" [oVirt shell (connected)]# list vms id : 77fd5b88-bcd6-4296-bf20-f3d857f7f0d2 name : test [oVirt shell (connected)]# list clusters id : 99408929-82cf-4dc7-a532-9d998063fa95 name : Default description: The default server cluster [mpastern@laptop ~]$ [mpastern@laptop ~]$ [mpastern@laptop ~]$ I see that this feature has a target release of 3.4, however considering this is available in the upstream is there any possibility of getting this into a future point release of RHEL 3.3? (In reply to Robert McSwain from comment #12) > I see that this feature has a target release of 3.4, however considering > this is available in the upstream is there any possibility of getting this > into a future point release of RHEL 3.3? RHEVM 3.3 already after feature freeze, currently we working on stabilizing the version Verified on : # rpm -q ovirt-engine ovirt-engine-3.4.0-0.7.beta2.el6.noarch # rpm -qa | grep ovirt-engine | egrep 'sdk|cli' ovirt-engine-cli-3.4.0.3-1.el6.noarch ovirt-engine-sdk-python-3.4.0.3-1.el6.noarch # ovirt-shell -c -l "https://ip.add.re.s/api" -u admin@internal -I -E "list vms;list clusters" Password: [oVirt shell (connected)]# list vms id : f12db6fb-c407-473b-b64a-14bda64dd31f name : vm222 id : 5416dbc7-236c-4e22-8db7-a31df74b1eae name : vm-test-1 [oVirt shell (connected)]# list clusters id : a1cfda61-1b88-4c49-a5b0-71daf49b9379 name : c33 id : 09f91db8-7f5b-4e78-9eba-8df524e01354 name : cluster1 id : b5c1c607-6f3a-4638-ac84-4b0fd3a03b46 name : cluster-nfs-1 id : 82de1af7-1855-42de-a0a9-975b62956bc7 name : clutestes id : 00000001-0001-0001-0001-000000000001 name : Default description: The default server cluster Closing as part of 3.4.0 |