Bug 1344079 - [RFE] - lifecycle button missing from cloud images
Summary: [RFE] - lifecycle button missing from cloud images
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.7.0
Assignee: Harpreet Kataria
QA Contact: Jeff Teehan
URL:
Whiteboard: provision:ui
Depends On:
Blocks: 1347278
TreeView+ depends on / blocked
 
Reported: 2016-06-08 17:08 UTC by Dave Johnson
Modified: 2017-08-28 13:29 UTC (History)
12 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1347278 (view as bug list)
Environment:
Last Closed: 2017-01-11 20:26:35 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Description Dave Johnson 2016-06-08 17:08:52 UTC
Description of problem:
==================================
I have an cloud image that I want to provision, if I go to the image details I would expect to be able to provision the template right there but there is no way to do that.  No lifecycle button.  

Same from the the Compute => Instance => Image panels.  In the accordion trees under the image panels, no lifecycle button.


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


How reproducible:
100%


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Harpreet Kataria 2016-06-23 20:28:47 UTC
Greg,

I looked into this BZ a bit to find out what we currently have, please see details below:
Currently provisioning related buttons that we have under Lifecycle button groups are:

On Infra side
List of VMs : Provision, Clone, Publish, Migrate
List of Templates: Clone
VM summary:  Clone, Publish, Migrate
Template summary: Clone

On cloud side:
List of Instances: Provision, Migrate

My understanding is that we want to change Cloud side list & summary screens to add buttons to match with what we have on Infra side. 

Can you provide list of any Image or Instance types that currently do not support Provision, Clone, Publish, Migrate functionality so i can add appropriate back-end method to be able to show a flash message on the screen. For example i was trying to add a clone button on Image summary screen and that happened to be an Amazon Image and was trying to load "miq_provision_amazon_dialogs_clone_to_vm" provisioning dialog which does not exist in product/dialogs/miq_dialogs directory, does that mean Clone is unsupported for Amazon Images or we need to add a new provisioning dialog to support that feature. I am sure i will run into similar issues with other types as well.

Please let me know if you have list of supported/unsupported tasks for each types.

Thanks,
~Harpreet

Comment 5 Greg McCullough 2016-07-26 02:54:58 UTC
Harpreet - Lucy is working to put this information together and I will be working with her to review and provide you feedback.

Adding needinfo for Lucy.

Comment 12 CFME Bot 2016-08-19 21:30:44 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/21df6db1c2dde676646447c68c077528869c4379

commit 21df6db1c2dde676646447c68c077528869c4379
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Wed Aug 17 17:33:17 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Aug 17 17:40:16 2016 -0400

    addressed rubocop comments.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278

 .../application_controller/miq_request_methods.rb  |   2 +-
 .../button/template_provision.rb                   |   2 +-
 .../toolbar/template_clouds_center.rb              | 285 +++++++++++----------
 .../toolbar/template_infras_center.rb              | 264 +++++++++----------
 .../toolbar/x_template_cloud_center.rb             | 190 +++++++-------
 spec/controllers/application_controller_spec.rb    |   5 +-
 6 files changed, 377 insertions(+), 371 deletions(-)

Comment 13 CFME Bot 2016-08-19 21:30:53 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a042dca49cb32303d500dc5757d50ab2adac844a

commit a042dca49cb32303d500dc5757d50ab2adac844a
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Wed Aug 17 16:32:16 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Aug 17 16:37:03 2016 -0400

    Added Provisoning button on Templates/Images list & summary screen
    
    - Added changes to be able to Select a single Template or Image from respective list view and start Provisioning. This will skip the Pre-Provisionign grid where user selects a template to be used for provisioning and instead will use the one that is selected from the list view.
    - Provisoning can also be initiated from a single Temple or Image summry screen, this will skip pro provisioning template selection screen and present user with Provisioning dialogs.
    - Added checks and model support to make Provisoning task available for Templates/Images that are not archived or orphaned.
    - Added spec tests to suuport changes in prov_redirect method
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278

 app/controllers/application_controller.rb          | 15 ++++++++
 .../application_controller/miq_request_methods.rb  | 28 ++++++++------
 .../button/template_provision.rb                   | 10 +++++
 .../toolbar/template_clouds_center.rb              | 18 +++++++++
 .../toolbar/template_infras_center.rb              |  8 ++++
 .../toolbar/x_miq_template_center.rb               |  6 +++
 .../toolbar/x_template_cloud_center.rb             | 16 ++++++++
 app/models/miq_template.rb                         |  4 ++
 app/models/vm_or_template.rb                       |  4 ++
 db/fixtures/miq_product_features.yml               |  8 ++++
 spec/controllers/application_controller_spec.rb    | 43 ++++++++++++++++++++++
 11 files changed, 149 insertions(+), 11 deletions(-)
 create mode 100644 app/helpers/application_helper/button/template_provision.rb

Comment 16 CFME Bot 2016-08-23 09:30:45 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/c1b60612a846d1065e3fa1f7186e3b4b6eacf8f8

