Skip to content

Commit ba05e7c

Browse files
committed
Merge remote-tracking branch 'apache/main' into snapshot-copy
2 parents 355a5c5 + c9d2303 commit ba05e7c

File tree

113 files changed

+2325
-1579
lines changed

Some content is hidden

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

113 files changed

+2325
-1579
lines changed

.github/linters/.flake8

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
# E112 Expected an indented block
19+
# E113 Unexpected indentation
20+
# E133 Closing bracket is missing indentation
1821
# E223 Tab before operator
1922
# E224 Tab after operator
23+
# E227 Missing whitespace around bitwise or shift operator
2024
# E242 Tab after ','
2125
# E273 Tab after keyword
2226
# E274 Tab before keyword
@@ -30,4 +34,7 @@
3034
# W391 Blank line at end of file
3135

3236
[flake8]
33-
select = E223,E224,E242,E273,E274,E742,E743,E901,E902,W291,W292,W293,W391
37+
exclude =
38+
.git,
39+
venv
40+
select = E112,E113,E133,E223,E224,E227,E242,E273,E274,E742,E743,E901,E902,W291,W292,W293,W391

.github/workflows/sonar-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ concurrency:
2929

3030
jobs:
3131
build:
32-
if: github.repository == 'apache/cloudstack'
32+
if: github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository
3333
name: Sonar JaCoCo Coverage
3434
runs-on: ubuntu-22.04
3535
steps:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ repos:
3131
#- id: check-added-large-files
3232
- id: check-case-conflict
3333
#- id: check-executables-have-shebangs
34-
#- id: check-merge-conflict
34+
- id: check-merge-conflict
3535
- id: check-vcs-permalinks
3636
#- id: check-yaml
3737
- id: detect-private-key

PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This PR...
2222
- [ ] Bug fix (non-breaking change which fixes an issue)
2323
- [ ] Enhancement (improves an existing feature and functionality)
2424
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
25+
- [ ] build/CI
2526

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

@@ -43,8 +44,12 @@ This PR...
4344

4445

4546
### How Has This Been Tested?
47+
4648
<!-- Please describe in detail how you tested your changes. -->
4749
<!-- Include details of your testing environment, and the tests you ran to -->
50+
51+
#### How did you try to break this feature and the system with this change?
52+
4853
<!-- see how your change affects other areas of the code, etc. -->
4954

5055

agent/conf/agent.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,11 @@ hypervisor.type=kvm
279279
# If this parameter is used, property host.overcommit.mem.mb must be set to 0.
280280
#host.reserved.mem.mb=1024
281281

282+
# Number of CPU cores to subtract from advertised available cores.
283+
# These are reserved for system activity, or otherwise share host CPU resources with
284+
# CloudStack VM allocation.
285+
# host.reserved.cpu.count = 0
286+
282287
# The model of Watchdog timer to present to the Guest.
283288
# For all models refer to the libvirt documentation.
284289
#vm.watchdog.model=i6300esb

agent/src/main/java/com/cloud/agent/dhcp/DhcpSnooper.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

agent/src/main/java/com/cloud/agent/dhcp/FakeDhcpSnooper.java

Lines changed: 0 additions & 161 deletions
This file was deleted.

agent/src/main/java/com/cloud/agent/properties/AgentProperties.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,15 @@ public class AgentProperties{
502502
*/
503503
public static final Property<Integer> HOST_RESERVED_MEM_MB = new Property<>("host.reserved.mem.mb", 1024);
504504

505+
/**
506+
* How many host CPUs to reserve for non-allocation.<br>
507+
* This can be used to set aside CPU cores on the host for other tasks, such as running hyperconverged storage<br>
508+
* processes, etc.
509+
* Data type: Integer.<br>
510+
* Default value: <code>0</code>
511+
*/
512+
public static final Property<Integer> HOST_RESERVED_CPU_CORE_COUNT = new Property<>("host.reserved.cpu.count", 0);
513+
505514
/**
506515
* The model of Watchdog timer to present to the Guest.<br>
507516
* For all models refer to the libvirt documentation.<br>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ List<TemplateResponse> createTemplateResponses(ResponseView view, VirtualMachine
438438
* @param result
439439
* @return
440440
*/
441-
PrivateGatewayResponse createPrivateGatewayResponse(PrivateGateway result);
441+
PrivateGatewayResponse createPrivateGatewayResponse(ResponseView view, PrivateGateway result);
442442

443443
/**
444444
* @param result
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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.vpc;
18+
19+
import org.apache.log4j.Logger;
20+
21+
import org.apache.cloudstack.api.APICommand;
22+
import org.apache.cloudstack.api.ResponseObject;
23+
import org.apache.cloudstack.api.command.admin.AdminCmd;
24+
import org.apache.cloudstack.api.command.user.vpc.ListPrivateGatewaysCmd;
25+
import org.apache.cloudstack.api.response.PrivateGatewayResponse;
26+
27+
import com.cloud.network.vpc.VpcGateway;
28+
29+
@APICommand(name = "listPrivateGateways", description = "List private gateways", responseObject = PrivateGatewayResponse.class, entityType = {VpcGateway.class},
30+
responseView = ResponseObject.ResponseView.Full,
31+
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
32+
public class ListPrivateGatewaysCmdByAdminCmd extends ListPrivateGatewaysCmd implements AdminCmd {
33+
public static final Logger s_logger = Logger.getLogger(ListPrivateGatewaysCmdByAdminCmd.class.getName());
34+
35+
}

0 commit comments

Comments
 (0)