[ovirt-users] Attach Storage via CLI
Juan Hernández
jhernand at redhat.com
Sat Jan 21 09:18:54 UTC 2017
On 01/20/2017 03:30 PM, Steffen Nolden wrote:
> Hi,
>
> i have create a storagedomain with ovirt-shell:
>
> add storagedomain --host-name <host> --type data --storage-type
> glusterfs --storage-path <IP>:/data --storage-vfs_type glusterfs --name
> Data-Domain
>
>
> Now i try to attach it to the data-center. I found this command
>
> add storagedomain --datacenter-identifier Default --name Data-Domain
>
>
> But i got this Error-MSG:
>
> =======================================================================
> ERROR
> =======================================================================
> cannot construct collection/member view, checked variants are:
> [('--datacenter-identifier',)].
> =======================================================================
>
>
> What is wrong.. or how can i attach a storagedomain to a data-center
> via CLI?
>
> Thanks
>
Should be this command:
add storagedomain --parent-datacenter-name Default --name Data-Domain
Please note that the CLI is based on version 3 of the API, which is
deprecated since version 4 of the engine, and will be removed in versoin
4.2. Consider using one of the version 4 SDKs for your scripts. Here you
have some examples:
Python:
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/attach_nfs_data_storage_domain.py
Ruby:
https://github.com/oVirt/ovirt-engine-sdk-ruby/blob/master/sdk/examples/attach_nfs_data_storage_domain.rb
Java:
https://github.com/oVirt/ovirt-engine-sdk-java/blob/master/sdk/src/test/java/org/ovirt/engine/sdk4/examples/AttachNfsDataStorageDomain.java
More information about the Users
mailing list