Skip to content

Commit d81ffd2

Browse files
committed
Merge remote-tracking branch 'apache/4.19'
2 parents 3e6900a + 84b91cc commit d81ffd2

File tree

34 files changed

+384
-164
lines changed

34 files changed

+384
-164
lines changed

PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This PR...
2323
- [ ] Enhancement (improves an existing feature and functionality)
2424
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
2525
- [ ] build/CI
26+
- [ ] test (unit or integration test code)
2627

2728
### Feature/Enhancement Scale or Bug Severity
2829

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.api.command.admin.vm;
18+
19+
import com.cloud.vm.VirtualMachine;
20+
import org.apache.cloudstack.acl.RoleType;
21+
import org.apache.cloudstack.api.APICommand;
22+
import org.apache.cloudstack.api.ResponseObject.ResponseView;
23+
import org.apache.cloudstack.api.command.admin.AdminCmd;
24+
25+
import org.apache.cloudstack.api.command.user.vm.ListVnfAppliancesCmd;
26+
import org.apache.cloudstack.api.response.UserVmResponse;
27+
28+
@APICommand(name = "listVnfAppliances", description = "List VNF appliance owned by the account.",
29+
responseObject = UserVmResponse.class,
30+
responseView = ResponseView.Full,
31+
entityType = {VirtualMachine.class},
32+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
33+
authorized = {RoleType.Admin},
34+
since = "4.19.1")
35+
public class ListVnfAppliancesCmdByAdmin extends ListVnfAppliancesCmd implements AdminCmd {
36+
}

api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd {
100100
description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " +
101101
"This binary data must be base64 encoded before adding it to the request. " +
102102
"Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " +
103-
"Using HTTP POST(via POST body), you can send up to 1MB of data after base64 encoding." +
103+
"Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " +
104104
"You also need to change vm.userdata.max.length value",
105105
length = 1048576,
106106
since = "4.18.0")

api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd {
9595
description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " +
9696
"This binary data must be base64 encoded before adding it to the request. " +
9797
"Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " +
98-
"Using HTTP POST(via POST body), you can send up to 1MB of data after base64 encoding." +
98+
"Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " +
9999
"You also need to change vm.userdata.max.length value",
100100
length = 1048576,
101101
since = "4.18.0")

api/src/main/java/org/apache/cloudstack/api/command/user/userdata/RegisterUserDataCmd.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,14 @@ public class RegisterUserDataCmd extends BaseCmd {
7272
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the userdata")
7373
private Long projectId;
7474

75-
@Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, required = true, description = "Userdata content", length = 1048576)
75+
@Parameter(name = ApiConstants.USER_DATA,
76+
type = CommandType.STRING,
77+
required = true,
78+
description = "Base64 encoded userdata content. " +
79+
"Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " +
80+
"Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " +
81+
"You also need to change vm.userdata.max.length value",
82+
length = 1048576)
7683
private String userData;
7784

7885
@Parameter(name = ApiConstants.PARAMS, type = CommandType.STRING, description = "comma separated list of variables declared in userdata content")

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd implements SecurityG
154154
private String hypervisor;
155155

156156
@Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING,
157-
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 4KB of data after base64 encoding. Using HTTP POST(via POST body), you can send up to 1MB of data after base64 encoding.",
157+
description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " +
158+
"This binary data must be base64 encoded before adding it to the request. " +
159+
"Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " +
160+
"Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " +
161+
"You also need to change vm.userdata.max.length value",
158162
length = 1048576)
159163
private String userData;
160164

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.api.command.user.vm;
18+
19+
import com.cloud.vm.VirtualMachine;
20+
import org.apache.cloudstack.acl.RoleType;
21+
import org.apache.cloudstack.api.APICommand;
22+
import org.apache.cloudstack.api.ResponseObject.ResponseView;
23+
import org.apache.cloudstack.api.command.user.UserCmd;
24+
25+
import org.apache.cloudstack.api.response.UserVmResponse;
26+
27+
@APICommand(name = "listVnfAppliances", description = "List VNF appliance owned by the account.",
28+
responseObject = UserVmResponse.class,
29+
responseView = ResponseView.Restricted, entityType = {VirtualMachine.class},
30+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,
31+
authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User},
32+
since = "4.19.1")
33+
public class ListVnfAppliancesCmd extends ListVMsCmd implements UserCmd {
34+
35+
@Override
36+
public Boolean getVnf() {
37+
return true;
38+
}
39+
}

api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMUserDataCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class ResetVMUserDataCmd extends BaseCmd implements UserCmd {
6060
description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " +
6161
"This binary data must be base64 encoded before adding it to the request. " +
6262
"Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " +
63-
"Using HTTP POST(via POST body), you can send up to 1MB of data after base64 encoding." +
63+
"Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " +
6464
"You also need to change vm.userdata.max.length value",
6565
length = 1048576)
6666
private String userData;

api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction,
8484
description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " +
8585
"This binary data must be base64 encoded before adding it to the request. " +
8686
"Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " +
87-
"Using HTTP POST(via POST body), you can send up to 1MB of data after base64 encoding." +
87+
"Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " +
8888
"You also need to change vm.userdata.max.length value",
8989
length = 1048576,
9090
since = "4.16.0")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class AutoScaleVmProfileResponse extends BaseResponse implements Controll
6969
private Map<String, String> counterParams;
7070

7171
@SerializedName(ApiConstants.USER_DATA)
72-
@Param(description = "Base 64 encoded VM user data")
72+
@Param(description = "Base64 encoded VM user data")
7373
private String userData;
7474

7575
@SerializedName(ApiConstants.USER_DATA_ID) @Param(description="the id of userdata used for the VM", since = "4.18.1")

0 commit comments

Comments
 (0)