Skip to content

Commit de37267

Browse files
authored
Merge branch 'main' into standardize-markdown
2 parents 3fe877a + b106d6e commit de37267

File tree

335 files changed

+13224
-2534
lines changed

Some content is hidden

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

335 files changed

+13224
-2534
lines changed

.asf.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ github:
6363
protected_branches: ~
6464

6565
notifications:
66-
commits: commits@cloudstack.apache.org
67-
issues: commits@cloudstack.apache.org
66+
commits: commits@cloudstack.apache.org
67+
issues: commits@cloudstack.apache.org
6868
pullrequests: commits@cloudstack.apache.org
69-
discussions: users@cloudstack.apache.org
69+
discussions: users@cloudstack.apache.org

.github/linters/.yamllint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
---
18+
extends: relaxed
19+
20+
rules:
21+
line-length:
22+
max: 400 # Very forgiving for GitHub Actions and infrastructure files
23+
indentation: disable # Disable indentation checking for existing files
24+
comments: disable # Disable comment formatting checks
25+
brackets: disable # Disable bracket spacing checks
26+
colons:
27+
max-spaces-after: -1 # Allow any number of spaces after colon
28+
max-spaces-before: 0
29+
document-start: disable # Many files don't have ---
30+
truthy:
31+
allowed-values: ['true', 'false', 'on', 'off', 'yes', 'no']

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,13 @@ repos:
9494
args: [--config=.github/linters/.markdown-lint.yml]
9595
types: [markdown]
9696
files: \.(md|mdown|markdown)$
97+
- repo: https://github.com/adrienverge/yamllint
98+
rev: v1.37.1
99+
hooks:
100+
- id: yamllint
101+
name: run yamllint
102+
description: check YAML files with yamllint
103+
args: [--config-file=.github/linters/.yamllint.yml]
104+
types: [yaml]
105+
files: \.ya?ml$
106+
exclude: ^.*k8s-.*\.ya?ml$

agent/conf/agent.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,3 +451,9 @@ iscsi.session.cleanup.enabled=false
451451

452452
# If set to true, creates VMs as full clones of their templates on KVM hypervisor. Creates as linked clones otherwise.
453453
# create.full.clone=false
454+
455+
# Instance conversion TMPDIR env var
456+
#convert.instance.env.tmpdir=
457+
458+
# Instance conversion VIRT_V2V_TMPDIR env var
459+
#convert.instance.env.virtv2v.tmpdir=

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,20 @@ public Property<Integer> getWorkers() {
794794
*/
795795
public static final Property<Boolean> VIRTV2V_VERBOSE_ENABLED = new Property<>("virtv2v.verbose.enabled", false);
796796

797+
/**
798+
* Set env TMPDIR var for virt-v2v Instance Conversion from VMware to KVM
799+
* Data type: String.<br>
800+
* Default value: <code>null</code>
801+
*/
802+
public static final Property<String> CONVERT_ENV_TMPDIR = new Property<>("convert.instance.env.tmpdir", null, String.class);
803+
804+
/**
805+
* Set env VIRT_V2V_TMPDIR var for virt-v2v Instance Conversion from VMware to KVM
806+
* Data type: String.<br>
807+
* Default value: <code>null</code>
808+
*/
809+
public static final Property<String> CONVERT_ENV_VIRTV2V_TMPDIR = new Property<>("convert.instance.env.virtv2v.tmpdir", null, String.class);
810+
797811
/**
798812
* BGP controll CIDR
799813
* Data type: String.<br>

api/src/main/java/com/cloud/configuration/ConfigurationService.java

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -108,36 +108,22 @@ public interface ConfigurationService {
108108
/**
109109
* Updates a service offering
110110
*
111-
* @param serviceOfferingId
112-
* @param userId
113-
* @param name
114-
* @param displayText
115-
* @param offerHA
116-
* @param useVirtualNetwork
117-
* @param tags
118111
* @return updated service offering
119112
*/
120113
ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd);
121114

