Bug 1403152

Summary: [AWS][SDN] - Cannot edit or create Cloud networks/subnets
Product: Red Hat CloudForms Management Engine Reporter: Pavol Kotvan <pakotvan>
Component: UI - OPSAssignee: Tzu-Mainn Chen <tzumainn>
Status: CLOSED ERRATA QA Contact: Ola Pavlenko <opavlenk>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: hkataria, jhajyahy, jhardy, mpovolny, obarenbo, simaishi, tzumainn
Target Milestone: GAKeywords: ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:sdn:amazon
Fixed In Version: 5.8.0.8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1437148 (view as bug list) Environment:
Last Closed: 2017-05-31 14:31:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: AWS Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1437148    

Comment 4 Harpreet Kataria 2016-12-09 16:39:30 UTC
Mainn,

Please send it back to me if this is not cloud networks/subnets specific bug.

Thanks,
~Harpreet

Comment 5 Tzu-Mainn Chen 2017-03-09 20:55:58 UTC
Hi Hapreet!  I think this may be a generic UI bug, based on the following (definitely put it back my way if you think I'm wrong though)!

Looking at the cloud subnet edit button code, I see the following:

https://github.com/tzumainn/manageiq-ui-classic/blob/master/app/helpers/application_helper/toolbar/cloud_subnet_center.rb#L16

As far as I understand, that means the edit button should *only* be visible to those subnets whose model supports :update, as follows:

https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/openstack/network_manager/cloud_subnet.rb#L18

I've verified that the other providers' subnets do not have similar code - so if the button appears anyway, I think there may be something wrong with ApplicationHelper::Button::GenericFeatureButtonWithDisable

Comment 8 Tzu-Mainn Chen 2017-03-10 16:25:00 UTC
This is partially fixed by https://github.com/ManageIQ/manageiq/pull/13096, which should be in a later 5.7 build.  We'll work on fixing the others.

Comment 9 Tzu-Mainn Chen 2017-03-10 16:43:14 UTC
A backport of https://github.com/ManageIQ/manageiq/pull/12692 should fix the subnet creation issue, leaving only network creation/edit

Comment 10 Tzu-Mainn Chen 2017-03-10 19:31:02 UTC
And https://github.com/ManageIQ/manageiq-ui-classic/pull/657 should fix the network issues.

Comment 12 CFME Bot 2017-03-16 19:16:11 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/46255b6198a229cb2b8b0ca5ea34bafc8f0ed516

commit 46255b6198a229cb2b8b0ca5ea34bafc8f0ed516
Author:     Tzu-Mainn Chen <tzumainn>
AuthorDate: Fri Mar 10 21:25:19 2017 +0100
Commit:     Tzu-Mainn Chen <tzumainn>
CommitDate: Fri Mar 10 21:26:10 2017 +0100

    Add SupportsFeatureMixin to CloudNetwork
    
    This is needed to allow non-OpenStack providers to filter out certain
    buttons in the UI.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1403152

 app/models/cloud_network.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 13 CFME Bot 2017-03-28 08:02:58 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/84236b2f9d46ac9230b50799bcd65fc8b6b62de3

commit 84236b2f9d46ac9230b50799bcd65fc8b6b62de3
Author:     Tzu-Mainn Chen <tzumainn>
AuthorDate: Fri Mar 10 19:32:47 2017 +0100
Commit:     Tzu-Mainn Chen <tzumainn>
CommitDate: Fri Mar 10 21:08:14 2017 +0100

    Disable cloud network buttons if no provider supports it
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1403152

 .../application_helper/button/cloud_network_new.rb | 13 +++++++++
 .../toolbar/cloud_network_center.rb                |  9 ++++--
 .../toolbar/cloud_networks_center.rb               |  3 +-
 .../buttons/cloud_network_new_spec.rb              | 33 ++++++++++++++++++++++
 4 files changed, 55 insertions(+), 3 deletions(-)
 create mode 100644 app/helpers/application_helper/button/cloud_network_new.rb
 create mode 100644 spec/helpers/application_helper/buttons/cloud_network_new_spec.rb

Comment 14 Tzu-Mainn Chen 2017-03-28 13:56:44 UTC
https://github.com/ManageIQ/manageiq/pull/14392 also needed

Comment 16 Ronnie Rasouli 2017-05-11 12:18:57 UTC
verified on openstack network, edited the network name and set it as shared, tested on 5.8.0.13

Comment 18 errata-xmlrpc 2017-05-31 14:31:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1367