[ovirt-users] Re: ansible module to copy floating disks

2019-10-03 Thread Eyal Shenitzky
On Thu, 3 Oct 2019 at 12:45, Gianluca Cecchi 
wrote:

> On Thu, Oct 3, 2019 at 6:55 AM Eyal Shenitzky  wrote:
>
>> You can use the update_storage_domains action.
>> According to the action implementation [1], it seems that you need to
>> specify where you want the disk to appear (in which storage domains).
>>
>> For example:
>> If the disks already reside on sd1 and you want to copy it to sd2, you
>> need to specify both sd1 and sd2.
>>
>> [1]
>> https://github.com/ansible/ansible/blob/25ac7042b070b22c5377f7a43399c19060a38966/lib/ansible/modules/cloud/ovirt/ovirt_disk.py#L532
>> [2] -
>> https://docs.ansible.com/ansible/latest/modules/ovirt_disk_module.html
>>
>>

 --
 Regards,
 Eyal Shenitzky

>>>
>>>
> I can try, thanks.
> But is it supported on block based storage such as iSCSI or FC?
> I see this in your [1] above
> "
> # We don't support move for non file based storages:
> if disk.storage_type != otypes.DiskStorageType.IMAGE:
> return changed
> "
>

Disk type IMAGE is the term for both Block and File-based disks.
So I guess that there is a problem with the documentation.


> Also it is not clear in my opinion the action connected to the different
> "state" possibilities: present/absent/attached/detached
> In web admin gui I can have a disk active on a VM and I can:
>
> - deactivate the disk
> I see red down arrow for the disk that remains associated with the VM
>
> - remove the disk
> a) remove permanently removes the disk from storage
> b) if I don't select "remove permanently" the disk goes into the floating
> disks list
>
> How do they map with Ansible module state options?
>

You can have a look at the 'example' section to get more information on the
supported actions.



>
> Gianluca
> Gianluca
>
>
>

-- 
Regards,
Eyal Shenitzky
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/2OYHOTUREIUJ5F5ZU4L5RKFMCGGLCB3I/


[ovirt-users] Re: ansible module to copy floating disks

2019-10-03 Thread Gianluca Cecchi
On Thu, Oct 3, 2019 at 6:55 AM Eyal Shenitzky  wrote:

> You can use the update_storage_domains action.
> According to the action implementation [1], it seems that you need to
> specify where you want the disk to appear (in which storage domains).
>
> For example:
> If the disks already reside on sd1 and you want to copy it to sd2, you
> need to specify both sd1 and sd2.
>
> [1]
> https://github.com/ansible/ansible/blob/25ac7042b070b22c5377f7a43399c19060a38966/lib/ansible/modules/cloud/ovirt/ovirt_disk.py#L532
> [2] -
> https://docs.ansible.com/ansible/latest/modules/ovirt_disk_module.html
>
>
>>>
>>> --
>>> Regards,
>>> Eyal Shenitzky
>>>
>>
>>
I can try, thanks.
But is it supported on block based storage such as iSCSI or FC?
I see this in your [1] above
"
# We don't support move for non file based storages:
if disk.storage_type != otypes.DiskStorageType.IMAGE:
return changed
"

Also it is not clear in my opinion the action connected to the different
"state" possibilities: present/absent/attached/detached
In web admin gui I can have a disk active on a VM and I can:

- deactivate the disk
I see red down arrow for the disk that remains associated with the VM

- remove the disk
a) remove permanently removes the disk from storage
b) if I don't select "remove permanently" the disk goes into the floating
disks list

How do they map with Ansible module state options?

Gianluca
Gianluca
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/CCBJECFDFUFGDXMWRBUT7PWBZ7TPOODY/


[ovirt-users] Re: ansible module to copy floating disks

2019-10-02 Thread Eyal Shenitzky
You can use the update_storage_domains action.
According to the action implementation [1], it seems that you need to
specify where you want the disk to appear (in which storage domains).

For example:
If the disks already reside on sd1 and you want to copy it to sd2, you need
to specify both sd1 and sd2.

[1]
https://github.com/ansible/ansible/blob/25ac7042b070b22c5377f7a43399c19060a38966/lib/ansible/modules/cloud/ovirt/ovirt_disk.py#L532
[2] - https://docs.ansible.com/ansible/latest/modules/ovirt_disk_module.html

On Wed, 2 Oct 2019 at 20:31, Gianluca Cecchi 
wrote:

