Skip to content

Commit 28e8e2d

Browse files
authored
pre-commit: add hook to trim trailing whitespace (apache#8205)
1 parent 40c5d35 commit 28e8e2d

File tree

157 files changed

+753
-754
lines changed

Some content is hidden

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

157 files changed

+753
-754
lines changed

.pre-commit-config.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ repos:
5858
- id: forbid-submodules
5959
- id: mixed-line-ending
6060
exclude: \.(cs|xml)$
61-
# - id: trailing-whitespace
61+
- id: trailing-whitespace
62+
files: \.(in|java|md|py|rb|sh|vue|yaml|yml)$
63+
args: [--markdown-linebreak-ext=md]
6264
- repo: https://github.com/pycqa/flake8
6365
rev: 7.0.0
6466
hooks:

CHANGES.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,11 @@ Bug ID | Description
430430
[CLOUDSTACK-6099](https://issues.apache.org/jira/browse/CLOUDSTACK-6099) | live migration is failing for vm deployed using dynamic compute offerings with NPE
431431
[CLOUDSTACK-7528](https://issues.apache.org/jira/browse/CLOUDSTACK-7528) | More verbose logging when sending alert fails
432432
[CLOUDSTACK-6624](https://issues.apache.org/jira/browse/CLOUDSTACK-6624) | set specifyIpRanges to true if specifyVlan is set to true
433-
[CLOUDSTACK-7404](https://issues.apache.org/jira/browse/CLOUDSTACK-7404) | Failed to start an instance when originating template has been deleted
433+
[CLOUDSTACK-7404](https://issues.apache.org/jira/browse/CLOUDSTACK-7404) | Failed to start an instance when originating template has been deleted
434434
[CLOUDSTACK-6531](https://issues.apache.org/jira/browse/CLOUDSTACK-6531) | Stopping the router in case of command failures
435435
[CLOUDSTACK-6115](https://issues.apache.org/jira/browse/CLOUDSTACK-6115) | TravisCI configuration
436436
[CLOUDSTACK-7405](https://issues.apache.org/jira/browse/CLOUDSTACK-7405) | allowing VR meta-data to be accessed without trailing slash
437-
[CLOUDSTACK-7260](https://issues.apache.org/jira/browse/CLOUDSTACK-7260) | Management server not responding after some time for Vmware due to Oom
437+
[CLOUDSTACK-7260](https://issues.apache.org/jira/browse/CLOUDSTACK-7260) | Management server not responding after some time for Vmware due to Oom
438438
[CLOUDSTACK-7038](https://issues.apache.org/jira/browse/CLOUDSTACK-7038) | Add mysql client dependency for mgmt server pkg for debian
439439
[CLOUDSTACK-6892](https://issues.apache.org/jira/browse/CLOUDSTACK-6892) | Create separate package for the mysql HA component
440440
[CLOUDSTACK-7038](https://issues.apache.org/jira/browse/CLOUDSTACK-7038) | Add mysql client dependency for mgmt server/rpms
@@ -449,12 +449,12 @@ Bug ID | Description
449449
[CLOUDSTACK-7006](https://issues.apache.org/jira/browse/CLOUDSTACK-7006) | Restore template ID in ROOT volume usages
450450
[CLOUDSTACK-6747](https://issues.apache.org/jira/browse/CLOUDSTACK-6747) | test to allow all cidrs on other end of vpc
451451
[CLOUDSTACK-6272](https://issues.apache.org/jira/browse/CLOUDSTACK-6272) | Fix recover/restore VM actions
452-
[CLOUDSTACK-6927](https://issues.apache.org/jira/browse/CLOUDSTACK-6927) | store virsh list in list instead of querying libvirt
452+
[CLOUDSTACK-6927](https://issues.apache.org/jira/browse/CLOUDSTACK-6927) | store virsh list in list instead of querying libvirt
453453
[CLOUDSTACK-6317](https://issues.apache.org/jira/browse/CLOUDSTACK-6317) | [VMware] Tagged VLAN support broken for Management/Control/Storage traffic
454454
[CLOUDSTACK-5891](https://issues.apache.org/jira/browse/CLOUDSTACK-5891) | [VMware] If a template has been registered and "cpu.corespersocket=X" ,
455455
[CLOUDSTACK-6478](https://issues.apache.org/jira/browse/CLOUDSTACK-6478) | Failed to download Template when having 3 SSVM's in one
456456
[CLOUDSTACK-6464](https://issues.apache.org/jira/browse/CLOUDSTACK-6464) | if guest network type is vlan://untagged, and traffic label is used
457-
[CLOUDSTACK-6816](https://issues.apache.org/jira/browse/CLOUDSTACK-6816) | bugfix: cloudstack-setup-management make /root directory's permission 0777
457+
[CLOUDSTACK-6816](https://issues.apache.org/jira/browse/CLOUDSTACK-6816) | bugfix: cloudstack-setup-management make /root directory's permission 0777
458458
[CLOUDSTACK-6204](https://issues.apache.org/jira/browse/CLOUDSTACK-6204) | applying missed patch
459459
[CLOUDSTACK-6472](https://issues.apache.org/jira/browse/CLOUDSTACK-6472) | (4.3 specific) listUsageRecords: Pull information from removed items as well
460460
[CLOUDSTACK-5976](https://issues.apache.org/jira/browse/CLOUDSTACK-5976) | Typo in "ssh_keypairs" table's foreign key constraints on the Upgraded Setup
@@ -657,11 +657,11 @@ Version 4.1.0
657657
-------------
658658

659659
This is the second major release of CloudStack from within the Apache Software Foundation, and the
660-
first major release as a Top-Level Project (TLP).
660+
first major release as a Top-Level Project (TLP).
661661

662662
Build Tool Changes:
663663

664-
* The project now uses Maven 3 exclusively to build.
664+
* The project now uses Maven 3 exclusively to build.
665665

666666
New Features:
667667
* CLOUDSTACK-101: OVS support in KVM
@@ -976,14 +976,14 @@ Issues fixed in this release:
976976
* CLOUDSTACK-1845: KVM - storage migration often fails
977977
* CLOUDSTACK-1846: KVM - storage pools can silently fail to be unregistered, leading to failure to register later
978978
* CLOUDSTACK-2003: Deleting domain while deleted account is cleaning up leaves VMs expunging forever due to 'Failed to update resource count'
979-
* CLOUDSTACK-2090: Upgrade from version 4.0.1 to version 4.0.2 triggers the 4.0.0 to 4.0.1.
979+
* CLOUDSTACK-2090: Upgrade from version 4.0.1 to version 4.0.2 triggers the 4.0.0 to 4.0.1.
980980
* CLOUDSTACK-2091: Error in API documentation for 4.0.x.
981981

982982

983983
Version 4.0.1-incubating
984984
------------------------
985985

986-
This is a bugfix release for Apache CloudStack 4.0.0-incubating, with no new features.
986+
This is a bugfix release for Apache CloudStack 4.0.0-incubating, with no new features.
987987

988988
Security Fixes:
989989

CONTRIBUTING.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ Contributing to Apache CloudStack (ACS)
33

44
Summary
55
-------
6-
This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions.
6+
This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions.
77
These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the ACS project and you will submit a Pull Request for your changes to be added.
88

99
_Lets get started!!!_
1010

1111
Bug fixes
1212
---------
1313

14-
It's very important that we can easily track bug fix commits, so their hashes should remain the same in all branches.
15-
Therefore, a pull request (PR) that fixes a bug, should be sent against a release branch.
16-
This can be either the "current release" or the "previous release", depending on which ones are maintained.
14+
It's very important that we can easily track bug fix commits, so their hashes should remain the same in all branches.
15+
Therefore, a pull request (PR) that fixes a bug, should be sent against a release branch.
16+
This can be either the "current release" or the "previous release", depending on which ones are maintained.
1717
Since the goal is a stable main, bug fixes should be "merged forward" to the next branch in order: "previous release" -> "current release" -> main (in other words: old to new)
1818

1919
Developing new features
2020
-----------------------
2121

22-
Development should be done in a feature branch, branched off of main.
23-
Send a PR(steps below) to get it into main (2x LGTM applies).
24-
PR will only be merged when main is open, will be held otherwise until main is open again.
22+
Development should be done in a feature branch, branched off of main.
23+
Send a PR(steps below) to get it into main (2x LGTM applies).
24+
PR will only be merged when main is open, will be held otherwise until main is open again.
2525
No back porting / cherry-picking features to existing branches!
2626

2727
PendingReleaseNotes file
@@ -33,7 +33,7 @@ When adding information to the PendingReleaseNotes file make sure that you write
3333

3434
Updating the PendingReleaseNotes file is preferably a part of the original Pull Request, but that is up to the developers' discretion.
3535

36-
Fork the code
36+
Fork the code
3737
-------------
3838

3939
In your browser, navigate to: [https://github.com/apache/cloudstack](https://github.com/apache/cloudstack)
@@ -136,4 +136,4 @@ $ git push origin :feature_x
136136

137137
Release Principles
138138
------------------
139-
Detailed information about ACS release principles is available at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up
139+
Detailed information about ACS release principles is available at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ This distribution includes cryptographic software. The country in which you curr
142142
reside may have restrictions on the import, possession, use, and/or re-export to another
143143
country, of encryption software. BEFORE using any encryption software, please check your
144144
country's laws, regulations and policies concerning the import, possession, or use, and
145-
re-export of encryption software, to see if this is permitted. See [The Wassenaar Arrangement](http://www.wassenaar.org/)
145+
re-export of encryption software, to see if this is permitted. See [The Wassenaar Arrangement](http://www.wassenaar.org/)
146146
for more information.
147147

148148
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has

agent/bindir/cloud-setup-agent.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

agent/bindir/cloud-ssh.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

agent/conf/environment.properties.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# to you under the Apache License, Version 2.0 (the
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

client/bindir/cloud-update-xenserver-licenses.in

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# to you under the Apache License, Version 2.0 (the
88
# "License"); you may not use this file except in compliance
99
# with the License. You may obtain a copy of the License at
10-
#
10+
#
1111
# http://www.apache.org/licenses/LICENSE-2.0
12-
#
12+
#
1313
# Unless required by applicable law or agreed to in writing,
1414
# software distributed under the License is distributed on an
1515
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -46,7 +46,7 @@ cfg = "@MSCONF@/db.properties"
4646
#---------------------- option parsing and command line checks ------------------------
4747

4848

49-
usage = """%prog <license file> <-a | host names / IP addresses...>
49+
usage = """%prog <license file> <-a | host names / IP addresses...>
5050
5151
This command deploys the license file specified in the command line into a specific XenServer host or all XenServer hosts known to the management server."""
5252

@@ -88,7 +88,7 @@ def parseuserpwfromhosts(hosts):
8888
return creds
8989

9090
class XenServerConfigurator(Thread):
91-
91+
9292
def __init__(self,host,user,password,keyfiledata):
9393
Thread.__init__(self)
9494
self.host = host
@@ -99,7 +99,7 @@ class XenServerConfigurator(Thread):
9999
self.stdout = ""
100100
self.stderr = ""
101101
self.state = 'initialized'
102-
102+
103103
def run(self):
104104
try:
105105
self.state = 'running'
@@ -120,18 +120,18 @@ class XenServerConfigurator(Thread):
120120
c.close()
121121
if self.retval != 0: self.state = 'failed'
122122
else: self.state = 'finished'
123-
123+
124124
except Exception as e:
125125
self.state = 'failed'
126126
self.retval = e
127127
#raise
128-
128+
129129
def __str__(self):
130130
if self.state == 'failed':
131131
return "<%s XenServerConfigurator on %s@%s: %s>"%(self.state,self.user,self.host,str(self.retval))
132132
else:
133133
return "<%s XenServerConfigurator on %s@%s>"%(self.state,self.user,self.host)
134-
134+
135135
#------------- actual code --------------------
136136

137137
(options, args) = parser.parse_args()
@@ -162,7 +162,7 @@ for host,(user,password) in list(creds.items()):
162162

163163

164164
for c in configurators: c.start()
165-
165+
166166
for c in configurators:
167167
print(c.host + "...", end=' ')
168168
c.join()

deps/install-non-oss.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# with the License. You may obtain a copy of the License at
99
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/configureOvm.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

plugins/network-elements/juniper-contrail/src/test/resources/mysql_db_start.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ echo "new mysql server is started on port "$PORT
4747
echo $db
4848

4949
echo "commands ...."
50-
echo "to connect(from local host): mysql -h 127.0.0.1 -P "$PORT
50+
echo "to connect(from local host): mysql -h 127.0.0.1 -P "$PORT
5151
echo "to stop: mysqladmin -S /tmp/mysql"$PORT"/mysqld.sock shutdown -u root"

plugins/storage/volume/storpool/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ This is independent of StorPool as snapshots exist on secondary.
294294
### Creating ROOT volume from templates
295295

296296
When creating the first volume based on the given template, if snapshot of the template does not exists on StorPool it will be first downloaded (cached) to PRIMARY storage.
297-
This is mapped to a StorPool snapshot so, creating succecutive volumes from the same template does not incur additional
297+
This is mapped to a StorPool snapshot so, creating succecutive volumes from the same template does not incur additional
298298
copying of data to PRIMARY storage.
299299

300300
This cached snapshot is garbage collected when the original template is deleted from CloudStack. This cleanup is done

python/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

python/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

python/distro/opensuse/SYSCONFDIR/init.d/cloud-ipallocator.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

python/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

python/distro/sles/SYSCONFDIR/init.d/cloud-ipallocator.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

python/distro/ubuntu/SYSCONFDIR/init.d/cloud-ipallocator.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# to you under the Apache License, Version 2.0 (the
77
# "License"); you may not use this file except in compliance
88
# with the License. You may obtain a copy of the License at
9-
#
9+
#
1010
# http://www.apache.org/licenses/LICENSE-2.0
11-
#
11+
#
1212
# Unless required by applicable law or agreed to in writing,
1313
# software distributed under the License is distributed on an
1414
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -52,7 +52,7 @@ start() {
5252
log_end_msg 1
5353
exit 1
5454
fi
55-
55+
5656
if start-stop-daemon --start --quiet \
5757
--pidfile "$PIDFILE" \
5858
--exec "$DAEMONIZE" -- -n "$SHORTNAME" -p "$PIDFILE" -l "$LOGFILE" "$PROG" $OPTIONS

0 commit comments

Comments
 (0)