Bug 913695
| Summary: | ovirt-engine-cli: suggest valid context for actions in error message [TEXT] | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Oded Ramraz <oramraz> |
| Component: | ovirt-engine-cli | Assignee: | Michael Pasternak <mpastern> |
| Status: | CLOSED DUPLICATE | QA Contact: | Haim <hateya> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | abaron, acathrow, amureini, bazulay, iheim, jkt, oramraz, Rhev-m-bugs, yeylon |
| Target Milestone: | --- | Keywords: | Reopened, Triaged |
| Target Release: | 3.4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | storage | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-10-07 09:53:57 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Oded Ramraz
2013-02-21 19:54:39 UTC
Same for import template without specifying target storage domain: [RHEVM shell (connected)]# action template a946f165-2d27-4987-bbad-08ae0ac00aeb import_template error: action "import_template" does not exist Oded,
both errors are correct, you trying to operate on:
/api/storagedomains/xxx
/api/templates/xxx
while actions deactivate/import, available only at:
/api/datacenters/aaa/storagedomains/xxx
/api/storagedomains/bbbtemplates/xxx
you could see this in action help:
1)
[oVirt shell (connected)]# help action storagedomain 7233a711-98e8-4c3c-bcfa-44c4bcc4f6c6
USAGE
action <type> <id> <action> [parent identifiers] [command options]
DESCRIPTION
Executes the an action on an object. This command requires the
following arguments:
* type - The type to operate on
* id - The name or id identifying the object
* action - The action to take
AVAILABLE ACTIONS
The following actions are available for the specified storagedomain object:
2)
[oVirt shell (connected)]# help action template a946f165-2d27-4987-bbad-08ae0ac00aeb
USAGE
action <type> <id> <action> [parent identifiers] [command options]
DESCRIPTION
Executes the an action on an object. This command requires the
following arguments:
* type - The type to operate on
* id - The name or id identifying the object
* action - The action to take
AVAILABLE ACTIONS
The following actions are available for the specified template object:
* export
- if you'd specify datacenter/storagedomain, you'd see actions you're trying to access,
- regardless of told above, i'll make error a bit more clear:
from => error: action XXX does not exist
to => error: action XXX does not exist in this context [1]
[1] http://gerrit.ovirt.org/12345
I still think it is quite misleading , especially since the auto complete suggest this operation , Simon please advise: [RHEVM shell (connected)]# action storagedomain 7233a711-98e8-4c3c-bcfa-44c4bcc4f6c6 activate datacenter deactivate [RHEVM shell (connected)]# action storagedomain 7233a711-98e8-4c3c-bcfa-44c4bcc4f6c6 deactivate error: action "deactivate" does not exist. [RHEVM shell (connected)]# action storagedomain 7233a711-98e8-4c3c-bcfa-44c4bcc4f6c6 deactivate --datacenter-identifier 5849b030-626e-47cb-ad90-3ce782d831b3 status-state: complete *** This bug has been marked as a duplicate of bug 867794 *** |