Skip to content

Commit a748988

Browse files
committed
Merge branch 'master' into ui-new-project-switcher
2 parents c529c5a + 90e8158 commit a748988

277 files changed

Lines changed: 21116 additions & 1797 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.

‎DISCLAIMER‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.cloud.agent.api.LogLevel.Log4jLevel;
2020
import com.cloud.agent.api.to.S3TO;
2121
import com.cloud.agent.api.to.SwiftTO;
22+
import com.cloud.storage.StoragePool;
2223

2324
/**
2425
* This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server
@@ -78,15 +79,16 @@ protected DeleteSnapshotBackupCommand() {
7879
* @param backupUUID The VHD which has to be deleted
7980
* @param childUUID The child VHD file of the backup whose parent is reset to its grandparent.
8081
*/
81-
public DeleteSnapshotBackupCommand(SwiftTO swift,
82+
public DeleteSnapshotBackupCommand(StoragePool pool,
83+
SwiftTO swift,
8284
S3TO s3,
8385
String secondaryStoragePoolURL,
8486
Long dcId,
8587
Long accountId,
8688
Long volumeId,
8789
String backupUUID, Boolean all)
8890
{
89-
super(null, secondaryStoragePoolURL, backupUUID, null, dcId, accountId, volumeId);
91+
super(pool, secondaryStoragePoolURL, backupUUID, null, dcId, accountId, volumeId);
9092
setSwift(swift);
9193
this.s3 = s3;
9294
setAll(all);

‎api/src/com/cloud/async/AsyncJob.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public enum Type {
4949
AutoScalePolicy,
5050
AutoScaleVmProfile,
5151
AutoScaleVmGroup,
52-
GlobalLoadBalancerRule
52+
GlobalLoadBalancerRule,
53+
AffinityGroup
5354
}
5455

5556
long getUserId();

‎api/src/com/cloud/configuration/ConfigurationService.java‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd;
3636
import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd;
3737
import org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd;
38+
import org.apache.cloudstack.api.command.admin.vlan.DedicatePublicIpRangeCmd;
3839
import org.apache.cloudstack.api.command.admin.vlan.DeleteVlanIpRangeCmd;
40+
import org.apache.cloudstack.api.command.admin.vlan.ReleasePublicIpRangeCmd;
3941
import org.apache.cloudstack.api.command.admin.zone.CreateZoneCmd;
4042
import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd;
4143
import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd;
@@ -234,6 +236,10 @@ public interface ConfigurationService {
234236

235237
boolean deleteVlanIpRange(DeleteVlanIpRangeCmd cmd);
236238

239+
Vlan dedicatePublicIpRange(DedicatePublicIpRangeCmd cmd) throws ResourceAllocationException;
240+
241+
boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
242+
237243
NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd);
238244

239245
NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ public class EventTypes {
226226
// VLANs/IP ranges
227227
public static final String EVENT_VLAN_IP_RANGE_CREATE = "VLAN.IP.RANGE.CREATE";
228228
public static final String EVENT_VLAN_IP_RANGE_DELETE = "VLAN.IP.RANGE.DELETE";
229+
public static final String EVENT_VLAN_IP_RANGE_DEDICATE = "VLAN.IP.RANGE.DEDICATE";
230+
public static final String EVENT_VLAN_IP_RANGE_RELEASE = "VLAN.IP.RANGE.RELEASE";
229231

230232
public static final String EVENT_STORAGE_IP_RANGE_CREATE = "STORAGE.IP.RANGE.CREATE";
231233
public static final String EVENT_STORAGE_IP_RANGE_DELETE = "STORAGE.IP.RANGE.DELETE";
@@ -348,7 +350,7 @@ public class EventTypes {
348350
// tag related events
349351
public static final String EVENT_TAGS_CREATE = "CREATE_TAGS";
350352
public static final String EVENT_TAGS_DELETE = "DELETE_TAGS";
351-
353+
352354
// vm snapshot events
353355
public static final String EVENT_VM_SNAPSHOT_CREATE = "VMSNAPSHOT.CREATE";
354356
public static final String EVENT_VM_SNAPSHOT_DELETE = "VMSNAPSHOT.DELETE";
@@ -382,6 +384,12 @@ public class EventTypes {
382384
public static final String EVENT_BAREMETAL_PXE_SERVER_ADD = "PHYSICAL.PXE.ADD";
383385
public static final String EVENT_BAREMETAL_PXE_SERVER_DELETE = "PHYSICAL.PXE.DELETE";
384386

387+
public static final String EVENT_AFFINITY_GROUP_CREATE = "AG.CREATE";
388+
public static final String EVENT_AFFINITY_GROUP_DELETE = "AG.DELETE";
389+
public static final String EVENT_AFFINITY_GROUP_ASSIGN = "AG.ASSIGN";
390+
public static final String EVENT_AFFINITY_GROUP_REMOVE = "AG.REMOVE";
391+
public static final String EVENT_VM_AFFINITY_GROUP_UPDATE = "VM.AG.UPDATE";
392+
385393
static {
386394

387395
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking
@@ -539,6 +547,8 @@ public class EventTypes {
539547
// VLANs/IP ranges
540548
entityEventDetails.put(EVENT_VLAN_IP_RANGE_CREATE, Vlan.class.getName());
541549
entityEventDetails.put(EVENT_VLAN_IP_RANGE_DELETE,Vlan.class.getName());
550+
entityEventDetails.put(EVENT_VLAN_IP_RANGE_DEDICATE, Vlan.class.getName());
551+
entityEventDetails.put(EVENT_VLAN_IP_RANGE_RELEASE,Vlan.class.getName());
542552

543553
entityEventDetails.put(EVENT_STORAGE_IP_RANGE_CREATE, StorageNetworkIpRange.class.getName());
544554
entityEventDetails.put(EVENT_STORAGE_IP_RANGE_DELETE, StorageNetworkIpRange.class.getName());
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.exception;
18+
19+
import com.cloud.utils.SerialVersionUID;
20+
import com.cloud.utils.exception.CloudRuntimeException;
21+
22+
public class AffinityConflictException extends CloudRuntimeException {
23+
24+
private static final long serialVersionUID = SerialVersionUID.AffinityConflictException;
25+
26+
public AffinityConflictException(String message) {
27+
super(message);
28+
}
29+
30+
public AffinityConflictException(String message, Throwable th) {
31+
super(message, th);
32+
}
33+
34+
}

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,11 @@
1616
// under the License.
1717
package com.cloud.network;
1818

19-
import java.net.URI;
20-
import java.util.ArrayList;
21-
import java.util.List;
22-
import java.util.Set;
23-
24-
import org.apache.cloudstack.acl.ControlledEntity;
25-
import org.apache.cloudstack.api.Identity;
26-
import org.apache.cloudstack.api.InternalIdentity;
27-
28-
import com.cloud.network.Networks.BroadcastDomainType;
29-
import com.cloud.network.Networks.Mode;
30-
import com.cloud.network.Networks.TrafficType;
3119
import com.cloud.network.Networks.BroadcastDomainType;
3220
import com.cloud.network.Networks.Mode;
3321
import com.cloud.network.Networks.TrafficType;
3422
import com.cloud.utils.fsm.StateMachine2;
3523
import com.cloud.utils.fsm.StateObject;
36-
3724
import org.apache.cloudstack.acl.ControlledEntity;
3825
import org.apache.cloudstack.api.Identity;
3926
import org.apache.cloudstack.api.InternalIdentity;
@@ -137,6 +124,7 @@ public static class Provider {
137124
public static final Provider None = new Provider("None", false);
138125
// NiciraNvp is not an "External" provider, otherwise we get in trouble with NetworkServiceImpl.providersConfiguredForExternalNetworking
139126
public static final Provider NiciraNvp = new Provider("NiciraNvp", false);
127+
public static final Provider CiscoVnmc = new Provider("CiscoVnmc", true);
140128

141129
private String name;
142130
private boolean isExternal;
@@ -182,6 +170,7 @@ public static class Capability {
182170
public static final Capability AllowDnsSuffixModification = new Capability("AllowDnsSuffixModification");
183171
public static final Capability RedundantRouter = new Capability("RedundantRouter");
184172
public static final Capability ElasticIp = new Capability("ElasticIp");
173+
public static final Capability AssociatePublicIP = new Capability("AssociatePublicIP");
185174
public static final Capability ElasticLb = new Capability("ElasticLb");
186175
public static final Capability AutoScaleCounters = new Capability("AutoScaleCounters");
187176
public static final Capability InlineMode = new Capability("InlineMode");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public interface NetworkService {
4646

4747
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
4848

49-
IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) throws ResourceAllocationException,
49+
IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException,
5050
InsufficientAddressCapacityException, ConcurrentOperationException;
5151

5252
boolean releaseIpAddress(long ipAddressId) throws InsufficientAddressCapacityException;

‎api/src/com/cloud/offering/NetworkOffering.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ public enum State {
107107

108108
boolean getElasticIp();
109109

110+
boolean getAssociatePublicIP();
111+
110112
boolean getElasticLb();
111113

112114
boolean getSpecifyIpRanges();

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public interface ManagementService {
123123
/**
124124
* Searches for servers by the specified search criteria Can search by: "name", "type", "state", "dataCenterId",
125125
* "podId"
126-
*
126+
*
127127
* @param cmd
128128
* @return List of Hosts
129129
*/
@@ -407,4 +407,6 @@ public interface ManagementService {
407407
*/
408408
List<? extends Capacity> listTopConsumedResources(ListCapacityCmd cmd);
409409

410+
List<String> listDeploymentPlanners();
411+
410412
}

0 commit comments

Comments
 (0)