122115
/**
123116
* Deletes a service offering
124-
*
125-
* @param userId
126-
* @param serviceOfferingId
127117
*/
128118
boolean deleteServiceOffering(DeleteServiceOfferingCmd cmd);
129119

130120
/**
131121
* Retrieve ID of domains for a service offering
132-
*
133-
* @param serviceOfferingId
134122
*/
135123
List<Long> getServiceOfferingDomains(Long serviceOfferingId);
136124

137125
/**
138126
* Retrieve ID of domains for a service offering
139-
*
140-
* @param serviceOfferingId
141127
*/
142128
List<Long> getServiceOfferingZones(Long serviceOfferingId);
143129

@@ -147,7 +133,6 @@ public interface ConfigurationService {
147133
* @param cmd
148134
* - the command specifying diskOfferingId, name, description, tags
149135
* @return updated disk offering
150-
* @throws
151136
*/
152137
DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd);
153138

@@ -157,34 +142,22 @@ public interface ConfigurationService {
157142
* @param cmd
158143
* - the command specifying disk offering id
159144
* @return true or false
160-
* @throws
161145
*/
162146
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd);
163147

164148
/**
165149
* Creates a new disk offering
166-
*
167-
* @param domainId
168-
* @param name
169-
* @param description
170-
* @param numGibibytes
171-
* @param mirrored
172-
* @param size
173150
* @return ID
174151
*/
175152
DiskOffering createDiskOffering(CreateDiskOfferingCmd cmd);
176153

177154
/**
178155
* Retrieve ID of domains for a disk offering
179-
*
180-
* @param diskOfferingId
181156
*/
182157
List<Long> getDiskOfferingDomains(Long diskOfferingId);
183158

184159
/**
185160
* Retrieve ID of domains for a disk offering
186-
*
187-
* @param diskOfferingId
188161
*/
189162
List<Long> getDiskOfferingZones(Long diskOfferingId);
190163

@@ -207,8 +180,6 @@ public interface ConfigurationService {
207180
* TODO
208181
* @param storageAccessGroups
209182
* @return the new pod if successful, null otherwise
210-
* @throws
211-
* @throws
212183
*/
213184
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState, List<String> storageAccessGroups);
214185

