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 2021/08/10 10:08:10 UTC

[GitHub] [cloudstack] bicrxm opened a new pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

bicrxm opened a new pull request #5215:
URL: https://github.com/apache/cloudstack/pull/5215


   This PR is a part of GSoC 2021 Idea: Support Multiple SSH Keys for VMs. Changes are made in the API part so that at the time of Resetting the SSH keys we can give list of keys as input and reset the keys. Previously CloudStack has the ability to support only single SSH key. (In the next half of GSoC I will make changes to support multiple keys at the time of deployment, and the corresponding changes will be made in UI)
   
   These are the changes I suggest. 
   1. ResetVMSSHKeyCmd can hold list of names as input.
   2. UserVmManagerImpl will find key-pairs using the list of key-pair-names.
   3. findbynames method added in SSHKeyPairDao to find keypairs with the list of names.
   4. sshPublicKeys of multiple sshkeypairs are added into a single string.
   5. keypairnames are added into a single string, and added as a detail in vmdetails.
   6. keypairnames from the vmdetails are set in the UserVmResponse.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani edited a comment on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

Posted by GitBox <gi...@apache.org>.
davidjumani edited a comment on pull request #5215:
URL: https://github.com/apache/cloudstack/pull/5215#issuecomment-896691889


   @bicrxm There appears to be an SQL error, please fix it and push the changes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @bicrxm There appears to be an SQL error, please it and push the changes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   <b>Trillian test result (tid-1652)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 13747 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5215-t1652-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
   Intermittent failure detected: /marvin/tests/smoke/test_affinity_groups_projects.py
   Intermittent failure detected: /marvin/tests/smoke/test_affinity_groups.py
   Intermittent failure detected: /marvin/tests/smoke/test_async_job.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_extra_config_data.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_iso.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_root_resize.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vms_with_varied_deploymentplanners.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_with_userdata.py
   Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
   Intermittent failure detected: /marvin/tests/smoke/test_direct_download.py
   Intermittent failure detected: /marvin/tests/smoke/test_domain_service_offerings.py
   Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_list_ids_parameter.py
   Intermittent failure detected: /marvin/tests/smoke/test_loadbalance.py
   Intermittent failure detected: /marvin/tests/smoke/test_metrics_api.py
   Intermittent failure detected: /marvin/tests/smoke/test_migration.py
   Intermittent failure detected: /marvin/tests/smoke/test_multipleips_per_nic.py
   Intermittent failure detected: /marvin/tests/smoke/test_network_acl.py
   Intermittent failure detected: /marvin/tests/smoke/test_network.py
   Intermittent failure detected: /marvin/tests/smoke/test_nic.py
   Intermittent failure detected: /marvin/tests/smoke/test_password_server.py
   Intermittent failure detected: /marvin/tests/smoke/test_persistent_network.py
   Intermittent failure detected: /marvin/tests/smoke/test_portforwardingrules.py
   Intermittent failure detected: /marvin/tests/smoke/test_primary_storage.py
   Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
   Intermittent failure detected: /marvin/tests/smoke/test_projects.py
   Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
   Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
   Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
   Intermittent failure detected: /marvin/tests/smoke/test_router_dns.py
   Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers.py
   Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
   Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
   Intermittent failure detected: /marvin/tests/smoke/test_templates.py
   Intermittent failure detected: /marvin/tests/smoke/test_usage_events.py
   Intermittent failure detected: /marvin/tests/smoke/test_usage.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_deployment_planner.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_snapshots.py
   Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
   Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
   Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
   Smoke tests completed. 39 look OK, 50 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Error` | 50.11 | test_internal_lb.py
   test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Error` | 88.98 | test_internal_lb.py
   test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 61.02 | test_internal_lb.py
   test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 82.66 | test_internal_lb.py
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 2.78 | test_accounts.py
   test_DeleteDomain | `Error` | 4.18 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 4.18 | test_accounts.py
   test_01_user_remove_VM_running | `Error` | 0.87 | test_accounts.py
   test_DeployVmAntiAffinityGroup_in_project | `Error` | 0.16 | test_affinity_groups_projects.py
   test_DeployVmAffinityGroup | `Error` | 0.09 | test_affinity_groups.py
   test_DeployVmAntiAffinityGroup | `Error` | 0.04 | test_affinity_groups.py
   test_query_async_job_result | `Error` | 1.52 | test_async_job.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   ContextSuite context=TestDeployVirtioSCSIVM>:setup | `Error` | 0.00 | test_deploy_virtio_scsi_vm.py
   test_01_deploy_vm_with_extraconfig_throws_exception_kvm | `Error` | 1.19 | test_deploy_vm_extra_config_data.py
   test_02_deploy_vm_with_extraconfig_kvm | `Error` | 1.16 | test_deploy_vm_extra_config_data.py
   test_03_update_vm_with_extraconfig_kvm | `Error` | 1.13 | test_deploy_vm_extra_config_data.py
   test_list_vms_metrics | `Error` | 0.26 | test_metrics_api.py
   test_deploy_vm_from_iso | `Error` | 6.58 | test_deploy_vm_iso.py
   test_01_native_to_native_network_migration | `Error` | 3.74 | test_migration.py
   test_02_native_to_native_vpc_migration | `Error` | 57.36 | test_migration.py
   test_00_deploy_vm_root_resize | `Error` | 0.09 | test_deploy_vm_root_resize.py
   test_02_deploy_vm_root_resize | `Failure` | 0.03 | test_deploy_vm_root_resize.py
   test_deployvm_firstfit | `Error` | 0.10 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userconcentrated | `Error` | 0.06 | test_deploy_vms_with_varied_deploymentplanners.py
   test_deployvm_userdispersing | `Error` | 0.07 | test_deploy_vms_with_varied_deploymentplanners.py
   test_network_acl | `Error` | 41.14 | test_network_acl.py
   test_deployvm_userdata | `Error` | 0.12 | test_deploy_vm_with_userdata.py
   test_deployvm_userdata_post | `Error` | 0.08 | test_deploy_vm_with_userdata.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_delete_account | `Error` | 5.65 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 1.13 | test_network.py
   test_deploy_vm_l2network | `Error` | 1.14 | test_network.py
   test_l2network_restart | `Error` | 2.20 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 3.84 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 1.03 | test_network.py
   test_reboot_router | `Error` | 0.53 | test_network.py
   test_releaseIP | `Error` | 0.51 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 1.03 | test_network.py
   test_01_deployVMInSharedNetwork | `Failure` | 0.03 | test_network.py
   test_01_deploy_vm_from_direct_download_template_nfs_storage | `Error` | 0.08 | test_direct_download.py
   test_01_nic | `Error` | 64.28 | test_nic.py
   test_03_deploy_vm_domain_service_offering | `Error` | 2.94 | test_domain_service_offerings.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_01_invalid_upgrade_kubernetes_cluster | `Failure` | 36.17 | test_kubernetes_clusters.py
   test_02_deploy_and_upgrade_kubernetes_cluster | `Failure` | 31.88 | test_kubernetes_clusters.py
   test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 35.13 | test_kubernetes_clusters.py
   test_04_basic_lifecycle_kubernetes_cluster | `Failure` | 28.74 | test_kubernetes_clusters.py
   test_05_delete_kubernetes_cluster | `Failure` | 27.71 | test_kubernetes_clusters.py
   test_07_deploy_kubernetes_ha_cluster | `Failure` | 28.80 | test_kubernetes_clusters.py
   test_08_deploy_and_upgrade_kubernetes_ha_cluster | `Failure` | 42.06 | test_kubernetes_clusters.py
   test_09_delete_kubernetes_ha_cluster | `Failure` | 27.80 | test_kubernetes_clusters.py
   ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 117.06 | test_kubernetes_clusters.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 15.68 | test_multipleips_per_nic.py
   test_03_deploy_and_destroy_VM_and_verify_network_resources_persist | `Failure` | 1.29 | test_persistent_network.py
   test_01_create_delete_portforwarding_fornonvpc | `Error` | 0.68 | test_portforwardingrules.py
   test_01_add_primary_storage_disabled_host | `Error` | 32.48 | test_primary_storage.py
   test_01_primary_storage_nfs | `Error` | 0.12 | test_primary_storage.py
   ContextSuite context=TestStorageTags>:setup | `Error` | 0.20 | test_primary_storage.py
   test_02_vpc_privategw_static_routes | `Failure` | 88.24 | test_privategw_acl.py
   test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 77.38 | test_privategw_acl.py
   test_04_rvpc_privategw_static_routes | `Failure` | 139.62 | test_privategw_acl.py
   test_09_project_suspend | `Error` | 1.18 | test_projects.py
   test_10_project_activation | `Error` | 1.09 | test_projects.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 0.18 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 0.30 | test_host_maintenance.py
   test_03_cancel_host_maintenace_with_migration_jobs_failure | `Error` | 0.35 | test_host_maintenance.py
   test_01_cancel_host_maintenance_ssh_enabled_agent_connected | `Failure` | 0.08 | test_host_maintenance.py
   test_03_cancel_host_maintenance_ssh_disabled_agent_connected | `Failure` | 0.10 | test_host_maintenance.py
   test_04_cancel_host_maintenance_ssh_disabled_agent_disconnected | `Failure` | 0.08 | test_host_maintenance.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 0.10 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 49.59 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 49.59 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 0.20 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 0.19 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 64.63 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 73.48 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 59.48 | test_routers_network_ops.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestCpuCapServiceOfferings>:setup | `Error` | 0.00 | test_service_offerings.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 0.63 | test_service_offerings.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   test_02_deploy_vm_from_direct_download_template | `Error` | 0.08 | test_templates.py
   ContextSuite context=TestTemplates>:setup | `Error` | 5.32 | test_templates.py
   test_01_positive_tests_usage | `Failure` | 1.62 | test_usage_events.py
   ContextSuite context=TestLBRuleUsage>:setup | `Error` | 2.67 | test_usage.py
   ContextSuite context=TestNatRuleUsage>:setup | `Error` | 3.21 | test_usage.py
   ContextSuite context=TestPublicIPUsage>:setup | `Error` | 3.73 | test_usage.py
   ContextSuite context=TestSnapshotUsage>:setup | `Error` | 4.24 | test_usage.py
   ContextSuite context=TestVmUsage>:setup | `Error` | 6.54 | test_usage.py
   ContextSuite context=TestVolumeUsage>:setup | `Error` | 7.17 | test_usage.py
   ContextSuite context=TestVpnUsage>:setup | `Error` | 7.70 | test_usage.py
   test_01_deploy_vm_on_specific_host | `Error` | 1.18 | test_vm_deployment_planner.py
   test_02_deploy_vm_on_specific_cluster | `Error` | 1.12 | test_vm_deployment_planner.py
   test_03_deploy_vm_on_specific_pod | `Error` | 1.14 | test_vm_deployment_planner.py
   test_04_deploy_vm_on_host_override_pod_and_cluster | `Error` | 1.15 | test_vm_deployment_planner.py
   test_05_deploy_vm_on_cluster_override_pod | `Error` | 0.11 | test_vm_deployment_planner.py
   ContextSuite context=TestDeployVM>:setup | `Error` | 0.00 | test_vm_life_cycle.py
   test_01_secure_vm_migration | `Error` | 73.03 | test_vm_life_cycle.py
   test_02_unsecure_vm_migration | `Error` | 217.44 | test_vm_life_cycle.py
   test_03_secured_to_nonsecured_vm_migration | `Error` | 144.84 | test_vm_life_cycle.py
   test_04_nonsecured_to_secured_vm_migration | `Error` | 146.91 | test_vm_life_cycle.py
   ContextSuite context=TestVMLifeCycle>:setup | `Error` | 0.94 | test_vm_life_cycle.py
   ContextSuite context=TestVmSnapshot>:setup | `Error` | 0.56 | test_vm_snapshots.py
   ContextSuite context=TestCreateVolume>:setup | `Error` | 0.00 | test_volumes.py
   ContextSuite context=TestVolumes>:setup | `Error` | 0.00 | test_volumes.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 74.73 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 69.53 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 77.82 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 98.92 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 79.47 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 79.48 | test_vpc_redundant.py
   test_01_VPC_nics_after_destroy | `Failure` | 45.80 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 37.62 | test_vpc_router_nics.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 140.43 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 66.02 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Failure` | 31.11 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 61.13 | test_vpc_vpn.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] DaanHoogland commented on pull request #5215: Support for multiple SSH Keys

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


   @bicrxm can you fix the conflicts? It is marked for 4.17, now. Is this otherwise ready for review/merge? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSH Keys

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


   @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 #5215: Support for multiple SSH Keys

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


   @davidjumani 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] GutoVeronezi commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
##########
@@ -992,9 +992,9 @@
             sb.and("affinityGroupId", sb.entity().getAffinityGroupId(), SearchCriteria.Op.EQ);
         }
 
-        if (keyPairName != null) {
-            sb.and("keyPairName", sb.entity().getKeypairName(), SearchCriteria.Op.EQ);
-        }
+        //if (keyPairName != null) {
+        //    sb.and("keyPairName", sb.entity().getKeypairName(), SearchCriteria.Op.EQ);
+        //}

Review comment:
       Do we need this commented code?

##########
File path: server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java
##########
@@ -325,6 +325,10 @@ public UserVmResponse newUserVmResponse(ResponseView view, String objectName, Us
         if (vmDetails != null) {
             Map<String, String> resourceDetails = new HashMap<String, String>();
             for (UserVmDetailVO userVmDetailVO : vmDetails) {
+                if (userVmDetailVO.getName().startsWith(VmDetailConstants.KEY_PAIR_NAMES)) {
+                    s_logger.info(userVmDetailVO.getValue());

Review comment:
       We could improve this log with some context.

##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -862,17 +862,52 @@ public UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws ResourceUnavailableExce
             throw new InvalidParameterValueException("Vm " + userVm + " should be stopped to do SSH Key reset");
         }
 
-        SSHKeyPairVO s = _sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), cmd.getName());
-        if (s == null) {
-            throw new InvalidParameterValueException("A key pair with name '" + cmd.getName() + "' does not exist for account " + owner.getAccountName()
-            + " in specified domain id");
+        if (cmd.getName() == null && cmd.getNames() == null) {

Review comment:
       `org.apache.commons.lang3.ObjectUtils` has a method to verify nulls `anyNull(...)`.

##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -862,17 +862,52 @@ public UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws ResourceUnavailableExce
             throw new InvalidParameterValueException("Vm " + userVm + " should be stopped to do SSH Key reset");
         }
 
-        SSHKeyPairVO s = _sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), cmd.getName());
-        if (s == null) {
-            throw new InvalidParameterValueException("A key pair with name '" + cmd.getName() + "' does not exist for account " + owner.getAccountName()
-            + " in specified domain id");
+        if (cmd.getName() == null && cmd.getNames() == null) {
+            throw new InvalidParameterValueException("No keypair name given");
+        }
+
+        String keypairnames = "";
+        SSHKeyPairVO s = null;
+        if (cmd.getName() != null) {
+            s = _sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), cmd.getName());
+            keypairnames = keypairnames + cmd.getName();
+        }
+
+        List<SSHKeyPairVO> s_list = null;
+        if (cmd.getNames() != null) {
+            s_list = _sshKeyPairDao.findByNames(owner.getAccountId(), owner.getDomainId(), cmd.getNames());
+            for (String keypairname : cmd.getNames()) {
+                if (keypairnames != "") {
+                    keypairnames = keypairnames + ", ";
+                }
+                keypairnames = keypairnames + keypairname;
+            }
+        }
+        if (s_list == null && s == null) {

Review comment:
       `org.apache.commons.lang3.ObjectUtils` has a method to verify nulls `anyNull(...)`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSH Keys

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


   @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] bicrxm commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   > @davidjumani a Jenkins job has been kicked to build packages. 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] bicrxm commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSH Keys

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


   Will be tracked as part of https://github.com/apache/cloudstack/pull/5965


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4113,11 +4110,11 @@ public UserVmVO doInTransaction(TransactionStatus status) throws InsufficientCap
                     vm.details.putAll(details);
                 }
 
-                if (sshPublicKey != null) {
+                if (sshPublicKey != "") {

Review comment:
       isEmpty() or isBlank() kind of condition, maybe?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSH Keys

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


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -862,25 +861,48 @@ public UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws ResourceUnavailableExce
             throw new InvalidParameterValueException("Vm " + userVm + " should be stopped to do SSH Key reset");
         }
 
-        SSHKeyPairVO s = _sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), cmd.getName());
-        if (s == null) {
-            throw new InvalidParameterValueException("A key pair with name '" + cmd.getName() + "' does not exist for account " + owner.getAccountName()
-            + " in specified domain id");
+        String keypairnames = "";
+
+        List<SSHKeyPairVO> s_list = null;
+        if (cmd.getNames() != null) {
+            s_list = _sshKeyPairDao.findByNames(owner.getAccountId(), owner.getDomainId(), cmd.getNames());
+            for (String keypairname : cmd.getNames()) {
+                if (keypairnames != "") {
+                    keypairnames = keypairnames + ", ";
+                }
+                keypairnames = keypairnames + keypairname;
+            }

Review comment:
       Is there a better way to join a list of names ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani 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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -434,8 +437,9 @@ public String getName() {
         return name;
     }
 
-    public String getSSHKeyPairName() {
-        return sshKeyPairName;
+    public List<String> getSSHKeyPairNames() {
+        if(sshKeyPairName != null) sshKeyPairNames.add(sshKeyPairName);

Review comment:
       Can this cause a null pointer exception if keypairs is not passed ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] GutoVeronezi commented on a change in pull request #5215: Support for multiple SSH Keys

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
##########
@@ -78,8 +84,11 @@
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
 
-    public String getName() {
-        return name;
+    public List<String> getNames() {
+        List<String> keypairnames = new ArrayList<String>();
+        if(names != null) { keypairnames = names; }
+        if(name != null && !name.isEmpty()) { keypairnames.add(name); }

Review comment:
       According to our [Coding conventions](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Coding+conventions), section `Files, Layout and whitespace`, item 7, `if` clauses should be:
   
   ```java
   if (condition) {
       statements;
   }
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] bicrxm commented on a change in pull request #5215: Support for multiple SSH Keys

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
##########
@@ -78,8 +84,11 @@
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
 
