Bug 1334930 - [RFE] Customer asking how to delete host instance using automate
Summary: [RFE] Customer asking how to delete host instance using automate
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: John Hardy
QA Contact: Dmitry Misharov
URL:
Whiteboard: automate:host
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-10 20:24 UTC by Thomas Hennessy
Modified: 2021-09-09 11:50 UTC (History)
11 users (show)

Fixed In Version: 5.9.0.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-01 13:06:56 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2532101 0 None None None 2017-05-19 16:16:58 UTC
Red Hat Product Errata RHSA-2018:0380 0 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 18:37:12 UTC

Description Thomas Hennessy 2016-05-10 20:24:19 UTC
Description of problem:Customer is asking how to use automate to delete a host instance from the VMDB.


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


How reproducible: This is a question for which I can find no answer or example in any existing automation documentation


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Use Case provided by customer:
"We have a automated process to provision a host. So, before provisioning a new host we want to check if there is any host with that name in the VMDB. If it exists want to remove that automatically. This is required in a case where provisioning is failed and we had to rebuild the host."

Comment 4 Greg McCullough 2017-10-24 19:18:14 UTC
John - I would like to clarify that this enhancement is only asking for the ability to delete the instance in the VMDB and that it does not include any provider level calls to delete a host defined in on a provider (ext_management_system).

Comment 6 CFME Bot 2017-10-25 20:12:54 UTC
New commit detected on ManageIQ/manageiq-automation_engine/master:
https://github.com/ManageIQ/manageiq-automation_engine/commit/2c9a55ddf3e273000025f295a4a972b8483bc406

commit 2c9a55ddf3e273000025f295a4a972b8483bc406
Author:     Greg McCullough <gmccullo>
AuthorDate: Tue Oct 24 15:42:11 2017 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Wed Oct 25 10:54:47 2017 -0400

    Add remove_from_vmdb method to Host object for Service models
    
    Create mixin to DRY-up existing methods from other models.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1334930

 .../service_models/miq_ae_service_host.rb                      |  2 ++
 .../service_models/miq_ae_service_load_balancer.rb             |  9 ++-------
 .../service_models/miq_ae_service_orchestration_stack.rb       |  9 ++-------
 .../service_models/miq_ae_service_service.rb                   |  9 ++-------
 .../service_models/miq_ae_service_vm_or_template.rb            |  9 ++-------
 .../mixins/miq_ae_service_remove_from_vmdb_mixin.rb            | 10 ++++++++++
 6 files changed, 20 insertions(+), 28 deletions(-)
 create mode 100644 lib/miq_automation_engine/service_models/mixins/miq_ae_service_remove_from_vmdb_mixin.rb

Comment 7 Milan Falešník 2017-11-03 10:39:57 UTC
Verified in 5.9.0.5.

$evm.vmdb(:Host).all.last.remove_from_vmdb works as expected.

Comment 8 Tina Fitzgerald 2017-11-27 16:18:39 UTC
Issue has been verified, clearing needinfo.

Comment 11 errata-xmlrpc 2018-03-01 13:06:56 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-2018:0380


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