DaanHoogland commented on a change in pull request #4420:
URL: https://github.com/apache/cloudstack/pull/4420#discussion_r510095864
##########
File path:
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java
##########
@@ -606,13 +610,20 @@ public KubernetesClusterResponse
createKubernetesClusterResponse(long kubernetes
response.setEndpoint(kubernetesCluster.getEndpoint());
response.setNetworkId(ntwk.getUuid());
response.setAssociatedNetworkName(ntwk.getName());
- List<String> vmIds = new ArrayList<String>();
+ List<UserVmResponse> vmIds = new ArrayList<UserVmResponse>();
List<KubernetesClusterVmMapVO> vmList =
kubernetesClusterVmMapDao.listByClusterId(kubernetesCluster.getId());
+ ResponseView respView = ResponseView.Restricted;
+ Account caller = CallContext.current().getCallingAccount();
+ if (accountService.isRootAdmin(caller.getId())) {
+ respView = ResponseView.Full;
+ }
if (vmList != null && !vmList.isEmpty()) {
for (KubernetesClusterVmMapVO vmMapVO : vmList) {
- UserVmVO userVM = userVmDao.findById(vmMapVO.getVmId());
+ UserVmJoinVO userVM =
userVmJoinDao.findById(vmMapVO.getVmId());
if (userVM != null) {
- vmIds.add(userVM.getUuid());
+ UserVmResponse vmResponse =
ApiDBUtils.newUserVmResponse(respView, "virtualmachine", userVM,
Review comment:
would like this string constant defined
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]