-    public String getName() {
-        return name;
+    public List<String> getNames() {
+        List<String> keypairnames = new ArrayList<String>();
+        if(names != null) { keypairnames = names; }
+        if(name != null && !name.isEmpty()) { keypairnames.add(name); }

Review comment:
       Thank you. Corrected it. Sorry I missed your comment.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -921,12 +942,14 @@ private boolean resetVMSSHKeyInternal(Long vmId, String sshPublicKey) throws Res
             final UserVmVO userVm = _vmDao.findById(vmId);
             _vmDao.loadDetails(userVm);
             userVm.setDetail(VmDetailConstants.SSH_PUBLIC_KEY, sshPublicKey);
+            userVm.setDetail(VmDetailConstants.KEY_PAIR_NAMES, keypairnames);
             _vmDao.saveDetails(userVm);
 
             if (vmInstance.getState() == State.Stopped) {
                 s_logger.debug("Vm " + vmInstance + " is stopped, not rebooting it as a part of SSH Key reset");
                 return true;
             }
+            s_logger.info("bb " + userVm.getDetail(VmDetailConstants.KEY_PAIR_NAMES));

Review comment:
       Better logging




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @blueorangutan test keepEnv


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

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

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



[GitHub] [cloudstack] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   <b>Trillian test result (tid-1623)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 83219 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5215-t1623-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
   Intermittent failure detected: /marvin/tests/smoke/test_affinity_groups_projects.py
   Intermittent failure detected: /marvin/tests/smoke/test_affinity_groups.py
   Intermittent failure detected: /marvin/tests/smoke/test_async_job.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_extra_config_data.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_iso.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_root_resize.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vms_with_varied_deploymentplanners.py
   Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_with_userdata.py
   Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
   Intermittent failure detected: /marvin/tests/smoke/test_direct_download.py
   Intermittent failure detected: /marvin/tests/smoke/test_domain_service_offerings.py
   Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
   Intermittent failure detected: /marvin/tests/smoke/test_iso.py
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_supported_versions.py
   Intermittent failure detected: /marvin/tests/smoke/test_list_ids_parameter.py
   Intermittent failure detected: /marvin/tests/smoke/test_loadbalance.py
   Intermittent failure detected: /marvin/tests/smoke/test_metrics_api.py
   Intermittent failure detected: /marvin/tests/smoke/test_migration.py
   Intermittent failure detected: /marvin/tests/smoke/test_multipleips_per_nic.py
   Intermittent failure detected: /marvin/tests/smoke/test_nested_virtualization.py
   Intermittent failure detected: /marvin/tests/smoke/test_network_acl.py
   Intermittent failure detected: /marvin/tests/smoke/test_network.py
   Intermittent failure detected: /marvin/tests/smoke/test_nic_adapter_type.py
   Intermittent failure detected: /marvin/tests/smoke/test_nic.py
   Intermittent failure detected: /marvin/tests/smoke/test_password_server.py
   Intermittent failure detected: /marvin/tests/smoke/test_persistent_network.py
   Intermittent failure detected: /marvin/tests/smoke/test_portforwardingrules.py
   Intermittent failure detected: /marvin/tests/smoke/test_primary_storage.py
   Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
   Intermittent failure detected: /marvin/tests/smoke/test_projects.py
   Intermittent failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py
   Intermittent failure detected: /marvin/tests/smoke/test_resource_accounting.py
   Intermittent failure detected: /marvin/tests/smoke/test_router_dhcphosts.py
   Intermittent failure detected: /marvin/tests/smoke/test_router_dns.py
   Intermittent failure detected: /marvin/tests/smoke/test_router_dnsservice.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
   Intermittent failure detected: /marvin/tests/smoke/test_routers.py
   Intermittent failure detected: /marvin/tests/smoke/test_service_offerings.py
   Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
   Intermittent failure detected: /marvin/tests/smoke/test_templates.py
   Intermittent failure detected: /marvin/tests/smoke/test_usage_events.py
   Intermittent failure detected: /marvin/tests/smoke/test_usage.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_deployment_planner.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
   Intermittent failure detected: /marvin/tests/smoke/test_vm_snapshots.py
   Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
   Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py
   Smoke tests completed. 35 look OK, 54 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestAccounts>:setup | `Error` | 0.00 | test_accounts.py
   ContextSuite context=TestAddVmToSubDomain>:setup | `Error` | 0.00 | test_accounts.py
   test_DeleteDomain | `Error` | 3.99 | test_accounts.py
   test_forceDeleteDomain | `Failure` | 3.98 | test_accounts.py
   ContextSuite context=TestRemoveUserFromAccount>:setup | `Error` | 5.02 | test_accounts.py
   ContextSuite context=TestDeployVmWithAffinityGroup>:setup | `Error` | 0.00 | test_affinity_groups_projects.py
   ContextSuite context=TestInternalLb>:setup | `Error` | 0.00 | test_internal_lb.py
   test_DeployVmAffinityGroup | `Error` | 0.08 | test_affinity_groups.py
   test_DeployVmAntiAffinityGroup | `Error` | 0.04 | test_affinity_groups.py
   ContextSuite context=TestAsyncJob>:setup | `Error` | 0.00 | test_async_job.py
   test_01_create_iso_with_checksum_sha1 | `Error` | 66.38 | test_iso.py
   test_02_create_iso_with_checksum_sha256 | `Error` | 66.48 | test_iso.py
   test_03_1_create_iso_with_checksum_md5_negative | `Error` | 66.37 | test_iso.py
   test_03_create_iso_with_checksum_md5 | `Error` | 66.40 | test_iso.py
   test_04_create_iso_with_no_checksum | `Error` | 66.41 | test_iso.py
   test_01_create_iso | `Failure` | 1511.95 | test_iso.py
   ContextSuite context=TestISO>:setup | `Error` | 3022.87 | test_iso.py
   ContextSuite context=TestDomainsServiceOfferings>:setup | `Error` | 1514.83 | test_domain_service_offerings.py
   ContextSuite context=TestLoadBalance>:setup | `Error` | 0.00 | test_loadbalance.py
   ContextSuite context=TestDeployVirtioSCSIVM>:setup | `Error` | 0.00 | test_deploy_virtio_scsi_vm.py
   test_01_deploy_vm_with_extraconfig_throws_exception_kvm | `Error` | 1.23 | test_deploy_vm_extra_config_data.py
   test_02_deploy_vm_with_extraconfig_kvm | `Error` | 0.14 | test_deploy_vm_extra_config_data.py
   test_03_update_vm_with_extraconfig_kvm | `Error` | 1.13 | test_deploy_vm_extra_config_data.py
   test_01_nic | `Error` | 64.14 | test_nic.py
   ContextSuite context=TestDeployVMFromISO>:setup | `Error` | 0.00 | test_deploy_vm_iso.py
   test_list_clusters_metrics | `Error` | 1511.76 | test_metrics_api.py
   test_list_vms_metrics | `Error` | 0.15 | test_metrics_api.py
   test_00_deploy_vm_root_resize | `Error` | 0.11 | test_deploy_vm_root_resize.py
   test_02_deploy_vm_root_resize | `Failure` | 0.04 | test_deploy_vm_root_resize.py
   ContextSuite context=TestDeployVmWithVariedPlanners>:setup | `Error` | 0.00 | test_deploy_vms_with_varied_deploymentplanners.py
   test_01_native_to_native_network_migration | `Error` | 3.68 | test_migration.py
   test_02_native_to_native_vpc_migration | `Error` | 41.14 | test_migration.py
   ContextSuite context=TestDeployVmWithUserData>:setup | `Error` | 0.00 | test_deploy_vm_with_userdata.py
   ContextSuite context=TestRemoteDiagnostics>:setup | `Error` | 0.00 | test_diagnostics.py
   test_01_deploy_vm_from_direct_download_template_nfs_storage | `Error` | 0.08 | test_direct_download.py
   ContextSuite context=TestNetworkACL>:setup | `Error` | 0.00 | test_network_acl.py
   test_delete_account | `Error` | 1511.47 | test_network.py
   test_delete_network_while_vm_on_it | `Error` | 1.11 | test_network.py
   test_deploy_vm_l2network | `Error` | 1.10 | test_network.py
   test_l2network_restart | `Error` | 1.21 | test_network.py
   ContextSuite context=TestPortForwarding>:setup | `Error` | 2.35 | test_network.py
   ContextSuite context=TestPublicIP>:setup | `Error` | 1.01 | test_network.py
   test_reboot_router | `Failure` | 0.04 | test_network.py
   test_releaseIP | `Error` | 0.53 | test_network.py
   ContextSuite context=TestRouterRules>:setup | `Error` | 0.58 | test_network.py
   test_01_deployVMInSharedNetwork | `Failure` | 0.03 | test_network.py
   ContextSuite context=TestAdapterTypeForNic>:setup | `Error` | 0.00 | test_nic_adapter_type.py
   test_01_invalid_upgrade_kubernetes_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_02_deploy_and_upgrade_kubernetes_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_04_basic_lifecycle_kubernetes_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_05_delete_kubernetes_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_06_deploy_invalid_kubernetes_ha_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_07_deploy_kubernetes_ha_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_08_deploy_and_upgrade_kubernetes_ha_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_09_delete_kubernetes_ha_cluster | `Failure` | 0.00 | test_kubernetes_clusters.py
   test_01_add_delete_kubernetes_supported_version | `Error` | 180.88 | test_kubernetes_supported_versions.py
   ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py
   test_nic_secondaryip_add_remove | `Error` | 1511.64 | test_multipleips_per_nic.py
   ContextSuite context=TestNestedVirtualization>:setup | `Error` | 0.00 | test_nested_virtualization.py
   ContextSuite context=TestIsolatedNetworksPasswdServer>:setup | `Error` | 0.00 | test_password_server.py
   test_03_deploy_and_destroy_VM_and_verify_network_resources_persist | `Failure` | 1.37 | test_persistent_network.py
   ContextSuite context=TestPortForwardingRules>:setup | `Error` | 0.00 | test_portforwardingrules.py
   test_01_add_primary_storage_disabled_host | `Error` | 32.34 | test_primary_storage.py
   test_01_primary_storage_nfs | `Error` | 0.10 | test_primary_storage.py
   ContextSuite context=TestStorageTags>:setup | `Error` | 0.17 | test_primary_storage.py
   ContextSuite context=TestPrivateGwACL>:setup | `Error` | 0.00 | test_privategw_acl.py
   ContextSuite context=TestProjectSuspendActivate>:setup | `Error` | 1518.10 | test_projects.py
   ContextSuite context=TestCreateVolume>:setup | `Error` | 0.00 | test_volumes.py
   ContextSuite context=TestVolumes>:setup | `Error` | 0.00 | test_volumes.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   test_01_so_removal_resource_update | `Error` | 0.18 | test_resource_accounting.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   test_01_VPC_nics_after_destroy | `Failure` | 36.58 | test_vpc_router_nics.py
   test_02_VPC_default_routes | `Failure` | 33.49 | test_vpc_router_nics.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 70.64 | test_vpc_redundant.py
   test_02_redundant_VPC_default_routes | `Failure` | 69.67 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 71.50 | test_vpc_redundant.py
   test_04_rvpc_network_garbage_collector_nics | `Failure` | 68.86 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 74.59 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 74.60 | test_vpc_redundant.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   test_02_routervm_iptables_policies | `Error` | 0.09 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 32.14 | test_routers_iptables_default_policy.py
   test_01_single_VPC_iptables_policies | `Error` | 32.14 | test_routers_iptables_default_policy.py
   test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 0.19 | test_routers_network_ops.py
   test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 0.19 | test_routers_network_ops.py
   test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Error` | 63.69 | test_routers_network_ops.py
   test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Error` | 64.49 | test_routers_network_ops.py
   test_03_RVR_Network_check_router_state | `Error` | 62.34 | test_routers_network_ops.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 140.90 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 67.18 | test_vpc_vpn.py
   test_01_vpc_remote_access_vpn | `Failure` | 31.89 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn | `Failure` | 72.74 | test_vpc_vpn.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestCpuCapServiceOfferings>:setup | `Error` | 0.00 | test_service_offerings.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 0.60 | test_service_offerings.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   test_02_deploy_vm_from_direct_download_template | `Error` | 0.08 | test_templates.py
   ContextSuite context=TestTemplates>:setup | `Error` | 5.41 | test_templates.py
   test_01_positive_tests_usage | `Failure` | 1.52 | test_usage_events.py
   ContextSuite context=TestLBRuleUsage>:setup | `Error` | 2.65 | test_usage.py
   ContextSuite context=TestNatRuleUsage>:setup | `Error` | 3.16 | test_usage.py
   ContextSuite context=TestPublicIPUsage>:setup | `Error` | 3.67 | test_usage.py
   ContextSuite context=TestSnapshotUsage>:setup | `Error` | 4.16 | test_usage.py
   ContextSuite context=TestVmUsage>:setup | `Error` | 6.43 | test_usage.py
   ContextSuite context=TestVolumeUsage>:setup | `Error` | 6.97 | test_usage.py
   ContextSuite context=TestVpnUsage>:setup | `Error` | 7.56 | test_usage.py
   test_01_deploy_vm_on_specific_host | `Error` | 1.18 | test_vm_deployment_planner.py
   test_02_deploy_vm_on_specific_cluster | `Error` | 1.12 | test_vm_deployment_planner.py
   test_03_deploy_vm_on_specific_pod | `Error` | 0.12 | test_vm_deployment_planner.py
   test_04_deploy_vm_on_host_override_pod_and_cluster | `Error` | 0.14 | test_vm_deployment_planner.py
   test_05_deploy_vm_on_cluster_override_pod | `Error` | 1.12 | test_vm_deployment_planner.py
   ContextSuite context=TestDeployVM>:setup | `Error` | 0.00 | test_vm_life_cycle.py
   test_01_secure_vm_migration | `Error` | 73.17 | test_vm_life_cycle.py
   test_02_unsecure_vm_migration | `Error` | 217.64 | test_vm_life_cycle.py
   test_03_secured_to_nonsecured_vm_migration | `Error` | 145.90 | test_vm_life_cycle.py
   test_04_nonsecured_to_secured_vm_migration | `Error` | 145.86 | test_vm_life_cycle.py
   ContextSuite context=TestVMLifeCycle>:setup | `Error` | 0.65 | test_vm_life_cycle.py
   ContextSuite context=TestVmSnapshot>:setup | `Error` | 0.56 | test_vm_snapshots.py
   test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 0.69 | test_host_maintenance.py
   test_03_cancel_host_maintenace_with_migration_jobs_failure | `Error` | 0.76 | test_host_maintenance.py
   test_01_cancel_host_maintenance_ssh_enabled_agent_connected | `Failure` | 0.22 | test_host_maintenance.py
   test_03_cancel_host_maintenance_ssh_disabled_agent_connected | `Failure` | 0.25 | test_host_maintenance.py
   test_04_cancel_host_maintenance_ssh_disabled_agent_disconnected | `Failure` | 0.20 | test_host_maintenance.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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @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] bicrxm commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   > @davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
   
   Can you show me the error message?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] bicrxm commented on pull request #5215: Support for multiple SSH Keys

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


   @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 #5215: Support for multiple SSH Keys

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian. SL-JID 914


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani a Jenkins job has been kicked to build packages. 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   <b>Trillian Build Failed (tid-1594)<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] davidjumani closed pull request #5215: Support for multiple SSH Keys

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


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @bicrxm Please check the build failure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] bicrxm closed pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] bicrxm commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   > @davidjumani a Jenkins job has been kicked to build packages. 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] bicrxm commented on pull request #5215: Support for multiple SSH Keys

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


   @blueorangutan  test keepEnv


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani 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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @blueorangutan test keepEnv


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

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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #5215: Support for multiple SSH Keys

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


   @bicrxm can you fix the conflicts? It is marked for 4.17, now. Is this otherwise ready for review/merge? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani a Jenkins job has been kicked to build packages. 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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -153,9 +153,12 @@
     @Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding. Using HTTP POST(via POST body), you can send up to 32K of data after base64 encoding.", length = 32768)
     private String userData;
 
