Skip to content

Commit 9dd6ff6

Browse files
committed
Merge branch 'master' into ui-restyle
Conflicts: ui/scripts/sharedFunctions.js
2 parents d0e8fa3 + fdb3b49 commit 9dd6ff6

443 files changed

Lines changed: 31774 additions & 2290 deletions

File tree

Some content is hidden

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

‎CHANGES‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
Apache CloudStack CHANGES
23
======================================
34

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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;
18+
19+
import com.cloud.vm.VirtualMachine;
20+
import com.cloud.vm.VirtualMachine.PowerState;
21+
22+
public class HostVmStateReportEntry {
23+
VirtualMachine.PowerState state;
24+
String host;
25+
26+
public HostVmStateReportEntry() {
27+
}
28+
29+
public HostVmStateReportEntry(PowerState state, String host) {
30+
this.state = state;
31+
this.host = host;
32+
}
33+
34+
public PowerState getState() {
35+
return state;
36+
}
37+
38+
public String getHost() {
39+
return host;
40+
}
41+
}

‎api/src/com/cloud/agent/api/to/LoadBalancerTO.java‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.cloud.network.lb.LoadBalancingRule.LbDestination;
3434
import com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy;
3535
import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy;
36+
import com.cloud.network.lb.LoadBalancingRule.LbSslCert;
3637
import com.cloud.utils.Pair;
3738

3839

@@ -41,13 +42,15 @@ public class LoadBalancerTO {
4142
String srcIp;
4243
int srcPort;
4344
String protocol;
45+
String lbProtocol;
4446
String algorithm;
4547
boolean revoked;
4648
boolean alreadyAdded;
4749
boolean inline;
4850
DestinationTO[] destinations;
4951
private StickinessPolicyTO[] stickinessPolicies;
5052
private HealthCheckPolicyTO[] healthCheckPolicies;
53+
private LbSslCert sslCert; /* XXX: Should this be SslCertTO? */
5154
private AutoScaleVmGroupTO autoScaleVmGroupTO;
5255
final static int MAX_STICKINESS_POLICIES = 1;
5356
final static int MAX_HEALTHCHECK_POLICIES = 1;
@@ -66,6 +69,8 @@ public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, S
6669
this.inline = inline;
6770
this.destinations = new DestinationTO[destinations.size()];
6871
this.stickinessPolicies = null;
72+
this.sslCert = null;
73+
this.lbProtocol = null;
6974
int i = 0;
7075
for (LbDestination destination : destinations) {
7176
this.destinations[i++] = new DestinationTO(destination.getIpAddress(), destination.getDestinationPortStart(), destination.isRevoked(), false);
@@ -77,12 +82,12 @@ public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, Str
7782
List<LbStickinessPolicy> stickinessPolicies) {
7883

7984
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations,
80-
stickinessPolicies, null);
85+
stickinessPolicies, null, null, null);
8186
}
8287

8388
public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked,
8489
boolean alreadyAdded, boolean inline, List<LbDestination> arg_destinations,
85-
List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies) {
90+
List<LbStickinessPolicy> stickinessPolicies, List<LbHealthCheckPolicy> healthCheckPolicies, LbSslCert sslCert, String lbProtocol) {
8691
this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations);
8792
this.stickinessPolicies = null;
8893
this.healthCheckPolicies = null;
@@ -117,6 +122,9 @@ public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, Str
117122
if (index == 0)
118123
this.healthCheckPolicies = null;
119124
}
125+
126+
this.sslCert = sslCert;
127+
this.lbProtocol = lbProtocol;
120128
}
121129

