Skip to content

Commit f06a3ae

Browse files
committed
Merge branch 'main' into pre-commit-color-always
2 parents 4bebd5e + fff4caf commit f06a3ae

File tree

212 files changed

+1079
-280
lines changed

Some content is hidden

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

212 files changed

+1079
-280
lines changed
File renamed without changes.

.pre-commit-config.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ repos:
2525
hooks:
2626
- id: identity
2727
- id: check-hooks-apply
28+
- repo: https://github.com/thlorenz/doctoc.git
29+
rev: v2.2.0
30+
hooks:
31+
- id: doctoc
32+
name: Add TOC for Markdown files
33+
files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
2834
- repo: https://github.com/oxipng/oxipng
2935
rev: v9.1.5
3036
hooks:
@@ -41,6 +47,11 @@ repos:
4147
- repo: https://github.com/Lucas-C/pre-commit-hooks
4248
rev: v1.5.5
4349
hooks:
50+
- id: chmod
51+
name: set file permissions
52+
args: ['644']
53+
files: \.md$
54+
stages: [manual]
4455
- id: insert-license
4556
name: add license for all Markdown files
4657
files: \.md$
@@ -84,7 +95,7 @@ repos:
8495
^systemvm/agent/certs/realhostip\.key$|
8596
^test/integration/smoke/test_ssl_offloading\.py$
8697
- id: end-of-file-fixer
87-
exclude: \.vhd$
98+
exclude: \.vhd$|\.svg$
8899
- id: file-contents-sorter
89100
args: [--unique]
90101
files: ^\.github/linters/codespell\.txt$
@@ -117,14 +128,6 @@ repos:
117128
args: [--config=.github/linters/.markdown-lint.yml]
118129
types: [markdown]
119130
files: \.(md|mdown|markdown)$
120-
- repo: https://github.com/Lucas-C/pre-commit-hooks
121-
rev: v1.5.5
122-
hooks:
123-
- id: chmod
124-
name: set file permissions
125-
args: ['644']
126-
files: \.md$
127-
stages: [manual]
128131
- repo: https://github.com/adrienverge/yamllint
129132
rev: v1.37.1
130133
hooks:

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@
2121

2222
## Summary
2323