-    @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING, description = "name of the ssh key pair used to login to the virtual machine")
+    @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.LIST, collectionType = CommandType.STRING, description = "name of the ssh key pairs used to login to the virtual machine")

Review comment:
       This should not be changed

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java
##########
@@ -58,8 +60,11 @@
     @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine")
     private Long id;
 
-    @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING, required = true, description = "name of the ssh key pair used to login to the virtual machine")
-    private String name;
+    @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.LIST, collectionType = CommandType.STRING ,description = "name of the ssh key pair to bt used to login to the virtual machine")

Review comment:
       This too




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @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 #5215: Support for multiple SSH Keys

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


   @davidjumani a Jenkins job has been kicked to build packages. 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] davidjumani commented on a change in pull request #5215: Support for multiple SSH Keys

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -153,9 +153,12 @@
     @Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding. Using HTTP POST(via POST body), you can send up to 32K of data after base64 encoding.", length = 32768)
     private String userData;
 
-    @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING, description = "name of the ssh key pair used to login to the virtual machine")
+    @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING, description = "name of the ssh key pairs used to login to the virtual machine")

Review comment:
       @bicrxm Can you change this back to key pair




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian. SL-JID 878


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian. SL-JID 861


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4113,11 +4110,11 @@ public UserVmVO doInTransaction(TransactionStatus status) throws InsufficientCap
                     vm.details.putAll(details);
                 }
 
