Comment 0 for bug 1759663

According to API documentation, V query parameter for webhook trigger is optional (https://developer.openstack.org/api-ref/clustering/#id250):

V (Optional) query string The webhook implementation version requested.

However, when sending a webhook trigger request without the V query parameter, an error is returned:

(openstack) cluster receiver create --cluster mycluster --action CLUSTER_SCALE_OUT --type webhook test-receiver
+------------+------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------+------------------------------------------------------------------------------------------------------+
| action | CLUSTER_SCALE_OUT |
| actor | { |
| | "trust_id": "d27dfaa97525490b8407822820bbf4e0" |
| | } |
| channel | { |
| | "alarm_url": "http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger?V=1" |
| | } |
| cluster_id | 447efe11-7505-49bb-b264-534523464cdd |
| created_at | 2018-03-28T16:15:20Z |
| domain_id | None |
| id | 30ef5c97-abab-4bfe-b73d-ca226ebf5f7d |
| location | None |
| name | test-receiver |
| params | {} |
| project_id | ce556a7d93c84471a0fc2154d3cbb592 |
| type | webhook |
| updated_at | None |
| user_id | 1d7de07588dc4b08b478fd71e80ec8f2 |
+------------+------------------------------------------------------------------------------------------------------+

stack@sandboxController:~> curl -X POST http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

The request to the webhook trigger does succeed without the V query parameter if the user passes in a X-Auth-Token:

stack@sandboxController:~> curl -X POST -H "X-Auth-Token: gAAAAABau9wcXjvwrJ1W-uFSK2T-wrbJSvmT--_6tGW_Dldv0W6-orLwZ5f-JWftvUjjxos2JCbwkxhXHv-2eSeuCAkKL9ps-sPZAaCEUX6gcO6sNH_c7-UAh5D1hgrrC2OkMYQiq9um1cb6wmW-ec-NE7XAXMy8e51lgXwPUVCqWo3pDXGjMbk" http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger
{"action": "fce862ed-aafc-4f3e-9bf5-30a2b14ede18"}