Bug 1631216

Summary: VMware vCloud Provider's vApp Provisioning Dialog Cannot be Submitted
Product: Red Hat CloudForms Management Engine Reporter: mplesko
Component: ProvidersAssignee: Nobody <nobody>
Status: ON_QA --- QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.4CC: dmetzger, jhardy, lavenel, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1635038 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: vCloud Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1635038    

Description mplesko 2018-09-20 08:54:36 UTC
Description of problem:
vApp provisioning dialog cannot be submitted because it's always refused by validation. The error is "Basic Information/Options/Tenant is required". But the Tenant drop-down is always empty, hence validation cannot be fulfilled.


Version-Release number of selected component (if applicable):
5.9.4.6


How reproducible:
Always

Steps to Reproduce:
1. Add vCloud Director provider
2. Create Catalog Item based on one of vApp templates from that vCD
3. Order item

Actual results:
Form will be refused not matter what

Expected results:
Form should be accepted if required fields are filled-in. Tenant is not a required field for this item.

Additional info:

Comment 3 CFME Bot 2018-09-21 13:27:52 UTC
New commit detected on ManageIQ/manageiq-providers-vmware/master:

https://github.com/ManageIQ/manageiq-providers-vmware/commit/563273f84be4d87bf736aa90ea258f6128b6fcf0
commit 563273f84be4d87bf736aa90ea258f6128b6fcf0
Author:     Miha Pleško <miha.plesko>
AuthorDate: Thu Sep 20 04:06:12 2018 -0400
Commit:     Miha Pleško <miha.plesko>
CommitDate: Thu Sep 20 04:06:12 2018 -0400

    Don't require cloud tenant upon vApp instantiation

    It used to be valid if user didn't pick anything in the Tenant field
    on the vApp provisioning dialog - but now the form won't let you
    through. Which is a problem for vCloud's vApp provisioning as we don't
    even inventory Cloud Tenants, so the drop-down options are always
    empty.

    Looking at the code, the 'tenant_name' field is in fact marked as
    required in the parent class of the vCloud's OrchestrationTemplate!

    With this commit we fix the vCloud's OrchestrationTemplate so that it
    now fully customizes its buttons, not just extends from base class.
    Having such power in hand we perform following changes:

    - drop `'tenant_name'` field entirely from our dialog
    - copy `'stack_name'` field from the base class to our dialog
    - modify `'stack_name'` field so that it now allows any string as vapp name
      because vCloud does not limit it in any way (even '!! 123 ?? ŠČŽ' is valid)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1631216

    Signed-off-by: Miha Pleško <miha.plesko>

 app/models/manageiq/providers/vmware/cloud_manager/orchestration_template.rb | 11 +-
 spec/models/manageiq/providers/vmware/cloud_manager/orchestration_template_spec.rb | 16 +-
 2 files changed, 18 insertions(+), 9 deletions(-)