Bug 1601336 - API unavailable to list host storage devices and create bricks
Summary: API unavailable to list host storage devices and create bricks
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine-sdk-python
Classification: oVirt
Component: General
Version: 4.2.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ritesh Chikatwar
QA Contact: Lukas Svaty
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-16 06:42 UTC by Parth Dhanjal
Modified: 2020-09-07 07:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-07 07:53:11 UTC
oVirt Team: Gluster
Embargoed:
rule-engine: ovirt-4.3+


Attachments (Terms of Use)

Description Parth Dhanjal 2018-07-16 06:42:32 UTC
Description of problem:

ovirt-engine-sdk-python API doesn't support the creation of bricks or volumes.
And also unable to list the available devices. We need to check for available devices so that we can create and attach volumes on these disks.

Comment 1 Ondra Machacek 2018-07-16 10:58:54 UTC
What exactly are you trying to do? We do support work with bricks[1] and volumes[2] via API and so via SDK.

[1] http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_volumes/methods/add

[2] http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_bricks

Comment 2 Parth Dhanjal 2018-07-16 11:08:39 UTC
(In reply to Ondra Machacek from comment #1)
> What exactly are you trying to do? We do support work with bricks[1] and
> volumes[2] via API and so via SDK.
> 
> [1]
> http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_volumes/
> methods/add
> 
> [2]
> http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_bricks

I'm trying to write a testcase for ovirt-system-tests, which uses ovirt-engine-sdk-python. I couldn't find any support on the python docs for the same. I did find the same on the REST API but I was looking for something similar on the Python API(https://github.com/oVirt/ovirt-engine-sdk/tree/master/sdk/)

Comment 3 Ondra Machacek 2018-07-16 11:24:03 UTC
As per:

http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_volumes/methods/add
http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_bricks

You can use it in Python SDK as follows:

connection = Connection(...)
clusters_service = connection.system_service().clusters_service()
cluster = clusters_service.list(search='name=mycluster')[0]
cluster_service = clusters_service.cluster_service(cluster.id)

gluster_volumes_service = cluster_service.gluster_volumes_service()
gluster_volumes_service.add(
   ...
)

gluster_bricks_service = cluster_service.gluster_bricks_service()
gluster_bricks_service.add(
  ...
)

etc.

http://ovirt.github.io/ovirt-engine-sdk/master/services.m.html#ovirtsdk4.services.GlusterVolumesService

http://ovirt.github.io/ovirt-engine-sdk/master/services.m.html#ovirtsdk4.services.GlusterBrickService

Comment 4 Parth Dhanjal 2018-07-16 15:09:50 UTC
(In reply to Ondra Machacek from comment #3)
> As per:
> 
> http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_volumes/
> methods/add
> http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_bricks
> 
> You can use it in Python SDK as follows:
> 
> connection = Connection(...)
> clusters_service = connection.system_service().clusters_service()
> cluster = clusters_service.list(search='name=mycluster')[0]
> cluster_service = clusters_service.cluster_service(cluster.id)
> 
> gluster_volumes_service = cluster_service.gluster_volumes_service()
> gluster_volumes_service.add(
>    ...
> )
> 
> gluster_bricks_service = cluster_service.gluster_bricks_service()
> gluster_bricks_service.add(
>   ...
> )
> 
> etc.
> 
> http://ovirt.github.io/ovirt-engine-sdk/master/services.m.html#ovirtsdk4.
> services.GlusterVolumesService
> 
> http://ovirt.github.io/ovirt-engine-sdk/master/services.m.html#ovirtsdk4.
> services.GlusterBrickService

Thanks! I missed that out. I'll remove the bug.

Comment 5 Parth Dhanjal 2018-07-16 15:13:30 UTC
Not a bug! So closing the same.

Comment 6 Sahina Bose 2018-07-20 06:56:19 UTC
(In reply to Ondra Machacek from comment #1)
> What exactly are you trying to do? We do support work with bricks[1] and
> volumes[2] via API and so via SDK.
> 
> [1]
> http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_volumes/
> methods/add
> 
> [2]
> http://ovirt.github.io/ovirt-engine-api-model/4.2/#services/gluster_bricks

We support gluster volume and brick management. However we're missing support for listing storage devices on a host and provision bricks using them. Support for this is available in BLL and webadmin - but API is missing.
I'm re-opening the bug.

Comment 7 Sahina Bose 2018-07-20 06:57:40 UTC
Moving to gluster team to add the support.

Comment 8 Sandro Bonazzola 2019-01-28 09:40:09 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.

Comment 9 Gobinda Das 2020-09-07 07:53:11 UTC
We provides UI way of support this feature but for SDK we don't have plan for now, as we are considering now only critical items.
So closing this for now, will reopen if any customer will ask for it.


Note You need to log in before you can comment on or make changes to this bug.