-                if (sshPublicKey != null) {
+                if (sshPublicKey != "") {

Review comment:
       isEmpty() or isBlank() kind of condition, maybe?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   <b>Trillian Build Failed (tid-1589)<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] nvazquez commented on pull request #5215: Support for multiple SSH Keys

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


   Hi @bicrxm can you please fix the conflicts? Is this PR ready for review and testing?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @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 #5215: Support for multiple SSH Keys

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


   @davidjumani a Jenkins job has been kicked to build packages. 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian. SL-JID 837


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani 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 #5215: Support for multiple SSH Keys

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


   <b>Trillian test result (tid-1704)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35696 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5215-t1704-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
   Smoke tests completed. 89 look OK, 0 have error(s)
   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] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @blueorangutan test keepEnv


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

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

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



[GitHub] [cloudstack] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -3785,17 +3807,32 @@ private UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOffe
 
         // check if the user data is correct
         userData = validateUserData(userData, httpmethod);
-
         // Find an SSH public key corresponding to the key pair name, if one is
         // given
-        String sshPublicKey = null;
-        if (sshKeyPair != null && !sshKeyPair.equals("")) {
-            SSHKeyPair pair = _sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), sshKeyPair);
-            if (pair == null) {
-                throw new InvalidParameterValueException("A key pair with name '" + sshKeyPair + "' was not found.");
-            }
+        String sshPublicKey = "";
+        String keypairnames = "";
 
