List userowned Services in VM-Servicecatalog


#1

Hello

I have some difficulties to implement the documented “Adding VMs and Services to Existing Services”.

Added the following method and getting a script error:
List_service

Do I have to replace some values or change them or should it work by copy paste?

Regards


#2

Try the script from the updated on-line book here: https://github.com/pemcg/mastering-automation-in-cloudforms-4.2-and-manageiq-euwe/blob/master/service_hierarchies/scripts/list_services.rb

pemcg


#3

Thank you for the reply. The script works now and the dropdown lists all the user owned services.

How do I have to name the Dropdown Field, so the new VM is added to the existing service?

I’ve tried the following values:
service_guid
service
service_name

None of them work - it just creates a new Service (randomly generated ID or “Catalog-Name-Date-Number”) with the requested VM.

Regards


#4

This won’t happen automatically unfortunately, you’ll need to add some code at the end of the VM or service provision state machines to add the new VM into the existing service.