Description of problem: From a bundle of catalog items at deployment time the user would like to deploy specific items based on user selection. More details here http://cloudformsnow.com/2014/10/11/service-item-selection/ Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: At deployment time using an Automate Method we should be able to exclude service items from getting deployed. Additional info:
Talk topic http://talk.manageiq.org/t/filtering-out-service-catalog-items-during-deployment/725/1
https://github.com/ManageIQ/manageiq/pull/3029
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/c0a928781577878a3b89549c4c68f58e5304472f commit c0a928781577878a3b89549c4c68f58e5304472f Author: Madhu Kanoor <mkanoor> AuthorDate: Tue Jul 21 15:38:39 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Tue Jul 21 15:38:39 2015 -0400 Moved the spec file to the spec/models directory https://bugzilla.redhat.com/show_bug.cgi?id=1227045 spec/models/service_template_filter_spec.rb | 51 ++++++++++++++++++++++++ vmdb/spec/models/service_template_filter_spec.rb | 51 ------------------------ 2 files changed, 51 insertions(+), 51 deletions(-) create mode 100644 spec/models/service_template_filter_spec.rb delete mode 100644 vmdb/spec/models/service_template_filter_spec.rb
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/a6dc83b694e100b11093ccb245caa143ebb4b029 commit a6dc83b694e100b11093ccb245caa143ebb4b029 Author: Madhu Kanoor <mkanoor> AuthorDate: Tue Jul 21 16:34:15 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Tue Jul 21 16:34:15 2015 -0400 Missing instance was in the incorrect namespace. https://bugzilla.redhat.com/show_bug.cgi?id=1227045 .../Cloud/VM/Provisioning/Profile.class/_missing.yaml | 12 ------------ .../Service/Provisioning/Profile.class/_missing.yaml | 4 +++- 2 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 db/fixtures/ae_datastore/ManageIQ/Cloud/VM/Provisioning/Profile.class/_missing.yaml
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/1a9e5f68ce74a9a31b2a39e2a60e08d3f589ef83 commit 1a9e5f68ce74a9a31b2a39e2a60e08d3f589ef83 Author: Madhu Kanoor <mkanoor> AuthorDate: Wed Jul 22 10:27:49 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Wed Jul 22 10:27:49 2015 -0400 Moved files out of vmdb https://bugzilla.redhat.com/show_bug.cgi?id=1227045 .../ServiceFilter.class/__class__.yaml | 33 +++++++++ .../__methods__/filterbydialogparameters.rb | 72 ++++++++++++++++++++ .../__methods__/filterbydialogparameters.yaml | 12 ++++ .../filterbydialogparameters.yaml | 12 ++++ .../Request.class/service_provision_info.yaml | 12 ++++ .../filter_by_dialog_parameters_spec.rb | 79 ++++++++++++++++++++++ .../ServiceFilter.class/__class__.yaml | 33 --------- .../__methods__/filterbydialogparameters.rb | 72 -------------------- .../__methods__/filterbydialogparameters.yaml | 12 ---- .../filterbydialogparameters.yaml | 12 ---- .../Request.class/service_provision_info.yaml | 12 ---- .../filter_by_dialog_parameters_spec.rb | 79 ---------------------- 12 files changed, 220 insertions(+), 220 deletions(-) create mode 100644 db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/__class__.yaml create mode 100644 db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/__methods__/filterbydialogparameters.rb create mode 100644 db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/__methods__/filterbydialogparameters.yaml create mode 100644 db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/filterbydialogparameters.yaml create mode 100644 db/fixtures/ae_datastore/ManageIQ/System/Request.class/service_provision_info.yaml create mode 100644 spec/automation/unit/method_validation/filter_by_dialog_parameters_spec.rb delete mode 100644 vmdb/db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/__class__.yaml delete mode 100644 vmdb/db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/__methods__/filterbydialogparameters.rb delete mode 100644 vmdb/db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/__methods__/filterbydialogparameters.yaml delete mode 100644 vmdb/db/fixtures/ae_datastore/ManageIQ/Service/Provisioning/ServiceFilter.class/filterbydialogparameters.yaml delete mode 100644 vmdb/db/fixtures/ae_datastore/ManageIQ/System/Request.class/service_provision_info.yaml delete mode 100644 vmdb/spec/automation/unit/method_validation/filter_by_dialog_parameters_spec.rb
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/0a8f392325e00ff1d7d0d95040411437b4463487 commit 0a8f392325e00ff1d7d0d95040411437b4463487 Author: Madhu Kanoor <mkanoor> AuthorDate: Tue Aug 18 15:05:38 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Tue Aug 18 15:05:38 2015 -0400 PR Review based changes https://bugzilla.redhat.com/show_bug.cgi?id=1227045 app/models/service_template_filter.rb | 8 ++++---- .../ServiceFilter.class/__methods__/filterbydialogparameters.rb | 9 --------- .../unit/method_validation/filter_by_dialog_parameters_spec.rb | 8 ++++---- spec/models/service_template_filter_spec.rb | 2 +- spec/support/service_template_helper.rb | 2 +- 5 files changed, 10 insertions(+), 19 deletions(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/b820b8401c2dbf1d39e6ec47349e750a6fd79e95 commit b820b8401c2dbf1d39e6ec47349e750a6fd79e95 Author: Madhu Kanoor <mkanoor> AuthorDate: Wed Aug 19 09:43:39 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Wed Aug 19 09:43:39 2015 -0400 Moved file into service_template directory https://bugzilla.redhat.com/show_bug.cgi?id=1227045 app/models/service_template/filter.rb | 29 +++++++++++++++++++++++++++++ app/models/service_template_filter.rb | 29 ----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 app/models/service_template/filter.rb delete mode 100644 app/models/service_template_filter.rb
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/d2518a3b565a200e2907686220459a409fef62a6 commit d2518a3b565a200e2907686220459a409fef62a6 Author: Madhu Kanoor <mkanoor> AuthorDate: Wed Aug 19 09:55:59 2015 -0400 Commit: Madhu Kanoor <mkanoor> CommitDate: Wed Aug 19 09:55:59 2015 -0400 Changed to use include_concern https://bugzilla.redhat.com/show_bug.cgi?id=1227045 app/models/service_template.rb | 2 +- app/models/service_template/filter.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
The links led me to the John's page, which is a bit dated [1], is it the right place where I can find the correct information on how to try out this functionality? [1] http://cloudformsnow.com/2014/10/11/service-item-selection/
Johns web site shows the use case. The talk link http://talk.manageiq.org/t/filtering-out-service-catalog-items-during-deployment/725 also discusses how the problem is being solved. In order to test this you have to create a service with multiple items like Johns web site discusses. During deployment time you can filter out one or more of these items using an automate method. You will see a sample of this in the Automate Explorer by navigating to ManageIQ/Service/Provisioning/Profile/.missing By default we include all services, which is also the legacy behavior. The method is also commented out if you check in the .missing instance #/Service/Provisioning/ServiceFilter/FilterByDialogParameters If someone wants to filter out the service items during deployment they would have to (1) Create a new domain (2) Copy out the .missing from ManageIQ/Service/Provisioning/Profile/ to the new domain. (3) Set include_service = false instead of true since we are changing the default behavior (4) Remove the comment for the method and add a new method. The method has the following requirements # Description: This sample method allows the customer to control which services # get processed. By default it allows all services to be included # from the bundle. If the user wants to do be selective about which # services from a bundle get installed, they can copy this method and # apply custom logic # # This example is for bundled services, which is composed of multiple catalog items. # The root service is always included. # In this example we match the 'dialog_environment' to match the service_template name # for a service to be included. # # Input Parameters: # $evm.root['service_template'] contains the current Service Template Object being evaluated # $evm.root['service'] contains the parent service object, will be nil if # this is the first service # $evm.root['service_template_provision_task'] # # Output : The evm.root should have an attribute called include_service which is # evaluated by the internal state machine to decide if the service gets # included or excluded #
Verified in 5.5.0.10.
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-2015:2551