-            sshPublicKey = pair.getPublicKey();
+        if (sshKeyPairs != null) {
+            for (String sshkeypair : sshKeyPairs) {
+                if (keypairnames != "") {
+                    keypairnames = keypairnames + ", ";
+                }
+                keypairnames = keypairnames + sshkeypair;
+            }
+            List<SSHKeyPairVO> pairs = _sshKeyPairDao.findByNames(owner.getAccountId(), owner.getDomainId(), sshKeyPairs);
+            for (SSHKeyPairVO pair : pairs) {
+                if (pair == null) {
+                    throw new InvalidParameterValueException("A key pair with name '" + pair.getName() + "' was not found.");
+                }
+                else {
+                    s_logger.info("publickey is " + pair.getPublicKey());
+                    sshPublicKey = sshPublicKey + pair.getPublicKey();
+                    sshPublicKey = sshPublicKey + "\n";
+                }
+            }
+        }

Review comment:
       Can this duplicate code be extracted out ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java
##########
@@ -146,9 +146,10 @@ private String getKubernetesNodeConfig(final String joinIp, final boolean ejectI
         final String clusterTokenKey = "{{ k8s_control_node.cluster.token }}";
         final String ejectIsoKey = "{{ k8s.eject.iso }}";
         String pubKey = "- \"" + configurationDao.getValue("ssh.publickey") + "\"";
-        String sshKeyPair = kubernetesCluster.getKeyPair();
-        if (!Strings.isNullOrEmpty(sshKeyPair)) {
-            SSHKeyPairVO sshkp = sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), sshKeyPair);
+        List<String> sshKeyPairs = null;
+        sshKeyPairs.add(kubernetesCluster.getKeyPair());