commit c1b60612a846d1065e3fa1f7186e3b4b6eacf8f8
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Mon Aug 22 12:05:14 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Mon Aug 22 17:45:29 2016 -0400

    fixed spec test affected by changes in this PR.
    
    Addressed rubocop comments.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278

 app/controllers/application_controller.rb                         | 2 +-
 app/helpers/application_helper/button/template_provision.rb       | 2 +-
 app/models/manageiq/providers/azure/cloud_manager/template.rb     | 4 +---
 app/models/manageiq/providers/google/cloud_manager/template.rb    | 6 +-----
 app/models/manageiq/providers/microsoft/infra_manager/template.rb | 6 +-----
 app/models/manageiq/providers/openstack/cloud_manager/template.rb | 4 +---
 app/models/manageiq/providers/redhat/infra_manager/template.rb    | 4 +---
 app/models/manageiq/providers/vmware/infra_manager/template.rb    | 4 +---
 spec/controllers/application_controller_spec.rb                   | 4 ++--
 9 files changed, 10 insertions(+), 26 deletions(-)

Comment 17 CFME Bot 2016-08-23 09:30:55 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5c90e3a52ab1b56c2e1ab06d5a18aa129c58446e

commit 5c90e3a52ab1b56c2e1ab06d5a18aa129c58446e
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Sun Aug 21 11:38:51 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Mon Aug 22 17:45:29 2016 -0400

    Changed supports_provisioning? logic to return false from base class
    
    And added logic into subclasses that support template provisoning to return true/false based upon condition. Changes to address https://github.com/ManageIQ/manageiq/pull/10561#discussion_r75485697
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278

 .../manageiq/providers/azure/cloud_manager/template.rb   | 10 ++++++++++
 .../manageiq/providers/google/cloud_manager/template.rb  | 12 ++++++++++++
 .../providers/microsoft/infra_manager/template.rb        | 12 ++++++++++++
 .../providers/openstack/cloud_manager/template.rb        | 10 ++++++++++
 .../manageiq/providers/redhat/infra_manager/template.rb  | 10 ++++++++++
 .../manageiq/providers/vmware/infra_manager/template.rb  | 10 ++++++++++
 app/models/miq_template.rb                               |  6 ++----
 app/models/vm_or_template.rb                             |  4 ----
 spec/models/miq_template_spec.rb                         | 16 ++++++++++++++++
 9 files changed, 82 insertions(+), 8 deletions(-)

Comment 18 CFME Bot 2016-08-23 14:17:56 UTC
New commit detected on ManageIQ/manageiq-providers-amazon/master:
https://github.com/ManageIQ/manageiq-providers-amazon/commit/d59e0d3163b892c18d6f41db0015cff7d0121bfd

commit d59e0d3163b892c18d6f41db0015cff7d0121bfd
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Mon Aug 22 11:40:09 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Mon Aug 22 15:50:41 2016 -0400

    Added supports_provisioning?  support for Amazon Template
    
    Changes to address https://github.com/ManageIQ/manageiq/pull/10561#discussion_r75485697
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278

 app/models/manageiq/providers/amazon/cloud_manager/template.rb | 8 ++++++++
 1 file changed, 8 insertions(+)

Comment 19 CFME Bot 2016-08-24 19:30:52 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/bb4a997de12563a8b807e493cdd015ac0aa8856f

commit bb4a997de12563a8b807e493cdd015ac0aa8856f
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Wed Aug 17 17:33:17 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Aug 24 14:20:37 2016 -0400

    addressed rubocop comments.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278
    (cherry picked from commit 21df6db)

 .../application_controller/miq_request_methods.rb  |   2 +-
 .../button/template_provision.rb                   |   2 +-
 .../toolbar/template_clouds_center.rb              | 285 +++++++++++----------
 .../toolbar/template_infras_center.rb              | 264 +++++++++----------
 .../toolbar/x_template_cloud_center.rb             | 190 +++++++-------
 spec/controllers/application_controller_spec.rb    |   5 +-
 6 files changed, 377 insertions(+), 371 deletions(-)

Comment 20 CFME Bot 2016-08-24 19:31:02 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/6e8aeb3ba93312349b3b3281941f877bfb933c41

