Hide Forgot
Description of problem: adding watchdog to template is not supported via restapi returning HTTP Error code 405 Method not allowed Version-Release number of selected component (if applicable): is18 How reproducible: 100% Steps to Reproduce: 1. Add/update watchdog via RESTAPI to template Actual results: HTML Error code 405 Expected results: HTML code 200 Additional info: curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u admin@internal:123456 --cacert ca.crt -d "<watchdogs> <watchdog> <model>i6300esb</model> <action>reset</action> </watchdog> </watchdogs>" https://ls-rhevm33.rhev.lab.eng.brq.redhat.com:443/api/templates/18e7869a-ae1a-4164-8b60-f71913014f0d/watchdogs <html><head><title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 405 - </h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u></u></p><p><b>JBWEB000069: description</b> <u>JBWEB000125: The specified HTTP method is not allowed for the requested resource.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html> also after adding watchdog to template in webadmin, api shows in /api/templates/18e7869a-ae1a-4164-8b60-f71913014f0d/watchdogs: <watchdogs> <watchdog href="/api/vms/18e7869a-ae1a-4164-8b60-f71913014f0d/watchdogs/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"> <vm href="/api/vms/18e7869a-ae1a-4164-8b60-f71913014f0d" id="18e7869a-ae1a-4164-8b60-f71913014f0d"/> <model>i6300esb</model> <action>reset</action> </watchdog> </watchdogs> why is there a link to api/vms (href="/api/vms") in watchdog templates? and subelement vm? also tried removing this watchdog from template in webadmin and trying to add it via RESTAPI with no success
hi, Looks like an add/update should be performed on a single watchdog node (i.e. without <watchdogs></watchdogs> tags). can you verify (it works the same for vm and template). For the second issue, I see there is a problem with it in the code. I'll consult Michael Pasternak, about it. thanks :)
Verified the first part and it seems to be working. Watchdog added successfully to template when I removed <watchdogs> tags from HTTP request. If the second part is OK with Michael this should be CLOSED as NOTABUG
(In reply to Lukas Svaty from comment #2) > Verified the first part and it seems to be working. Watchdog added > successfully to template when I removed <watchdogs> tags from HTTP request. > > If the second part is OK with Michael this should be CLOSED as NOTABUG I guess that we can remove the needinfo, talked with Michael, and I'm uploading a fix for the second issue. Also changing the bug title to sth less frightening :)
tested in is23
Closing - RHEV 3.3 Released