122130
protected LoadBalancerTO() {
@@ -142,6 +150,10 @@ public String getProtocol() {
142150
return protocol;
143151
}
144152

153+
public String getLbProtocol() {
154+
return lbProtocol;
155+
}
156+
145157
public boolean isRevoked() {
146158
return revoked;
147159
}
@@ -178,6 +190,10 @@ public boolean isAutoScaleVmGroupTO() {
178190
return this.autoScaleVmGroupTO != null;
179191
}
180192

193+
public LbSslCert getSslCert(){
194+
return this.sslCert;
195+
}
196+
181197
public static class StickinessPolicyTO {
182198
private String _methodName;
183199
private List<Pair<String, String>> _paramsList;
@@ -294,6 +310,8 @@ public void setMonitorState(String state) {
294310
public String getMonitorState() {
295311
return monitorState;
296312
}
313+
314+
297315
}
298316
public static class CounterTO implements Serializable {
299317
private final String name;
@@ -558,5 +576,4 @@ public void setAutoScaleVmGroup(LbAutoScaleVmGroup lbAutoScaleVmGroup)
558576
autoScaleVmGroupTO = new AutoScaleVmGroupTO(autoScaleVmGroup.getUuid(), autoScaleVmGroup.getMinMembers(), autoScaleVmGroup.getMaxMembers(), autoScaleVmGroup.getMemberPort(),
559577
autoScaleVmGroup.getInterval(), autoScalePolicyTOs, autoScaleVmProfileTO, autoScaleVmGroup.getState(), lbAutoScaleVmGroup.getCurrentState());
560578
}
561-
562579
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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 org.apache.cloudstack.api.InternalIdentity;
20+
21+
public class MonitorServiceTO implements InternalIdentity {
22+
long id;
23+
String service;
24+
String processname;
25+
String serviceName;
26+
String servicePath;
27+
String pidFile;
28+
boolean isDefault;
29+
30+
protected MonitorServiceTO() {
31+
}
32+
33+
public MonitorServiceTO (String service, String processname, String serviceName, String servicepath, String pidFile, boolean isDefault) {
34+
this.service = service;
35+
this.processname = processname;
36+
this.serviceName = serviceName;
37+
this.servicePath = servicepath;
38+
this.pidFile = pidFile;
39+
this.isDefault = isDefault;
40+
}
41+
42+
43+
44+
public boolean isDefault() {
45+
return isDefault;
46+
}
47+
48+
public String getPidFile() {
49+
return pidFile;
50+
}
51+
52+
@Override
53+
public long getId() {
54+
return id;
55+
}
56+
57+
58+
public String getService() {
59+
return service;
60+
}
61+
62+
public String getServiceName() {
63+
return serviceName;
64+
}
65+
66+
public String getServicePath() {
67+
return servicePath;
68+
}
69+
70+
public String getProcessname() {
71+
return processname;
72+
}
73+
74+
}

‎api/src/com/cloud/agent/manager/allocator/HostAllocator.java‎

Lines changed: 45 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,43 +38,65 @@ public interface HostAllocator extends Adapter {
3838
/**
3939
* Determines which physical hosts are suitable to
4040
* allocate the guest virtual machines on
41-
*
41+
*
4242
* @param VirtualMachineProfile vmProfile
4343
* @param DeploymentPlan plan
4444
* @param GuestType type
4545
* @param ExcludeList avoid
4646
* @param int returnUpTo (use -1 to return all possible hosts)
4747
* @return List<Host> List of hosts that are suitable for VM allocation
4848
**/
49-
49+
5050
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
51-
51+
5252
/**
53-
* Determines which physical hosts are suitable to
54-
* allocate the guest virtual machines on
55-
*
56-
* @param VirtualMachineProfile vmProfile
57-
* @param DeploymentPlan plan
58-
* @param GuestType type
59-
* @param ExcludeList avoid
60-
* @param int returnUpTo (use -1 to return all possible hosts)
61-
* @param boolean considerReservedCapacity (default should be true, set to false if host capacity calculation should not look at reserved capacity)
62-
* @return List<Host> List of hosts that are suitable for VM allocation
63-
**/
64-
53+
* Determines which physical hosts are suitable to allocate the guest
54+
* virtual machines on
55+
*
56+
* Allocators must set any other hosts not considered for allocation in the
57+
* ExcludeList avoid. Thus the avoid set and the list of hosts suitable,
58+
* together must cover the entire host set in the cluster.
59+
*
60+
* @param VirtualMachineProfile
61+
* vmProfile
62+
* @param DeploymentPlan
63+
* plan
64+
* @param GuestType
65+
* type
66+
* @param ExcludeList
67+
* avoid
68+
* @param int returnUpTo (use -1 to return all possible hosts)
69+
* @param boolean considerReservedCapacity (default should be true, set to
70+
* false if host capacity calculation should not look at reserved
71+
* capacity)
72+
* @return List<Host> List of hosts that are suitable for VM allocation
73+
**/
74+
6575
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity);
6676

6777
/**
68-
* Determines which physical hosts are suitable to
69-
* allocate the guest virtual machines on
78+
* Determines which physical hosts are suitable to allocate the guest
79+
* virtual machines on
7080
*
71-
* @param VirtualMachineProfile vmProfile
72-
* @param DeploymentPlan plan
73-
* @param GuestType type
74-
* @param ExcludeList avoid
75-
* @param List<HostVO> hosts
81+
* Allocators must set any other hosts not considered for allocation in the
82+
* ExcludeList avoid. Thus the avoid set and the list of hosts suitable,
83+
* together must cover the entire host set in the cluster.
84+
*
85+
*
86+
* @param VirtualMachineProfile
87+
* vmProfile
88+
* @param DeploymentPlan
89+
* plan
90+
* @param GuestType
91+
* type
92+
* @param ExcludeList
93+
* avoid
94+
* @param List
95+
* <HostVO> hosts
7696
* @param int returnUpTo (use -1 to return all possible hosts)
77-
* @param boolean considerReservedCapacity (default should be true, set to false if host capacity calculation should not look at reserved capacity)
97+
* @param boolean considerReservedCapacity (default should be true, set to
98+
* false if host capacity calculation should not look at reserved
99+
* capacity)
78100
* @return List<Host> List of hosts that are suitable for VM allocation
79101
**/
80102
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, List<? extends Host> hosts,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ public class EventTypes {
133133
public static final String EVENT_LB_HEALTHCHECKPOLICY_CREATE = "LB.HEALTHCHECKPOLICY.CREATE";
134134
public static final String EVENT_LB_HEALTHCHECKPOLICY_DELETE = "LB.HEALTHCHECKPOLICY.DELETE";
135135
public static final String EVENT_LOAD_BALANCER_UPDATE = "LB.UPDATE";
136+
public static final String EVENT_LB_CERT_UPLOAD = "LB.CERT.UPLOAD";
137+
public static final String EVENT_LB_CERT_DELETE = "LB.CERT.DELETE";
138+
public static final String EVENT_LB_CERT_ASSIGN = "LB.CERT.ASSIGN";
139+
public static final String EVENT_LB_CERT_REMOVE = "LB.CERT.REMOVE";
136140

137141
// Global Load Balancer rules
138142
public static final String EVENT_ASSIGN_TO_GLOBAL_LOAD_BALANCER_RULE = "GLOBAL.LB.ASSIGN";
@@ -511,6 +515,10 @@ public class EventTypes {
511515
entityEventDetails.put(EVENT_LB_STICKINESSPOLICY_CREATE, LoadBalancer.class.getName());
512516
entityEventDetails.put(EVENT_LB_STICKINESSPOLICY_DELETE, LoadBalancer.class.getName());
513517
entityEventDetails.put(EVENT_LOAD_BALANCER_UPDATE, LoadBalancer.class.getName());
518+
entityEventDetails.put(EVENT_LB_CERT_UPLOAD, LoadBalancer.class.getName());
519+
entityEventDetails.put(EVENT_LB_CERT_DELETE, LoadBalancer.class.getName());
520+
entityEventDetails.put(EVENT_LB_CERT_ASSIGN, LoadBalancer.class.getName());
521+
entityEventDetails.put(EVENT_LB_CERT_REMOVE, LoadBalancer.class.getName());
514522

515523
// Account events
516524
entityEventDetails.put(EVENT_ACCOUNT_DISABLE, Account.class.getName());

‎api/src/com/cloud/host/Host.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ public static String[] toStrings(Host.Type... types) {
106106
*/
107107
Long getTotalMemory();
108108

109+
/**
110+
* @return # of cpu sockets in a machine.
111+
*/
112+
Integer getCpuSockets();
113+
109114
/**
110115
* @return # of cores in a machine. Note two cpus with two cores each returns 4.
111116
*/
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
package com.cloud.network;
19+
import org.apache.cloudstack.acl.ControlledEntity;
20+
import org.apache.cloudstack.api.Identity;
21+
import org.apache.cloudstack.api.InternalIdentity;
22+
23+
24+
/**
25+
* Nic represents one nic on the VM.
26+
*/
27+
public interface MonitoringService extends ControlledEntity, Identity, InternalIdentity {
28+
/**
29+
* @return id in the CloudStack database
30+
*/
31+
enum Service {
32+
Dhcp,
33+
LoadBalancing,
34+
Ssh,
35+
Webserver,
36+
}
37+
long getId();
38+
String getService();
39+
String getServiceName();
40+
String getPidFile();
41+
String getServicePath();
42+
}

‎api/src/com/cloud/network/Network.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public static class Provider {
116116
public static final Provider VirtualRouter = new Provider("VirtualRouter", false);
117117
public static final Provider JuniperContrail = new Provider("JuniperContrail", false);
118118
public static final Provider JuniperSRX = new Provider("JuniperSRX", true);
119+
public static final Provider PaloAlto = new Provider("PaloAlto", true);
119120
public static final Provider F5BigIp = new Provider("F5BigIp", true);
120121
public static final Provider Netscaler = new Provider("Netscaler", true);
121122
public static final Provider ExternalDhcpServer = new Provider("ExternalDhcpServer", true);
@@ -180,6 +181,7 @@ public static class Capability {
180181
public static final Capability SupportedTrafficDirection = new Capability("SupportedTrafficDirection");
181182
public static final Capability SupportedEgressProtocols = new Capability("SupportedEgressProtocols");
182183
public static final Capability HealthCheckPolicy = new Capability("HealthCheckPolicy");
184+
public static final Capability SslTermination = new Capability("SslTermination");
183185
public static final Capability LbSchemes = new Capability("LbSchemes");
184186
public static final Capability DhcpAccrossMultipleSubnets = new Capability("DhcpAccrossMultipleSubnets");
185187

0 commit comments

Comments
 (0)