You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/04/03 03:43:55 UTC

[GitHub] [cloudstack] nvazquez opened a new pull request #6104: Direct download certificates additions and improvements

nvazquez opened a new pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104


   ### Description
   
   This PR adds some improvements around the direct download functionality:
   - Add a new API for certificates listing
   - Add a new API to provision an uploaded certificate to a host
   - Refactor the revokeTemplateDirectDownloadCertificate API
   - Refactor the uploadTemplateDirectDownloadCertificate API
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### 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?
   


-- 
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



[GitHub] [cloudstack] nvazquez commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r835493076



##########
File path: server/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadManagerImpl.java
##########
@@ -475,48 +486,55 @@ public boolean uploadCertificateToHosts(String certificateCer, String alias, Str
             certificateVO = directDownloadCertificateDao.findByAlias(alias, hypervisorType, zoneId);
             if (certificateVO == null) {
                 s_logger.info("Certificate must be uploaded on zone " + zoneId);
-                return false;
+                return new ArrayList<>();
             }
         }
 
         s_logger.info("Attempting to upload certificate: " + alias + " to " + hosts.size() + " hosts on zone " + zoneId);
-        int hostCount = 0;
+        int success = 0;
+        int failed = 0;
+        List<HostCertificateStatus> results = new ArrayList<>();
         if (CollectionUtils.isNotEmpty(hosts)) {
             for (HostVO host : hosts) {
-                if (!uploadCertificate(certificateVO.getId(), host.getId())) {
-                    String msg = "Could not upload certificate " + alias + " on host: " + host.getName() + " (" + host.getUuid() + ")";
+                if (host == null) {
+                    continue;
+                }
+                HostCertificateStatus hostStatus;
+                Pair<Boolean, String> result = provisionCertificate(certificateVO.getId(), host.getId());
+                if (!result.first()) {
+                    String msg = "Could not upload certificate " + alias + " on host: " + host.getName() + " (" + host.getUuid() + "): " + result.second();
                     s_logger.error(msg);
-                    throw new CloudRuntimeException(msg);
+                    failed++;

Review comment:
       Yes, there is a new API for provisioning certificate to a host




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084400185


   @weizhouapache a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068297776


   @nvazquez a 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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r829060148



##########
File path: server/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadManagerImpl.java
##########
@@ -19,6 +19,10 @@
 package org.apache.cloudstack.direct.download;
 
 import static com.cloud.storage.Storage.ImageFormat;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.FAILED;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.REVOKED;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.SKIPPED;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.UPLOADED;

Review comment:
       possible to import _org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus_ , and use the status enums ?




-- 
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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r825848142



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificasCmd.java
##########
@@ -0,0 +1,98 @@
+// 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.api.command.admin.direct.download;
+
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificate;
+import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+@APICommand(name = ListTemplateDirectDownloadCertificasCmd.APINAME,
+        description = "List the uploaded direct download certificates",
+        responseObject = DirectDownloadCertificateResponse.class,
+        since = "4.17.0",
+        authorized = {RoleType.Admin})
+public class ListTemplateDirectDownloadCertificasCmd extends BaseListCmd {

Review comment:
       ```suggestion
   public class ListTemplateDirectDownloadCertificatesCmd extends BaseListCmd {
   ```




-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1079263592


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1082429711


   <b>Trillian test result (tid-3751)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 34845 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6104-t3751-kvm-centos7.zip
   Smoke tests completed. 91 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_upload_direct_download_certificates | `Failure` | 1.53 | test_direct_download.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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1083408879


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1080398794


   @DaanHoogland a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1083590172


   @weizhouapache a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084528353


   <b>Trillian Build Failed (tid-3776)<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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066789124


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2867


-- 
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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r825850542



##########
File path: api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateResponse.java
##########
@@ -0,0 +1,88 @@
+// 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.api.response;
+
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificate;
+
+@EntityReference(value = DirectDownloadCertificate.class)
+public class DirectDownloadCertificateResponse extends BaseResponse {
+
+    @SerializedName(ApiConstants.ID)
+    @Param(description = "the direct download certificate id")
+    private String id;
+
+    @SerializedName(ApiConstants.ALIAS)
+    @Param(description = "the direct download certificate alias")
+    private String alias;
+
+    @SerializedName(ApiConstants.ZONE_ID)
+    @Param(description = "the zone id where the certificate is uploaded")
+    private String zoneId;
+
+    @SerializedName(ApiConstants.CERTIFICATE)
+    @Param(description = "the direct download certifica")

Review comment:
       ```suggestion
       @Param(description = "the direct download certificate")
   ```




-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1070331601


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1086895498


   <b>Trillian test result (tid-3800)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 30862 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6104-t3800-kvm-centos7.zip
   Smoke tests completed. 92 look OK, 0 have errors
   Only failed 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1070353769


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1070331844


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1071285977


   <b>Trillian test result (tid-3651)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 48147 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6104-t3651-kvm-centos7.zip
   Smoke tests completed. 89 look OK, 3 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_upload_direct_download_certificates | `Failure` | 1.59 | test_direct_download.py
   test_01_create_volume | `Failure` | 1564.21 | test_volumes.py
   test_02_redundant_VPC_default_routes | `Failure` | 337.78 | test_vpc_redundant.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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066277283


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 2858


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066631456


   @nvazquez a 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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r825850034



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificasCmd.java
##########
@@ -0,0 +1,98 @@
+// 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.api.command.admin.direct.download;
+
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificate;
+import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+@APICommand(name = ListTemplateDirectDownloadCertificasCmd.APINAME,
+        description = "List the uploaded direct download certificates",
+        responseObject = DirectDownloadCertificateResponse.class,
+        since = "4.17.0",
+        authorized = {RoleType.Admin})
+public class ListTemplateDirectDownloadCertificasCmd extends BaseListCmd {
+
+    @Inject
+    DirectDownloadManager directDownloadManager;
+
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class,
+            description = "list direct download certificate by ID")
+    private Long id;
+
+    @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class,
+            description = "the zone where certificates are uploaded")
+    private Long zoneId;
+
+    private static final Logger LOG = Logger.getLogger(ListTemplateDirectDownloadCertificasCmd.class);
+    public static final String APINAME = "listTemplateDirectDownloadCertificates";
+
+    private void createResponse(final List<DirectDownloadCertificate> certificates) {
+        final ListResponse<DirectDownloadCertificateResponse> response = new ListResponse<>();
+        final List<DirectDownloadCertificateResponse> responses = new ArrayList<>();
+        for (final DirectDownloadCertificate certificate : certificates) {
+            if (certificate == null) {
+                continue;
+            }
+            DirectDownloadCertificateResponse certificateResponse = _responseGenerator.createDirectDownloadCertificateResponse(certificate);
+            responses.add(certificateResponse);
+        }
+        response.setResponses(responses);
+        response.setResponseName(getCommandName());
+        setResponseObject(response);
+    }
+
+    @Override
+    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException {
+        if (id == null && zoneId == null) {
+            throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Please specify a direct download id or a zone id for listing certificates");

Review comment:
       ```suggestion
               throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Please specify a direct download certificate id or a zone id for listing certificates");
   ```




-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068297407


   @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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068732322


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066689024


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 2865


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066747855


   @nvazquez a 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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066746900


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1070352560


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2912


-- 
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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r829052612



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java
##########
@@ -0,0 +1,110 @@
+// 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.api.command.admin.direct.download;
+
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateHostMapResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificate;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificateHostMap;
+import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+@APICommand(name = ListTemplateDirectDownloadCertificatesCmd.APINAME,
+        description = "List the uploaded direct download certificates",

Review comment:
       ```suggestion
           description = "List the uploaded certificates for direct download templates",
   ```




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068732623


   @nvazquez a 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



[GitHub] [cloudstack] weizhouapache commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084265901


   @blueorangutan ubuntu20 kvm-ubuntu20


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1083440566


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3028


-- 
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



[GitHub] [cloudstack] nvazquez closed pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez closed pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104


   


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1071285977


   <b>Trillian test result (tid-3651)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 48147 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6104-t3651-kvm-centos7.zip
   Smoke tests completed. 89 look OK, 3 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_upload_direct_download_certificates | `Failure` | 1.59 | test_direct_download.py
   test_01_create_volume | `Failure` | 1564.21 | test_volumes.py
   test_02_redundant_VPC_default_routes | `Failure` | 337.78 | test_vpc_redundant.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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1070353310


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066276422


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066300384


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2859


-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066631077


   @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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068236730


   @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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1081802775


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084391778


   @weizhouapache a Trillian-Jenkins test job (ubuntu20 mgmt + kvm-ubuntu20) 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084455818


   <b>Trillian Build Failed (tid-3775)<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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1083409675


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084441925


   <b>Trillian Build Failed (tid-3774)<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



[GitHub] [cloudstack] DaanHoogland commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1080397685


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1085045554


   <b>Trillian test result (tid-3773)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 32500 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6104-t3773-kvm-centos7.zip
   Smoke tests completed. 91 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_upload_direct_download_certificates | `Failure` | 1.69 | test_direct_download.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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1086770299


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1086788387


   @nvazquez a 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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r829052612



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java
##########
@@ -0,0 +1,110 @@
+// 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.api.command.admin.direct.download;
+
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateHostMapResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificate;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificateHostMap;
+import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+@APICommand(name = ListTemplateDirectDownloadCertificatesCmd.APINAME,
+        description = "List the uploaded direct download certificates",

Review comment:
       ```suggestion
           description = "List the uploaded certificates for direct download templates",
   ```

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java
##########
@@ -0,0 +1,110 @@
+// 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.api.command.admin.direct.download;
+
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateHostMapResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificate;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificateHostMap;
+import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+@APICommand(name = ListTemplateDirectDownloadCertificatesCmd.APINAME,
+        description = "List the uploaded direct download certificates",

Review comment:
       whatever applicable.
   
   ```suggestion
           description = "List the uploaded certificates for direct download templates",
   ```
   
   (or)
   
   
   ```suggestion
           description = "List the uploaded direct download certificates of templates",
   ```

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/RevokeTemplateDirectDownloadCertificateCmd.java
##########
@@ -28,39 +28,40 @@
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
 import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
 import org.apache.cloudstack.api.response.HostResponse;
-import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateHostStatusResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus;
 import org.apache.log4j.Logger;
 
 import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
 
 @APICommand(name = RevokeTemplateDirectDownloadCertificateCmd.APINAME,
-        description = "Revoke a certificate alias from a KVM host",
-        responseObject = SuccessResponse.class,
-        requestHasSensitiveInfo = true,
-        responseHasSensitiveInfo = true,
+        description = "Revoke a certificate from hosts in a zone",

Review comment:
       ```suggestion
           description = "Revoke a direct download certificate from hosts in a zone",
   ```

##########
File path: engine/schema/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadCertificateHostMapVO.java
##########
@@ -25,12 +25,12 @@
 
 @Entity
 @Table(name = "direct_download_certificate_host_map")
-public class DirectDownloadCertificateHostMapVO {
+public class DirectDownloadCertificateHostMapVO implements DirectDownloadCertificateHostMap{

Review comment:
       ```suggestion
   public class DirectDownloadCertificateHostMapVO implements DirectDownloadCertificateHostMap {
   ```

##########
File path: server/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadManagerImpl.java
##########
@@ -19,6 +19,10 @@
 package org.apache.cloudstack.direct.download;
 
 import static com.cloud.storage.Storage.ImageFormat;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.FAILED;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.REVOKED;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.SKIPPED;
+import static org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus.UPLOADED;

Review comment:
       possible to import _org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus.CertificateStatus_ , and use the status enums ?

##########
File path: server/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadManagerImpl.java
##########
@@ -475,48 +486,55 @@ public boolean uploadCertificateToHosts(String certificateCer, String alias, Str
             certificateVO = directDownloadCertificateDao.findByAlias(alias, hypervisorType, zoneId);
             if (certificateVO == null) {
                 s_logger.info("Certificate must be uploaded on zone " + zoneId);
-                return false;
+                return new ArrayList<>();
             }
         }
 
         s_logger.info("Attempting to upload certificate: " + alias + " to " + hosts.size() + " hosts on zone " + zoneId);
-        int hostCount = 0;
+        int success = 0;
+        int failed = 0;
+        List<HostCertificateStatus> results = new ArrayList<>();
         if (CollectionUtils.isNotEmpty(hosts)) {
             for (HostVO host : hosts) {
-                if (!uploadCertificate(certificateVO.getId(), host.getId())) {
-                    String msg = "Could not upload certificate " + alias + " on host: " + host.getName() + " (" + host.getUuid() + ")";
+                if (host == null) {
+                    continue;
+                }
+                HostCertificateStatus hostStatus;
+                Pair<Boolean, String> result = provisionCertificate(certificateVO.getId(), host.getId());
+                if (!result.first()) {
+                    String msg = "Could not upload certificate " + alias + " on host: " + host.getName() + " (" + host.getUuid() + "): " + result.second();
                     s_logger.error(msg);
-                    throw new CloudRuntimeException(msg);
+                    failed++;

Review comment:
       failed ones can be re-provisioned later ? any retry attempt here ?




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066664260


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2864


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066686400


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1079291117


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2989


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1081058400


   <b>Trillian test result (tid-3735)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35637 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6104-t3735-kvm-centos7.zip
   Smoke tests completed. 87 look OK, 5 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_upload_direct_download_certificates | `Failure` | 1.55 | test_direct_download.py
   test_01_add_primary_storage_disabled_host | `Error` | 0.70 | test_primary_storage.py
   test_01_primary_storage_nfs | `Error` | 0.14 | test_primary_storage.py
   ContextSuite context=TestStorageTags>:setup | `Error` | 0.25 | test_primary_storage.py
   test_01_secure_vm_migration | `Error` | 150.16 | test_vm_life_cycle.py
   test_02_unsecure_vm_migration | `Error` | 272.03 | test_vm_life_cycle.py
   test_03_secured_to_nonsecured_vm_migration | `Error` | 141.91 | test_vm_life_cycle.py
   test_08_migrate_vm | `Error` | 43.74 | test_vm_life_cycle.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 9.46 | test_snapshots.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 9.46 | test_snapshots.py
   test_hostha_kvm_host_degraded | `Error` | 696.14 | test_hostha_kvm.py
   test_hostha_kvm_host_fencing | `Error` | 674.87 | test_hostha_kvm.py
   test_hostha_kvm_host_recovering | `Error` | 700.50 | test_hostha_kvm.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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1086770130


   @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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084866013


   @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



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084441925






-- 
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



[GitHub] [cloudstack] weizhouapache commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1083588878


   
   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068271859


   Packaging result: :heavy_multiplication_x: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_multiplication_x: suse15. SL-JID 2890


-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066685884


   @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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r829061612



##########
File path: server/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadManagerImpl.java
##########
@@ -475,48 +486,55 @@ public boolean uploadCertificateToHosts(String certificateCer, String alias, Str
             certificateVO = directDownloadCertificateDao.findByAlias(alias, hypervisorType, zoneId);
             if (certificateVO == null) {
                 s_logger.info("Certificate must be uploaded on zone " + zoneId);
-                return false;
+                return new ArrayList<>();
             }
         }
 
         s_logger.info("Attempting to upload certificate: " + alias + " to " + hosts.size() + " hosts on zone " + zoneId);
-        int hostCount = 0;
+        int success = 0;
+        int failed = 0;
+        List<HostCertificateStatus> results = new ArrayList<>();
         if (CollectionUtils.isNotEmpty(hosts)) {
             for (HostVO host : hosts) {
-                if (!uploadCertificate(certificateVO.getId(), host.getId())) {
-                    String msg = "Could not upload certificate " + alias + " on host: " + host.getName() + " (" + host.getUuid() + ")";
+                if (host == null) {
+                    continue;
+                }
+                HostCertificateStatus hostStatus;
+                Pair<Boolean, String> result = provisionCertificate(certificateVO.getId(), host.getId());
+                if (!result.first()) {
+                    String msg = "Could not upload certificate " + alias + " on host: " + host.getName() + " (" + host.getUuid() + "): " + result.second();
                     s_logger.error(msg);
-                    throw new CloudRuntimeException(msg);
+                    failed++;

Review comment:
       failed ones can be re-provisioned later ? any retry attempt here ?




-- 
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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r829055812



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/RevokeTemplateDirectDownloadCertificateCmd.java
##########
@@ -28,39 +28,40 @@
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiErrorCode;
 import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
 import org.apache.cloudstack.api.response.HostResponse;
-import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateHostStatusResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.cloudstack.context.CallContext;
 import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.cloudstack.direct.download.DirectDownloadManager.HostCertificateStatus;
 import org.apache.log4j.Logger;
 
 import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
 
 @APICommand(name = RevokeTemplateDirectDownloadCertificateCmd.APINAME,
-        description = "Revoke a certificate alias from a KVM host",
-        responseObject = SuccessResponse.class,
-        requestHasSensitiveInfo = true,
-        responseHasSensitiveInfo = true,
+        description = "Revoke a certificate from hosts in a zone",

Review comment:
       ```suggestion
           description = "Revoke a direct download certificate from hosts in a zone",
   ```




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1081803289


   @nvazquez a 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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1083375491


   @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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084795465


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084866622


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1081351304


   <b>Trillian Build Failed (tid-3744)<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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1086774112


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3059


-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066276198


   @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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066282103


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1066282202


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068237529


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068750689


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2899


-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1069208939


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1079263784


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084397776


   <b>Trillian Build Failed (tid-3772)<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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1083898624


   <b>Trillian test result (tid-3767)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 15094 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6104-t3767-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_root_resize.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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r829052612



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java
##########
@@ -0,0 +1,110 @@
+// 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.api.command.admin.direct.download;
+
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.NetworkRuleConflictException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import org.apache.cloudstack.acl.RoleType;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateHostMapResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.DirectDownloadCertificateResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificate;
+import org.apache.cloudstack.direct.download.DirectDownloadCertificateHostMap;
+import org.apache.cloudstack.direct.download.DirectDownloadManager;
+import org.apache.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.List;
+
+@APICommand(name = ListTemplateDirectDownloadCertificatesCmd.APINAME,
+        description = "List the uploaded direct download certificates",

Review comment:
       whatever applicable.
   
   ```suggestion
           description = "List the uploaded certificates for direct download templates",
   ```
   
   (or)
   
   
   ```suggestion
           description = "List the uploaded direct download certificates of templates",
   ```




-- 
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



[GitHub] [cloudstack] weizhouapache commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084399593


   @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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084848338


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 3044


-- 
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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1086788298


   @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



[GitHub] [cloudstack] weizhouapache removed a comment on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
weizhouapache removed a comment on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084265901


   @blueorangutan ubuntu20 kvm-ubuntu20


-- 
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



[GitHub] [cloudstack] weizhouapache commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084391134


   
   @blueorangutan test ubuntu20 kvm-ubuntu20
   
   


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1086770320


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084796431


   @nvazquez a 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



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1084528353


   <b>Trillian Build Failed (tid-3776)<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



[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on a change in pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#discussion_r829058149



##########
File path: engine/schema/src/main/java/org/apache/cloudstack/direct/download/DirectDownloadCertificateHostMapVO.java
##########
@@ -25,12 +25,12 @@
 
 @Entity
 @Table(name = "direct_download_certificate_host_map")
-public class DirectDownloadCertificateHostMapVO {
+public class DirectDownloadCertificateHostMapVO implements DirectDownloadCertificateHostMap{

Review comment:
       ```suggestion
   public class DirectDownloadCertificateHostMapVO implements DirectDownloadCertificateHostMap {
   ```




-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Add direct download certificates listing

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1068335850


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2891


-- 
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



[GitHub] [cloudstack] blueorangutan commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1081348618


   @nvazquez a 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



[GitHub] [cloudstack] nvazquez commented on pull request #6104: Direct download certificates additions and improvements

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6104:
URL: https://github.com/apache/cloudstack/pull/6104#issuecomment-1081348200


   @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