Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

REST API : DELTEMPLATE is not producing the same result as through the web interface #5719

Closed
castorsenior opened this issue Sep 28, 2017 · 1 comment

Comments

@castorsenior
Copy link


BUG REPORT INFORMATION

Centreon Web version: 2.8.9-19.el7
Centreon Engine version: 1.7.2-3.el7
Centreon Broker version: 3.0.7-1.el7
OS : Red Hat Enterprise Linux Server 7.3 (Maipo)
Additional environment details (AWS, VirtualBox, physical, etc.): environment=ESX

Steps to reproduce the issue:

  1. Remove a template from a host in the web interface ==> the services related to this template ARE REMOVED ALSO

  2. Do the same operation through REST API (commands below) ==> the services related to this template ARE STILL RUNNING (enjoy then clicking in web interface to remove them !)

curl --request POST
--url 'http://192.168.42.245/centreon/api/index.php?action=authenticate'
--header 'cache-control: no-cache'
--header 'content-type: multipart/form-data'
--form username=admin
--form password=password

curl 'http://192.168.42.245/centreon/api/index.php?action=action&object=centreon_clapi'
-H 'Content-Type: application/json'
-H 'centreon-auth-token:XXXXXXXXXXXXXXXXXXX'
--data '{
"action":"DELTEMPLATE",
"object":"HOST",
"values": "MyHost;MyTemplate"}'

PS : APPLYTPL doesn't switch off the services when you run it after DELTEMPLATE.

@lpinsivy
Copy link
Contributor

duplicate of #4371

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants