You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,10 @@
19
19
importjava.util.ArrayList;
20
20
importjava.util.List;
21
21
22
+
importorg.apache.commons.lang3.BooleanUtils;
22
23
importorg.apache.log4j.Logger;
23
24
25
+
importorg.apache.cloudstack.acl.RoleType;
24
26
importorg.apache.cloudstack.api.APICommand;
25
27
importorg.apache.cloudstack.api.ApiConstants;
26
28
importorg.apache.cloudstack.api.BaseListCmd;
@@ -51,6 +53,10 @@ public class ListGuestOsCmd extends BaseListCmd {
51
53
@Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "list os by description", since = "3.0.1")
52
54
privateStringdescription;
53
55
56
+
@Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter",
@@ -62,4 +73,69 @@ public GuestOSVO findByCategoryIdAndDisplayNameOrderByCreatedDesc(long categoryI
62
73
}
63
74
returnnull;
64
75
}
76
+
77
+
/**
78
+
+ "select display_name from"
79
+
+ "(select display_name, count(1) as count from guest_os go1 where removed is null group by display_name having count > 1) tab0";
80
+
*
81
+
* @return
82
+
*/
83
+
@Override
84
+
@DB
85
+
publicSet<String> findDoubleNames() {
86
+
StringselectSql = "SELECT display_name FROM (SELECT display_name, count(1) AS count FROM guest_os go1 WHERE removed IS NULL GROUP BY display_name HAVING count > 1) tab0";
0 commit comments