commit 6e8aeb3ba93312349b3b3281941f877bfb933c41
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Wed Aug 17 16:32:16 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Aug 24 14:17:12 2016 -0400

    Added Provisoning button on Templates/Images list & summary screen
    
    - Added changes to be able to Select a single Template or Image from respective list view and start Provisioning. This will skip the Pre-Provisionign grid where user selects a template to be used for provisioning and instead will use the one that is selected from the list view.
    - Provisoning can also be initiated from a single Temple or Image summry screen, this will skip pro provisioning template selection screen and present user with Provisioning dialogs.
    - Added checks and model support to make Provisoning task available for Templates/Images that are not archived or orphaned.
    - Added spec tests to suuport changes in prov_redirect method
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278
    (cherry picked from commit a042dca)

 app/controllers/application_controller.rb          | 15 ++++++++
 .../application_controller/miq_request_methods.rb  | 28 ++++++++------
 .../button/template_provision.rb                   | 10 +++++
 .../toolbar/template_clouds_center.rb              | 18 +++++++++
 .../toolbar/template_infras_center.rb              |  8 ++++
 .../toolbar/x_miq_template_center.rb               |  6 +++
 .../toolbar/x_template_cloud_center.rb             | 16 ++++++++
 app/models/miq_template.rb                         |  4 ++
 app/models/vm_or_template.rb                       |  4 ++
 db/fixtures/miq_product_features.yml               |  8 ++++
 spec/controllers/application_controller_spec.rb    | 43 ++++++++++++++++++++++
 11 files changed, 149 insertions(+), 11 deletions(-)
 create mode 100644 app/helpers/application_helper/button/template_provision.rb

Comment 21 CFME Bot 2016-09-01 01:15:54 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/522a1219a00abcea793c0f48693e395157cd504d

commit 522a1219a00abcea793c0f48693e395157cd504d
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Mon Aug 22 12:05:14 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Aug 24 16:02:38 2016 -0400

    fixed spec test affected by changes in this PR.
    
    Addressed rubocop comments.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278
    (cherry picked from commit c1b6061)

 app/controllers/application_controller.rb                         | 2 +-
 app/helpers/application_helper/button/template_provision.rb       | 2 +-
 app/models/manageiq/providers/azure/cloud_manager/template.rb     | 4 +---
 app/models/manageiq/providers/google/cloud_manager/template.rb    | 5 +----
 app/models/manageiq/providers/microsoft/infra_manager/template.rb | 6 +-----
 app/models/manageiq/providers/openstack/cloud_manager/template.rb | 4 +---
 app/models/manageiq/providers/redhat/infra_manager/template.rb    | 4 +---
 app/models/manageiq/providers/vmware/infra_manager/template.rb    | 4 +---
 spec/controllers/application_controller_spec.rb                   | 4 ++--
 9 files changed, 10 insertions(+), 25 deletions(-)

Comment 22 CFME Bot 2016-09-01 01:16:04 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/1c7c492d42b4d931d45487643f0a8a8c30276248

commit 1c7c492d42b4d931d45487643f0a8a8c30276248
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Wed Aug 24 16:09:02 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Aug 24 16:17:42 2016 -0400

    Added supports_provisioning? support for Providers
    
    Have to add supports provisioning support for Providers that support provisioning to get cherry-picked code working correctly.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278

 app/models/ext_management_system.rb                      | 1 +
 app/models/manageiq/providers/azure/cloud_manager.rb     | 2 ++
 app/models/manageiq/providers/google/cloud_manager.rb    | 2 ++
 app/models/manageiq/providers/microsoft/infra_manager.rb | 2 ++
 app/models/manageiq/providers/openstack/cloud_manager.rb | 2 ++
 app/models/manageiq/providers/redhat/infra_manager.rb    | 2 ++
 app/models/manageiq/providers/vmware/infra_manager.rb    | 2 ++
 7 files changed, 13 insertions(+)

Comment 23 CFME Bot 2016-09-01 01:16:15 UTC
New commit detected on ManageIQ/manageiq/darga:
https://github.com/ManageIQ/manageiq/commit/d830f102d8f767b24dc820138f6b6fec847666c7

commit d830f102d8f767b24dc820138f6b6fec847666c7
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Sun Aug 21 11:38:51 2016 -0400
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Aug 24 16:01:47 2016 -0400

    Changed supports_provisioning? logic to return false from base class
    
    And added logic into subclasses that support template provisoning to return true/false based upon condition. Changes to address https://github.com/ManageIQ/manageiq/pull/10561#discussion_r75485697
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344079
    https://bugzilla.redhat.com/show_bug.cgi?id=1347278
    (cherry picked from commit 5c90e3a)

 .../manageiq/providers/azure/cloud_manager/template.rb   | 10 ++++++++++
 .../manageiq/providers/google/cloud_manager/template.rb  | 11 +++++++++++
 .../providers/microsoft/infra_manager/template.rb        | 12 ++++++++++++
 .../providers/openstack/cloud_manager/template.rb        |  9 +++++++++
 .../manageiq/providers/redhat/infra_manager/template.rb  | 10 ++++++++++
 .../manageiq/providers/vmware/infra_manager/template.rb  | 10 ++++++++++
 app/models/miq_template.rb                               |  6 ++----
 app/models/vm_or_template.rb                             |  4 ----
 spec/models/miq_template_spec.rb                         | 16 ++++++++++++++++
 9 files changed, 80 insertions(+), 8 deletions(-)

Comment 24 Jeff Teehan 2016-09-21 18:55:28 UTC
I'll take this since I've already provisioned from images.  In 5.7.0.1 running on 10.16.6.92, the menu is enabled and the vm provisions from the image just fine.  Moving to verified.

Also added Polarion test case id.


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