Bug 834854

Summary: Ovirt CLI - Can't create vm disk when specifying storage domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Elena <edolinin>
Component: ovirt-engine-restapiAssignee: Ori Liel <oliel>
Status: CLOSED NOTABUG QA Contact: Oded Ramraz <oramraz>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: acathrow, amureini, dyasny, ecohen, iheim, mpastern, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ---   
Target Release: 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-24 12:41:39 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 Elena 2012-06-24 09:54:58 UTC
create disk --vm-identifier '339857a2-642c-4d0b-b4d5-02bda1c7ac66'   --storage_domains-storage_domain-id 'd2c04ba8-1e64-4f87-b3e7-acf27888335f' --format 'cow' --sparse true --interface 'virtio' --size 214748364

error: syntax error "%s", see help on collection based arguments for more details.

Comment 1 Elena 2012-06-24 09:56:14 UTC
Storage domain is required for vm first disk creation

Comment 2 Michael Pasternak 2012-06-24 10:11:18 UTC
error: syntax error at "--storage_domains-storage_domain-id", see help on collection based arguments for more details.

this bug caused by incorrect parameter representation in RSDL,
storage_domains [1] implemented as collection while RSDL reporting 
it as Type

[1]

    public List<StorageDomain> getStorageDomains() {
        if (storageDomains == null) {
            storageDomains = new ArrayList<StorageDomain>();
        }
        return this.storageDomains;
    }

Comment 3 Michael Pasternak 2012-06-24 12:41:39 UTC
my bad, - (was on old branch), current RSDL impl is correct (see cli help [1]), usage is not, Elena please always review /help/ to determinate correct option format.

[1]

     Overload 1:
     
     * --size: int
     * --type: string
     * --interface: string
     * --format: string
     * [--sparse: boolean]
     * [--bootable: boolean]
     * [--shareable: boolean]
     * [--allow_snapshot: boolean]
     * [--propagate_errors: boolean]
     * [--wipe_after_delete: boolean]
     * [--storage_domains: collection]
       {
         [storage_domain.id|name: string]
       }