Add webhook api

Add a new webhook api and its microversion is 1.4

Partially Implements: blueprint event-driven-optimization-based

Change-Id: I50f7c824e52f3c5fc775d5064898ed422e375a99
This commit is contained in:
licanwei
2019-12-13 11:01:35 +08:00
parent 0c02b08a6a
commit 775be27719
9 changed files with 169 additions and 3 deletions

View File

@@ -185,3 +185,12 @@ def allow_list_datamodel():
"""
return pecan.request.version.minor >= (
versions.VERSIONS.MINOR_3_DATAMODEL.value)
def allow_webhook_api():
"""Check if we should support webhook API.
Version 1.4 of the API added support to trigger webhook.
"""
return pecan.request.version.minor >= (
versions.VERSIONS.MINOR_4_WEBHOOK_API.value)