24+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
25+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
26+
27+
- [Summary](#summary)
28+
- [Bug fixes](#bug-fixes)
29+
- [Developing new features](#developing-new-features)
30+
- [PendingReleaseNotes file](#pendingreleasenotes-file)
31+
- [Fork the code](#fork-the-code)
32+
- [Making changes](#making-changes)
33+
- [Rebase `feature_x` to include updates from `upstream/main`](#rebase-feature_x-to-include-updates-from-upstreammain)
34+
- [Make a GitHub Pull Request to contribute your changes](#make-a-github-pull-request-to-contribute-your-changes)
35+
- [Cleaning up after a successful pull request](#cleaning-up-after-a-successful-pull-request)
36+
- [Release Principles](#release-principles)
37+
38+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
39+
40+
## Summary
41+
2442
This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions.
2543
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.
2644

INSTALL.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,21 @@ or the developer [wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/H
2626
Apache CloudStack developers use various platforms for development, this guide
2727
was tested against a CentOS 7 x86_64 setup.
2828

29-
* [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for Apache CloudStack.
30-
* [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack) Apache CloudStack.
31-
* [Appliance based development](https://github.com/rhtyd/monkeybox)
29+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
30+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
31+
32+
- [Setting up Development Environment](#setting-up-development-environment)
33+
- [Using jenv and/or pyenv for Version Management](#using-jenv-andor-pyenv-for-version-management)
34+
- [Getting the Source Code](#getting-the-source-code)
35+
- [Building](#building)
36+
- [To bring up CloudStack UI](#to-bring-up-cloudstack-ui)
37+
- [Building with non-redistributable plugins](#building-with-non-redistributable-plugins)
38+
- [Packaging and Installation](#packaging-and-installation)
39+
- [Debian/Ubuntu](#debianubuntu)
40+
- [RHEL/CentOS](#rhelcentos)
41+
- [Notes](#notes)
42+
43+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3244

3345
## Setting up Development Environment
3446

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@
3131

3232
[![Apache CloudStack](tools/logo/apache_cloudstack.png)](https://cloudstack.apache.org/)
3333

34+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
35+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
36+
37+
- [Who Uses CloudStack?](#who-uses-cloudstack)
38+
- [Demo](#demo)
39+
- [Getting Started](#getting-started)
40+
- [Getting Source Repository](#getting-source-repository)
41+
- [Documentation](#documentation)
42+
- [News and Events](#news-and-events)
43+
- [Getting Involved and Contributing](#getting-involved-and-contributing)
44+
- [Reporting Security Vulnerabilities](#reporting-security-vulnerabilities)
45+
- [License](#license)
46+
- [Notice of Cryptographic Software](#notice-of-cryptographic-software)
47+
- [Star History](#star-history)
48+
- [Contributors](#contributors)
49+
50+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
51+
3452
Apache CloudStack is open source software designed to deploy and manage large
3553
networks of virtual machines, as a highly available, highly scalable
3654
Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used

agent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.22.0.0-SNAPSHOT</version>
27+
<version>4.23.0.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.cloudstack</groupId>
2626
<artifactId>cloudstack</artifactId>
27-
<version>4.22.0.0-SNAPSHOT</version>
27+
<version>4.23.0.0-SNAPSHOT</version>
2828
</parent>
2929
<dependencies>
3030
<dependency>
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
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 com.cloud.agent.api.to;
18+
19+
import java.util.ArrayList;
20+
import java.util.HashMap;
21+
import java.util.List;
22+
import java.util.Map;
23+
24+
public class VirtualMachineMetadataTO {
25+
// VM details
26+
private final String name;
27+
private final String internalName;
28+
private final String displayName;
29+
private final String instanceUuid;
30+
private final Integer cpuCores;
31+
private final Integer memory;
32+
private final Long created;
33+
private final Long started;
34+
35+
// Owner details
36+
private final String ownerDomainUuid;
37+
private final String ownerDomainName;
38+
private final String ownerAccountUuid;
39+
private final String ownerAccountName;
40+
private final String ownerProjectUuid;
41+
private final String ownerProjectName;
42+
43+
// Host and service offering
44+
private final String serviceOfferingName;
45+
private final List<String> serviceOfferingHostTags;
46+
47+
// zone, pod, and cluster details
48+
private final String zoneName;
49+
private final String zoneUuid;
50+
private final String podName;
51+
private final String podUuid;
52+
private final String clusterName;
53+
private final String clusterUuid;
54+
55+
// resource tags
56+
private final Map<String, String> resourceTags;
57+
58+
public VirtualMachineMetadataTO(
59+
String name, String internalName, String displayName, String instanceUuid, Integer cpuCores, Integer memory, Long created, Long started,
60+
String ownerDomainUuid, String ownerDomainName, String ownerAccountUuid, String ownerAccountName, String ownerProjectUuid, String ownerProjectName,
61+
String serviceOfferingName, List<String> serviceOfferingHostTags,
62+
String zoneName, String zoneUuid, String podName, String podUuid, String clusterName, String clusterUuid, Map<String, String> resourceTags) {
63+
/*
64+
* Something failed in the metadata shall not be a fatal error, the VM can still be started
65+
* Thus, the unknown fields just get an explicit "unknown" value so it can be fixed in case
66+
* there are bugs on some execution paths.
67+
* */
68+
69+
this.name = (name != null) ? name : "unknown";
70+
this.internalName = (internalName != null) ? internalName : "unknown";
71+
this.displayName = (displayName != null) ? displayName : "unknown";
72+
this.instanceUuid = (instanceUuid != null) ? instanceUuid : "unknown";
73+
this.cpuCores = (cpuCores != null) ? cpuCores : -1;
74+
this.memory = (memory != null) ? memory : -1;
75+
this.created = (created != null) ? created : 0;
76+
this.started = (started != null) ? started : 0;
77+
this.ownerDomainUuid = (ownerDomainUuid != null) ? ownerDomainUuid : "unknown";
78+
this.ownerDomainName = (ownerDomainName != null) ? ownerDomainName : "unknown";
79+
this.ownerAccountUuid = (ownerAccountUuid != null) ? ownerAccountUuid : "unknown";
80+
this.ownerAccountName = (ownerAccountName != null) ? ownerAccountName : "unknown";
81+
this.ownerProjectUuid = (ownerProjectUuid != null) ? ownerProjectUuid : "unknown";
82+
this.ownerProjectName = (ownerProjectName != null) ? ownerProjectName : "unknown";
83+
this.serviceOfferingName = (serviceOfferingName != null) ? serviceOfferingName : "unknown";
84+
this.serviceOfferingHostTags = (serviceOfferingHostTags != null) ? serviceOfferingHostTags : new ArrayList<>();
85+
this.zoneName = (zoneName != null) ? zoneName : "unknown";
86+
this.zoneUuid = (zoneUuid != null) ? zoneUuid : "unknown";
87+
this.podName = (podName != null) ? podName : "unknown";
88+
this.podUuid = (podUuid != null) ? podUuid : "unknown";
89+
this.clusterName = (clusterName != null) ? clusterName : "unknown";
90+
this.clusterUuid = (clusterUuid != null) ? clusterUuid : "unknown";
91+
92+
this.resourceTags = (resourceTags != null) ? resourceTags : new HashMap<>();
93+
}
94+
95+
public String getName() {
96+
return name;
97+
}
98+
99+
public String getInternalName() {
100+
return internalName;
101+
}
102+
103+
public String getDisplayName() {
104+
return displayName;
105+
}
106+
107+
public String getInstanceUuid() {
108+
return instanceUuid;
109+
}
110+
111+
public Integer getCpuCores() {
112+
return cpuCores;
113+
}
114+
115+
public Integer getMemory() {
116+
return memory;
117+
}
118+
119+
public Long getCreated() { return created; }
120+
121+
public Long getStarted() {
122+
return started;
123+
}
124+
125+
public String getOwnerDomainUuid() {
126+
return ownerDomainUuid;
127+
}
128+
129+
public String getOwnerDomainName() {
130+
return ownerDomainName;
131+
}
132+
133+
public String getOwnerAccountUuid() {
134+
return ownerAccountUuid;
135+
}
136+
137+
public String getOwnerAccountName() {
138+
return ownerAccountName;
139+
}
140+
141+
public String getOwnerProjectUuid() {
142+
return ownerProjectUuid;
143+
}
144+
145+
public String getOwnerProjectName() {
146+
return ownerProjectName;
147+
}
148+
149+
public String getserviceOfferingName() {
150+
return serviceOfferingName;
151+
}
152+
153+
public List<String> getserviceOfferingHostTags() {
154+
return serviceOfferingHostTags;
155+
}
156+
157+
public String getZoneName() {
158+
return zoneName;
159+
}
160+
161+
public String getZoneUuid() {
162+
return zoneUuid;
163+
}
164+
165+
public String getPodName() {
166+
return podName;
167+
}
168+
169+
public String getPodUuid() {
170+
return podUuid;
171+
}
172+
173+
public String getClusterName() {
174+
return clusterName;
175+
}
176+
177+
public String getClusterUuid() {
178+
return clusterUuid;
179+
}
180+
181+
public Map<String, String> getResourceTags() { return resourceTags; }
182+
}

api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public class VirtualMachineTO {
8989
private DeployAsIsInfoTO deployAsIsInfo;
9090
private String metadataManufacturer;
9191
private String metadataProductName;
92+
private VirtualMachineMetadataTO metadata;
9293

9394
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader,
9495
String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
@@ -494,6 +495,14 @@ public void setMetadataProductName(String metadataProductName) {
494495
this.metadataProductName = metadataProductName;
495496
}
496497

498+
public VirtualMachineMetadataTO getMetadata() {
499+
return metadata;
500+
}
501+
502+
public void setMetadata(VirtualMachineMetadataTO metadata) {
503+
this.metadata = metadata;
504+
}
505+
497506
@Override
498507
public String toString() {
499508
return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity {
4141
String getHypervNetworkLabel();
4242

4343
String getOvm3NetworkLabel();
44+
45+
String getVlan();
4446
}

0 commit comments

Comments
 (0)