Review comment:
       Won't this cause a null pointer exception ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on pull request #5215: Support for multiple SSH Keys

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


   @blueorangutan test keepEnv


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

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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   <b>Trillian Build Failed (tid-1593)<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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -862,25 +861,48 @@ public UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws ResourceUnavailableExce
             throw new InvalidParameterValueException("Vm " + userVm + " should be stopped to do SSH Key reset");
         }
 
-        SSHKeyPairVO s = _sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), cmd.getName());
-        if (s == null) {
-            throw new InvalidParameterValueException("A key pair with name '" + cmd.getName() + "' does not exist for account " + owner.getAccountName()
-            + " in specified domain id");
+        String keypairnames = "";
+
+        List<SSHKeyPairVO> s_list = null;
+        if (cmd.getNames() != null) {
+            s_list = _sshKeyPairDao.findByNames(owner.getAccountId(), owner.getDomainId(), cmd.getNames());
+            for (String keypairname : cmd.getNames()) {
+                if (keypairnames != "") {
+                    keypairnames = keypairnames + ", ";
+                }
+                keypairnames = keypairnames + keypairname;
+            }
+        }
+        if (s_list == null) {
+            throw new InvalidParameterValueException("Any key pair with the given names does not exist for account " + owner.getAccountName()
+                    + " in specified domain id");
         }
 
         _accountMgr.checkAccess(caller, null, true, userVm);
 
-        String sshPublicKey = s.getPublicKey();
+        String sshPublicKey = "";
 
-        boolean result = resetVMSSHKeyInternal(vmId, sshPublicKey);
+        if (s_list != null) {
+            for (SSHKeyPairVO s_each : s_list) {
+                String publicKey = s_each.getPublicKey();
+                sshPublicKey = sshPublicKey + publicKey;
+                sshPublicKey = sshPublicKey + "\n";
+                s_logger.info("the public key for keypair name " + s_each.getName() + " is " + publicKey);
+            }
+        }
 
+        boolean result = resetVMSSHKeyInternal(vmId, sshPublicKey, keypairnames);
+
+        UserVmVO vm = _vmDao.findById(vmId);
+        _vmDao.loadDetails(vm);
+        _vmDao.saveDetails(vm);

Review comment:
       Why is it being loaded and then immediately saved ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani edited a comment on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

Posted by GitBox <gi...@apache.org>.
davidjumani edited a comment on pull request #5215:
URL: https://github.com/apache/cloudstack/pull/5215#issuecomment-895939176


   @bicrxm 
   ```
   api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java:65: Line has trailing spaces. [RegexpSingleline]
   ```
   You can build / test it locally by running `mvn clean install -Dnoredist -P developer,systemvm`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani a Jenkins job has been kicked to build packages. 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] bicrxm commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @blueorangutan test keepEnv


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

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

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



