Skip to content

Commit 0fb6698

Browse files
committed
Merge branch 'master' into ui-restyle
2 parents c05482b + 267ff79 commit 0fb6698

326 files changed

Lines changed: 22099 additions & 8073 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.

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
G# Licensed to the Apache Software Foundation (ASF) under one
1+
# Licensed to the Apache Software Foundation (ASF) under one
22
# or more contributor license agreements. See the NOTICE file
33
# distributed with this work for additional information
44
# regarding copyright ownership. The ASF licenses this file

‎agent/src/com/cloud/agent/AgentShell.java‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ public void setPersistentProperty(String prefix, String name, String value) {
167167

168168
void loadProperties() throws ConfigurationException {
169169
final File file = PropertiesUtil.findConfigFile("agent.properties");
170-
if (file == null) {
170+
171+
if (null == file) {
171172
throw new ConfigurationException("Unable to find agent.properties.");
172173
}
173174

@@ -303,12 +304,17 @@ public void init(String[] args) throws ConfigurationException {
303304
// For KVM agent, do it specially here
304305

305306
File file = new File("/etc/cloudstack/agent/log4j-cloud.xml");
306-
if (!file.exists()) {
307+
if(!file.exists()) {
307308
file = PropertiesUtil.findConfigFile("log4j-cloud.xml");
308309
}
309-
DOMConfigurator.configureAndWatch(file.getAbsolutePath());
310310

311-
s_logger.info("Agent started");
311+
if (null != file) {
312+
DOMConfigurator.configureAndWatch(file.getAbsolutePath());
313+
314+
s_logger.info("Agent started");
315+
} else {
316+
s_logger.error("Could not start the Agent because the absolut path of the \"log4j-cloud.xml\" file cannot be determined.");
317+
}
312318

313319
final Class<?> c = this.getClass();
314320
_version = c.getPackage().getImplementationVersion();

‎api/src/com/cloud/alert/Alert.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ public interface Alert extends Identity, InternalIdentity {
3939
Date getResolved();
4040

4141
boolean getArchived();
42+
String getName();
4243
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,8 @@ public class EventTypes {
398398
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD";
399399
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_DELETE = "PHYSICAL.NVPCONTROLLER.DELETE";
400400
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_CONFIGURE = "PHYSICAL.NVPCONTROLLER.CONFIGURE";
401+
public static final String EVENT_EXTERNAL_OVS_CONTROLLER_ADD = "PHYSICAL.OVSCONTROLLER.ADD";
402+
public static final String EVENT_EXTERNAL_OVS_CONTROLLER_DELETE = "PHYSICAL.OVSCONTROLLER.DELETE";
401403

402404
// AutoScale
403405
public static final String EVENT_COUNTER_CREATE = "COUNTER.CREATE";
@@ -450,6 +452,10 @@ public class EventTypes {
450452
// Object store migration
451453
public static final String EVENT_MIGRATE_PREPARE_SECONDARY_STORAGE = "MIGRATE.PREPARE.SS";
452454

455+
//Alert generation
456+
public static final String ALERT_GENERATE = "ALERT.GENERATE";
457+
458+
453459
static {
454460

455461
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ public static class Provider {
126126
public static final Provider NiciraNvp = new Provider("NiciraNvp", false);
127127
public static final Provider InternalLbVm = new Provider("InternalLbVm", false);
128128
public static final Provider CiscoVnmc = new Provider("CiscoVnmc", true);
129+
// add new Ovs provider
130+
public static final Provider Ovs = new Provider("Ovs", false);
129131

130132
private final String name;
131133
private final boolean isExternal;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.cloud.network;
2+
3+
import org.apache.cloudstack.api.Identity;
4+
import org.apache.cloudstack.api.InternalIdentity;
5+
6+
public interface OvsProvider extends InternalIdentity, Identity {
7+
public boolean isEnabled();
8+
9+
public long getNspId();
10+
}

‎api/src/com/cloud/network/element/VirtualRouterElementService.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,25 @@
1818

1919
import java.util.List;
2020

21+
import org.apache.cloudstack.api.command.admin.router.ConfigureOvsElementCmd;
2122
import org.apache.cloudstack.api.command.admin.router.ConfigureVirtualRouterElementCmd;
23+
import org.apache.cloudstack.api.command.admin.router.ListOvsElementsCmd;
2224
import org.apache.cloudstack.api.command.admin.router.ListVirtualRouterElementsCmd;
2325

26+
import com.cloud.network.OvsProvider;
2427
import com.cloud.network.VirtualRouterProvider;
2528
import com.cloud.network.VirtualRouterProvider.Type;
2629
import com.cloud.utils.component.PluggableService;
2730

2831
public interface VirtualRouterElementService extends PluggableService {
2932
VirtualRouterProvider configure(ConfigureVirtualRouterElementCmd cmd);
3033

34+
OvsProvider configure(ConfigureOvsElementCmd cmd);
3135
VirtualRouterProvider addElement(Long nspId, Type providerType);
3236

3337
VirtualRouterProvider getCreatedElement(long id);
3438

3539
List<? extends VirtualRouterProvider> searchForVirtualRouterElement(ListVirtualRouterElementsCmd cmd);
40+
41+
List<? extends OvsProvider> searchForOvsElement(ListOvsElementsCmd cmd);
3642
}

‎api/src/com/cloud/network/lb/LoadBalancingRule.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,13 +437,15 @@ public static class LbSslCert {
437437
private String key;
438438
private String password = null;
439439
private String chain = null;
440+
private String fingerprint;
440441
private boolean revoked;
441442

442-
public LbSslCert(String cert, String key, String password, String chain, boolean revoked) {
443+
public LbSslCert(String cert, String key, String password, String chain, String fingerprint, boolean revoked) {
443444
this.cert = cert;
444445
this.key = key;
445446
this.password = password;
446447
this.chain = chain;
448+
this.fingerprint = fingerprint;
447449
this.revoked = revoked;
448450
}
449451

@@ -464,6 +466,10 @@ public String getChain() {
464466
return chain;
465467
}
466468

469+
public String getFingerprint() {
470+
return fingerprint;
471+
}
472+
467473
public boolean isRevoked() {
468474
return revoked;
469475
}

‎api/src/com/cloud/network/vpc/NetworkACLService.java‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.List;
2020

2121
import org.apache.cloudstack.api.command.user.network.CreateNetworkACLCmd;
22+
import org.apache.cloudstack.api.command.user.network.ListNetworkACLListsCmd;
2223
import org.apache.cloudstack.api.command.user.network.ListNetworkACLsCmd;
2324

2425
import com.cloud.exception.ResourceUnavailableException;
@@ -43,13 +44,10 @@ public interface NetworkACLService {
4344

4445
/**
4546
* List NetworkACLs by Id/Name/Network or Vpc it belongs to
46-
* @param id
47-
* @param name
48-
* @param networkId
49-
* @param vpcId
47+
* @param cmd
5048
* @return
5149
*/
52-
Pair<List<? extends NetworkACL>, Integer> listNetworkACLs(Long id, String name, Long networkId, Long vpcId);
50+
Pair<List<? extends NetworkACL>,Integer> listNetworkACLs(ListNetworkACLListsCmd cmd);
5351

5452
/**
5553
* Delete specified network ACL. Deletion fails if the list is not empty

‎api/src/com/cloud/server/ResourceTag.java‎

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,31 @@
2222

2323
public interface ResourceTag extends ControlledEntity, Identity, InternalIdentity {
2424

25-
//FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code
25+
// FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code
2626
public enum ResourceObjectType {
27-
UserVm(true, true), Template(true, true), ISO(true, false), Volume(true, true), Snapshot(true, false), Network(true, true), Nic(false, true), LoadBalancer(
28-
true,
29-
true), PortForwardingRule(true, true), FirewallRule(true, true), SecurityGroup(true, false), PublicIpAddress(true, true), Project(true, false), Vpc(
30-
true,
31-
false), NetworkACL(true, false), StaticRoute(true, false), VMSnapshot(true, false), RemoteAccessVpn(true, true), Zone(false, true), ServiceOffering(
32-
false,
33-
true), Storage(false, true);
27+
UserVm(true, true),
28+
Template(true, true),
29+
ISO(true, false),
30+
Volume(true, true),
31+
Snapshot(true, false),
32+
Network(true, true),
33+
Nic(false, true),
34+
LoadBalancer(true, true),
35+
PortForwardingRule(true, true),
36+
FirewallRule(true, true),
37+
SecurityGroup(true, false),
38+
PublicIpAddress(true, true),
39+
Project(true, false),
40+
Vpc(true, true),
41+
NetworkACL(true, true),
42+
StaticRoute(true, false),
43+
VMSnapshot(true, false),
44+
RemoteAccessVpn(true, true),
45+
Zone(false, true),
46+
ServiceOffering(false, true),
47+
Storage(false, true),
48+
PrivateGateway(false, true),
49+
NetworkACLList(false, true);
3450

3551
ResourceObjectType(boolean resourceTagsSupport, boolean resourceMetadataSupport) {
3652
this.resourceTagsSupport = resourceTagsSupport;

0 commit comments

Comments
 (0)