Bug 1394289

Summary: Various network object CRUD forms require better filtering
Product: Red Hat CloudForms Management Engine Reporter: Tzu-Mainn Chen <tzumainn>
Component: UI - OPSAssignee: Gilles Dubreuil <gdubreui>
Status: CLOSED CURRENTRELEASE QA Contact: Ola Pavlenko <opavlenk>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: cpelland, dajohnso, gdubreui, hkataria, jhajyahy, jhardy, mpovolny, obarenbo, opavlenk, simaishi, tzumainn
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: openstack:sdn
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1458377 (view as bug list) Environment:
Last Closed: 2018-03-06 14:35:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1458377    

Description Tzu-Mainn Chen 2016-11-11 15:06:12 UTC
These forms often ask you to select a network provider, network, and tenant.  However they do not always 'filter' properly - if you select a specific network provider, only a subset of networks (those in that provider) should be selectable, etc.

Comment 5 Gilles Dubreuil 2016-11-17 09:22:28 UTC
Could you please more specific about the network items that need better filtering?

Comment 6 Tzu-Mainn Chen 2016-11-17 14:52:13 UTC
Ah, sure.  It's probably best illustrated by something that already happens on Routers: the Network selection doesn't appear until you select the Network Provider, and those Networks are filtered to only include those that are in that Provider.

So on Routers, we'd want the Cloud Tenants to be filtered depending on the Provider as well; and similar behavior for the Network and Subnet forms.

Let me know if that doesn't make sense!

Comment 7 Gilles Dubreuil 2016-11-17 23:42:55 UTC
Yes that makes perfect sense! Thanks.

Comment 8 Gilles Dubreuil 2016-11-18 05:43:24 UTC
The network item:
 - Cloud Tenant to show all tenants available in the corresponding network provider

The subnet item:
 - The network filter needs to be applied
 - The cloud tenant must be the same as the tenant of the network the subnet is attached to. I don't a use case for allowing a different tenant.

Comment 9 Gilles Dubreuil 2016-12-16 05:21:26 UTC
Cloud subnet:

Filtering networks by ems: https://github.com/ManageIQ/manageiq/pull/13213

Comment 11 CFME Bot 2017-01-10 16:19:11 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/74f4c40c9e359ac35c11e6b6572361449ae29416

commit 74f4c40c9e359ac35c11e6b6572361449ae29416
Author:     Gilles Dubreuil <gilles>
AuthorDate: Wed Jan 4 17:01:25 2017 +1100
Commit:     Gilles Dubreuil <gilles>
CommitDate: Tue Jan 10 18:32:44 2017 +1100

    Cloud Subnet: Filtering networks by ems_id
    
    Dynamically filters the network list available for creating a subnet
    upon the selection of the network providers.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1394289

 .../cloud_subnet/cloud_subnet_form_controller.js   | 11 ++++++
 app/controllers/cloud_subnet_controller.rb         | 33 ++++++++++++++----
 app/views/cloud_subnet/new.html.haml               | 39 +++++++++++++---------
 config/routes.rb                                   |  2 ++
 4 files changed, 63 insertions(+), 22 deletions(-)

Comment 12 Tzu-Mainn Chen 2017-01-11 12:27:34 UTC
Hi Gilles!  I tested the network filtering, and it works great.

Just to confirm, I believe you mentioned that no filtering is needed on the subnet form, because it's already limited to the network's cloud tenant.  Is the same true for the router form?

Comment 13 Gilles Dubreuil 2017-01-12 07:24:21 UTC
Mainn,

Since a subnet is attached to a network it effectively lives under the same ownership realm. I don't see a use case to allow different tenants/projects  between the two.

And the other hand, a router can/must be filtered by cloud tenant.

Neutron RBAC would have to be used to properly tackle the issue of allowing different tenant/project to use network objects (neutron items). That would apply to all items including subnet. But that's the next feature :)

Comment 14 Tzu-Mainn Chen 2017-01-12 12:52:21 UTC
Okay, that's fine by me!  So would you say this BZ is complete as far as it can practically go at the moment?

Comment 16 Gilles Dubreuil 2017-01-23 04:18:09 UTC
I believe so.

Comment 19 Gilles Dubreuil 2017-06-13 02:42:29 UTC
Mainn,

Thanks to your help, it seems now we done here, would you agree?

Comment 20 Tzu-Mainn Chen 2017-06-13 12:03:19 UTC
Yep, I agree!  This is in POST.

Comment 21 Jad Haj Yahya 2018-02-20 12:39:20 UTC
Verified on RHOS 11, 5.9.0.21