Bug 1379225

Summary: cannot assign gluster network role using api
Product: [oVirt] ovirt-engine Reporter: RamaKasturi <knarra>
Component: RestAPIAssignee: Sahina Bose <sabose>
Status: CLOSED CURRENTRELEASE QA Contact: RamaKasturi <knarra>
Severity: medium Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, gklein, juan.hernandez, knarra, omachace, sabose
Target Milestone: ovirt-4.1.1Flags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
omachace: devel_ack+
knarra: testing_ack+
Target Release: 4.1.1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:37:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description RamaKasturi 2016-09-26 05:33:30 UTC
Description of problem:
For a network created user will not be able to assign the glusternw role via API.

Version-Release number of selected component (if applicable):
python-ovirt-engine-sdk4-4.0.1-1.fc23.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Create a network.
2. Assign gluster network role to it.
3.

Actual results:
gluster network role cannot be assigned.

Expected results:
User should be able to assign gluster network

Additional info:

Comment 1 Ondra Machacek 2016-09-26 06:20:09 UTC
Works fine for me. Can you please take a look at following patch?

 https://gerrit.ovirt.org/#/c/64436/

It's an example of assigning GlusterAdmin role on network to user. Can you please let as know if it works for you, or share the code you've used? Thanks.

Comment 2 Sahina Bose 2016-09-26 06:32:46 UTC
(In reply to Ondra Machacek from comment #1)
> Works fine for me. Can you please take a look at following patch?
> 
>  https://gerrit.ovirt.org/#/c/64436/
> 
> It's an example of assigning GlusterAdmin role on network to user. Can you
> please let as know if it works for you, or share the code you've used?
> Thanks.

The bug is about assigning the network role "Gluster" to a network created in cluster..similar to Display and Migration roles. Not about the user roles.

Comment 3 RamaKasturi 2016-12-27 11:57:04 UTC
Moving this bug to assigned because i see that assigning glusternw while attaching the network to cluster does not work.
 
clusters_service.cluster_service(cluster.id).networks_service().add(types.Network(name='nw1',required=False,usages=[types.NetworkUsage.GLUSTER,types.NetworkUsage.MIGRATION]))

If user wants to get this working he has to attach the network to cluster and later update it.

clusters_service.cluster_service(cluster.id).networks_service().network_service(network_list.id).update(types.Network(name='nw1',required=False,usages=[types.NetworkUsage.GLUSTER]))

Comment 4 Red Hat Bugzilla Rules Engine 2016-12-27 11:57:09 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 5 Sandro Bonazzola 2017-01-25 07:55:15 UTC
4.0.6 has been the last oVirt 4.0 release, please re-target this bug.

Comment 6 RamaKasturi 2017-04-06 10:29:31 UTC
Verified and works fine with python-ovirt-engine-sdk4-4.1.3-1.el7ev.x86_64.

i see that assigning glusternw while attaching the network to cluster works fine.

clusters_service.cluster_service(cluster.id).networks_service().add(types.Network(name='glusternw',required=False,usages=[types.NetworkUsage.GLUSTER,types.NetworkUsage.MIGRATION]))