@@ -228,8 +199,7 @@ public interface ConfigurationService {
228199
/**
229200
* Updates a mutually exclusive IP range in the pod.
230201
* @param cmd - The command specifying pod ID, current Start IP, current End IP, new Start IP, new End IP.
231-
* @throws com.cloud.exception.ConcurrentOperationException
232-
* @return Success
202+
* @throws com.cloud.exception.ConcurrentOperationException when this pod is already being accessed
233203
*/
234204
void updatePodIpRange(UpdatePodManagementNetworkIpRangeCmd cmd) throws ConcurrentOperationException;
235205

@@ -250,9 +220,6 @@ public interface ConfigurationService {
250220

251221
/**
252222
* Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.
253-
*
254-
* @param UpdatePodCmd
255-
* api command
256223
*/
257224
Pod editPod(UpdatePodCmd cmd);
258225

@@ -262,17 +229,12 @@ public interface ConfigurationService {
262229
* @param cmd
263230
* - the command containing podId
264231
* @return true or false
265-
* @throws ,
266232
*/
267233
boolean deletePod(DeletePodCmd cmd);
268234

269235
/**
270236
* Creates a new zone
271-
*
272-
* @param cmd
273237
* @return the zone if successful, null otherwise
274-
* @throws
275-
* @throws
276238
*/
277239
DataCenter createZone(CreateZoneCmd cmd);
278240

@@ -295,22 +257,7 @@ public interface ConfigurationService {
295257
* Adds a VLAN to the database, along with an IP address range. Can add three types of VLANs: (1) zone-wide VLANs on
296258
* the
297259
* virtual public network (2) pod-wide direct attached VLANs (3) account-specific direct attached VLANs
298-
*
299-
* @param userId
300-
* @param vlanType
301-
* - either "DomR" (VLAN for a virtual public network) or "DirectAttached" (VLAN for IPs that will be
302-
* directly
303-
* attached to UserVMs)
304-
* @param zoneId
305-
* @param accountId
306-
* @param podId
307-
* @param add
308-
* @param vlanId
309-
* @param gateway
310-
* @param startIP
311-
* @param endIP
312260
* @throws ResourceAllocationException TODO
313-
* @throws
314261
* @return The new Vlan object
315262
*/
316263
Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
@@ -325,9 +272,6 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
325272
/**
326273
* Marks the account with the default zone-id.
327274
*
328-
* @param accountName
329-
* @param domainId
330-
* @param defaultZoneId
331275
* @return The new account object
332276
*/
333277
Account markDefaultZone(String accountName, long domainId, long defaultZoneId);
@@ -349,14 +293,12 @@ Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOpera
349293
/**
350294
* Retrieve ID of domains for a network offering
351295
*
352-
* @param networkOfferingId
353296
*/
354297
List<Long> getNetworkOfferingDomains(Long networkOfferingId);
355298

356299
/**
357300
* Retrieve ID of domains for a network offering
358301
*
359-
* @param networkOfferingId
360302
*/
361303
List<Long> getNetworkOfferingZones(Long networkOfferingId);
362304

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import org.apache.cloudstack.api.response.HostResponse;
2828
import org.apache.cloudstack.api.response.PodResponse;
2929
import org.apache.cloudstack.api.response.ZoneResponse;
30+
import org.apache.cloudstack.backup.BackupRepositoryService;
3031
import org.apache.cloudstack.config.Configuration;
3132
import org.apache.cloudstack.datacenter.DataCenterIpv4GuestSubnet;
3233
import org.apache.cloudstack.extension.Extension;
@@ -852,6 +853,10 @@ public class EventTypes {
852853
// Custom Action
853854
public static final String EVENT_CUSTOM_ACTION = "CUSTOM.ACTION";
854855

856+
// Backup Repository
857+
public static final String EVENT_BACKUP_REPOSITORY_ADD = "BACKUP.REPOSITORY.ADD";
858+
public static final String EVENT_BACKUP_REPOSITORY_UPDATE = "BACKUP.REPOSITORY.UPDATE";
859+
855860
static {
856861

857862
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking
@@ -1385,6 +1390,10 @@ public class EventTypes {
13851390
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_ADD, ExtensionCustomAction.class);
13861391
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_UPDATE, ExtensionCustomAction.class);
13871392
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_DELETE, ExtensionCustomAction.class);
1393+
1394+
// Backup Repository
1395+
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_ADD, BackupRepositoryService.class);
1396+
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_UPDATE, BackupRepositoryService.class);
13881397
}
13891398

13901399
public static boolean isNetworkEvent(String eventType) {

api/src/main/java/com/cloud/kubernetes/cluster/KubernetesCluster.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ enum State {
8888
s_fsm.addTransition(State.Stopping, Event.OperationFailed, State.Alert);
8989

9090
s_fsm.addTransition(State.Stopped, Event.StartRequested, State.Starting);
91+
s_fsm.addTransition(State.Stopped, Event.OperationSucceeded, State.Stopped);
92+
s_fsm.addTransition(State.Running, Event.OperationSucceeded, State.Running);
9193

9294
s_fsm.addTransition(State.Running, Event.FaultsDetected, State.Alert);
9395

api/src/main/java/com/cloud/network/RouterHealthCheckResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public interface RouterHealthCheckResult {
2626

2727
String getCheckType();
2828

29-
boolean getCheckResult();
29+
VirtualNetworkApplianceService.RouterHealthStatus getCheckResult();
3030

3131
Date getLastUpdateTime();
3232

api/src/main/java/com/cloud/network/VirtualNetworkApplianceService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,8 @@ void startRouterForHA(VirtualMachine vm, Map<VirtualMachineProfile.Param, Object
8787
Pair<Boolean, String> performRouterHealthChecks(long routerId);
8888

8989
<T extends VirtualRouter> void collectNetworkStatistics(T router, Nic nic);
90+
91+
enum RouterHealthStatus{
92+
SUCCESS, FAILED, WARNING, UNKNOWN;
93+
}
9094
}

0 commit comments

Comments
 (0)