Skip to content

Commit 21bbae2

Browse files
committed
Merge branch 'feature-extensions-framework' into ExternalDeploymentIntegration
2 parents b2f04ca + abae8af commit 21bbae2

File tree

62 files changed

+1784
-1438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1784
-1438
lines changed

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class ApiConstants {
3232
public static final String ALLOCATED_DATE = "allocateddate";
3333
public static final String ALLOCATED_ONLY = "allocatedonly";
3434
public static final String ALLOCATED_TIME = "allocated";
35+
public static final String ALLOWED_ROLE_TYPES = "allowedroletypes";
3536
public static final String ALLOW_USER_FORCE_STOP_VM = "allowuserforcestopvm";
3637
public static final String ANNOTATION = "annotation";
3738
public static final String API_KEY = "apikey";
@@ -198,7 +199,7 @@ public class ApiConstants {
198199
public static final String END_IPV6 = "endipv6";
199200
public static final String END_PORT = "endport";
200201
public static final String ENTRY_POINT = "entrypoint";
201-
public static final String ENTRY_POINT_SYNC = "entrypointsync";
202+
public static final String ENTRY_POINT_READY = "entrypointready";
202203
public static final String ENTRY_TIME = "entrytime";
203204
public static final String ERROR_MESSAGE = "errormessage";
204205
public static final String EVENT_ID = "eventid";
@@ -213,6 +214,7 @@ public class ApiConstants {
213214
public static final String EXTERNAL_UUID = "externaluuid";
214215
public static final String EXTERNAL_DETAILS = "externaldetails";
215216
public static final String PARAMETERS = "parameters";
217+
public static final String EXTENSION = "extension";
216218
public static final String EXTENSION_ID = "extensionid";
217219
public static final String EXTENSION_NAME = "extensionname";
218220
public static final String FENCE = "fence";
@@ -559,7 +561,10 @@ public class ApiConstants {
559561
public static final String USER_SECRET_KEY = "usersecretkey";
560562
public static final String USE_VIRTUAL_NETWORK = "usevirtualnetwork";
561563
public static final String UPDATE_IN_SEQUENCE = "updateinsequence";
564+
public static final String VALIDATION_FORMAT = "validationformat";
562565
public static final String VALUE = "value";
566+
public static final String VALUE_OPTIONS = "valueoptions";
567+
public static final String VIRTUAL_MACHINE = "virtualmachine";
563568
public static final String VIRTUAL_MACHINE_ID = "virtualmachineid";
564569
public static final String VIRTUAL_MACHINE_IDS = "virtualmachineids";
565570
public static final String VIRTUAL_MACHINE_NAME = "virtualmachinename";
@@ -682,7 +687,6 @@ public class ApiConstants {
682687
public static final String PROJECT_ROLE_NAME = "projectrolename";
683688
public static final String ROLE_TYPE = "roletype";
684689
public static final String ROLE_NAME = "rolename";
685-
public static final String ROLES = "roles";
686690
public static final String PERMISSION = "permission";
687691
public static final String RULE = "rule";
688692
public static final String RULES = "rules";
@@ -1045,6 +1049,7 @@ public class ApiConstants {
10451049

10461050
public static final String RESOURCE_DETAILS = "resourcedetails";
10471051
public static final String RESOURCE_ICON = "icon";
1052+
public static final String RESOURCE_MAP = "resourcemap";
10481053
public static final String EXPUNGE = "expunge";
10491054
public static final String FOR_DISPLAY = "fordisplay";
10501055
public static final String PASSIVE = "passive";

api/src/main/java/org/apache/cloudstack/api/response/ExtensionCustomActionParameterResponse.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@ public class ExtensionCustomActionParameterResponse extends BaseResponse {
3535
@Param(description = "Type of the parameter")
3636
private String type;
3737

38-
@SerializedName(ApiConstants.FORMAT)
39-
@Param(description = "Format for value of the parameter. Available for specific types")
40-
private String format;
38+
@SerializedName(ApiConstants.VALIDATION_FORMAT)
39+
@Param(description = "Validation format for value of the parameter. Available for specific types")
40+
private String validationFormat;
4141

42-
@SerializedName(ApiConstants.OPTIONS)
43-
@Param(description = "Options for value of the parameter")
44-
private List<Object> options;
42+
@SerializedName(ApiConstants.VALUE_OPTIONS)
43+
@Param(description = "Comma-separated list of options for value of the parameter")
44+
private List<Object> valueOptions;
4545

4646
@SerializedName(ApiConstants.REQUIRED)
4747
@Param(description = "Whether the parameter is required or not")
4848
private Boolean required;
4949

50-
public ExtensionCustomActionParameterResponse(String name, String type, String format, List<Object> options,
51-
boolean required) {
50+
public ExtensionCustomActionParameterResponse(String name, String type, String validationFormat, List<Object> valueOptions,
51+
boolean required) {
5252
this.name = name;
5353
this.type = type;
54-
this.format = format;
55-
this.options = options;
54+
this.validationFormat = validationFormat;
55+
this.valueOptions = valueOptions;
5656
this.required = required;
5757
}
5858
}

api/src/main/java/org/apache/cloudstack/api/response/ExtensionCustomActionResponse.java

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,32 @@
3434
public class ExtensionCustomActionResponse extends BaseResponse {
3535

3636
@SerializedName(ApiConstants.ID)
37-
@Param(description = "ID of the extension custom action")
37+
@Param(description = "ID of the custom action")
3838
private String id;
3939

4040
@SerializedName(ApiConstants.NAME)
41-
@Param(description = "Name of the extension custom action")
41+
@Param(description = "Name of the custom action")
4242
private String name;
4343

4444
@SerializedName(ApiConstants.DESCRIPTION)
45-
@Param(description = "Description of the extension custom action")
45+
@Param(description = "Description of the custom action")
4646
private String description;
4747

4848
@SerializedName(ApiConstants.EXTENSION_ID)
49-
@Param(description = "ID of the extension that this extension custom action belongs to")
49+
@Param(description = "ID of the extension that this custom action belongs to")
5050
private String extensionId;
5151

5252
@SerializedName(ApiConstants.EXTENSION_NAME)
53-
@Param(description = "Name of the extension that this extension custom action belongs to")
53+
@Param(description = "Name of the extension that this custom action belongs to")
5454
private String extensionName;
5555

5656
@SerializedName(ApiConstants.RESOURCE_TYPE)
5757
@Param(description = "Resource type for which the action is available")
5858
private String resourceType;
5959

60-
@SerializedName(ApiConstants.ROLES)
61-
@Param(description = "List of roles associated with the extension custom action")
62-
private List<String> roles;
60+
@SerializedName(ApiConstants.ALLOWED_ROLE_TYPES)
61+
@Param(description = "List of role types allowed for the custom action")
62+
private List<String> allowedRoleTypes;
6363

6464
@SerializedName(ApiConstants.SUCCESS_MESSAGE)
6565
@Param(description = "Message that will be used on successful execution of the action")
@@ -69,20 +69,24 @@ public class ExtensionCustomActionResponse extends BaseResponse {
6969
@Param(description = "Message that will be used on failure during execution of the action")
7070
private String errorMessage;
7171

72+
@SerializedName(ApiConstants.TIMEOUT)
73+
@Param(description = "Specifies the timeout in seconds to wait for the action to complete before failing")
74+
private Integer timeout;
75+
7276
@SerializedName(ApiConstants.ENABLED)
73-
@Param(description = "Whether the extension custom action is enabled or not")
77+
@Param(description = "Whether the custom action is enabled or not")
7478
private Boolean enabled;
7579

7680
@SerializedName(ApiConstants.DETAILS)
77-
@Param(description = "Details of the extension custom action")
81+
@Param(description = "Details of the custom action")
7882
private Map<String, String> details;
7983

8084
@SerializedName(ApiConstants.PARAMETERS)
8185
@Param(description = "List of the parameters for the action", responseObject = ExtensionCustomActionParameterResponse.class)
8286
private Set<ExtensionCustomActionParameterResponse> parameters;
8387

8488
@SerializedName(ApiConstants.CREATED)
85-
@Param(description = "Creation timestamp of the extension custom action")
89+
@Param(description = "Creation timestamp of the custom action")
8690
private Date created;
8791

8892
public ExtensionCustomActionResponse(String id, String name, String description) {
@@ -131,12 +135,12 @@ public void setResourceType(String resourceType) {
131135
this.resourceType = resourceType;
132136
}
133137

134-
public List<String> getRoles() {
135-
return roles;
138+
public List<String> getAllowedRoleTypes() {
139+
return allowedRoleTypes;
136140
}
137141

138-
public void setRoles(List<String> roles) {
139-
this.roles = roles;
142+
public void setAllowedRoleTypes(List<String> allowedRoleTypes) {
143+
this.allowedRoleTypes = allowedRoleTypes;
140144
}
141145

142146
public void setSuccessMessage(String successMessage) {
@@ -147,6 +151,10 @@ public void setErrorMessage(String errorMessage) {
147151
this.errorMessage = errorMessage;
148152
}
149153

154+
public void setTimeout(Integer timeout) {
155+
this.timeout = timeout;
156+
}
157+
150158
public void setEnabled(Boolean enabled) {
151159
this.enabled = enabled;
152160
}

api/src/main/java/org/apache/cloudstack/api/response/ExtensionResponse.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public class ExtensionResponse extends BaseResponse {
5151
@Param(description = "The path of the entry point fo the extension")
5252
private String entryPoint;
5353

54-
@SerializedName(ApiConstants.ENTRY_POINT_SYNC)
55-
@Param(description = "True if the extension entry point is in sync across management servers")
56-
private Boolean entryPointSync;
54+
@SerializedName(ApiConstants.ENTRY_POINT_READY)
55+
@Param(description = "True if the extension entry point is in ready state across management servers")
56+
private Boolean entryPointReady;
5757

5858
@SerializedName(ApiConstants.IS_USER_DEFINED)
5959
@Param(description = "True if the extension is added by admin")
@@ -90,8 +90,8 @@ public void setEntryPoint(String entryPoint) {
9090
this.entryPoint = entryPoint;
9191
}
9292

93-
public void setEntryPointSync(Boolean entryPointSync) {
94-
this.entryPointSync = entryPointSync;
93+
public void setEntryPointReady(Boolean entryPointReady) {
94+
this.entryPointReady = entryPointReady;
9595
}
9696

9797
public void setUserDefined(Boolean userDefined) {

api/src/main/java/org/apache/cloudstack/extension/Extension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ enum State {
3333
String getDescription();
3434
Type getType();
3535
String getRelativeEntryPoint();
36-
boolean isEntryPointSync();
36+
boolean isEntryPointReady();
3737
boolean isUserDefined();
3838
State getState();
3939
Date getCreated();

0 commit comments

Comments
 (0)