Description of problem: Calling service.atomic? or service.composite? will fail if a service does not an associated service_template. Building a service via Automate can duplicate this case. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Build a service via Automate without an associated service_template 2. Call atomic? or composite? on said service Actual results: An exception will be raised - NoMethodError - undefined method atomic? | composite? for nil:NilClass Expected results: true or false returned Additional info:
https://github.com/ManageIQ/manageiq/pull/13785
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/be71c6f1912b08b0ae9f68460221b4e99303b7a5 commit be71c6f1912b08b0ae9f68460221b4e99303b7a5 Author: Drew Bomhof <dbomhof> AuthorDate: Mon Feb 6 17:03:29 2017 -0500 Commit: Drew Bomhof <dbomhof> CommitDate: Tue Feb 7 09:22:29 2017 -0500 Allow power_state for services that do not have an associated service_template For the cases in Automate where a service does not have an associated ServiceTemplate 1. If children exist we have a composite service 2. If no children exists we have an atomic service https://bugzilla.redhat.com/show_bug.cgi?id=1419730 app/models/service.rb | 10 ++++++++-- spec/models/service_spec.rb | 10 ++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-)
Verified in 5.8.0.4. A service created without service template responds to atomic? and composite? with a boolean and not an error.