>
>
> Il Mer 2 Ott 2019, 18:56 Eyal Shenitzky  ha scritto:
>
>> Can you please make the question clearer?
>> Are you looking for a way to clone floating disks via the UI or via
>> ansible ovirt_disk module?
>>
>> On Wed, 2 Oct 2019 at 19:10, Gianluca Cecchi 
>> wrote:
>>
>>> Hello,
>>> in docs about ovirt_disk module for Ansible there is also notice about
>>> managing floating disks.
>>> But I don't find a way to copy an existing floating disk into a new one
>>> as I do in web admin gui selecting Storage --> disks, selecting the disk
>>> and choosing "copy" button.
>>>
>>> I can also temporarily attach this disk to a VM, but then it seems to me
>>> there is no option to copy this disk too even if attached to a VM...
>>>
>>> Is there anything doable in Ansible to reach this target?
>>> I don't know if this below is the corresponding for REST API:
>>>
>>> https://www.ovirt.org/develop/release-management/features/storage/copy-disks.html
>>>
>>> Thanks,
>>> Gianluca
>>> ___
>>> Users mailing list -- users@ovirt.org
>>> To unsubscribe send an email to users-le...@ovirt.org
>>> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>>> oVirt Code of Conduct:
>>> https://www.ovirt.org/community/about/community-guidelines/
>>> List Archives:
>>> https://lists.ovirt.org/archives/list/users@ovirt.org/message/VLJBZGNKZUJYKN32NWQPLKTFU26FINVJ/
>>>
>>
>>
>> --
>> Regards,
>> Eyal Shenitzky
>>
>
> Let me explain better.
> I have sort of master disk for a sw install that I keep as a floating disk.
> When needed I copy from UI (and this workflow is clear) this floating disk
> and then assign the new disk to the target vm where I'm going to setup the
> sw.
> The floating disk is retained for future installs.
> I don't find an equivalent with ovirt_disk or another ovirt related
> Ansible module.
> Thanks,
> Gianluca
>
>>

-- 
Regards,
Eyal Shenitzky
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/5QXC4JETR7M7EMWWSCWB64CWD24QHWJY/


[ovirt-users] Re: ansible module to copy floating disks

2019-10-02 Thread Gianluca Cecchi
Il Mer 2 Ott 2019, 18:56 Eyal Shenitzky  ha scritto:

> Can you please make the question clearer?
> Are you looking for a way to clone floating disks via the UI or via
> ansible ovirt_disk module?
>
> On Wed, 2 Oct 2019 at 19:10, Gianluca Cecchi 
> wrote:
>
>> Hello,
>> in docs about ovirt_disk module for Ansible there is also notice about
>> managing floating disks.
>> But I don't find a way to copy an existing floating disk into a new one
>> as I do in web admin gui selecting Storage --> disks, selecting the disk
>> and choosing "copy" button.
>>
>> I can also temporarily attach this disk to a VM, but then it seems to me
>> there is no option to copy this disk too even if attached to a VM...
>>
>> Is there anything doable in Ansible to reach this target?
>> I don't know if this below is the corresponding for REST API:
>>
>> https://www.ovirt.org/develop/release-management/features/storage/copy-disks.html
>>
>> Thanks,
>> Gianluca
>> ___
>> Users mailing list -- users@ovirt.org
>> To unsubscribe send an email to users-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> oVirt Code of Conduct:
>> https://www.ovirt.org/community/about/community-guidelines/
>> List Archives:
>> https://lists.ovirt.org/archives/list/users@ovirt.org/message/VLJBZGNKZUJYKN32NWQPLKTFU26FINVJ/
>>
>
>
> --
> Regards,
> Eyal Shenitzky
>

Let me explain better.
I have sort of master disk for a sw install that I keep as a floating disk.
When needed I copy from UI (and this workflow is clear) this floating disk
and then assign the new disk to the target vm where I'm going to setup the
sw.
The floating disk is retained for future installs.
I don't find an equivalent with ovirt_disk or another ovirt related Ansible
module.
Thanks,
Gianluca

>
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/ZQXSZVC33GQJAV6MRE4D252H56OKU5IA/


[ovirt-users] Re: ansible module to copy floating disks

2019-10-02 Thread Eyal Shenitzky
Can you please make the question clearer?
Are you looking for a way to clone floating disks via the UI or via ansible
ovirt_disk module?

On Wed, 2 Oct 2019 at 19:10, Gianluca Cecchi 
wrote:

> Hello,
> in docs about ovirt_disk module for Ansible there is also notice about
> managing floating disks.
> But I don't find a way to copy an existing floating disk into a new one as
> I do in web admin gui selecting Storage --> disks, selecting the disk and
> choosing "copy" button.
>
> I can also temporarily attach this disk to a VM, but then it seems to me
> there is no option to copy this disk too even if attached to a VM...
>
> Is there anything doable in Ansible to reach this target?
> I don't know if this below is the corresponding for REST API:
>
> https://www.ovirt.org/develop/release-management/features/storage/copy-disks.html
>
> Thanks,
> Gianluca
> ___
> Users mailing list -- users@ovirt.org
> To unsubscribe send an email to users-le...@ovirt.org
> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/users@ovirt.org/message/VLJBZGNKZUJYKN32NWQPLKTFU26FINVJ/
>


-- 
Regards,
Eyal Shenitzky
___
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/TQKF2HK66O7XCUITF36B3IGGVD6YXKGW/