You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "shwstppr (via GitHub)" <gi...@apache.org> on 2024/02/19 07:02:14 UTC

[PR] feature: webhooks [cloudstack]

shwstppr opened a new pull request, #8674:
URL: https://github.com/apache/cloudstack/pull/8674

   ### Description
   
   This PR...
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ******************************************************************************* -->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ******************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2003584194

   @shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2003576954

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1982039098

   <b>[SF] Trillian test result (tid-9402)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 49313 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9402-kvm-centos7.zip
   Smoke tests completed. 131 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1985566233

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2098058984

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2084386793

   <b>[LL] Trillian Build Failed (tid-6921)<b/>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2088399916

   Retry
   
   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2126236345

   @kiranchavala a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154813754

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr closed pull request #8674: feature: webhooks
URL: https://github.com/apache/cloudstack/pull/8674


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953515067

   @blueorangutan test keepEnv


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953701211

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8720


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1526470661


##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/WebhookApiServiceImpl.java:
##########
@@ -0,0 +1,533 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.acl.SecurityChecker;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.mom.webhook.api.command.user.CreateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ExecuteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhookDeliveriesCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhooksCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.UpdateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookDeliveryResponse;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookResponse;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryJoinDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookJoinDao;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookVO;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.api.ApiResponseHelper;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.domain.Domain;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.projects.Project;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.utils.Pair;
+import com.cloud.utils.Ternary;
+import com.cloud.utils.UriUtils;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.rest.HttpConstants;
+
+public class WebhookApiServiceImpl extends ManagerBase implements WebhookApiService {
+
+    @Inject
+    AccountManager accountManager;
+    @Inject
+    DomainDao domainDao;
+    @Inject
+    WebhookDao webhookDao;
+    @Inject
+    WebhookJoinDao webhookJoinDao;
+    @Inject
+    WebhookDeliveryDao webhookDeliveryDao;
+    @Inject
+    WebhookDeliveryJoinDao webhookDeliveryJoinDao;
+    @Inject
+    ManagementServerHostDao managementServerHostDao;
+    @Inject
+    WebhookService webhookService;
+
+    protected WebhookResponse createWebhookResponse(WebhookJoinVO webhookVO) {
+        WebhookResponse response = new WebhookResponse();
+        response.setObjectName("webhook");
+        response.setId(webhookVO.getUuid());
+        response.setName(webhookVO.getName());
+        response.setDescription(webhookVO.getDescription());
+        ApiResponseHelper.populateOwner(response, webhookVO);
+        response.setState(webhookVO.getState().toString());
+        response.setPayloadUrl(webhookVO.getPayloadUrl());
+        response.setSecretKey(webhookVO.getSecretKey());
+        response.setSslVerification(webhookVO.isSslVerification());
+        response.setScope(webhookVO.getScope().toString());
+        response.setCreated(webhookVO.getCreated());
+        return response;
+    }
+
+    protected List<Long> getIdsOfAccessibleWebhooks(Account caller) {
+        if (Account.Type.ADMIN.equals(caller.getType())) {
+            return new ArrayList<>();
+        }
+        String domainPath = null;
+        if (Account.Type.DOMAIN_ADMIN.equals(caller.getType())) {
+            Domain domain = domainDao.findById(caller.getDomainId());
+            domainPath = domain.getPath();
+        }
+        List<WebhookJoinVO> webhooks = webhookJoinDao.listByAccountOrDomain(caller.getId(), domainPath);
+        return webhooks.stream().map(WebhookJoinVO::getId).collect(Collectors.toList());
+    }
+
+    protected ManagementServerHostVO basicWebhookDeliveryApiCheck(Account caller, final Long id, final Long webhookId,

Review Comment:
   would package private not be suitable for that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1951831682

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: `150 lines` in your changes are missing coverage. Please review.
   > Comparison is base [(`6af1c25`)](https://app.codecov.io/gh/apache/cloudstack/commit/6af1c25f5201b47b29b6e984817a63739002498c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 30.79% compared to head [(`cf2eb1f`)](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 4.36%.
   
   | [Files](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [.../src/components/view/WebhookDispatchHistoryTab.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbXBvbmVudHMvdmlldy9XZWJob29rRGlzcGF0Y2hIaXN0b3J5VGFiLnZ1ZQ==) | 0.00% | [46 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/config/section/tools.js](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbmZpZy9zZWN0aW9uL3Rvb2xzLmpz) | 0.00% | [32 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/views/tools/TestWebhookDispatch.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL3ZpZXdzL3Rvb2xzL1Rlc3RXZWJob29rRGlzcGF0Y2gudnVl) | 0.00% | [25 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/components/view/TestWebhookDispatchView.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbXBvbmVudHMvdmlldy9UZXN0V2ViaG9va0Rpc3BhdGNoVmlldy52dWU=) | 0.00% | [24 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/components/view/SearchView.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbXBvbmVudHMvdmlldy9TZWFyY2hWaWV3LnZ1ZQ==) | 5.88% | [16 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/components/view/ListView.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbXBvbmVudHMvdmlldy9MaXN0Vmlldy52dWU=) | 0.00% | [7 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main   #8674       +/-   ##
   ============================================
   - Coverage     30.79%   4.36%   -26.43%     
   ============================================
     Files          5353     364     -4989     
     Lines        374626   28873   -345753     
     Branches      54642    5035    -49607     
   ============================================
   - Hits         115358    1261   -114097     
   + Misses       243942   27473   -216469     
   + Partials      15326     139    -15187     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.36% <1.96%> (-0.02%)` | :arrow_down: |
   | [unit-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1958616356

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1980277231

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1968680495

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1505913965


##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Found %d event buses : %s", eventBuses.size(),
+                    StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray())));
+        }

Review Comment:
   ```suggestion
           logger.trace("Found {} event buses : {}", eventBuses.size(),
                       () -> StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray()));
   ```
   
   might need testing, but it does seem simpler



##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Found %d event buses : %s", eventBuses.size(),
+                    StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray())));
+        }
+    }
+
+    @Override
+    public Map<String, EventBusException> publish(Event event) {
+        Map<String, EventBusException> exceptions = new HashMap<>();
+        if (event == null) {
+            return exceptions;
+        }
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Publishing event [category: %s, type: %s]: %s to %d event buses",
+                    event.getEventCategory(), event.getEventType(),
+                    event.getDescription(), eventBuses.size()));
+        }
+        for (EventBus bus : eventBuses) {
+            try {
+                bus.publish(event);
+            } catch (EventBusException e) {
+                logger.warn(String.format("Failed to publish for bus %s of event [category: %s, type: %s]",
+                        bus.getName(), event.getEventCategory(), event.getEventType()));
+                if (logger.isTraceEnabled()) {
+                    logger.trace(event.getDescription());
+                }

Review Comment:
   there is more of those. not commenting on any of those now.



##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Found %d event buses : %s", eventBuses.size(),
+                    StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray())));
+        }
+    }
+
+    @Override
+    public Map<String, EventBusException> publish(Event event) {
+        Map<String, EventBusException> exceptions = new HashMap<>();
+        if (event == null) {
+            return exceptions;
+        }
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Publishing event [category: %s, type: %s]: %s to %d event buses",
+                    event.getEventCategory(), event.getEventType(),
+                    event.getDescription(), eventBuses.size()));
+        }

Review Comment:
   ```suggestion
           logger.trace("Publishing event [category: {}, type: {}]: {} to {} event buses",
                   event.getEventCategory(), event.getEventType(),
                   event.getDescription(), eventBuses.size());
   ```



##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Found %d event buses : %s", eventBuses.size(),
+                    StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray())));
+        }
+    }
+
+    @Override
+    public Map<String, EventBusException> publish(Event event) {
+        Map<String, EventBusException> exceptions = new HashMap<>();
+        if (event == null) {
+            return exceptions;
+        }
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Publishing event [category: %s, type: %s]: %s to %d event buses",
+                    event.getEventCategory(), event.getEventType(),
+                    event.getDescription(), eventBuses.size()));
+        }
+        for (EventBus bus : eventBuses) {
+            try {
+                bus.publish(event);
+            } catch (EventBusException e) {
+                logger.warn(String.format("Failed to publish for bus %s of event [category: %s, type: %s]",
+                        bus.getName(), event.getEventCategory(), event.getEventType()));

Review Comment:
   ```suggestion
               logger.warn("Failed to publish for bus {} of event [category: {}, type: {}]",
                       bus.getName(), event.getEventCategory(), event.getEventType());
   ```



##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Found %d event buses : %s", eventBuses.size(),
+                    StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray())));
+        }
+    }
+
+    @Override
+    public Map<String, EventBusException> publish(Event event) {
+        Map<String, EventBusException> exceptions = new HashMap<>();
+        if (event == null) {
+            return exceptions;
+        }
+        if (logger.isTraceEnabled()) {
+            logger.trace(String.format("Publishing event [category: %s, type: %s]: %s to %d event buses",
+                    event.getEventCategory(), event.getEventType(),
+                    event.getDescription(), eventBuses.size()));
+        }
+        for (EventBus bus : eventBuses) {
+            try {
+                bus.publish(event);
+            } catch (EventBusException e) {
+                logger.warn(String.format("Failed to publish for bus %s of event [category: %s, type: %s]",
+                        bus.getName(), event.getEventCategory(), event.getEventType()));
+                if (logger.isTraceEnabled()) {
+                    logger.trace(event.getDescription());
+                }

Review Comment:
   no parameter expansion so no guard needed
   ```suggestion
                   logger.trace(event.getDescription());
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1967494134

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8799


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2314356365

   @btzq I'm not sure if ACS currently publishes a separate event for router healthcheck fails but it does publish an event with type `ROUTER.HEALTH.CHECKS` which can be used in the webhook


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1636182102


##########
api/src/main/java/org/apache/cloudstack/api/response/BucketResponse.java:
##########
@@ -98,7 +98,7 @@ public class BucketResponse extends BaseResponseWithTagInformation implements Co
     @Param(description = "Bucket Access Key")
     private String accessKey;
 
-    @SerializedName(ApiConstants.SECRET_KEY)
+    @SerializedName(ApiConstants.USER_SECRET_KEY)

Review Comment:
   same here, but not as important as previous one



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1617120474


##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/WebhookApiServiceImpl.java:
##########
@@ -0,0 +1,533 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.acl.SecurityChecker;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.mom.webhook.api.command.user.CreateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ExecuteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhookDeliveriesCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhooksCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.UpdateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookDeliveryResponse;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookResponse;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryJoinDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookJoinDao;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookVO;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.api.ApiResponseHelper;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.domain.Domain;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.projects.Project;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.utils.Pair;
+import com.cloud.utils.Ternary;
+import com.cloud.utils.UriUtils;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.rest.HttpConstants;
+
+public class WebhookApiServiceImpl extends ManagerBase implements WebhookApiService {
+
+    @Inject
+    AccountManager accountManager;
+    @Inject
+    DomainDao domainDao;
+    @Inject
+    WebhookDao webhookDao;
+    @Inject
+    WebhookJoinDao webhookJoinDao;
+    @Inject
+    WebhookDeliveryDao webhookDeliveryDao;
+    @Inject
+    WebhookDeliveryJoinDao webhookDeliveryJoinDao;
+    @Inject
+    ManagementServerHostDao managementServerHostDao;
+    @Inject
+    WebhookService webhookService;
+
+    protected WebhookResponse createWebhookResponse(WebhookJoinVO webhookVO) {
+        WebhookResponse response = new WebhookResponse();
+        response.setObjectName("webhook");
+        response.setId(webhookVO.getUuid());
+        response.setName(webhookVO.getName());
+        response.setDescription(webhookVO.getDescription());
+        ApiResponseHelper.populateOwner(response, webhookVO);
+        response.setState(webhookVO.getState().toString());
+        response.setPayloadUrl(webhookVO.getPayloadUrl());
+        response.setSecretKey(webhookVO.getSecretKey());
+        response.setSslVerification(webhookVO.isSslVerification());
+        response.setScope(webhookVO.getScope().toString());
+        response.setCreated(webhookVO.getCreated());
+        return response;
+    }
+
+    protected List<Long> getIdsOfAccessibleWebhooks(Account caller) {
+        if (Account.Type.ADMIN.equals(caller.getType())) {
+            return new ArrayList<>();
+        }
+        String domainPath = null;
+        if (Account.Type.DOMAIN_ADMIN.equals(caller.getType())) {
+            Domain domain = domainDao.findById(caller.getDomainId());
+            domainPath = domain.getPath();
+        }
+        List<WebhookJoinVO> webhooks = webhookJoinDao.listByAccountOrDomain(caller.getId(), domainPath);
+        return webhooks.stream().map(WebhookJoinVO::getId).collect(Collectors.toList());
+    }
+
+    protected ManagementServerHostVO basicWebhookDeliveryApiCheck(Account caller, final Long id, final Long webhookId,

Review Comment:
   that didn't work in my experience



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2135105315

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9722


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2140929072

   <b>[SF] Trillian test result (tid-10317)</b>
   Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 46960 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t10317-kvm-rocky8.zip
   Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1524504969


##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {

Review Comment:
   @DaanHoogland yes



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2088393434

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2084392667

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "GutoVeronezi (via GitHub)" <gi...@apache.org>.
GutoVeronezi commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1954874952

   @shwstppr do you have any description of the feature?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2045744912

   <b>[SF] Trillian test result (tid-9760)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 46723 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9760-kvm-centos7.zip
   Smoke tests completed. 131 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2063487762

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2072671468

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2084474515

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9472


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2088391328

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2098053777

   Try again
   
   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1980275708

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "btzq (via GitHub)" <gi...@apache.org>.
btzq commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2314361495

   @shwstppr I think thats pretty good for us, we just need to have an alert when there is a failing health check. 
   
   Right now, we have to login in ACS every few minutes and check the UI. We dont have RabbitMQ/Kafka installed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154967101

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9822


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2152295696

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2138952006

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9740


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2138986759

   @blueorangutan test rocky8 kvm-rocky8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud merged PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2135163566

   @blueorangutan test rocky8 kvm-rocky8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2138810600

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2138150833

   Test failing with exceptions,
   ```
   2024-05-28T13:43:38,730 WARN  [c.c.u.AccountManagerImpl] (API-Job-Executor-31:[ctx-26228571, job-39, ctx-aa487b81]) (logid:bf162f6e) Failed to cleanup account Account [{"accountName":"test-TestUserLogin-test_2FA_setup-CKUF5G","id":7,"uuid":"047e3b67-c492-48ae-b8ea-0b67358e1a64"}] due to com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.cj.jdbc.ClientPreparedStatement: UPDATE user_data SET user_data.removed='2024-05-28 13:43:38' WHERE user_data.account_id = 7
           at com.cloud.utils.db.GenericDaoBase.update(GenericDaoBase.java:871)
           at com.cloud.utils.db.GenericDaoBase.remove(GenericDaoBase.java:1993)
   ```
   While https://github.com/apache/cloudstack/pull/9120 is merged, we need https://github.com/apache/cloudstack/pull/8893 for 4.19.1 DB changes to work in `main` cc @weizhouapache @DaanHoogland 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2139729854

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2138992646

   @shwstppr a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2044108920

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2056626258

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2088394090

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2088401332

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1964331454

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1985663297

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8888


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2094918056

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1636187875


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java:
##########
@@ -66,7 +66,7 @@ public class UpdateUserCmd extends BaseCmd {
     @Parameter(name = ApiConstants.CURRENT_PASSWORD, type = CommandType.STRING, description = "Current password that was being used by the user. You must inform the current password when updating the password.", acceptedOnAdminPort = false)
     private String currentPassword;
 
-    @Parameter(name = ApiConstants.SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userApiKey")
+    @Parameter(name = ApiConstants.USER_SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userApiKey")

Review Comment:
   @weizhouapache only the variable name is changed (adjusted to actual string value). API parameter is still the same - `usersecretkey`
   https://github.com/apache/cloudstack/pull/8674/files#diff-72d5bf21c12ffd0a3c2d3a6033ec70ae5ba6c31338e915fe65df1b7a67827a9eL403
   
   https://github.com/apache/cloudstack/pull/8674/files#diff-72d5bf21c12ffd0a3c2d3a6033ec70ae5ba6c31338e915fe65df1b7a67827a9eR491



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2155040340

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1976960273

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8849


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1977214778

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2134959136

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2135167941

   @shwstppr a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2155088558

   <b>[SF] Trillian Build Failed (tid-10391)<b/>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1636198111


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java:
##########
@@ -66,7 +66,7 @@ public class UpdateUserCmd extends BaseCmd {
     @Parameter(name = ApiConstants.CURRENT_PASSWORD, type = CommandType.STRING, description = "Current password that was being used by the user. You must inform the current password when updating the password.", acceptedOnAdminPort = false)
     private String currentPassword;
 
-    @Parameter(name = ApiConstants.SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userApiKey")
+    @Parameter(name = ApiConstants.USER_SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userApiKey")

Review Comment:
   ok @shwstppr 
   double-checked it, it is the same as before
   was a bit confused.
   sorry
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1985459509

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953616353

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953618312

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1964330425

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082580063

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2087296600

   <b>[LL] Trillian Build Failed (tid-6922)<b/>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1967388915

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1970589693

   @DaanHoogland thanks. Will address logging changes together with any remaining review comments


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1976804501

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2063491296

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2068653187

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2134955411

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2126233228

   @blueorangutan test rocky8 kvm-rocky8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2152615571

   Packaging result [SF]: ✖️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9809


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154811198

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1636181653


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java:
##########
@@ -66,7 +66,7 @@ public class UpdateUserCmd extends BaseCmd {
     @Parameter(name = ApiConstants.CURRENT_PASSWORD, type = CommandType.STRING, description = "Current password that was being used by the user. You must inform the current password when updating the password.", acceptedOnAdminPort = false)
     private String currentPassword;
 
-    @Parameter(name = ApiConstants.SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userApiKey")
+    @Parameter(name = ApiConstants.USER_SECRET_KEY, type = CommandType.STRING, description = "The secret key for the user. Must be specified with userApiKey")

Review Comment:
   @shwstppr 
   IMHO this should not be changed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1958705975

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 8737


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1958616931

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1952018555

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1968681223

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082003071

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2031937084

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9123


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2031963576

   @shwstppr a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2033489124

   <b>[SF] Trillian test result (tid-9668)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 52826 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9668-kvm-centos7.zip
   Smoke tests completed. 130 look OK, 0 have errors, 1 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   all_test_human_readable_logs | `Skipped` | --- | test_human_readable_logs.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2044109443

   @shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2098032901

   Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 9563


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154804856

   Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 9820


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2155991258

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1985563302

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2042075580

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8674?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `58.53324%` with `605 lines` in your changes are missing coverage. Please review.
   > Project coverage is 31.34%. Comparing base [(`a0b642c`)](https://app.codecov.io/gh/apache/cloudstack/commit/a0b642cdb851ffd19acb21bac70149cb75045cb5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`b054e0c`)](https://app.codecov.io/gh/apache/cloudstack/pull/8674?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 26 commits behind head on main.
   
   > :exclamation: Current head b054e0c differs from pull request most recent head 6a3949a. Consider uploading reports for the commit 6a3949a to get more accurate results
   
   | [Files](https://app.codecov.io/gh/apache/cloudstack/pull/8674?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [.../cloudstack/mom/webhook/WebhookApiServiceImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=plugins%2Fevent-bus%2Fwebhook%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fmom%2Fwebhook%2FWebhookApiServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2lucy9ldmVudC1idXMvd2ViaG9vay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9tb20vd2ViaG9vay9XZWJob29rQXBpU2VydmljZUltcGwuamF2YQ==) | 62.42% | [80 Missing and 41 partials :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/views/tools/CreateWebhook.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=ui%2Fsrc%2Fviews%2Ftools%2FCreateWebhook.vue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL3ZpZXdzL3Rvb2xzL0NyZWF0ZVdlYmhvb2sudnVl) | 0.00% | [82 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/components/view/WebhookDeliveriesTab.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=ui%2Fsrc%2Fcomponents%2Fview%2FWebhookDeliveriesTab.vue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbXBvbmVudHMvdmlldy9XZWJob29rRGVsaXZlcmllc1RhYi52dWU=) | 0.00% | [69 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/components/view/TestWebhookDeliveryView.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=ui%2Fsrc%2Fcomponents%2Fview%2FTestWebhookDeliveryView.vue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbXBvbmVudHMvdmlldy9UZXN0V2ViaG9va0RlbGl2ZXJ5Vmlldy52dWU=) | 0.00% | [52 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...che/cloudstack/mom/webhook/WebhookServiceImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=plugins%2Fevent-bus%2Fwebhook%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fmom%2Fwebhook%2FWebhookServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2lucy9ldmVudC1idXMvd2ViaG9vay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9tb20vd2ViaG9vay9XZWJob29rU2VydmljZUltcGwuamF2YQ==) | 69.86% | [37 Missing and 7 partials :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../cloudstack/mom/webhook/WebhookDeliveryThread.java](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=plugins%2Fevent-bus%2Fwebhook%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fmom%2Fwebhook%2FWebhookDeliveryThread.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2lucy9ldmVudC1idXMvd2ViaG9vay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9tb20vd2ViaG9vay9XZWJob29rRGVsaXZlcnlUaHJlYWQuamF2YQ==) | 74.80% | [23 Missing and 9 partials :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...rg/apache/cloudstack/mom/webhook/vo/WebhookVO.java](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=plugins%2Fevent-bus%2Fwebhook%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fmom%2Fwebhook%2Fvo%2FWebhookVO.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2lucy9ldmVudC1idXMvd2ViaG9vay9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvY2xvdWRzdGFjay9tb20vd2ViaG9vay92by9XZWJob29rVk8uamF2YQ==) | 49.18% | [31 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/config/section/tools.js](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=ui%2Fsrc%2Fconfig%2Fsection%2Ftools.js&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbmZpZy9zZWN0aW9uL3Rvb2xzLmpz) | 0.00% | [30 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/views/tools/TestWebhookDelivery.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=ui%2Fsrc%2Fviews%2Ftools%2FTestWebhookDelivery.vue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL3ZpZXdzL3Rvb2xzL1Rlc3RXZWJob29rRGVsaXZlcnkudnVl) | 0.00% | [22 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [ui/src/components/view/SearchView.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&filepath=ui%2Fsrc%2Fcomponents%2Fview%2FSearchView.vue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL2NvbXBvbmVudHMvdmlldy9TZWFyY2hWaWV3LnZ1ZQ==) | 5.26% | [18 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | ... and [19 more](https://app.codecov.io/gh/apache/cloudstack/pull/8674?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #8674      +/-   ##
   ============================================
   + Coverage     30.91%   31.34%   +0.43%     
   - Complexity    33734    34355     +621     
   ============================================
     Files          5404     5432      +28     
     Lines        380289   381645    +1356     
     Branches      55489    55655     +166     
   ============================================
   + Hits         117550   119634    +2084     
   + Misses       247104   246194     -910     
   - Partials      15635    15817     +182     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `25.20% <68.63%> (+0.66%)` | :arrow_up: |
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.31% <1.38%> (-0.03%)` | :arrow_down: |
   | [unit-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8674/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `16.89% <18.97%> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8674?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2042227092

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9188


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1980387780

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8862


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2084391438

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2084594827

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082006022

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082119387

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9459


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082575017

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2134893195

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2138807579

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2144484806

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9761


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953505256

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8718


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953460605

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1627564767


##########
plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java:
##########
@@ -185,11 +185,14 @@ public static void setRetryInterval(Integer retryInterval) {
      */
     @Override
     public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws EventBusException {
-
         if (subscriber == null || topic == null) {
             throw new EventBusException("Invalid EventSubscriber/EventTopic object passed.");
         }
 
+        if (logger.isDebugEnabled()) {
+            logger.debug("subscribing '{}' to events of type '{}' from '{}'", subscriber.toString(), topic.getEventType(), topic.getEventSource());
+        }

Review Comment:
   ```suggestion
           logger.debug("subscribing '{}' to events of type '{}' from '{}'", subscriber.toString(), topic.getEventType(), topic.getEventSource());
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1627566381


##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -425,6 +428,17 @@ public void setQuerySelectors(List<QuerySelector> querySelectors) {
         _querySelectors = querySelectors;
     }
 
+    protected void deleteWebhooksForAccount(long accountId) {
+        try {
+            WebhookHelper webhookService = ComponentContext.getDelegateComponentOfType(WebhookHelper.class);
+            webhookService.deleteWebhooksForAccount(accountId);
+        } catch (NoSuchBeanDefinitionException ignored) {
+            if (logger.isDebugEnabled()) {
+                logger.debug("No WebhookHelper bean found");
+            }

Review Comment:
   ```suggestion
               logger.debug("No WebhookHelper bean found");
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "btzq (via GitHub)" <gi...@apache.org>.
btzq commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2314365303

   I see, Thank you @shwstppr excited to test this!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "btzq (via GitHub)" <gi...@apache.org>.
btzq commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2314347856

   @shwstppr this is a great feature for us. 
   Does this include Healthcheck Fails for Virtual Routers?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2042709487

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9194


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2042548286

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953516385

   @shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1954867163

   <b>[SF] Trillian test result (tid-9301)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 46591 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9301-kvm-centos7.zip
   Smoke tests completed. 129 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2063629455

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9308


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2098245655

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9564


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2098027904

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2098026804

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2127813362

   <b>[SF] Trillian test result (tid-10261)</b>
   Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 47163 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t10261-kvm-rocky8.zip
   Smoke tests completed. 132 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_events_resource | `Error` | 420.15 | test_events_resource.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1980438426

   @shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1980434743

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1522952722


##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {
+            logger.trace("Found {} event buses : {}", eventBuses.size(),
+                    StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray()));
+        }
+    }
+
+    @Override
+    public Map<String, EventBusException> publish(Event event) {
+        Map<String, EventBusException> exceptions = new HashMap<>();
+        if (event == null) {
+            return exceptions;
+        }
+        if (logger.isTraceEnabled()) {
+            logger.trace("Publishing event [category: {}, type: {}]: {} to {} event buses",
+                    event.getEventCategory(), event.getEventType(),
+                    event.getDescription(), eventBuses.size());
+        }

Review Comment:
   ```suggestion
           logger.trace("Publishing event [category: {}, type: {}]: {} to {} event buses",
                   event.getEventCategory(), event.getEventType(),
                   event.getDescription(), eventBuses.size());
   ```



##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {

Review Comment:
   this is the logger from `ComponentLifecycleBase`. Is that intentional?



##########
plugins/event-bus/inmemory/src/main/java/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java:
##########
@@ -68,6 +72,9 @@ public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws Event
 
     @Override
     public void unsubscribe(UUID subscriberId, EventSubscriber subscriber) throws EventBusException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("unsubscribing '{}'", subscriberId);
+        }

Review Comment:
   ```suggestion
           logger.debug("unsubscribing '{}'", subscriberId);
   ```



##########
plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java:
##########
@@ -185,11 +185,14 @@ public static void setRetryInterval(Integer retryInterval) {
      */
     @Override
     public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws EventBusException {
-
         if (subscriber == null || topic == null) {
             throw new EventBusException("Invalid EventSubscriber/EventTopic object passed.");
         }
 
+        if (logger.isDebugEnabled()) {
+            logger.debug("subscribing '{}' to events of type '{}' from '{}'", subscriber.toString(), topic.getEventType(), topic.getEventSource());
+        }

Review Comment:
   ```suggestion
           logger.debug("subscribing '{}' to events of type '{}' from '{}'",
               () -> subscriber.toString(),
               () -> topic.getEventType(),
               () -> topic.getEventSource());
   ```



##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/WebhookDeliveryThread.java:
##########
@@ -0,0 +1,292 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
+import java.security.InvalidKeyException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import javax.crypto.Mac;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.framework.async.AsyncRpcContext;
+import org.apache.cloudstack.framework.events.Event;
+import org.apache.cloudstack.storage.command.CommandResult;
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHeaders;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicHeader;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.util.EntityUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class WebhookDeliveryThread implements Runnable {
+    protected static Logger LOGGER = LogManager.getLogger(WebhookDeliveryThread.class);
+
+    private static final String HEADER_X_CS_EVENT_ID = "X-CS-Event-ID";
+    private static final String HEADER_X_CS_EVENT = "X-CS-Event";
+    private static final String HEADER_X_CS_SIGNATURE = "X-CS-Signature";
+    private static final String PREFIX_HEADER_USER_AGENT = "CS-Hookshot/";
+    private final Webhook webhook;
+    private final Event event;
+    private CloseableHttpClient httpClient;
+    private String headers;
+    private String payload;
+    private String response;
+    private Date startTime;
+    private int deliveryRetries = 3;
+    private int deliveryTimeout = 10;
+
+    AsyncCompletionCallback<WebhookDeliveryResult> callback;
+
+    protected boolean isValidJson(String json) {
+        try {
+            new JSONObject(json);
+        } catch (JSONException ex) {
+            try {
+                new JSONArray(json);
+            } catch (JSONException ex1) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    protected void setHttpClient() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
+        if (webhook.isSslVerification()) {
+            httpClient = HttpClients.createDefault();
+            return;
+        }
+        httpClient = HttpClients
+                .custom()
+                .setSSLContext(new SSLContextBuilder().loadTrustMaterial(null,
+                        TrustAllStrategy.INSTANCE).build())
+                .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+                .build();
+    }
+
+    protected HttpPost getBasicHttpPostRequest() throws URISyntaxException {
+        final URI uri = new URI(webhook.getPayloadUrl());
+        HttpPost request = new HttpPost();
+        RequestConfig.Builder requestConfig = RequestConfig.custom();
+        requestConfig.setConnectTimeout(deliveryTimeout * 1000);
+        requestConfig.setConnectionRequestTimeout(deliveryTimeout * 1000);
+        requestConfig.setSocketTimeout(deliveryTimeout * 1000);
+        request.setConfig(requestConfig.build());
+        request.setURI(uri);
+        return request;
+    }
+
+    protected void updateRequestHeaders(HttpPost request) throws DecoderException, NoSuchAlgorithmException,
+            InvalidKeyException {
+        request.addHeader(HEADER_X_CS_EVENT_ID, event.getEventUuid());
+        request.addHeader(HEADER_X_CS_EVENT, event.getEventType());
+        request.setHeader(HttpHeaders.USER_AGENT, String.format("%s%s", PREFIX_HEADER_USER_AGENT,
+                event.getResourceAccountUuid()));
+        if (StringUtils.isNotBlank(webhook.getSecretKey())) {
+            request.addHeader(HEADER_X_CS_SIGNATURE, generateHMACSignature(payload, webhook.getSecretKey()));
+        }
+        List<Header> headers = new ArrayList<>(Arrays.asList(request.getAllHeaders()));
+        HttpEntity entity = request.getEntity();
+        if (entity.getContentLength() > 0 && !request.containsHeader(HttpHeaders.CONTENT_LENGTH)) {
+            headers.add(new BasicHeader(HttpHeaders.CONTENT_LENGTH, Long.toString(entity.getContentLength())));
+        }
+        if (entity.getContentType() != null && !request.containsHeader(HttpHeaders.CONTENT_TYPE)) {
+            headers.add(entity.getContentType());
+        }
+        if (entity.getContentEncoding() != null && !request.containsHeader(HttpHeaders.CONTENT_ENCODING)) {
+            headers.add(entity.getContentEncoding());
+        }
+        this.headers = StringUtils.join(headers, "\n");
+    }
+
+    public WebhookDeliveryThread(Webhook webhook, Event event,
+                                 AsyncCompletionCallback<WebhookDeliveryResult> callback) {
+        this.webhook = webhook;
+        this.event = event;
+        this.callback = callback;
+    }
+
+    public void setDeliveryRetries(int deliveryRetries) {
+        this.deliveryRetries = deliveryRetries;
+    }
+
+    public void setDeliveryTimeout(int deliveryTimeout) {
+        this.deliveryTimeout = deliveryTimeout;
+    }
+
+    @Override
+    public void run() {
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Delivering event: {} for {}", event.getEventType(), webhook);
+        }

Review Comment:
   ```suggestion
           LOGGER.debug("Delivering event: {} for {}", event.getEventType(), webhook);
   ```
   or
   ```suggestion
           LOGGER.debug("Delivering event: {} for {}", () -> event.getEventType(), () -> webhook.toString());
   ```
   depending on what kind of `Object` webhook is. I haven't found a `toString()` for it yet.



##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/WebhookDeliveryThread.java:
##########
@@ -0,0 +1,292 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
+import java.security.InvalidKeyException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import javax.crypto.Mac;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.framework.async.AsyncRpcContext;
+import org.apache.cloudstack.framework.events.Event;
+import org.apache.cloudstack.storage.command.CommandResult;
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHeaders;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicHeader;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.util.EntityUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class WebhookDeliveryThread implements Runnable {
+    protected static Logger LOGGER = LogManager.getLogger(WebhookDeliveryThread.class);
+
+    private static final String HEADER_X_CS_EVENT_ID = "X-CS-Event-ID";
+    private static final String HEADER_X_CS_EVENT = "X-CS-Event";
+    private static final String HEADER_X_CS_SIGNATURE = "X-CS-Signature";
+    private static final String PREFIX_HEADER_USER_AGENT = "CS-Hookshot/";
+    private final Webhook webhook;
+    private final Event event;
+    private CloseableHttpClient httpClient;
+    private String headers;
+    private String payload;
+    private String response;
+    private Date startTime;
+    private int deliveryRetries = 3;
+    private int deliveryTimeout = 10;
+
+    AsyncCompletionCallback<WebhookDeliveryResult> callback;
+
+    protected boolean isValidJson(String json) {
+        try {
+            new JSONObject(json);
+        } catch (JSONException ex) {
+            try {
+                new JSONArray(json);
+            } catch (JSONException ex1) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    protected void setHttpClient() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
+        if (webhook.isSslVerification()) {
+            httpClient = HttpClients.createDefault();
+            return;
+        }
+        httpClient = HttpClients
+                .custom()
+                .setSSLContext(new SSLContextBuilder().loadTrustMaterial(null,
+                        TrustAllStrategy.INSTANCE).build())
+                .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+                .build();
+    }
+
+    protected HttpPost getBasicHttpPostRequest() throws URISyntaxException {
+        final URI uri = new URI(webhook.getPayloadUrl());
+        HttpPost request = new HttpPost();
+        RequestConfig.Builder requestConfig = RequestConfig.custom();
+        requestConfig.setConnectTimeout(deliveryTimeout * 1000);
+        requestConfig.setConnectionRequestTimeout(deliveryTimeout * 1000);
+        requestConfig.setSocketTimeout(deliveryTimeout * 1000);
+        request.setConfig(requestConfig.build());
+        request.setURI(uri);
+        return request;
+    }
+
+    protected void updateRequestHeaders(HttpPost request) throws DecoderException, NoSuchAlgorithmException,
+            InvalidKeyException {
+        request.addHeader(HEADER_X_CS_EVENT_ID, event.getEventUuid());
+        request.addHeader(HEADER_X_CS_EVENT, event.getEventType());
+        request.setHeader(HttpHeaders.USER_AGENT, String.format("%s%s", PREFIX_HEADER_USER_AGENT,
+                event.getResourceAccountUuid()));
+        if (StringUtils.isNotBlank(webhook.getSecretKey())) {
+            request.addHeader(HEADER_X_CS_SIGNATURE, generateHMACSignature(payload, webhook.getSecretKey()));
+        }
+        List<Header> headers = new ArrayList<>(Arrays.asList(request.getAllHeaders()));
+        HttpEntity entity = request.getEntity();
+        if (entity.getContentLength() > 0 && !request.containsHeader(HttpHeaders.CONTENT_LENGTH)) {
+            headers.add(new BasicHeader(HttpHeaders.CONTENT_LENGTH, Long.toString(entity.getContentLength())));
+        }
+        if (entity.getContentType() != null && !request.containsHeader(HttpHeaders.CONTENT_TYPE)) {
+            headers.add(entity.getContentType());
+        }
+        if (entity.getContentEncoding() != null && !request.containsHeader(HttpHeaders.CONTENT_ENCODING)) {
+            headers.add(entity.getContentEncoding());
+        }
+        this.headers = StringUtils.join(headers, "\n");
+    }
+
+    public WebhookDeliveryThread(Webhook webhook, Event event,
+                                 AsyncCompletionCallback<WebhookDeliveryResult> callback) {
+        this.webhook = webhook;
+        this.event = event;
+        this.callback = callback;
+    }
+
+    public void setDeliveryRetries(int deliveryRetries) {
+        this.deliveryRetries = deliveryRetries;
+    }
+
+    public void setDeliveryTimeout(int deliveryTimeout) {
+        this.deliveryTimeout = deliveryTimeout;
+    }
+
+    @Override
+    public void run() {
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Delivering event: {} for {}", event.getEventType(), webhook);
+        }
+        if (event == null) {
+            LOGGER.warn("Invalid event received for delivering to {}", webhook);
+            return;
+        }
+        payload = event.getDescription();
+        int attempt = 0;
+        boolean success = false;
+        try {
+            setHttpClient();
+        } catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException e) {
+            response = String.format("Failed to initiate delivery due to : %s", e.getMessage());
+            callback.complete(new WebhookDeliveryResult(headers, payload, success, response, new Date()));
+            return;
+        }
+        while (attempt < deliveryRetries) {
+            attempt++;
+            if (delivery(attempt)) {
+                success = true;
+                break;
+            }
+        }
+        callback.complete(new WebhookDeliveryResult(headers, payload, success, response, startTime));
+    }
+
+    protected void updateResponseFromRequest(HttpEntity entity) {
+        try {
+            this.response =  EntityUtils.toString(entity, StandardCharsets.UTF_8);
+        } catch (IOException e) {
+            LOGGER.error("Failed to parse response for event: {} for {}",
+                    event.getEventType(), webhook);
+            this.response = "";
+        }
+    }
+
+    protected boolean delivery(int attempt) {
+        startTime = new Date();
+        try {
+            HttpPost request = getBasicHttpPostRequest();
+            StringEntity input = new StringEntity(payload,
+                    isValidJson(payload) ? ContentType.APPLICATION_JSON : ContentType.TEXT_PLAIN);
+            request.setEntity(input);
+            updateRequestHeaders(request);
+            if (LOGGER.isTraceEnabled()) {
+                LOGGER.trace("Delivering event: {} for {} with timeout: {}, " +
+                        "attempt #{}", event.getEventType(), webhook,
+                        deliveryTimeout, attempt);
+            }

Review Comment:
   ```suggestion
               LOGGER.trace("Delivering event: {} for {} with timeout: {}, attempt #{}",
                   event.getEventType(), webhook, deliveryTimeout, attempt);
   ```



##########
framework/events/src/main/java/org/apache/cloudstack/framework/events/EventDistributorImpl.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cloudstack.framework.events;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.utils.component.ManagerBase;
+
+public class EventDistributorImpl extends ManagerBase implements EventDistributor {
+
+    List<EventBus> eventBuses;
+
+    public void setEventBuses(List<EventBus> eventBuses) {
+        this.eventBuses = eventBuses;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (logger.isTraceEnabled()) {
+            logger.trace("Found {} event buses : {}", eventBuses.size(),
+                    StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray()));
+        }

Review Comment:
   ```suggestion
           logger.trace("Found {} event buses : {}",
               () -> eventBuses.size(),
               () -> StringUtils.join(eventBuses.stream().map(x->x.getClass().getName()).toArray()));
   ```



##########
plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java:
##########
@@ -250,6 +253,9 @@ public void handleDelivery(String queueName, Envelope envelope, AMQP.BasicProper
 
     @Override
     public void unsubscribe(UUID subscriberId, EventSubscriber subscriber) throws EventBusException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("unsubscribing '{}'", subscriberId);
+        }

Review Comment:
   ```suggestion
           logger.debug("unsubscribing '{}'", subscriberId);
   ```



##########
plugins/event-bus/inmemory/src/main/java/org/apache/cloudstack/mom/inmemory/InMemoryEventBus.java:
##########
@@ -60,6 +60,10 @@ public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws Event
         if (subscriber == null || topic == null) {
             throw new EventBusException("Invalid EventSubscriber/EventTopic object passed.");
         }
+        if (logger.isDebugEnabled()) {
+            logger.debug("subscribing '{}' to events of type '{}' from '{}'", subscriber.toString(), topic.getEventType(), topic.getEventSource());
+        }

Review Comment:
   ```suggestion
           logger.debug("subscribing '{}' to events of type '{}' from '{}'",
               () -> subscriber.toString(),
               () -> topic.getEventType(),
               () -> topic.getEventSource());
   ```



##########
plugins/event-bus/kafka/src/main/java/org/apache/cloudstack/mom/kafka/KafkaEventBus.java:
##########
@@ -87,19 +87,29 @@ public void setName(String name) {
 
     @Override
     public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws EventBusException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("subscribing '{}' to events of type '{}' from '{}'", subscriber.toString(), topic.getEventType(), topic.getEventSource());
+        }
+
         /* NOOP */
         return UUID.randomUUID();
     }
 
     @Override
     public void unsubscribe(UUID subscriberId, EventSubscriber subscriber) throws EventBusException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("unsubscribing '{}'", subscriberId);
+        }
         /* NOOP */
     }
 
     @Override
     public void publish(Event event) throws EventBusException {
-        ProducerRecord<String, String> record = new ProducerRecord<String,String>(_topic, event.getResourceUUID(), event.getDescription());
-        _producer.send(record);
+        if (logger.isTraceEnabled()) {
+            logger.trace("publish '{}'", event.getDescription());
+        }

Review Comment:
   ```suggestion
           logger.trace("publish '{}'", event.getDescription());
   ```



##########
plugins/event-bus/kafka/src/main/java/org/apache/cloudstack/mom/kafka/KafkaEventBus.java:
##########
@@ -87,19 +87,29 @@ public void setName(String name) {
 
     @Override
     public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws EventBusException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("subscribing '{}' to events of type '{}' from '{}'", subscriber.toString(), topic.getEventType(), topic.getEventSource());
+        }
+
         /* NOOP */
         return UUID.randomUUID();
     }
 
     @Override
     public void unsubscribe(UUID subscriberId, EventSubscriber subscriber) throws EventBusException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("unsubscribing '{}'", subscriberId);
+        }

Review Comment:
   ```suggestion
           logger.debug("unsubscribing '{}'", subscriberId);
   ```



##########
plugins/event-bus/kafka/src/main/java/org/apache/cloudstack/mom/kafka/KafkaEventBus.java:
##########
@@ -87,19 +87,29 @@ public void setName(String name) {
 
     @Override
     public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws EventBusException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("subscribing '{}' to events of type '{}' from '{}'", subscriber.toString(), topic.getEventType(), topic.getEventSource());
+        }

Review Comment:
   ```suggestion
           logger.debug("subscribing '{}' to events of type '{}' from '{}'",
               () -> subscriber.toString(),
               () -> topic.getEventType(),
               () -> topic.getEventSource());
   ```



##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/WebhookApiServiceImpl.java:
##########
@@ -0,0 +1,533 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.acl.SecurityChecker;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.mom.webhook.api.command.user.CreateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ExecuteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhookDeliveriesCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhooksCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.UpdateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookDeliveryResponse;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookResponse;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryJoinDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookJoinDao;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookVO;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.api.ApiResponseHelper;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.domain.Domain;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.projects.Project;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.utils.Pair;
+import com.cloud.utils.Ternary;
+import com.cloud.utils.UriUtils;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.rest.HttpConstants;
+
+public class WebhookApiServiceImpl extends ManagerBase implements WebhookApiService {
+
+    @Inject
+    AccountManager accountManager;
+    @Inject
+    DomainDao domainDao;
+    @Inject
+    WebhookDao webhookDao;
+    @Inject
+    WebhookJoinDao webhookJoinDao;
+    @Inject
+    WebhookDeliveryDao webhookDeliveryDao;
+    @Inject
+    WebhookDeliveryJoinDao webhookDeliveryJoinDao;
+    @Inject
+    ManagementServerHostDao managementServerHostDao;
+    @Inject
+    WebhookService webhookService;
+
+    protected WebhookResponse createWebhookResponse(WebhookJoinVO webhookVO) {
+        WebhookResponse response = new WebhookResponse();
+        response.setObjectName("webhook");
+        response.setId(webhookVO.getUuid());
+        response.setName(webhookVO.getName());
+        response.setDescription(webhookVO.getDescription());
+        ApiResponseHelper.populateOwner(response, webhookVO);
+        response.setState(webhookVO.getState().toString());
+        response.setPayloadUrl(webhookVO.getPayloadUrl());
+        response.setSecretKey(webhookVO.getSecretKey());
+        response.setSslVerification(webhookVO.isSslVerification());
+        response.setScope(webhookVO.getScope().toString());
+        response.setCreated(webhookVO.getCreated());
+        return response;
+    }
+
+    protected List<Long> getIdsOfAccessibleWebhooks(Account caller) {
+        if (Account.Type.ADMIN.equals(caller.getType())) {
+            return new ArrayList<>();
+        }
+        String domainPath = null;
+        if (Account.Type.DOMAIN_ADMIN.equals(caller.getType())) {
+            Domain domain = domainDao.findById(caller.getDomainId());
+            domainPath = domain.getPath();
+        }
+        List<WebhookJoinVO> webhooks = webhookJoinDao.listByAccountOrDomain(caller.getId(), domainPath);
+        return webhooks.stream().map(WebhookJoinVO::getId).collect(Collectors.toList());
+    }
+
+    protected ManagementServerHostVO basicWebhookDeliveryApiCheck(Account caller, final Long id, final Long webhookId,

Review Comment:
   this seems to only be called internally. Can it be 
   ```suggestion
       private ManagementServerHostVO basicWebhookDeliveryApiCheck(Account caller, final Long id, final Long webhookId,
   ```



##########
plugins/event-bus/rabbitmq/src/main/java/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java:
##########
@@ -265,6 +271,9 @@ public void unsubscribe(UUID subscriberId, EventSubscriber subscriber) throws Ev
     // publish event on to the exchange created on AMQP server
     @Override
     public void publish(Event event) throws EventBusException {
+        if (logger.isTraceEnabled()) {
+            logger.trace("publish '{}'", event.getDescription());
+        }

Review Comment:
   ```suggestion
           logger.trace("publish '{}'", event.getDescription());
   ```



##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/api/command/user/ListWebhooksCmd.java:
##########
@@ -0,0 +1,95 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook.api.command.user;
+
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ResponseObject;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.mom.webhook.WebhookApiService;
+import org.apache.cloudstack.mom.webhook.Webhook;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookResponse;
+
+@APICommand(name = "listWebhooks",
+        description = "Lists Webhooks",
+        responseObject = WebhookResponse.class,
+        responseView = ResponseObject.ResponseView.Restricted,
+        entityType = {Webhook.class},
+        authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User},
+        since = "4.20.0")
+public class ListWebhooksCmd extends BaseListProjectAndAccountResourcesCmd {
+
+    @Inject
+    WebhookApiService webhookApiService;
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID,
+            entityType = WebhookResponse.class,
+            description = "The ID of the Webhooks")

Review Comment:
   Is this the single id of multiple webhooks? seems lika an id would be of a webhook, not webhook**s**



##########
server/src/main/java/com/cloud/projects/ProjectManagerImpl.java:
##########
@@ -163,6 +168,19 @@ public class ProjectManagerImpl extends ManagerBase implements ProjectManager, C
     private String senderAddress;
     protected SMTPMailSender mailSender;
 
+    protected List<? extends ControlledEntity> listWebhooksForProject(Project project) {
+        List<? extends ControlledEntity> webhooks = new ArrayList<>();
+        try {
+            WebhookHelper webhookService = ComponentContext.getDelegateComponentOfType(WebhookHelper.class);
+            webhooks = webhookService.listWebhooksByAccount(project.getProjectAccountId());
+        } catch (NoSuchBeanDefinitionException ignored) {
+            if (logger.isDebugEnabled()) {
+                logger.debug("No WebhookHelper bean found");
+            }

Review Comment:
   ```suggestion
               logger.debug("No WebhookHelper bean found");
   ```



##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/api/command/user/ListWebhooksCmd.java:
##########
@@ -0,0 +1,95 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook.api.command.user;
+
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ResponseObject;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.mom.webhook.WebhookApiService;
+import org.apache.cloudstack.mom.webhook.Webhook;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookResponse;
+
+@APICommand(name = "listWebhooks",
+        description = "Lists Webhooks",
+        responseObject = WebhookResponse.class,
+        responseView = ResponseObject.ResponseView.Restricted,
+        entityType = {Webhook.class},
+        authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User},
+        since = "4.20.0")
+public class ListWebhooksCmd extends BaseListProjectAndAccountResourcesCmd {
+
+    @Inject
+    WebhookApiService webhookApiService;
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID,
+            entityType = WebhookResponse.class,
+            description = "The ID of the Webhooks")

Review Comment:
   ```suggestion
       @Parameter(name = ApiConstants.ID, type = CommandType.UUID,
               entityType = WebhookResponse.class,
               description = "The ID of the Webhook")
   ```



##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/WebhookDeliveryThread.java:
##########
@@ -0,0 +1,292 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
+import java.security.InvalidKeyException;
+import java.security.KeyManagementException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import javax.crypto.Mac;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.framework.async.AsyncRpcContext;
+import org.apache.cloudstack.framework.events.Event;
+import org.apache.cloudstack.storage.command.CommandResult;
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHeaders;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.TrustAllStrategy;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicHeader;
+import org.apache.http.ssl.SSLContextBuilder;
+import org.apache.http.util.EntityUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class WebhookDeliveryThread implements Runnable {
+    protected static Logger LOGGER = LogManager.getLogger(WebhookDeliveryThread.class);
+
+    private static final String HEADER_X_CS_EVENT_ID = "X-CS-Event-ID";
+    private static final String HEADER_X_CS_EVENT = "X-CS-Event";
+    private static final String HEADER_X_CS_SIGNATURE = "X-CS-Signature";
+    private static final String PREFIX_HEADER_USER_AGENT = "CS-Hookshot/";
+    private final Webhook webhook;
+    private final Event event;
+    private CloseableHttpClient httpClient;
+    private String headers;
+    private String payload;
+    private String response;
+    private Date startTime;
+    private int deliveryRetries = 3;
+    private int deliveryTimeout = 10;
+
+    AsyncCompletionCallback<WebhookDeliveryResult> callback;
+
+    protected boolean isValidJson(String json) {
+        try {
+            new JSONObject(json);
+        } catch (JSONException ex) {
+            try {
+                new JSONArray(json);
+            } catch (JSONException ex1) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    protected void setHttpClient() throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
+        if (webhook.isSslVerification()) {
+            httpClient = HttpClients.createDefault();
+            return;
+        }
+        httpClient = HttpClients
+                .custom()
+                .setSSLContext(new SSLContextBuilder().loadTrustMaterial(null,
+                        TrustAllStrategy.INSTANCE).build())
+                .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
+                .build();
+    }
+
+    protected HttpPost getBasicHttpPostRequest() throws URISyntaxException {
+        final URI uri = new URI(webhook.getPayloadUrl());
+        HttpPost request = new HttpPost();
+        RequestConfig.Builder requestConfig = RequestConfig.custom();
+        requestConfig.setConnectTimeout(deliveryTimeout * 1000);
+        requestConfig.setConnectionRequestTimeout(deliveryTimeout * 1000);
+        requestConfig.setSocketTimeout(deliveryTimeout * 1000);
+        request.setConfig(requestConfig.build());
+        request.setURI(uri);
+        return request;
+    }
+
+    protected void updateRequestHeaders(HttpPost request) throws DecoderException, NoSuchAlgorithmException,
+            InvalidKeyException {
+        request.addHeader(HEADER_X_CS_EVENT_ID, event.getEventUuid());
+        request.addHeader(HEADER_X_CS_EVENT, event.getEventType());
+        request.setHeader(HttpHeaders.USER_AGENT, String.format("%s%s", PREFIX_HEADER_USER_AGENT,
+                event.getResourceAccountUuid()));
+        if (StringUtils.isNotBlank(webhook.getSecretKey())) {
+            request.addHeader(HEADER_X_CS_SIGNATURE, generateHMACSignature(payload, webhook.getSecretKey()));
+        }
+        List<Header> headers = new ArrayList<>(Arrays.asList(request.getAllHeaders()));
+        HttpEntity entity = request.getEntity();
+        if (entity.getContentLength() > 0 && !request.containsHeader(HttpHeaders.CONTENT_LENGTH)) {
+            headers.add(new BasicHeader(HttpHeaders.CONTENT_LENGTH, Long.toString(entity.getContentLength())));
+        }
+        if (entity.getContentType() != null && !request.containsHeader(HttpHeaders.CONTENT_TYPE)) {
+            headers.add(entity.getContentType());
+        }
+        if (entity.getContentEncoding() != null && !request.containsHeader(HttpHeaders.CONTENT_ENCODING)) {
+            headers.add(entity.getContentEncoding());
+        }
+        this.headers = StringUtils.join(headers, "\n");
+    }
+
+    public WebhookDeliveryThread(Webhook webhook, Event event,
+                                 AsyncCompletionCallback<WebhookDeliveryResult> callback) {
+        this.webhook = webhook;
+        this.event = event;
+        this.callback = callback;
+    }
+
+    public void setDeliveryRetries(int deliveryRetries) {
+        this.deliveryRetries = deliveryRetries;
+    }
+
+    public void setDeliveryTimeout(int deliveryTimeout) {
+        this.deliveryTimeout = deliveryTimeout;
+    }
+
+    @Override
+    public void run() {
+        if (LOGGER.isDebugEnabled()) {
+            LOGGER.debug("Delivering event: {} for {}", event.getEventType(), webhook);
+        }
+        if (event == null) {
+            LOGGER.warn("Invalid event received for delivering to {}", webhook);
+            return;
+        }
+        payload = event.getDescription();
+        int attempt = 0;
+        boolean success = false;
+        try {
+            setHttpClient();
+        } catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException e) {
+            response = String.format("Failed to initiate delivery due to : %s", e.getMessage());
+            callback.complete(new WebhookDeliveryResult(headers, payload, success, response, new Date()));
+            return;
+        }
+        while (attempt < deliveryRetries) {
+            attempt++;
+            if (delivery(attempt)) {
+                success = true;
+                break;
+            }
+        }
+        callback.complete(new WebhookDeliveryResult(headers, payload, success, response, startTime));
+    }
+
+    protected void updateResponseFromRequest(HttpEntity entity) {
+        try {
+            this.response =  EntityUtils.toString(entity, StandardCharsets.UTF_8);
+        } catch (IOException e) {
+            LOGGER.error("Failed to parse response for event: {} for {}",
+                    event.getEventType(), webhook);
+            this.response = "";
+        }
+    }
+
+    protected boolean delivery(int attempt) {
+        startTime = new Date();
+        try {
+            HttpPost request = getBasicHttpPostRequest();
+            StringEntity input = new StringEntity(payload,
+                    isValidJson(payload) ? ContentType.APPLICATION_JSON : ContentType.TEXT_PLAIN);
+            request.setEntity(input);
+            updateRequestHeaders(request);
+            if (LOGGER.isTraceEnabled()) {
+                LOGGER.trace("Delivering event: {} for {} with timeout: {}, " +
+                        "attempt #{}", event.getEventType(), webhook,
+                        deliveryTimeout, attempt);
+            }
+            final CloseableHttpResponse response = httpClient.execute(request);
+            updateResponseFromRequest(response.getEntity());
+            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+                if (LOGGER.isTraceEnabled()) {
+                    LOGGER.trace("Successfully delivered event: {} for {}",
+                            event.getEventType(), webhook);
+                }

Review Comment:
   ```suggestion
                   LOGGER.trace("Successfully delivered event: {} for {}",
                           event.getEventType(), webhook);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1994391436

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1998914786

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2003896031

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2155991825

   @shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2137351729

   <b>[SF] Trillian test result (tid-10310)</b>
   Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 83625 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t10310-kvm-rocky8.zip
   Smoke tests completed. 110 look OK, 23 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_events_resource | `Error` | 440.09 | test_events_resource.py
   test_01_events_resource | `Error` | 440.11 | test_events_resource.py
   ContextSuite context=TestAddVmToSubDomain>:teardown | `Error` | 45.01 | test_accounts.py
   test_DeleteDomain | `Error` | 239.94 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 410.95 | test_accounts.py
   test_forceDeleteDomain | `Error` | 410.96 | test_accounts.py
   ContextSuite context=TestNonRootAdminsPrivileges>:teardown | `Error` | 10.51 | test_accounts.py
   ContextSuite context=TestServiceOfferingHierarchy>:teardown | `Error` | 3.42 | test_accounts.py
   ContextSuite context=TestServiceOfferingSiblings>:teardown | `Error` | 3.50 | test_accounts.py
   ContextSuite context=TestTemplateHierarchy>:teardown | `Error` | 4.57 | test_accounts.py
   ContextSuite context=TestUserAPIKeys>:teardown | `Error` | 3.14 | test_accounts.py
   test_LoginApiDomain | `Error` | 5.75 | test_accounts.py
   test_01_create_list_domain_account_project | `Error` | 8.28 | test_create_list_domain_account_project.py
   ContextSuite context=TestListAccounts>:teardown | `Error` | 4.43 | test_list_accounts.py
   test_deploy_more_vms_than_limit_allows | `Error` | 137.79 | test_deploy_vms_in_parallel.py
   test_04_list_domains_level_filter | `Failure` | 0.20 | test_list_domains.py
   test_05_list_domains_no_filter | `Failure` | 0.24 | test_list_domains.py
   ContextSuite context=TestListDomains>:teardown | `Error` | 3.54 | test_list_domains.py
   ContextSuite context=TestDomainsDiskOfferings>:teardown | `Error` | 23.06 | test_domain_disk_offerings.py
   ContextSuite context=TestListVolumes>:teardown | `Error` | 17.91 | test_list_volumes.py
   ContextSuite context=TestDomainsNetworkOfferings>:teardown | `Error` | 20.16 | test_domain_network_offerings.py
   ContextSuite context=TestDomainsServiceOfferings>:teardown | `Error` | 380.36 | test_domain_service_offerings.py
   ContextSuite context=TestDomainsVpcOfferings>:teardown | `Error` | 191.29 | test_domain_vpc_offerings.py
   test_01_disable_account_settings_for_domain | `Error` | 5.95 | test_enable_account_settings_for_domain.py
   test_02_enable_account_settings_for_domain | `Error` | 6.24 | test_enable_account_settings_for_domain.py
   test_03_enable_account_settings_for_domain | `Error` | 5.75 | test_enable_account_settings_for_domain.py
   ContextSuite context=TestHostControlState>:teardown | `Error` | 39.93 | test_host_control_state.py
   ContextSuite context=TestImportAndUnmanageVolumes>:teardown | `Error` | 33.87 | test_import_unmanage_volumes.py
   ContextSuite context=TestNetworkPermissions>:teardown | `Error` | 18.38 | test_network_permissions.py
   ContextSuite context=TestNonStrictAffinityGroups>:teardown | `Error` | 189.12 | test_nonstrict_affinity_group.py
   ContextSuite context=TestCrossDomainAccountAdd>:teardown | `Error` | 6.63 | test_projects.py
   test_04_delete_domain_with_project | `Error` | 2.26 | test_projects.py
   test_CRUD_operations_userdata | `Error` | 5.76 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata | `Error` | 5.78 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_allow | `Error` | 5.45 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_append | `Error` | 5.67 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_deny | `Error` | 5.75 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_params | `Error` | 5.48 | test_register_userdata.py
   test_link_and_unlink_userdata_to_template | `Error` | 5.62 | test_register_userdata.py
   test_user_userdata_crud | `Error` | 5.70 | test_register_userdata.py
   ContextSuite context=TestRAMCPUResourceAccounting>:teardown | `Error` | 150.71 | test_resource_accounting.py
   ContextSuite context=TestVmAutoScaling>:setup | `Error` | 0.00 | test_vm_autoscaling.py
   ContextSuite context=TestVnfTemplates>:teardown | `Error` | 3.40 | test_vnf_templates.py
   test_01_webhook_deliveries | `Error` | 7.28 | test_webhook_delivery.py
   test_04_create_webhook_domainadmin_local | `Error` | 5.67 | test_webhook_lifecycle.py
   test_05_create_webhook_domainadmin_subdomain | `Error` | 6.60 | test_webhook_lifecycle.py
   test_06_create_webhook_domainadmin_global_negative | `Error` | 5.61 | test_webhook_lifecycle.py
   test_07_create_webhook_user_local | `Error` | 5.29 | test_webhook_lifecycle.py
   test_08_create_webhook_user_domain | `Error` | 5.11 | test_webhook_lifecycle.py
   test_09_create_webhook_user_gloabl | `Error` | 5.13 | test_webhook_lifecycle.py
   test_10_create_webhook_admin_advanced | `Error` | 5.01 | test_webhook_lifecycle.py
   test_11_update_webhook | `Error` | 5.12 | test_webhook_lifecycle.py
   test_12_list_user_webhook_deliveries | `Error` | 10.57 | test_webhook_lifecycle.py
   test_13_webhook_execute_delivery | `Error` | 5.88 | test_webhook_lifecycle.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154697677

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1584139253


##########
engine/schema/src/main/resources/META-INF/db/schema-41900to42000.sql:
##########
@@ -79,3 +78,46 @@ CREATE TABLE IF NOT EXISTS `cloud_usage`.`quota_email_configuration`(
     PRIMARY KEY (`account_id`, `email_template_id`),
     CONSTRAINT `FK_quota_email_configuration_account_id` FOREIGN KEY (`account_id`) REFERENCES `cloud_usage`.`quota_account`(`account_id`),
     CONSTRAINT `FK_quota_email_configuration_email_template_id` FOREIGN KEY (`email_template_id`) REFERENCES `cloud_usage`.`quota_email_templates`(`id`));
+
+-- Webhooks feature
+DROP TABLE IF EXISTS `cloud`.`webhook`;
+CREATE TABLE `cloud`.`webhook` (
+  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id of the webhook',
+  `uuid` varchar(255) COMMENT 'uuid of the webhook',
+  `name` varchar(255) NOT NULL COMMENT 'name of the webhook',
+  `description` varchar(4096) COMMENT 'description for the webhook',
+  `state` char(32) NOT NULL COMMENT 'state of the webhook - Enabled or Disabled',
+  `domain_id` bigint unsigned NOT NULL COMMENT 'id of the owner domain of the webhook',
+  `account_id` bigint unsigned NOT NULL COMMENT 'id of the owner account of the webhook',
+  `payload_url` varchar(255) COMMENT 'payload URL for the webhook',
+  `secret_key` varchar(255) COMMENT 'secret key for the webhook',
+  `ssl_verification` boolean COMMENT 'for https payload url, if true then strict ssl verification',
+  `scope` char(32) NOT NULL COMMENT 'scope for the webhook - Local, Domain, Global',
+  `created` datetime COMMENT 'date the webhook was created',
+  `removed` datetime COMMENT 'date removed if not null',
+  `generated_removed` BIGINT(15) GENERATED ALWAYS AS (IF(removed IS NULL, 0, TIMESTAMPDIFF(SECOND, from_unixtime(0), removed))),

Review Comment:
   ```suggestion
     `generated_removed` BIGINT(15) GENERATED ALWAYS AS (IF(removed IS NULL, 0, TIMESTAMPDIFF(SECOND, from_unixtime(0), removed))) PERSISTENT,
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr closed pull request #8674: feature: webhooks
URL: https://github.com/apache/cloudstack/pull/8674


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2144363833

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154700413

   @DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2155044331

   @shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154495857

   Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 9818


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1968795053

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8809


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2005592013

   <b>[SF] Trillian test result (tid-9511)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 52275 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9511-kvm-centos7.zip
   Smoke tests completed. 131 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2033454192

   <b>[SF] Trillian test result (tid-9666)</b>
   Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 49849 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9666-xenserver-71.zip
   Smoke tests completed. 129 look OK, 0 have errors, 2 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   all_test_human_readable_logs | `Skipped` | --- | test_human_readable_logs.py
   all_test_image_store_object_migration | `Skipped` | --- | test_image_store_object_migration.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2031960027

   @blueorangutan test matrix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2031743392

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2033532045

   <b>[SF] Trillian test result (tid-9667)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 56083 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9667-vmware-67u3.zip
   Smoke tests completed. 130 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_balanced_drs_algorithm | `Error` | 451.54 | test_cluster_drs.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2042084318

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2042550964

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1976800991

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1978283558

   <b>[SF] Trillian test result (tid-9390)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 51048 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t9390-kvm-centos7.zip
   Smoke tests completed. 128 look OK, 3 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_list_cpvm_vm | `Failure` | 0.03 | test_ssvm.py
   test_04_cpvm_internals | `Failure` | 0.03 | test_ssvm.py
   test_12_destroy_cpvm | `Error` | 3.16 | test_ssvm.py
   test_01_webhook_deliveries | `Error` | 6.39 | test_webhook_delivery.py
   test_12_list_user_webhook_deliveries | `Error` | 9.43 | test_webhook_lifecycle.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1524469107


##########
plugins/event-bus/webhook/src/main/java/org/apache/cloudstack/mom/webhook/WebhookApiServiceImpl.java:
##########
@@ -0,0 +1,533 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.mom.webhook;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.apache.cloudstack.acl.SecurityChecker;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.mom.webhook.api.command.user.CreateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.DeleteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ExecuteWebhookDeliveryCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhookDeliveriesCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.ListWebhooksCmd;
+import org.apache.cloudstack.mom.webhook.api.command.user.UpdateWebhookCmd;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookDeliveryResponse;
+import org.apache.cloudstack.mom.webhook.api.response.WebhookResponse;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookDeliveryJoinDao;
+import org.apache.cloudstack.mom.webhook.dao.WebhookJoinDao;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookDeliveryVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookJoinVO;
+import org.apache.cloudstack.mom.webhook.vo.WebhookVO;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import com.cloud.api.ApiResponseHelper;
+import com.cloud.cluster.ManagementServerHostVO;
+import com.cloud.cluster.dao.ManagementServerHostDao;
+import com.cloud.domain.Domain;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.projects.Project;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.utils.Pair;
+import com.cloud.utils.Ternary;
+import com.cloud.utils.UriUtils;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.utils.rest.HttpConstants;
+
+public class WebhookApiServiceImpl extends ManagerBase implements WebhookApiService {
+
+    @Inject
+    AccountManager accountManager;
+    @Inject
+    DomainDao domainDao;
+    @Inject
+    WebhookDao webhookDao;
+    @Inject
+    WebhookJoinDao webhookJoinDao;
+    @Inject
+    WebhookDeliveryDao webhookDeliveryDao;
+    @Inject
+    WebhookDeliveryJoinDao webhookDeliveryJoinDao;
+    @Inject
+    ManagementServerHostDao managementServerHostDao;
+    @Inject
+    WebhookService webhookService;
+
+    protected WebhookResponse createWebhookResponse(WebhookJoinVO webhookVO) {
+        WebhookResponse response = new WebhookResponse();
+        response.setObjectName("webhook");
+        response.setId(webhookVO.getUuid());
+        response.setName(webhookVO.getName());
+        response.setDescription(webhookVO.getDescription());
+        ApiResponseHelper.populateOwner(response, webhookVO);
+        response.setState(webhookVO.getState().toString());
+        response.setPayloadUrl(webhookVO.getPayloadUrl());
+        response.setSecretKey(webhookVO.getSecretKey());
+        response.setSslVerification(webhookVO.isSslVerification());
+        response.setScope(webhookVO.getScope().toString());
+        response.setCreated(webhookVO.getCreated());
+        return response;
+    }
+
+    protected List<Long> getIdsOfAccessibleWebhooks(Account caller) {
+        if (Account.Type.ADMIN.equals(caller.getType())) {
+            return new ArrayList<>();
+        }
+        String domainPath = null;
+        if (Account.Type.DOMAIN_ADMIN.equals(caller.getType())) {
+            Domain domain = domainDao.findById(caller.getDomainId());
+            domainPath = domain.getPath();
+        }
+        List<WebhookJoinVO> webhooks = webhookJoinDao.listByAccountOrDomain(caller.getId(), domainPath);
+        return webhooks.stream().map(WebhookJoinVO::getId).collect(Collectors.toList());
+    }
+
+    protected ManagementServerHostVO basicWebhookDeliveryApiCheck(Account caller, final Long id, final Long webhookId,

Review Comment:
   This is protected to allow adding unit tests



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2068656205

   @kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082475422

   <b>[LL] Trillian Build Failed (tid-6919)<b/>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2088479101

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9506


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2084598314

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2094918610

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1953459635

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1964500425

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8793


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2314363474

   @btzq that Type showing as `Health check` is a UI thing. If you check the API response it will have proper type,
   
   ```
       "listeventsresponse": {
           "count": 1,
           "event": [
               {
                   "id": "36c995da-7b14-4083-9164-c486c7796b8c",
                   "username": "system",
                   "type": "ROUTER.HEALTH.CHECKS",
                   "level": "INFO",
                   "description": "Router r-9-VM / 9974ef30-b2fe-4c05-a2e3-57d3cfaf0b4b has failing checks: gateways_check.py",
                   "account": "system",
                   "domainid": "62a64961-4b15-11ef-953b-1e0054000142",
                   "domain": "ROOT",
                   "resourceid": "9974ef30-b2fe-4c05-a2e3-57d3cfaf0b4b",
                   "resourcetype": "DomainRouter",
                   "resourcename": "r-9-VM",
                   "created": "2024-08-28T05:13:46+0000",
                   "state": "Completed"
               }
           ]
       }
   ```
   
   Maybe test creating a Global webhook and try there


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "btzq (via GitHub)" <gi...@apache.org>.
btzq commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2314359661

   @shwstppr under events, i only could find this:
   
   ![Screenshot 2024-08-28 at 1 38 10 PM](https://github.com/user-attachments/assets/5576df23-5ce2-4295-9901-1a66550979f0)
   
   But it seems to be under (Level = INFO) (Type = Health Check)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1961182833

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8752


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2042085360

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1964318842

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1967386184

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2056789513

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9260


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2056624511

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2068796535

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9355


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2084742163

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9476


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2088396306

   Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 9504


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2144365768

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082546701

   <b>[LL] Trillian Build Failed (tid-6920)<b/>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2082779518

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9467


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2094939161

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9538


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2156232944

   <b>[SF] Trillian test result (tid-10394)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 44993 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8674-t10394-kvm-centos7.zip
   Smoke tests completed. 134 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on code in PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#discussion_r1636188101


##########
api/src/main/java/org/apache/cloudstack/api/response/BucketResponse.java:
##########
@@ -98,7 +98,7 @@ public class BucketResponse extends BaseResponseWithTagInformation implements Co
     @Param(description = "Bucket Access Key")
     private String accessKey;
 
-    @SerializedName(ApiConstants.SECRET_KEY)
+    @SerializedName(ApiConstants.USER_SECRET_KEY)

Review Comment:
   same as https://github.com/apache/cloudstack/pull/8674#discussion_r1636187875



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1977217978

   @shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1976046821

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2031744781

   @shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1998913916

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1998968210

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8943


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-1955974621

   > @shwstppr do you have any description of the feature?
   
   @GutoVeronezi yes, I've added a feature spec at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Webhooks
   This is still in WIP so some specific details may change over time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154483545

   @rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2154481478

   
   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feature: webhooks [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #8674:
URL: https://github.com/apache/cloudstack/pull/8674#issuecomment-2152294081

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org