[GitHub] [cloudstack] davidjumani commented on pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @bicrxm 
   ```
   api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java:65: Line has trailing spaces. [RegexpSingleline]
   ```
   You can build / test it locally by running `mvn -Psystemvm,developer clean 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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -862,25 +860,44 @@ public UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws ResourceUnavailableExce
             throw new InvalidParameterValueException("Vm " + userVm + " should be stopped to do SSH Key reset");
         }
 
-        SSHKeyPairVO s = _sshKeyPairDao.findByName(owner.getAccountId(), owner.getDomainId(), cmd.getName());
-        if (s == null) {
-            throw new InvalidParameterValueException("A key pair with name '" + cmd.getName() + "' does not exist for account " + owner.getAccountName()
-            + " in specified domain id");
+        String keypairnames = "";
+
+        List<SSHKeyPairVO> s_list = null;
+
+        if (cmd.getNames() != null) {
+            s_list = _sshKeyPairDao.findByNames(owner.getAccountId(), owner.getDomainId(), cmd.getNames());

Review comment:
       A check to ensure that all the keyparis passed exist




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   @davidjumani a Jenkins job has been kicked to build packages. 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 #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian. SL-JID 823


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the 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] davidjumani commented on a change in pull request #5215: Support for multiple SSHKeys in resetsshkeyforvirtualmachine api

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



##########
File path: ui/src/views/compute/ResetSSH.vue
##########
@@ -0,0 +1,157 @@
+// 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.
+
+<template>
+  <a-form class="form" v-ctrl-enter="handleSubmit">
+
+    <p v-html="$t('Select SSH Keys from the list')" />
+
+    <div v-if="loading" class="loading">
+      <a-icon type="loading" style="color: #1890ff;" />
+    </div>
+
+    <div class="form__item">
+      <a-input-search
+        style="margin-bottom: 10px;"
+        :placeholder="$t('label.search')"
+        v-model="filter"
+        @search="handleSearch"
+        autoFocus />
+    </div>
+
+    <div class="form__item">
+      <a-table
+        size="small"
+        :loading="loading"
+        :columns="columns"
+        :dataSource="items"
+        :rowKey="record => record.id || record.name"
+        :pagination="{showSizeChanger: true, total: total}"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange"
+        @handle-search-filter="handleTableChange"
+        style="overflow-y: auto"/>
+    </div>
+
+    <div :span="24" class="action-button">
+      <a-button @click="closeAction">{{ this.$t('label.cancel') }}</a-button>
+      <a-button :loading="loading" ref="submit" type="primary" @click="handleSubmit">{{ this.$t('label.ok') }}</a-button>
+    </div>
+
+  </a-form>
+</template>
+
+<script>
+import { api } from '@/api'
+import { genericCompare } from '@/utils/sort.js'
+
+export default {
+  name: 'ResetSSH',
+  props: {
+    resource: {
+      type: Object,
+      required: true
+    }
+  },
+  data () {
+    return {
+      items: [],
+      total: 0,
+      columns: [
+        {
+          dataIndex: 'name',
+          title: this.$t('label.name'),
+          sorter: function (a, b) { return genericCompare(a[this.dataIndex] || '', b[this.dataIndex] || '') }
+        }
+      ],
+      selectedRowKeys: [],
+      options: {
+        page: 1,
+        pageSize: 10,
+        keyword: ''
+      },
+      filter: '',
+      loading: false
+    }
+  },
+  created () {
+    this.fetchData()
+  },
+  methods: {
+    fetchData () {
+      this.loading = true
+      this.items = []
+      this.total = 0
+      api('listSSHKeyPairs', {
+        page: this.options.page,
+        pageSize: this.options.pageSize,
+        response: 'json'
+      }).then(response => {
+        this.total = response.listsshkeypairsresponse.count
+        if (this.total !== 0) {
+          this.items = response.listsshkeypairsresponse.sshkeypair
+        }
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+    onSelectChange (selectedRowKeys) {
+      this.selectedRowKeys = selectedRowKeys
+    },
+    handleSearch (keyword) {
+      this.filter = keyword
+      this.options.keyword = keyword
+      this.fetchData()
+    },
+    handleTableChange (pagination) {
+      this.options.page = pagination.current
+      this.options.pageSize = pagination.pageSize
+      this.fetchData()
+    },
+    closeAction () {
+      this.$emit('close-action')
+    },
+    handleSubmit () {
+      if (this.loading) return
+      this.loading = true
+      api('resetSSHKeyForVirtualMachine', {
+        id: this.resource.id,
+        keypairs: this.selectedRowKeys.join(',')
+      }).then(response => {
+        this.$notification.success({
+          message: this.$t('SSH Key(s) resetted sucessfully')
+        })
+        this.$parent.$parent.close()
+      }).catch(error => {
+        this.$notifyError(error)
+      }).finally(() => {
+        this.loading = false
+      })
+      window.location.reload()

Review comment:
       Try to refresh the data without reloading the entire page




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

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

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