You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2013/05/12 13:26:25 UTC
[48/50] [abbrv] Merge branch 'master' into portablepublicip
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/api/src/com/cloud/async/AsyncJob.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/api/src/com/cloud/configuration/ConfigurationService.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/event/EventTypes.java
index e2886a3,45a904e..9034541
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@@ -391,10 -399,15 +401,18 @@@ public class EventTypes
public static final String EVENT_AFFINITY_GROUP_ASSIGN = "AG.ASSIGN";
public static final String EVENT_AFFINITY_GROUP_REMOVE = "AG.REMOVE";
public static final String EVENT_VM_AFFINITY_GROUP_UPDATE = "VM.AG.UPDATE";
+
+ public static final String EVENT_INTERNAL_LB_VM_START = "INTERNALLBVM.START";
+ public static final String EVENT_INTERNAL_LB_VM_STOP = "INTERNALLBVM.STOP";
+
+ // Dedicated guest vlan range
+ public static final String EVENT_GUEST_VLAN_RANGE_DEDICATE = "GUESTVLANRANGE.DEDICATE";
+ public static final String EVENT_DEDICATED_GUEST_VLAN_RANGE_RELEASE = "GUESTVLANRANGE.RELEASE";
+
+ public static final String EVENT_PORTABLE_IP_RANGE_CREATE = "PORTABLE.IP.RANGE.CREATE";
+ public static final String EVENT_PORTABLE_IP_RANGE_DELETE = "PORTABLE.IP.RANGE.DELETE";
+
static {
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/api/src/com/cloud/network/IpAddress.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/network/IpAddress.java
index 835fa54,c48e8b9..de11a6d
--- a/api/src/com/cloud/network/IpAddress.java
+++ b/api/src/com/cloud/network/IpAddress.java
@@@ -81,6 -81,7 +81,9 @@@ public interface IpAddress extends Cont
Long getVpcId();
String getVmIp();
-
+
+ boolean isPortable();
++
+ Long getNetworkId();
+
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/api/src/com/cloud/network/NetworkService.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/api/src/org/apache/cloudstack/api/ResponseGenerator.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/ResponseGenerator.java
index 003daae,ab8f995..d0ab1f4
--- a/api/src/org/apache/cloudstack/api/ResponseGenerator.java
+++ b/api/src/org/apache/cloudstack/api/ResponseGenerator.java
@@@ -26,84 -26,90 +26,10 @@@ import org.apache.cloudstack.affinity.A
import org.apache.cloudstack.api.ApiConstants.HostDetails;
import org.apache.cloudstack.api.ApiConstants.VMDetails;
import org.apache.cloudstack.api.command.user.job.QueryAsyncJobResultCmd;
--import org.apache.cloudstack.api.response.AccountResponse;
- import org.apache.cloudstack.api.response.AsyncJobResponse;
- import org.apache.cloudstack.api.response.AutoScalePolicyResponse;
- import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse;
- import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
- import org.apache.cloudstack.api.response.CapacityResponse;
- import org.apache.cloudstack.api.response.ClusterResponse;
- import org.apache.cloudstack.api.response.ConditionResponse;
- import org.apache.cloudstack.api.response.ConfigurationResponse;
- import org.apache.cloudstack.api.response.CounterResponse;
- import org.apache.cloudstack.api.response.CreateCmdResponse;
- import org.apache.cloudstack.api.response.DiskOfferingResponse;
- import org.apache.cloudstack.api.response.DomainResponse;
- import org.apache.cloudstack.api.response.DomainRouterResponse;
- import org.apache.cloudstack.api.response.EventResponse;
- import org.apache.cloudstack.api.response.ExtractResponse;
- import org.apache.cloudstack.api.response.FirewallResponse;
- import org.apache.cloudstack.api.response.FirewallRuleResponse;
- import org.apache.cloudstack.api.response.GuestOSResponse;
- import org.apache.cloudstack.api.response.HostResponse;
- import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse;
- import org.apache.cloudstack.api.response.IPAddressResponse;
- import org.apache.cloudstack.api.response.InstanceGroupResponse;
- import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
- import org.apache.cloudstack.api.response.LBHealthCheckResponse;
- import org.apache.cloudstack.api.response.LBStickinessResponse;
- import org.apache.cloudstack.api.response.LDAPConfigResponse;
- import org.apache.cloudstack.api.response.LoadBalancerResponse;
- import org.apache.cloudstack.api.response.NetworkACLResponse;
- import org.apache.cloudstack.api.response.NetworkOfferingResponse;
- import org.apache.cloudstack.api.response.NetworkResponse;
- import org.apache.cloudstack.api.response.NicResponse;
- import org.apache.cloudstack.api.response.NicSecondaryIpResponse;
- import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
- import org.apache.cloudstack.api.response.PodResponse;
- import org.apache.cloudstack.api.response.PrivateGatewayResponse;
- import org.apache.cloudstack.api.response.ProjectAccountResponse;
- import org.apache.cloudstack.api.response.ProjectInvitationResponse;
- import org.apache.cloudstack.api.response.ProjectResponse;
- import org.apache.cloudstack.api.response.ProviderResponse;
- import org.apache.cloudstack.api.response.RegionResponse;
- import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
- import org.apache.cloudstack.api.response.ResourceCountResponse;
- import org.apache.cloudstack.api.response.ResourceLimitResponse;
- import org.apache.cloudstack.api.response.ResourceTagResponse;
- import org.apache.cloudstack.api.response.S3Response;
- import org.apache.cloudstack.api.response.SecurityGroupResponse;
- import org.apache.cloudstack.api.response.ServiceOfferingResponse;
- import org.apache.cloudstack.api.response.ServiceResponse;
- import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse;
- import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse;
- import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
- import org.apache.cloudstack.api.response.SnapshotPolicyResponse;
- import org.apache.cloudstack.api.response.SnapshotResponse;
- import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
- import org.apache.cloudstack.api.response.StaticRouteResponse;
- import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
- import org.apache.cloudstack.api.response.StoragePoolResponse;
- import org.apache.cloudstack.api.response.SwiftResponse;
- import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
- import org.apache.cloudstack.api.response.SystemVmResponse;
- import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
- import org.apache.cloudstack.api.response.TemplateResponse;
- import org.apache.cloudstack.api.response.TrafficMonitorResponse;
- import org.apache.cloudstack.api.response.TrafficTypeResponse;
- import org.apache.cloudstack.api.response.UsageRecordResponse;
- import org.apache.cloudstack.api.response.UserResponse;
- import org.apache.cloudstack.api.response.UserVmResponse;
- import org.apache.cloudstack.api.response.VMSnapshotResponse;
- import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
- import org.apache.cloudstack.api.response.VlanIpRangeResponse;
- import org.apache.cloudstack.api.response.VolumeResponse;
- import org.apache.cloudstack.api.response.VpcOfferingResponse;
- import org.apache.cloudstack.api.response.VpcResponse;
- import org.apache.cloudstack.api.response.VpnUsersResponse;
- import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.cloudstack.api.response.ApplicationLoadBalancerResponse;
-import org.apache.cloudstack.api.response.AsyncJobResponse;
-import org.apache.cloudstack.api.response.AutoScalePolicyResponse;
-import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse;
-import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
-import org.apache.cloudstack.api.response.CapacityResponse;
-import org.apache.cloudstack.api.response.ClusterResponse;
-import org.apache.cloudstack.api.response.ConditionResponse;
-import org.apache.cloudstack.api.response.ConfigurationResponse;
-import org.apache.cloudstack.api.response.CounterResponse;
-import org.apache.cloudstack.api.response.CreateCmdResponse;
-import org.apache.cloudstack.api.response.DiskOfferingResponse;
-import org.apache.cloudstack.api.response.DomainResponse;
-import org.apache.cloudstack.api.response.DomainRouterResponse;
-import org.apache.cloudstack.api.response.EventResponse;
-import org.apache.cloudstack.api.response.ExtractResponse;
-import org.apache.cloudstack.api.response.FirewallResponse;
-import org.apache.cloudstack.api.response.FirewallRuleResponse;
-import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse;
-import org.apache.cloudstack.api.response.GuestOSResponse;
-import org.apache.cloudstack.api.response.GuestVlanRangeResponse;
-import org.apache.cloudstack.api.response.HostForMigrationResponse;
-import org.apache.cloudstack.api.response.HostResponse;
-import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse;
-import org.apache.cloudstack.api.response.IPAddressResponse;
-import org.apache.cloudstack.api.response.InstanceGroupResponse;
-import org.apache.cloudstack.api.response.InternalLoadBalancerElementResponse;
-import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
-import org.apache.cloudstack.api.response.IsolationMethodResponse;
-import org.apache.cloudstack.api.response.LBHealthCheckResponse;
-import org.apache.cloudstack.api.response.LBStickinessResponse;
-import org.apache.cloudstack.api.response.LDAPConfigResponse;
-import org.apache.cloudstack.api.response.LoadBalancerResponse;
-import org.apache.cloudstack.api.response.NetworkACLResponse;
-import org.apache.cloudstack.api.response.NetworkOfferingResponse;
-import org.apache.cloudstack.api.response.NetworkResponse;
-import org.apache.cloudstack.api.response.NicResponse;
-import org.apache.cloudstack.api.response.NicSecondaryIpResponse;
-import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
-import org.apache.cloudstack.api.response.PodResponse;
-import org.apache.cloudstack.api.response.PrivateGatewayResponse;
-import org.apache.cloudstack.api.response.ProjectAccountResponse;
-import org.apache.cloudstack.api.response.ProjectInvitationResponse;
-import org.apache.cloudstack.api.response.ProjectResponse;
-import org.apache.cloudstack.api.response.ProviderResponse;
-import org.apache.cloudstack.api.response.RegionResponse;
-import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
-import org.apache.cloudstack.api.response.ResourceCountResponse;
-import org.apache.cloudstack.api.response.ResourceLimitResponse;
-import org.apache.cloudstack.api.response.ResourceTagResponse;
-import org.apache.cloudstack.api.response.S3Response;
-import org.apache.cloudstack.api.response.SecurityGroupResponse;
-import org.apache.cloudstack.api.response.ServiceOfferingResponse;
-import org.apache.cloudstack.api.response.ServiceResponse;
-import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse;
-import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse;
-import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
-import org.apache.cloudstack.api.response.SnapshotPolicyResponse;
-import org.apache.cloudstack.api.response.SnapshotResponse;
-import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
-import org.apache.cloudstack.api.response.StaticRouteResponse;
-import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
-import org.apache.cloudstack.api.response.StoragePoolForMigrationResponse;
-import org.apache.cloudstack.api.response.StoragePoolResponse;
-import org.apache.cloudstack.api.response.SwiftResponse;
-import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
-import org.apache.cloudstack.api.response.SystemVmResponse;
-import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
-import org.apache.cloudstack.api.response.TemplateResponse;
-import org.apache.cloudstack.api.response.TrafficMonitorResponse;
-import org.apache.cloudstack.api.response.TrafficTypeResponse;
-import org.apache.cloudstack.api.response.UsageRecordResponse;
-import org.apache.cloudstack.api.response.UserResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VMSnapshotResponse;
-import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
-import org.apache.cloudstack.api.response.VlanIpRangeResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.cloudstack.api.response.VpcOfferingResponse;
-import org.apache.cloudstack.api.response.VpcResponse;
-import org.apache.cloudstack.api.response.VpnUsersResponse;
-import org.apache.cloudstack.api.response.ZoneResponse;
++import org.apache.cloudstack.api.response.*;
+import org.apache.cloudstack.region.PortableIp;
+import org.apache.cloudstack.region.PortableIpRange;
+ import org.apache.cloudstack.network.lb.ApplicationLoadBalancerRule;
import org.apache.cloudstack.region.Region;
import org.apache.cloudstack.usage.Usage;
@@@ -399,7 -431,7 +351,12 @@@ public interface ResponseGenerator
Long getAffinityGroupId(String name, long entityOwnerId);
+ PortableIpRangeResponse createPortableIPRangeResponse(PortableIpRange range);
+
+ PortableIpResponse createPortableIPResponse(PortableIp portableIp);
++
+ InternalLoadBalancerElementResponse createInternalLbElementResponse(VirtualRouterProvider result);
-
++
+ IsolationMethodResponse createIsolationMethodResponse(IsolationType method);
++
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --cc client/tomcatconf/commands.properties.in
index 6427546,0a6ec70..3256184
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@@ -591,7 -605,10 +605,16 @@@ addCiscoAsa1000vResource=
deleteCiscoAsa1000vResource=1
listCiscoAsa1000vResources=1
+#### portable public IP commands
+createPortableIpRange=1
+deletePortableIpRange=1
+listPortableIpRanges=1
++
+ #### Internal LB VM commands
+ stopInternalLoadBalancerVM=1
+ startInternalLoadBalancerVM=1
+ listInternalLoadBalancerVMs=1
+
+ ### Network Isolation methods listing
+ listNetworkIsolationMethods=1
++
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
----------------------------------------------------------------------
diff --cc engine/schema/src/com/cloud/network/dao/IPAddressVO.java
index 0000000,ae27e95..a7dcf6a
mode 000000,100644..100644
--- a/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
+++ b/engine/schema/src/com/cloud/network/dao/IPAddressVO.java
@@@ -1,0 -1,308 +1,319 @@@
+ // Licensed to the Apache Software Foundation (ASF) under one
+ // or more contributor license agreements. See the NOTICE file
+ // distributed with this work for additional information
+ // regarding copyright ownership. The ASF licenses this file
+ // to you under the Apache License, Version 2.0 (the
+ // "License"); you may not use this file except in compliance
+ // with the License. You may obtain a copy of the License at
+ //
+ // http://www.apache.org/licenses/LICENSE-2.0
+ //
+ // Unless required by applicable law or agreed to in writing,
+ // software distributed under the License is distributed on an
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ // KIND, either express or implied. See the License for the
+ // specific language governing permissions and limitations
+ // under the License.
+ package com.cloud.network.dao;
+
+ import java.util.Date;
+ import java.util.UUID;
+
+ import javax.persistence.Column;
+ import javax.persistence.Entity;
+ import javax.persistence.EnumType;
+ import javax.persistence.Enumerated;
+ import javax.persistence.GeneratedValue;
+ import javax.persistence.GenerationType;
+ import javax.persistence.Id;
+ import javax.persistence.Table;
+ import javax.persistence.Temporal;
+ import javax.persistence.TemporalType;
+ import javax.persistence.Transient;
+
+ import com.cloud.network.IpAddress;
+ import com.cloud.utils.net.Ip;
+
+ /**
+ * A bean representing a public IP Address
+ *
+ */
+ @Entity
+ @Table(name=("user_ip_address"))
+ public class IPAddressVO implements IpAddress {
+ @Id
+ @GeneratedValue(strategy=GenerationType.IDENTITY)
+ @Column(name="id")
+ long id;
+
+ @Column(name="account_id")
+ private Long allocatedToAccountId = null;
+
+ @Column(name="domain_id")
+ private Long allocatedInDomainId = null;
+
+ @Id
+ @Column(name="public_ip_address")
+ @Enumerated(value=EnumType.STRING)
+ private Ip address = null;
+
+ @Column(name="data_center_id", updatable=false)
+ private long dataCenterId;
+
+ @Column(name="source_nat")
+ private boolean sourceNat;
+
+ @Column(name="allocated")
+ @Temporal(value=TemporalType.TIMESTAMP)
+ private Date allocatedTime;
+
+ @Column(name="vlan_db_id")
+ private long vlanId;
+
+ @Column(name="one_to_one_nat")
+ private boolean oneToOneNat;
+
+ @Column(name="vm_id")
+ private Long associatedWithVmId;
+
+ @Column(name="state")
+ private State state;
+
+ @Column(name="mac_address")
+ private long macAddress;
+
+ @Column(name="source_network_id")
+ private Long sourceNetworkId;
+
+ @Column(name="network_id")
+ private Long associatedWithNetworkId;
+
+ @Column(name="uuid")
+ private String uuid;
+
+ @Column(name="physical_network_id")
+ private Long physicalNetworkId;
+
+ @Column(name="is_system")
+ private boolean system;
+
+ @Column(name="account_id")
+ @Transient
+ private Long accountId = null;
+
+ @Transient
+ @Column(name="domain_id")
+ private Long domainId = null;
+
+ @Column(name="vpc_id")
+ private Long vpcId;
+
+ @Column(name="dnat_vmip")
+ private String vmIp;
+
++ @Column(name="is_portable")
++ private boolean portable;
+
+ protected IPAddressVO() {
+ this.uuid = UUID.randomUUID().toString();
+ }
+
+ @Override
+ public boolean readyToUse() {
+ return state == State.Allocated;
+ }
+
+ public IPAddressVO(Ip address, long dataCenterId, long macAddress, long vlanDbId, boolean sourceNat) {
+ this.address = address;
+ this.dataCenterId = dataCenterId;
+ this.vlanId = vlanDbId;
+ this.sourceNat = sourceNat;
+ this.allocatedInDomainId = null;
+ this.allocatedToAccountId = null;
+ this.allocatedTime = null;
+ this.state = State.Free;
+ this.macAddress = macAddress;
+ this.uuid = UUID.randomUUID().toString();
+ }
+
+ public long getMacAddress() {
+ return macAddress;
+ }
+
+ @Override
+ public long getDataCenterId() {
+ return dataCenterId;
+ }
+
+ @Override
+ public Ip getAddress() {
+ return address;
+ }
+
+ @Override
+ public Long getAllocatedToAccountId() {
+ return allocatedToAccountId;
+ }
+
+ @Override
+ public Long getAllocatedInDomainId() {
+ return allocatedInDomainId;
+ }
+
+ @Override
+ public Long getAssociatedWithNetworkId() {
+ return associatedWithNetworkId;
+ }
+
+ public void setAssociatedWithNetworkId(Long networkId) {
+ this.associatedWithNetworkId = networkId;
+ }
+
+ @Override
+ public Long getAssociatedWithVmId() {
+ return associatedWithVmId;
+ }
+
+ public void setAssociatedWithVmId(Long associatedWithVmId) {
+ this.associatedWithVmId = associatedWithVmId;
+ }
+
+ @Override
+ public Date getAllocatedTime() {
+ return allocatedTime;
+ }
+
+ public void setAllocatedToAccountId(Long accountId) {
+ this.allocatedToAccountId = accountId;
+ }
+
+ public void setAllocatedInDomainId(Long domainId) {
+ this.allocatedInDomainId = domainId;
+ }
+
+ public void setSourceNat(boolean sourceNat) {
+ this.sourceNat = sourceNat;
+ }
+
+ @Override
+ public boolean isSourceNat() {
+ return sourceNat;
+ }
+
+ public void setAllocatedTime(Date allocated) {
+ this.allocatedTime = allocated;
+ }
+
+ @Override
+ public long getVlanId() {
+ return this.vlanId;
+ }
+
+ public void setVlanId(long vlanDbId) {
+ this.vlanId = vlanDbId;
+ }
+
+ @Override
+ public boolean isOneToOneNat() {
+ return oneToOneNat;
+ }
+
+ public void setOneToOneNat(boolean oneToOneNat) {
+ this.oneToOneNat = oneToOneNat;
+ }
+
+ @Override
+ public long getDomainId() {
+ return allocatedInDomainId == null ? -1 : allocatedInDomainId;
+ }
+
+ @Override
+ public long getAccountId() {
+ return allocatedToAccountId == null ? -1 : allocatedToAccountId;
+ }
+
+ @Override
+ public State getState() {
+ return state;
+ }
+
+ public void setState(State state) {
+ this.state = state;
+ }
+
+ @Override
+ public String toString() {
+ return new StringBuilder("Ip[").append(address).append("-").append(dataCenterId).append("]").toString();
+ }
+
+ @Override
+ public long getId() {
+ return id;
+ }
+
+ public Long getSourceNetworkId() {
+ return sourceNetworkId;
+ }
+
+ public void setSourceNetworkId(Long sourceNetworkId) {
+ this.sourceNetworkId = sourceNetworkId;
+ }
+
+ @Override
+ public String getUuid() {
+ return this.uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public Long getPhysicalNetworkId() {
+ return physicalNetworkId;
+ }
+
+ public void setPhysicalNetworkId(Long physicalNetworkId) {
+ this.physicalNetworkId = physicalNetworkId;
+ }
+
+ @Override
+ public boolean getSystem() {
+ return system;
+ }
+
+ public void setSystem(boolean isSystem) {
+ this.system = isSystem;
+ }
+
++ @Override
++ public boolean isPortable() {
++ return portable;
++ }
++
++ public void setPortable(boolean portable) {
++ this.portable = portable;
++ }
++
+ @Override
+ public Long getVpcId() {
+ return vpcId;
+ }
+
+ public void setVpcId(Long vpcId) {
+ this.vpcId = vpcId;
+ }
+
+ @Override
+ public String getVmIp() {
+ return vmIp;
+ }
+
+ public void setVmIp(String vmIp) {
+ this.vmIp = vmIp;
+ }
+
+ @Override
+ public Long getNetworkId() {
+ return sourceNetworkId;
+ }
+ }
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiResponseHelper.java
index 2820825,d5960ab..ef06763
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@@ -42,93 -43,98 +43,10 @@@ import org.apache.cloudstack.api.ApiCon
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.ResponseGenerator;
import org.apache.cloudstack.api.command.user.job.QueryAsyncJobResultCmd;
--import org.apache.cloudstack.api.response.AccountResponse;
- import org.apache.cloudstack.api.response.AsyncJobResponse;
- import org.apache.cloudstack.api.response.AutoScalePolicyResponse;
- import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse;
- import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
- import org.apache.cloudstack.api.response.CapabilityResponse;
- import org.apache.cloudstack.api.response.CapacityResponse;
- import org.apache.cloudstack.api.response.ClusterResponse;
- import org.apache.cloudstack.api.response.ConditionResponse;
- import org.apache.cloudstack.api.response.ConfigurationResponse;
- import org.apache.cloudstack.api.response.ControlledEntityResponse;
- import org.apache.cloudstack.api.response.ControlledViewEntityResponse;
- import org.apache.cloudstack.api.response.CounterResponse;
- import org.apache.cloudstack.api.response.CreateCmdResponse;
- import org.apache.cloudstack.api.response.DiskOfferingResponse;
- import org.apache.cloudstack.api.response.DomainResponse;
- import org.apache.cloudstack.api.response.DomainRouterResponse;
- import org.apache.cloudstack.api.response.EventResponse;
- import org.apache.cloudstack.api.response.ExtractResponse;
- import org.apache.cloudstack.api.response.FirewallResponse;
- import org.apache.cloudstack.api.response.FirewallRuleResponse;
- import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse;
- import org.apache.cloudstack.api.response.GuestOSResponse;
- import org.apache.cloudstack.api.response.HostResponse;
- import org.apache.cloudstack.api.response.HostForMigrationResponse;
- import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse;
- import org.apache.cloudstack.api.response.IPAddressResponse;
- import org.apache.cloudstack.api.response.InstanceGroupResponse;
- import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
- import org.apache.cloudstack.api.response.LBHealthCheckPolicyResponse;
- import org.apache.cloudstack.api.response.LBHealthCheckResponse;
- import org.apache.cloudstack.api.response.LBStickinessPolicyResponse;
- import org.apache.cloudstack.api.response.LBStickinessResponse;
- import org.apache.cloudstack.api.response.LDAPConfigResponse;
- import org.apache.cloudstack.api.response.LoadBalancerResponse;
- import org.apache.cloudstack.api.response.NetworkACLResponse;
- import org.apache.cloudstack.api.response.NetworkOfferingResponse;
- import org.apache.cloudstack.api.response.NetworkResponse;
- import org.apache.cloudstack.api.response.NicResponse;
- import org.apache.cloudstack.api.response.NicSecondaryIpResponse;
- import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
- import org.apache.cloudstack.api.response.PodResponse;
- import org.apache.cloudstack.api.response.PrivateGatewayResponse;
- import org.apache.cloudstack.api.response.ProjectAccountResponse;
- import org.apache.cloudstack.api.response.ProjectInvitationResponse;
- import org.apache.cloudstack.api.response.ProjectResponse;
- import org.apache.cloudstack.api.response.ProviderResponse;
- import org.apache.cloudstack.api.response.RegionResponse;
- import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
- import org.apache.cloudstack.api.response.ResourceCountResponse;
- import org.apache.cloudstack.api.response.ResourceLimitResponse;
- import org.apache.cloudstack.api.response.ResourceTagResponse;
- import org.apache.cloudstack.api.response.S3Response;
- import org.apache.cloudstack.api.response.SecurityGroupResponse;
- import org.apache.cloudstack.api.response.SecurityGroupRuleResponse;
- import org.apache.cloudstack.api.response.ServiceOfferingResponse;
- import org.apache.cloudstack.api.response.ServiceResponse;
- import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse;
- import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse;
- import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
- import org.apache.cloudstack.api.response.SnapshotPolicyResponse;
- import org.apache.cloudstack.api.response.SnapshotResponse;
- import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
- import org.apache.cloudstack.api.response.StaticRouteResponse;
- import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
- import org.apache.cloudstack.api.response.StoragePoolForMigrationResponse;
- import org.apache.cloudstack.api.response.StoragePoolResponse;
- import org.apache.cloudstack.api.response.SwiftResponse;
- import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
- import org.apache.cloudstack.api.response.SystemVmResponse;
- import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
- import org.apache.cloudstack.api.response.TemplateResponse;
- import org.apache.cloudstack.api.response.TrafficMonitorResponse;
- import org.apache.cloudstack.api.response.TrafficTypeResponse;
- import org.apache.cloudstack.api.response.UsageRecordResponse;
- import org.apache.cloudstack.api.response.UserResponse;
- import org.apache.cloudstack.api.response.UserVmResponse;
- import org.apache.cloudstack.api.response.VMSnapshotResponse;
- import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
- import org.apache.cloudstack.api.response.VlanIpRangeResponse;
- import org.apache.cloudstack.api.response.VolumeResponse;
- import org.apache.cloudstack.api.response.VpcOfferingResponse;
- import org.apache.cloudstack.api.response.VpcResponse;
- import org.apache.cloudstack.api.response.VpnUsersResponse;
- import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.cloudstack.api.response.ApplicationLoadBalancerInstanceResponse;
-import org.apache.cloudstack.api.response.ApplicationLoadBalancerResponse;
-import org.apache.cloudstack.api.response.ApplicationLoadBalancerRuleResponse;
-import org.apache.cloudstack.api.response.AsyncJobResponse;
-import org.apache.cloudstack.api.response.AutoScalePolicyResponse;
-import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse;
-import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
-import org.apache.cloudstack.api.response.CapabilityResponse;
-import org.apache.cloudstack.api.response.CapacityResponse;
-import org.apache.cloudstack.api.response.ClusterResponse;
-import org.apache.cloudstack.api.response.ConditionResponse;
-import org.apache.cloudstack.api.response.ConfigurationResponse;
-import org.apache.cloudstack.api.response.ControlledEntityResponse;
-import org.apache.cloudstack.api.response.ControlledViewEntityResponse;
-import org.apache.cloudstack.api.response.CounterResponse;
-import org.apache.cloudstack.api.response.CreateCmdResponse;
-import org.apache.cloudstack.api.response.DiskOfferingResponse;
-import org.apache.cloudstack.api.response.DomainResponse;
-import org.apache.cloudstack.api.response.DomainRouterResponse;
-import org.apache.cloudstack.api.response.EventResponse;
-import org.apache.cloudstack.api.response.ExtractResponse;
-import org.apache.cloudstack.api.response.FirewallResponse;
-import org.apache.cloudstack.api.response.FirewallRuleResponse;
-import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse;
-import org.apache.cloudstack.api.response.GuestOSResponse;
-import org.apache.cloudstack.api.response.GuestVlanRangeResponse;
-import org.apache.cloudstack.api.response.HostForMigrationResponse;
-import org.apache.cloudstack.api.response.HostResponse;
-import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse;
-import org.apache.cloudstack.api.response.IPAddressResponse;
-import org.apache.cloudstack.api.response.InstanceGroupResponse;
-import org.apache.cloudstack.api.response.InternalLoadBalancerElementResponse;
-import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
-import org.apache.cloudstack.api.response.IsolationMethodResponse;
-import org.apache.cloudstack.api.response.LBHealthCheckPolicyResponse;
-import org.apache.cloudstack.api.response.LBHealthCheckResponse;
-import org.apache.cloudstack.api.response.LBStickinessPolicyResponse;
-import org.apache.cloudstack.api.response.LBStickinessResponse;
-import org.apache.cloudstack.api.response.LDAPConfigResponse;
-import org.apache.cloudstack.api.response.LoadBalancerResponse;
-import org.apache.cloudstack.api.response.NetworkACLResponse;
-import org.apache.cloudstack.api.response.NetworkOfferingResponse;
-import org.apache.cloudstack.api.response.NetworkResponse;
-import org.apache.cloudstack.api.response.NicResponse;
-import org.apache.cloudstack.api.response.NicSecondaryIpResponse;
-import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
-import org.apache.cloudstack.api.response.PodResponse;
-import org.apache.cloudstack.api.response.PrivateGatewayResponse;
-import org.apache.cloudstack.api.response.ProjectAccountResponse;
-import org.apache.cloudstack.api.response.ProjectInvitationResponse;
-import org.apache.cloudstack.api.response.ProjectResponse;
-import org.apache.cloudstack.api.response.ProviderResponse;
-import org.apache.cloudstack.api.response.RegionResponse;
-import org.apache.cloudstack.api.response.RemoteAccessVpnResponse;
-import org.apache.cloudstack.api.response.ResourceCountResponse;
-import org.apache.cloudstack.api.response.ResourceLimitResponse;
-import org.apache.cloudstack.api.response.ResourceTagResponse;
-import org.apache.cloudstack.api.response.S3Response;
-import org.apache.cloudstack.api.response.SecurityGroupResponse;
-import org.apache.cloudstack.api.response.SecurityGroupRuleResponse;
-import org.apache.cloudstack.api.response.ServiceOfferingResponse;
-import org.apache.cloudstack.api.response.ServiceResponse;
-import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse;
-import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse;
-import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse;
-import org.apache.cloudstack.api.response.SnapshotPolicyResponse;
-import org.apache.cloudstack.api.response.SnapshotResponse;
-import org.apache.cloudstack.api.response.SnapshotScheduleResponse;
-import org.apache.cloudstack.api.response.StaticRouteResponse;
-import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse;
-import org.apache.cloudstack.api.response.StoragePoolForMigrationResponse;
-import org.apache.cloudstack.api.response.StoragePoolResponse;
-import org.apache.cloudstack.api.response.SwiftResponse;
-import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
-import org.apache.cloudstack.api.response.SystemVmResponse;
-import org.apache.cloudstack.api.response.TemplatePermissionsResponse;
-import org.apache.cloudstack.api.response.TemplateResponse;
-import org.apache.cloudstack.api.response.TrafficMonitorResponse;
-import org.apache.cloudstack.api.response.TrafficTypeResponse;
-import org.apache.cloudstack.api.response.UsageRecordResponse;
-import org.apache.cloudstack.api.response.UserResponse;
-import org.apache.cloudstack.api.response.UserVmResponse;
-import org.apache.cloudstack.api.response.VMSnapshotResponse;
-import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
-import org.apache.cloudstack.api.response.VlanIpRangeResponse;
-import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.cloudstack.api.response.VpcOfferingResponse;
-import org.apache.cloudstack.api.response.VpcResponse;
-import org.apache.cloudstack.api.response.VpnUsersResponse;
-import org.apache.cloudstack.api.response.ZoneResponse;
++import org.apache.cloudstack.api.response.*;
+import org.apache.cloudstack.region.PortableIp;
+import org.apache.cloudstack.region.PortableIpRange;
+ import org.apache.cloudstack.network.lb.ApplicationLoadBalancerRule;
import org.apache.cloudstack.region.Region;
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
import org.apache.cloudstack.usage.Usage;
@@@ -3719,66 -3808,30 +3722,92 @@@ public class ApiResponseHelper implemen
}
}
-
+ @Override
+ public PortableIpRangeResponse createPortableIPRangeResponse(PortableIpRange ipRange) {
+ PortableIpRangeResponse response = new PortableIpRangeResponse();
+ response.setId(ipRange.getUuid());
+ String ipRangeStr = ipRange.getIpRange();
+ if (ipRangeStr != null) {
+ String[] range = ipRangeStr.split("-");
+ response.setStartIp(range[0]);
+ response.setEndIp(range[1]);
+ }
+ response.setVlan(ipRange.getVlanTag());
+ response.setGateway(ipRange.getGateway());
+ response.setNetmask(ipRange.getNetmask());
+ response.setRegionId(ipRange.getRegionId());
+ return response;
+ }
+
+ @Override
+ public PortableIpResponse createPortableIPResponse(PortableIp portableIp) {
+ PortableIpResponse response = new PortableIpResponse();
+ response.setAddress(portableIp.getAddress());
+ Long accountId = portableIp.getAllocatedInDomainId();
+ if (accountId != null) {
+ Account account = ApiDBUtils.findAccountById(accountId);
+ response.setAllocatedToAccountId(account.getAccountName());
+ Domain domain = ApiDBUtils.findDomainById(account.getDomainId());
+ response.setAllocatedInDomainId(domain.getUuid());
+ }
+
+ response.setAllocatedTime(portableIp.getAllocatedTime());
+
+ if (portableIp.getAssociatedDataCenterId() != null) {
+ DataCenter zone = ApiDBUtils.findZoneById(portableIp.getAssociatedDataCenterId());
+ if (zone != null) {
+ response.setAssociatedDataCenterId(zone.getUuid());
+ }
+ }
+
+ if (portableIp.getPhysicalNetworkId() != null) {
+ PhysicalNetwork pnw = ApiDBUtils.findPhysicalNetworkById(portableIp.getPhysicalNetworkId());
+ if (pnw != null) {
+ response.setPhysicalNetworkId(pnw.getUuid());
+ }
+ }
+
+ if (portableIp.getAssociatedWithNetworkId() != null) {
+ Network ntwk = ApiDBUtils.findNetworkById(portableIp.getAssociatedWithNetworkId());
+ if (ntwk != null) {
+ response.setAssociatedWithNetworkId(ntwk.getUuid());
+ }
+ }
+
+ if (portableIp.getAssociatedWithVpcId() != null) {
+ Vpc vpc = ApiDBUtils.findVpcById(portableIp.getAssociatedWithVpcId());
+ if (vpc != null) {
+ response.setAssociatedWithVpcId(vpc.getUuid());
+ }
+ }
+
+ response.setState(portableIp.getState().name());
++
++ return response;
++ }
++
+ @Override
+ public InternalLoadBalancerElementResponse createInternalLbElementResponse(VirtualRouterProvider result) {
+ if (result.getType() != VirtualRouterProvider.VirtualRouterProviderType.InternalLbVm) {
+ return null;
+ }
+ InternalLoadBalancerElementResponse response = new InternalLoadBalancerElementResponse();
+ response.setId(result.getUuid());
+ PhysicalNetworkServiceProvider nsp = ApiDBUtils.findPhysicalNetworkServiceProviderById(result.getNspId());
+ if (nsp != null) {
+ response.setNspId(nsp.getUuid());
+ }
+ response.setEnabled(result.isEnabled());
+
+ response.setObjectName("internalloadbalancerelement");
+ return response;
+ }
+
-
+ @Override
+ public IsolationMethodResponse createIsolationMethodResponse(IsolationType method) {
+ IsolationMethodResponse response = new IsolationMethodResponse();
+ response.setIsolationMethodName(method.toString());
+ response.setObjectName("isolationmethod");
return response;
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index daaf596,fdc0ffb..bc7583d
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@@ -67,8 -68,10 +71,12 @@@ import org.apache.cloudstack.api.comman
import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd;
import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd;
import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd;
+import org.apache.cloudstack.region.*;
+import org.apache.cloudstack.region.dao.RegionDao;
+ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+ import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO;
+ import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
@@@ -251,11 -248,17 +253,23 @@@ public class ConfigurationManagerImpl e
@Inject
VpcManager _vpcMgr;
@Inject
+ PortableIpRangeDao _portableIpRangeDao;
+ @Inject
+ RegionDao _regionDao;
+ @Inject
+ PortableIpDao _portableIpDao;
++ @Inject
+ ConfigurationServer _configServer;
+ @Inject
+ DcDetailsDao _dcDetailsDao;
+ @Inject
+ ClusterDetailsDao _clusterDetailsDao;
+ @Inject
+ StoragePoolDetailsDao _storagePoolDetailsDao;
+ @Inject
+ AccountDetailsDao _accountDetailsDao;
+ @Inject
+ PrimaryDataStoreDao _storagePoolDao;
// FIXME - why don't we have interface for DataCenterLinkLocalIpAddressDao?
@Inject protected DataCenterLinkLocalIpAddressDao _LinkLocalIpAllocDao;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/server/ManagementServerImpl.java
index 9edeb1a,86c1a64..5173cd5
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@@ -43,48 -43,166 +43,171 @@@ import javax.crypto.spec.SecretKeySpec
import javax.inject.Inject;
import javax.naming.ConfigurationException;
- import com.cloud.configuration.*;
- import com.cloud.storage.dao.*;
+ import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
+import org.apache.cloudstack.api.ApiConstants;
+
+import com.cloud.event.ActionEventUtils;
+import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoCmd;
- import org.apache.cloudstack.api.command.admin.account.*;
- import org.apache.cloudstack.api.command.admin.domain.*;
- import org.apache.cloudstack.api.command.admin.host.*;
- import org.apache.cloudstack.api.command.admin.network.*;
- import org.apache.cloudstack.api.command.admin.offering.*;
+import org.apache.cloudstack.api.command.admin.region.*;
- import org.apache.cloudstack.api.command.admin.resource.*;
- import org.apache.cloudstack.api.command.admin.router.*;
- import org.apache.cloudstack.api.command.admin.storage.*;
- import org.apache.cloudstack.api.command.admin.systemvm.*;
- import org.apache.cloudstack.api.command.admin.usage.*;
- import org.apache.cloudstack.api.command.admin.user.*;
- import org.apache.cloudstack.api.command.admin.vlan.*;
- import org.apache.cloudstack.api.command.admin.vpc.*;
- import org.apache.cloudstack.api.command.user.autoscale.*;
- import org.apache.cloudstack.api.command.user.firewall.*;
- import org.apache.cloudstack.api.command.user.iso.*;
- import org.apache.cloudstack.api.command.user.loadbalancer.*;
- import org.apache.cloudstack.api.command.user.nat.*;
- import org.apache.cloudstack.api.command.user.network.*;
- import org.apache.cloudstack.api.command.user.project.*;
- import org.apache.cloudstack.api.command.user.resource.*;
- import org.apache.cloudstack.api.command.user.securitygroup.*;
- import org.apache.cloudstack.api.command.user.snapshot.*;
- import org.apache.cloudstack.api.command.user.template.*;
- import org.apache.cloudstack.api.command.user.vm.*;
- import org.apache.cloudstack.api.command.user.volume.*;
- import org.apache.cloudstack.api.command.user.vpc.*;
- import org.apache.cloudstack.api.command.user.vpn.*;
+import org.apache.cloudstack.api.response.ExtractResponse;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.log4j.Logger;
import org.apache.cloudstack.affinity.AffinityGroupProcessor;
import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
-
+ import org.apache.cloudstack.api.ApiConstants;
+ import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoCmd;
+ import org.apache.cloudstack.api.command.admin.account.CreateAccountCmd;
+ import org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd;
+ import org.apache.cloudstack.api.command.admin.account.DisableAccountCmd;
+ import org.apache.cloudstack.api.command.admin.account.EnableAccountCmd;
+ import org.apache.cloudstack.api.command.admin.account.LockAccountCmd;
+ import org.apache.cloudstack.api.command.admin.account.UpdateAccountCmd;
+ import org.apache.cloudstack.api.command.admin.autoscale.CreateCounterCmd;
+ import org.apache.cloudstack.api.command.admin.autoscale.DeleteCounterCmd;
+ import org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd;
+ import org.apache.cloudstack.api.command.admin.cluster.DeleteClusterCmd;
+ import org.apache.cloudstack.api.command.admin.cluster.ListClustersCmd;
+ import org.apache.cloudstack.api.command.admin.cluster.UpdateClusterCmd;
+ import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd;
+ import org.apache.cloudstack.api.command.admin.config.ListHypervisorCapabilitiesCmd;
+ import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
+ import org.apache.cloudstack.api.command.admin.config.UpdateHypervisorCapabilitiesCmd;
+ import org.apache.cloudstack.api.command.admin.domain.CreateDomainCmd;
+ import org.apache.cloudstack.api.command.admin.domain.DeleteDomainCmd;
+ import org.apache.cloudstack.api.command.admin.domain.ListDomainChildrenCmd;
+ import org.apache.cloudstack.api.command.admin.domain.ListDomainsCmd;
+ import org.apache.cloudstack.api.command.admin.domain.UpdateDomainCmd;
+ import org.apache.cloudstack.api.command.admin.host.AddHostCmd;
+ import org.apache.cloudstack.api.command.admin.host.AddSecondaryStorageCmd;
+ import org.apache.cloudstack.api.command.admin.host.CancelMaintenanceCmd;
+ import org.apache.cloudstack.api.command.admin.host.DeleteHostCmd;
+ import org.apache.cloudstack.api.command.admin.host.FindHostsForMigrationCmd;
+ import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
+ import org.apache.cloudstack.api.command.admin.host.PrepareForMaintenanceCmd;
+ import org.apache.cloudstack.api.command.admin.host.ReconnectHostCmd;
+ import org.apache.cloudstack.api.command.admin.host.UpdateHostCmd;
+ import org.apache.cloudstack.api.command.admin.host.UpdateHostPasswordCmd;
+ import org.apache.cloudstack.api.command.admin.internallb.ConfigureInternalLoadBalancerElementCmd;
+ import org.apache.cloudstack.api.command.admin.internallb.CreateInternalLoadBalancerElementCmd;
+ import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd;
+ import org.apache.cloudstack.api.command.admin.internallb.ListInternalLoadBalancerElementsCmd;
+ import org.apache.cloudstack.api.command.admin.internallb.StartInternalLBVMCmd;
+ import org.apache.cloudstack.api.command.admin.internallb.StopInternalLBVMCmd;
+ import org.apache.cloudstack.api.command.admin.ldap.LDAPConfigCmd;
+ import org.apache.cloudstack.api.command.admin.ldap.LDAPRemoveCmd;
+ import org.apache.cloudstack.api.command.admin.network.AddNetworkDeviceCmd;
+ import org.apache.cloudstack.api.command.admin.network.AddNetworkServiceProviderCmd;
+ import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.network.CreatePhysicalNetworkCmd;
+ import org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd;
+ import org.apache.cloudstack.api.command.admin.network.DeleteNetworkDeviceCmd;
+ import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.network.DeleteNetworkServiceProviderCmd;
+ import org.apache.cloudstack.api.command.admin.network.DeletePhysicalNetworkCmd;
+ import org.apache.cloudstack.api.command.admin.network.DeleteStorageNetworkIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.network.ListDedicatedGuestVlanRangesCmd;
+ import org.apache.cloudstack.api.command.admin.network.ListNetworkDeviceCmd;
+ import org.apache.cloudstack.api.command.admin.network.ListNetworkIsolationMethodsCmd;
+ import org.apache.cloudstack.api.command.admin.network.ListNetworkServiceProvidersCmd;
+ import org.apache.cloudstack.api.command.admin.network.ListPhysicalNetworksCmd;
+ import org.apache.cloudstack.api.command.admin.network.ListStorageNetworkIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.network.ListSupportedNetworkServicesCmd;
+ import org.apache.cloudstack.api.command.admin.network.ReleaseDedicatedGuestVlanRangeCmd;
+ import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.network.UpdateNetworkServiceProviderCmd;
+ import org.apache.cloudstack.api.command.admin.network.UpdatePhysicalNetworkCmd;
+ import org.apache.cloudstack.api.command.admin.network.UpdateStorageNetworkIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.offering.DeleteServiceOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.offering.UpdateDiskOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.offering.UpdateServiceOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.pod.CreatePodCmd;
+ import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd;
+ import org.apache.cloudstack.api.command.admin.pod.ListPodsByCmd;
+ import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd;
-import org.apache.cloudstack.api.command.admin.region.AddRegionCmd;
-import org.apache.cloudstack.api.command.admin.region.RemoveRegionCmd;
-import org.apache.cloudstack.api.command.admin.region.UpdateRegionCmd;
+ import org.apache.cloudstack.api.command.admin.resource.ArchiveAlertsCmd;
+ import org.apache.cloudstack.api.command.admin.resource.DeleteAlertsCmd;
+ import org.apache.cloudstack.api.command.admin.resource.ListAlertsCmd;
+ import org.apache.cloudstack.api.command.admin.resource.ListCapacityCmd;
+ import org.apache.cloudstack.api.command.admin.resource.UploadCustomCertificateCmd;
+ import org.apache.cloudstack.api.command.admin.router.ConfigureVirtualRouterElementCmd;
+ import org.apache.cloudstack.api.command.admin.router.CreateVirtualRouterElementCmd;
+ import org.apache.cloudstack.api.command.admin.router.DestroyRouterCmd;
+ import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd;
+ import org.apache.cloudstack.api.command.admin.router.ListVirtualRouterElementsCmd;
+ import org.apache.cloudstack.api.command.admin.router.RebootRouterCmd;
+ import org.apache.cloudstack.api.command.admin.router.StartRouterCmd;
+ import org.apache.cloudstack.api.command.admin.router.StopRouterCmd;
+ import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd;
+ import org.apache.cloudstack.api.command.admin.storage.AddS3Cmd;
+ import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
+ import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd;
+ import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
+ import org.apache.cloudstack.api.command.admin.storage.FindStoragePoolsForMigrationCmd;
+ import org.apache.cloudstack.api.command.admin.storage.ListS3sCmd;
+ import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd;
+ import org.apache.cloudstack.api.command.admin.storage.ListStorageProvidersCmd;
+ import org.apache.cloudstack.api.command.admin.storage.PreparePrimaryStorageForMaintenanceCmd;
+ import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
+ import org.apache.cloudstack.api.command.admin.swift.AddSwiftCmd;
+ import org.apache.cloudstack.api.command.admin.swift.ListSwiftsCmd;
+ import org.apache.cloudstack.api.command.admin.systemvm.DestroySystemVmCmd;
+ import org.apache.cloudstack.api.command.admin.systemvm.ListSystemVMsCmd;
+ import org.apache.cloudstack.api.command.admin.systemvm.MigrateSystemVMCmd;
+ import org.apache.cloudstack.api.command.admin.systemvm.RebootSystemVmCmd;
+ import org.apache.cloudstack.api.command.admin.systemvm.StartSystemVMCmd;
+ import org.apache.cloudstack.api.command.admin.systemvm.StopSystemVmCmd;
+ import org.apache.cloudstack.api.command.admin.systemvm.UpgradeSystemVMCmd;
+ import org.apache.cloudstack.api.command.admin.template.PrepareTemplateCmd;
+ import org.apache.cloudstack.api.command.admin.usage.AddTrafficMonitorCmd;
+ import org.apache.cloudstack.api.command.admin.usage.AddTrafficTypeCmd;
+ import org.apache.cloudstack.api.command.admin.usage.DeleteTrafficMonitorCmd;
+ import org.apache.cloudstack.api.command.admin.usage.DeleteTrafficTypeCmd;
+ import org.apache.cloudstack.api.command.admin.usage.GenerateUsageRecordsCmd;
+ import org.apache.cloudstack.api.command.admin.usage.GetUsageRecordsCmd;
+ import org.apache.cloudstack.api.command.admin.usage.ListTrafficMonitorsCmd;
+ import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
+ import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypesCmd;
+ import org.apache.cloudstack.api.command.admin.usage.ListUsageTypesCmd;
+ import org.apache.cloudstack.api.command.admin.usage.UpdateTrafficTypeCmd;
+ import org.apache.cloudstack.api.command.admin.user.CreateUserCmd;
+ import org.apache.cloudstack.api.command.admin.user.DeleteUserCmd;
+ import org.apache.cloudstack.api.command.admin.user.DisableUserCmd;
+ import org.apache.cloudstack.api.command.admin.user.EnableUserCmd;
+ import org.apache.cloudstack.api.command.admin.user.GetUserCmd;
+ import org.apache.cloudstack.api.command.admin.user.ListUsersCmd;
+ import org.apache.cloudstack.api.command.admin.user.LockUserCmd;
+ import org.apache.cloudstack.api.command.admin.user.RegisterCmd;
+ import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
+ import org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.vlan.DedicatePublicIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.vlan.DeleteVlanIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd;
+ import org.apache.cloudstack.api.command.admin.vlan.ReleasePublicIpRangeCmd;
+ import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
+ import org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd;
+ import org.apache.cloudstack.api.command.admin.vm.MigrateVirtualMachineWithVolumeCmd;
+ import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
+ import org.apache.cloudstack.api.command.admin.vpc.CreatePrivateGatewayCmd;
+ import org.apache.cloudstack.api.command.admin.vpc.CreateVPCOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.vpc.DeletePrivateGatewayCmd;
+ import org.apache.cloudstack.api.command.admin.vpc.DeleteVPCOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.vpc.UpdateVPCOfferingCmd;
+ import org.apache.cloudstack.api.command.admin.zone.CreateZoneCmd;
+ import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd;
+ import org.apache.cloudstack.api.command.admin.zone.MarkDefaultZoneForAccountCmd;
+ import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd;
+ import org.apache.cloudstack.api.command.user.account.AddAccountToProjectCmd;
+ import org.apache.cloudstack.api.command.user.account.DeleteAccountFromProjectCmd;
+ import org.apache.cloudstack.api.command.user.account.ListAccountsCmd;
+ import org.apache.cloudstack.api.command.user.account.ListProjectAccountsCmd;
+ import org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd;
+ import org.apache.cloudstack.api.command.user.address.DisassociateIPAddrCmd;
+ import org.apache.cloudstack.api.command.user.address.ListPublicIpAddressesCmd;
import org.apache.cloudstack.api.command.user.affinitygroup.CreateAffinityGroupCmd;
import org.apache.cloudstack.api.command.user.affinitygroup.DeleteAffinityGroupCmd;
import org.apache.cloudstack.api.command.user.affinitygroup.ListAffinityGroupTypesCmd;
@@@ -179,83 -561,27 +566,96 @@@ import com.cloud.utils.exception.CloudR
import com.cloud.utils.net.MacAddress;
import com.cloud.utils.net.NetUtils;
import com.cloud.utils.ssh.SSHKeysHelper;
- import com.cloud.vm.*;
+ import com.cloud.vm.ConsoleProxyVO;
+ import com.cloud.vm.DiskProfile;
+ import com.cloud.vm.InstanceGroupVO;
+ import com.cloud.vm.SecondaryStorageVmVO;
+ import com.cloud.vm.UserVmVO;
+ import com.cloud.vm.VMInstanceVO;
+ import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachine.State;
- import com.cloud.vm.dao.*;
+ import com.cloud.vm.VirtualMachineManager;
+ import com.cloud.vm.VirtualMachineProfile;
+ import com.cloud.vm.VirtualMachineProfileImpl;
+ import com.cloud.vm.dao.ConsoleProxyDao;
+ import com.cloud.vm.dao.DomainRouterDao;
+ import com.cloud.vm.dao.InstanceGroupDao;
+ import com.cloud.vm.dao.SecondaryStorageVmDao;
+ import com.cloud.vm.dao.UserVmDao;
+ import com.cloud.vm.dao.VMInstanceDao;
+
import edu.emory.mathcs.backport.java.util.Arrays;
import edu.emory.mathcs.backport.java.util.Collections;
-
+import org.apache.cloudstack.acl.ControlledEntity;
+import org.apache.cloudstack.api.command.admin.autoscale.CreateCounterCmd;
+import org.apache.cloudstack.api.command.admin.autoscale.DeleteCounterCmd;
+import org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd;
+import org.apache.cloudstack.api.command.admin.cluster.DeleteClusterCmd;
+import org.apache.cloudstack.api.command.admin.cluster.ListClustersCmd;
+import org.apache.cloudstack.api.command.admin.cluster.UpdateClusterCmd;
+import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd;
+import org.apache.cloudstack.api.command.admin.config.ListHypervisorCapabilitiesCmd;
+import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
+import org.apache.cloudstack.api.command.admin.config.UpdateHypervisorCapabilitiesCmd;
+import org.apache.cloudstack.api.command.admin.ldap.LDAPConfigCmd;
+import org.apache.cloudstack.api.command.admin.ldap.LDAPRemoveCmd;
+import org.apache.cloudstack.api.command.admin.pod.CreatePodCmd;
+import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd;
+import org.apache.cloudstack.api.command.admin.pod.ListPodsByCmd;
+import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd;
- import org.apache.cloudstack.api.command.admin.region.ListPortableIpRangesCmd;
+import org.apache.cloudstack.api.command.admin.swift.AddSwiftCmd;
+import org.apache.cloudstack.api.command.admin.swift.ListSwiftsCmd;
+import org.apache.cloudstack.api.command.admin.template.PrepareTemplateCmd;
+import org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd;
+import org.apache.cloudstack.api.command.admin.vlan.DeleteVlanIpRangeCmd;
+import org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd;
+import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd;
+import org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd;
+import org.apache.cloudstack.api.command.admin.vm.MigrateVirtualMachineWithVolumeCmd;
+import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd;
+import org.apache.cloudstack.api.command.admin.zone.CreateZoneCmd;
+import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd;
+import org.apache.cloudstack.api.command.admin.zone.MarkDefaultZoneForAccountCmd;
+import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd;
+import org.apache.cloudstack.api.command.user.account.AddAccountToProjectCmd;
+import org.apache.cloudstack.api.command.user.account.DeleteAccountFromProjectCmd;
+import org.apache.cloudstack.api.command.user.account.ListAccountsCmd;
+import org.apache.cloudstack.api.command.user.account.ListProjectAccountsCmd;
+import org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd;
+import org.apache.cloudstack.api.command.user.address.DisassociateIPAddrCmd;
+import org.apache.cloudstack.api.command.user.address.ListPublicIpAddressesCmd;
+import org.apache.cloudstack.api.command.user.config.ListCapabilitiesCmd;
+import org.apache.cloudstack.api.command.user.event.ArchiveEventsCmd;
+import org.apache.cloudstack.api.command.user.event.DeleteEventsCmd;
+import org.apache.cloudstack.api.command.user.event.ListEventTypesCmd;
+import org.apache.cloudstack.api.command.user.event.ListEventsCmd;
+import org.apache.cloudstack.api.command.user.guest.ListGuestOsCategoriesCmd;
+import org.apache.cloudstack.api.command.user.guest.ListGuestOsCmd;
+import org.apache.cloudstack.api.command.user.job.ListAsyncJobsCmd;
+import org.apache.cloudstack.api.command.user.job.QueryAsyncJobResultCmd;
+import org.apache.cloudstack.api.command.user.offering.ListDiskOfferingsCmd;
+import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd;
+import org.apache.cloudstack.api.command.user.region.ListRegionsCmd;
+import org.apache.cloudstack.api.command.user.region.ha.gslb.*;
+import org.apache.cloudstack.api.command.user.ssh.CreateSSHKeyPairCmd;
+import org.apache.cloudstack.api.command.user.ssh.DeleteSSHKeyPairCmd;
+import org.apache.cloudstack.api.command.user.ssh.ListSSHKeyPairsCmd;
+import org.apache.cloudstack.api.command.user.ssh.RegisterSSHKeyPairCmd;
+import org.apache.cloudstack.api.command.user.tag.CreateTagsCmd;
+import org.apache.cloudstack.api.command.user.tag.DeleteTagsCmd;
+import org.apache.cloudstack.api.command.user.tag.ListTagsCmd;
+import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
+import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd;
+import org.apache.cloudstack.api.command.user.vmgroup.ListVMGroupsCmd;
+import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
+import org.apache.cloudstack.api.command.user.vmsnapshot.CreateVMSnapshotCmd;
+import org.apache.cloudstack.api.command.user.vmsnapshot.DeleteVMSnapshotCmd;
+import org.apache.cloudstack.api.command.user.vmsnapshot.ListVMSnapshotCmd;
- import org.apache.cloudstack.api.command.user.vmsnapshot.RevertToSnapshotCmd;
+import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
+import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
public class ManagementServerImpl extends ManagerBase implements ManagementServer {
public static final Logger s_logger = Logger.getLogger(ManagementServerImpl.class.getName());
@@@ -2492,9 -2873,11 +2947,14 @@@
cmdList.add(ListAffinityGroupsCmd.class);
cmdList.add(UpdateVMAffinityGroupCmd.class);
cmdList.add(ListAffinityGroupTypesCmd.class);
+ cmdList.add(CreatePortableIpRangeCmd.class);
+ cmdList.add(DeletePortableIpRangeCmd.class);
+ cmdList.add(ListPortableIpRangesCmd.class);
+ cmdList.add(StopInternalLBVMCmd.class);
+ cmdList.add(StartInternalLBVMCmd.class);
+ cmdList.add(ListInternalLBVMsCmd.class);
+ cmdList.add(ListNetworkIsolationMethodsCmd.class);
+ cmdList.add(ListNetworkIsolationMethodsCmd.class);
return cmdList;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/test/com/cloud/network/MockNetworkManagerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
----------------------------------------------------------------------
diff --cc server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
index 55ddcde,6f52397..63f3cbf
--- a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
+++ b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
@@@ -19,10 -19,15 +19,17 @@@ package org.apache.cloudstack.networkof
import java.io.IOException;
+ import com.cloud.dc.ClusterDetailsDao;
+ import com.cloud.dc.dao.*;
+ import com.cloud.server.ConfigurationServer;
+ import com.cloud.user.*;
import org.apache.cloudstack.acl.SecurityChecker;
+import org.apache.cloudstack.region.PortableIpDaoImpl;
+import org.apache.cloudstack.region.dao.RegionDaoImpl;
+ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl;
+ import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao;
+ import org.apache.cloudstack.test.utils.SpringUtils;
import org.mockito.Mockito;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@@ -160,9 -148,7 +151,10 @@@ import org.apache.cloudstack.region.Por
NetworkServiceMapDaoImpl.class,
PrimaryDataStoreDaoImpl.class,
StoragePoolDetailsDaoImpl.class,
+ PortableIpRangeDaoImpl.class,
+ RegionDaoImpl.class,
- PortableIpDaoImpl.class
++ PortableIpDaoImpl.class,
+ AccountGuestVlanMapDaoImpl.class
},
includeFilters={@Filter(value=ChildTestConfiguration.Library.class, type=FilterType.CUSTOM)},
useDefaultFilters=false
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --cc setup/db/db/schema-410to420.sql
index e89cf23,065b35c..0e4015c
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@@ -1109,40 -1116,65 +1116,103 @@@ CREATE VIEW `cloud`.`account_view` A
and async_job.instance_type = 'Account'
and async_job.job_status = 0;
+
+
+ ALTER TABLE `cloud`.`load_balancing_rules` ADD COLUMN `source_ip_address` varchar(40) COMMENT 'source ip address for the load balancer rule';
+ ALTER TABLE `cloud`.`load_balancing_rules` ADD COLUMN `source_ip_address_network_id` bigint unsigned COMMENT 'the id of the network where source ip belongs to';
+ ALTER TABLE `cloud`.`load_balancing_rules` ADD COLUMN `scheme` varchar(40) NOT NULL COMMENT 'load balancer scheme; can be Internal or Public';
+ UPDATE `cloud`.`load_balancing_rules` SET `scheme`='Public';
+
+
+
+ -- Add details talbe for the network offering
+ CREATE TABLE `cloud`.`network_offering_details` (
+ `id` bigint unsigned NOT NULL auto_increment,
+ `network_offering_id` bigint unsigned NOT NULL COMMENT 'network offering id',
+ `name` varchar(255) NOT NULL,
+ `value` varchar(1024) NOT NULL,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `fk_network_offering_details__network_offering_id` FOREIGN KEY `fk_network_offering_details__network_offering_id`(`network_offering_id`) REFERENCES `network_offerings`(`id`) ON DELETE CASCADE
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+ -- Change the constraint for the network service map table. Now we support multiple provider for the same service
+ ALTER TABLE `cloud`.`ntwk_service_map` DROP FOREIGN KEY `fk_ntwk_service_map__network_id`;
+ ALTER TABLE `cloud`.`ntwk_service_map` DROP INDEX `network_id`;
+
+ ALTER TABLE `cloud`.`ntwk_service_map` ADD UNIQUE `network_id` (`network_id`,`service`,`provider`);
+ ALTER TABLE `cloud`.`ntwk_service_map` ADD CONSTRAINT `fk_ntwk_service_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks` (`id`) ON DELETE CASCADE;
+
+
+ ALTER TABLE `cloud`.`network_offerings` ADD COLUMN `internal_lb` int(1) unsigned NOT NULL DEFAULT '0' COMMENT 'true if the network offering supports Internal lb service';
+ ALTER TABLE `cloud`.`network_offerings` ADD COLUMN `public_lb` int(1) unsigned NOT NULL DEFAULT '0' COMMENT 'true if the network offering supports Public lb service';
+ UPDATE `cloud`.`network_offerings` SET public_lb=1 where id IN (SELECT DISTINCT network_offering_id FROM `cloud`.`ntwk_offering_service_map` WHERE service='Lb');
+
+
+ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'internallbvm.service.offering', null, 'Uuid of the service offering used by internal lb vm; if NULL - default system internal lb offering will be used');
+
+
alter table `cloud_usage`.`usage_network_offering` add column nic_id bigint(20) unsigned NOT NULL;
+
++
+CREATE TABLE `cloud`.`portable_ip_range` (
+ `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
+ `uuid` varchar(40),
+ `region_id` int unsigned NOT NULL,
+ `vlan_id` varchar(255),
+ `gateway` varchar(255),
+ `netmask` varchar(255),
+ `start_ip` varchar(255),
+ `end_ip` varchar(255),
+ PRIMARY KEY (`id`),
+ CONSTRAINT `fk_portableip__region_id` FOREIGN KEY (`region_id`) REFERENCES `region`(`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+CREATE TABLE `cloud`.`portable_ip_address` (
+ `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
+ `account_id` bigint unsigned NULL,
+ `domain_id` bigint unsigned NULL,
+ `allocated` datetime NULL COMMENT 'Date portable ip was allocated',
+ `state` char(32) NOT NULL default 'Free' COMMENT 'state of the portable ip address',
+ `region_id` int unsigned NOT NULL,
+ `vlan` varchar(255),
+ `gateway` varchar(255),
+ `netmask` varchar(255),
+ `portable_ip_address` varchar(255),
+ `portable_ip_range_id` bigint unsigned NOT NULL,
+ `data_center_id` bigint unsigned NULL COMMENT 'zone to which portable IP is associated',
+ `physical_network_id` bigint unsigned NULL COMMENT 'physical network id in the zone to which portable IP is associated',
+ `network_id` bigint unsigned NULL COMMENT 'guest network to which portable ip address is associated with',
+ `vpc_id` bigint unsigned COMMENT 'vpc to which portable ip address is associated with',
+ PRIMARY KEY (`id`),
+ CONSTRAINT `fk_portable_ip_address__portable_ip_range_id` FOREIGN KEY (`portable_ip_range_id`) REFERENCES `portable_ip_range`(`id`) ON DELETE CASCADE,
+ CONSTRAINT `fk_portable_ip_address__region_id` FOREIGN KEY (`region_id`) REFERENCES `region`(`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+ALTER TABLE `cloud`.`user_ip_address` ADD COLUMN is_portable int(1) unsigned NOT NULL default '0';
++
+ ALTER TABLE `cloud`.`data_center_details` MODIFY value varchar(1024);
+ ALTER TABLE `cloud`.`cluster_details` MODIFY value varchar(255);
+ ALTER TABLE `cloud`.`storage_pool_details` MODIFY value varchar(255);
+ ALTER TABLE `cloud`.`account_details` MODIFY value varchar(255);
+
+ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'midonet.apiserver.address', 'http://localhost:8081', 'Specify the address at which the Midonet API server can be contacted (if using Midonet)');
+ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'midonet.providerrouter.id', 'd7c5e6a3-e2f4-426b-b728-b7ce6a0448e5', 'Specifies the UUID of the Midonet provider router (if using Midonet)');
+
+ alter table cloud.vpc_gateways add column source_nat boolean default false;
+ alter table cloud.private_ip_address add column source_nat boolean default false;
+
+ CREATE TABLE `cloud`.`account_vnet_map` (
+ `id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
+ `uuid` varchar(255) UNIQUE,
+ `vnet_range` varchar(255) NOT NULL COMMENT 'dedicated guest vlan range',
+ `account_id` bigint unsigned NOT NULL COMMENT 'account id. foreign key to account table',
+ `physical_network_id` bigint unsigned NOT NULL COMMENT 'physical network id. foreign key to the the physical network table',
+ PRIMARY KEY (`id`),
+ CONSTRAINT `fk_account_vnet_map__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network` (`id`) ON DELETE CASCADE,
+ INDEX `i_account_vnet_map__physical_network_id`(`physical_network_id`),
+ CONSTRAINT `fk_account_vnet_map__account_id` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE,
+ INDEX `i_account_vnet_map__account_id`(`account_id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+ ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD COLUMN account_vnet_map_id bigint unsigned;
+ ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD CONSTRAINT `fk_op_dc_vnet_alloc__account_vnet_map_id` FOREIGN KEY `fk_op_dc_vnet_alloc__account_vnet_map_id` (`account_vnet_map_id`) REFERENCES `account_vnet_map` (`id`);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f82c6a84/utils/src/com/cloud/utils/net/NetUtils.java
----------------------------------------------------------------------