Skip to content

Commit e1e668f

Browse files
Dirk KlahreDirk Klahre
authored andcommitted
Merge branch 'master' of https://github.com/apache/cloudstack
2 parents 611fc43 + 58a0a7b commit e1e668f

File tree

368 files changed

+3515
-2388
lines changed

Some content is hidden

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

368 files changed

+3515
-2388
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class IpAddressTO {
3535
private String networkName;
3636
private Integer nicDevId;
3737
private boolean newNic;
38+
private boolean isPrivateGateway;
3839

3940
public IpAddressTO(long accountId, String ipAddress, boolean add, boolean firstIP, boolean sourceNat, String broadcastUri, String vlanGateway, String vlanNetmask,
4041
String vifMacAddress, Integer networkRate, boolean isOneToOneNat) {
@@ -133,4 +134,12 @@ public boolean isNewNic() {
133134
public void setNewNic(boolean newNic) {
134135
this.newNic = newNic;
135136
}
137+
138+
public boolean isPrivateGateway() {
139+
return isPrivateGateway;
140+
}
141+
142+
public void setPrivateGateway(boolean isPrivateGateway) {
143+
this.isPrivateGateway = isPrivateGateway;
144+
}
136145
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public class EventTypes {
104104
public static final String EVENT_VM_EXPUNGE = "VM.EXPUNGE";
105105
public static final String EVENT_VM_IMPORT = "VM.IMPORT";
106106
public static final String EVENT_VM_UNMANAGE = "VM.UNMANAGE";
107+
public static final String EVENT_VM_RECOVER = "VM.RECOVER";
107108

108109
// Domain Router
109110
public static final String EVENT_ROUTER_CREATE = "ROUTER.CREATE";

api/src/main/java/com/cloud/vm/NicProfile.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ public void setDeviceId(int deviceId) {
175175
this.deviceId = deviceId;
176176
}
177177

178+
public void setDeviceId(Integer deviceId) {
179+
this.deviceId = deviceId;
180+
}
181+
178182
public String getName() {
179183
return name;
180184
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ public class AccountResponse extends BaseResponse implements ResourceLimitAndCou
5555
private String roleName;
5656

5757
@SerializedName(ApiConstants.DOMAIN_ID)
58-
@Param(description = "id of the Domain the account belongs too")
58+
@Param(description = "id of the Domain the account belongs to")
5959
private String domainId;
6060

6161
@SerializedName(ApiConstants.DOMAIN)
62-
@Param(description = "name of the Domain the account belongs too")
62+
@Param(description = "name of the Domain the account belongs to")
6363
private String domainName;
6464

6565
@SerializedName(ApiConstants.DOMAIN_PATH)
66-
@Param(description = "name of the Domain the account belongs too", since = "4.13")
66+
@Param(description = "path of the Domain the account belongs to", since = "4.13")
6767
private String domainPath;
6868

6969
@SerializedName(ApiConstants.DEFAULT_ZONE_ID)

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,23 @@ public class HostForMigrationResponse extends BaseResponse {
9595
@Param(description = "the CPU speed of the host")
9696
private Long cpuSpeed;
9797

98+
@Deprecated
9899
@SerializedName("cpuallocated")
99100
@Param(description = "the amount of the host's CPU currently allocated")
100101
private String cpuAllocated;
101102

103+
@SerializedName("cpuallocatedvalue")
104+
@Param(description = "the amount of the host's CPU currently allocated in MHz")
105+
private Long cpuAllocatedValue;
106+
107+
@SerializedName("cpuallocatedpercentage")
108+
@Param(description = "the amount of the host's CPU currently allocated in percentage")
109+
private String cpuAllocatedPercentage;
110+
111+
@SerializedName("cpuallocatedwithoverprovisioning")
112+
@Param(description = "the amount of the host's CPU currently allocated after applying the cpu.overprovisioning.factor")
113+
private String cpuAllocatedWithOverprovisioning;
114+
102115
@SerializedName("cpuused")
103116
@Param(description = "the amount of the host's CPU currently used")
104117
private String cpuUsed;
@@ -128,10 +141,19 @@ public class HostForMigrationResponse extends BaseResponse {
128141
@Param(description = "the outgoing network traffic on the host")
129142
private Long networkKbsWrite;
130143

144+
@Deprecated
131145
@SerializedName("memoryallocated")
132146
@Param(description = "the amount of the host's memory currently allocated")
133147
private String memoryAllocated;
134148

149+
@SerializedName("memoryallocatedpercentage")
150+
@Param(description = "the amount of the host's memory currently allocated in percentage")
151+
private String memoryAllocatedPercentage;
152+
153+
@SerializedName("memoryallocatedbytes")
154+
@Param(description = "the amount of the host's memory currently allocated in bytes")
155+
private Long memoryAllocatedBytes;
156+
135157
@SerializedName("memoryused")
136158
@Param(description = "the amount of the host's memory currently used")
137159
private Long memoryUsed;
@@ -294,6 +316,18 @@ public void setCpuAllocated(String cpuAllocated) {
294316
this.cpuAllocated = cpuAllocated;
295317
}
296318

319+
public void setCpuAllocatedValue(Long cpuAllocatedValue) {
320+
this.cpuAllocatedValue = cpuAllocatedValue;
321+
}
322+
323+
public void setCpuAllocatedPercentage(String cpuAllocatedPercentage) {
324+
this.cpuAllocatedPercentage = cpuAllocatedPercentage;
325+
}
326+
327+
public void setCpuAllocatedWithOverprovisioning(String cpuAllocatedWithOverprovisioning) {
328+
this.cpuAllocatedWithOverprovisioning = cpuAllocatedWithOverprovisioning;
329+
}
330+
297331
public void setCpuUsed(String cpuUsed) {
298332
this.cpuUsed = cpuUsed;
299333
}
@@ -314,6 +348,14 @@ public void setMemoryAllocated(String memoryAllocated) {
314348
this.memoryAllocated = memoryAllocated;
315349
}
316350

351+
public void setMemoryAllocatedPercentage(String memoryAllocatedPercentage) {
352+
this.memoryAllocatedPercentage = memoryAllocatedPercentage;
353+
}
354+
355+
public void setMemoryAllocatedBytes(Long memoryAllocatedBytes) {
356+
this.memoryAllocatedBytes = memoryAllocatedBytes;
357+
}
358+
317359
public void setMemoryUsed(Long memoryUsed) {
318360
this.memoryUsed = memoryUsed;
319361
}

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

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,29 @@ public class HostResponse extends BaseResponse {
103103
@Param(description = "the CPU speed of the host")
104104
private Long cpuSpeed;
105105

106+
@Deprecated
106107
@SerializedName("cpuallocated")
107108
@Param(description = "the amount of the host's CPU currently allocated")
108109
private String cpuAllocated;
109110

111+
@SerializedName("cpuallocatedvalue")
112+
@Param(description = "the amount of the host's CPU currently allocated in MHz")
113+
private Long cpuAllocatedValue;
114+
115+
@SerializedName("cpuallocatedpercentage")
116+
@Param(description = "the amount of the host's CPU currently allocated in percentage")
117+
private String cpuAllocatedPercentage;
118+
119+
@SerializedName("cpuallocatedwithoverprovisioning")
120+
@Param(description = "the amount of the host's CPU currently allocated after applying the cpu.overprovisioning.factor")
121+
private String cpuAllocatedWithOverprovisioning;
122+
110123
@SerializedName("cpuused")
111124
@Param(description = "the amount of the host's CPU currently used")
112125
private String cpuUsed;
113126

114127
@SerializedName("cpuwithoverprovisioning")
115-
@Param(description = "the amount of the host's CPU after applying the cpu.overprovisioning.factor ")
128+
@Param(description = "the amount of the host's CPU after applying the cpu.overprovisioning.factor")
116129
private String cpuWithOverprovisioning;
117130

118131
@SerializedName(ApiConstants.CPU_LOAD_AVERAGE)
@@ -136,10 +149,19 @@ public class HostResponse extends BaseResponse {
136149
@Param(description = "the amount of the host's memory after applying the mem.overprovisioning.factor")
137150
private String memWithOverprovisioning;
138151

152+
@Deprecated
139153
@SerializedName("memoryallocated")
140154
@Param(description = "the amount of the host's memory currently allocated")
141155
private long memoryAllocated;
142156

157+
@SerializedName("memoryallocatedpercentage")
158+
@Param(description = "the amount of the host's memory currently allocated in percentage")
159+
private String memoryAllocatedPercentage;
160+
161+
@SerializedName("memoryallocatedbytes")
162+
@Param(description = "the amount of the host's memory currently allocated in bytes")
163+
private Long memoryAllocatedBytes;
164+
143165
@SerializedName("memoryused")
144166
@Param(description = "the amount of the host's memory currently used")
145167
private Long memoryUsed;
@@ -333,6 +355,18 @@ public void setCpuAllocated(String cpuAllocated) {
333355
this.cpuAllocated = cpuAllocated;
334356
}
335357

358+
public void setCpuAllocatedValue(Long cpuAllocatedValue) {
359+
this.cpuAllocatedValue = cpuAllocatedValue;
360+
}
361+
362+
public void setCpuAllocatedPercentage(String cpuAllocatedPercentage) {
363+
this.cpuAllocatedPercentage = cpuAllocatedPercentage;
364+
}
365+
366+
public void setCpuAllocatedWithOverprovisioning(String cpuAllocatedWithOverprovisioning) {
367+
this.cpuAllocatedWithOverprovisioning = cpuAllocatedWithOverprovisioning;
368+
}
369+
336370
public void setCpuUsed(String cpuUsed) {
337371
this.cpuUsed = cpuUsed;
338372
}
@@ -608,6 +642,14 @@ public long getMemoryAllocated() {
608642
return memoryAllocated;
609643
}
610644

645+
public void setMemoryAllocatedPercentage(String memoryAllocatedPercentage) {
646+
this.memoryAllocatedPercentage = memoryAllocatedPercentage;
647+
}
648+
649+
public void setMemoryAllocatedBytes(Long memoryAllocatedBytes) {
650+
this.memoryAllocatedBytes = memoryAllocatedBytes;
651+
}
652+
611653
public Long getMemoryUsed() {
612654
return memoryUsed;
613655
}

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes
190190
@Param(description = "VPC the network belongs to")
191191
private String vpcId;
192192

193+
@SerializedName(ApiConstants.VPC_NAME)
194+
@Param(description = "Name of the VPC to which this network belongs", since = "4.15")
195+
private String vpcName;
196+
193197
@SerializedName(ApiConstants.CAN_USE_FOR_DEPLOY)
194198
@Param(description = "list networks available for vm deployment")
195199
private Boolean canUseForDeploy;
@@ -470,4 +474,12 @@ public Boolean getRedundantRouter() {
470474
public void setRedundantRouter(Boolean redundantRouter) {
471475
this.redundantRouter = redundantRouter;
472476
}
477+
478+
public String getVpcName() {
479+
return vpcName;
480+
}
481+
482+
public void setVpcName(String vpcName) {
483+
this.vpcName = vpcName;
484+
}
473485
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public class PhysicalNetworkResponse extends BaseResponse {
4747
@Param(description = "zone id of the physical network")
4848
private String zoneId;
4949

50+
@SerializedName(ApiConstants.ZONE_NAME)
51+
@Param(description = "zone name of the physical network")
52+
private String zoneName;
53+
5054
@SerializedName(ApiConstants.STATE)
5155
@Param(description = "state of the physical network")
5256
private String state;
@@ -85,6 +89,10 @@ public void setZoneId(String zoneId) {
8589
this.zoneId = zoneId;
8690
}
8791

92+
public void setZoneName(String zoneName) {
93+
this.zoneName = zoneName;
94+
}
95+
8896
public void setState(String state) {
8997
this.state = state;
9098
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ public class UsageRecordResponse extends BaseResponseWithTagInformation implemen
144144
@Param(description = "True if the resource is default")
145145
private Boolean isDefault;
146146

147+
@SerializedName("vpcid")
148+
@Param(description = "id of the vpc")
149+
private String vpcId;
150+
147151
public UsageRecordResponse() {
148152
tags = new LinkedHashSet<ResourceTagResponse>();
149153
}
@@ -276,4 +280,8 @@ public void setMemory(Long memory) {
276280
public String getDomainName(){
277281
return domainName;
278282
}
283+
284+
public void setVpcId(String vpcId) {
285+
this.vpcId = vpcId;
286+
}
279287
}

core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public class VirtualRoutingResource {
8787
private int _retry;
8888
private int _port;
8989
private Duration _eachTimeout;
90-
private Map<String, Object> _params;
9190

9291
private String _cfgVersion = "1.0";
9392

@@ -397,7 +396,7 @@ private Answer execute(GetDomRVersionCmd cmd) {
397396
}
398397

399398
public boolean configureHostParams(final Map<String, String> params) {
400-
if (_params.get("router.aggregation.command.each.timeout") != null) {
399+
if (params.get("router.aggregation.command.each.timeout") != null) {
401400
String value = (String)params.get("router.aggregation.command.each.timeout");
402401
_eachTimeout = Duration.standardSeconds(NumbersUtil.parseLong(value, 600));
403402
if (s_logger.isDebugEnabled()){
@@ -410,7 +409,6 @@ public boolean configureHostParams(final Map<String, String> params) {
410409

411410
public boolean configure(final String name, final Map<String, Object> params) throws ConfigurationException {
412411
_name = name;
413-
_params = params;
414412

415413
String value = (String)params.get("ssh.sleep");
416414
_sleep = NumbersUtil.parseInt(value, 10) * 1000;

0 commit comments

Comments
 (0)