Commit b2ed9564 by Karsa Zoltán István

webhook initial commit

parent 31bb2f5c
...@@ -460,7 +460,9 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin, ...@@ -460,7 +460,9 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
def callhookurl(self): def callhookurl(self):
import requests as req import requests as req
if self.hookurl: if self.hookurl:
req.get(url=self.hookurl) logger.info("notify remote host (callhookurl)")
req.post(url=self.hookurl)
def _update_status(self): def _update_status(self):
"""Set the proper status of the instance to Instance.status. """Set the proper status of the instance to Instance.status.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment