You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by li...@apache.org on 2013/04/26 01:25:48 UTC
[7/7] git commit: updated refs/heads/dedicate-guest-vlan-ranges to
5f15f38
guest-vlan: fix tests
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5f15f388
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5f15f388
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5f15f388
Branch: refs/heads/dedicate-guest-vlan-ranges
Commit: 5f15f388157456c5b8ff6603ffed5b2d3731aca2
Parents: ad79f37
Author: Likitha Shetty <li...@citrix.com>
Authored: Fri Apr 26 04:06:12 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Fri Apr 26 04:19:57 2013 +0530
----------------------------------------------------------------------
api/src/com/cloud/event/EventTypes.java | 3 +-
server/src/com/cloud/dc/DataCenterVnetVO.java | 2 +-
.../src/com/cloud/network/NetworkServiceImpl.java | 2 +-
.../affinity/AffinityApiTestConfiguration.java | 3 +-
.../networkoffering/ChildTestConfiguration.java | 4 ++-
setup/db/db/schema-410to420.sql | 16 +++++++-------
6 files changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f15f388/api/src/com/cloud/event/EventTypes.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java
index 8478dbf..b035d1e 100755
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -391,7 +391,8 @@ public class EventTypes {
public static final String EVENT_VM_AFFINITY_GROUP_UPDATE = "VM.AG.UPDATE";
// Dedicated guest vlan range
- public static final String EVENT_DEDICATED_GUEST_VLAN_RANGE_RELEASE = "DEDICATED.GUESTVLANRANGE.RELEASE";
+ public static final String EVENT_DEDICATED_GUEST_VLAN_RANGE_DEDICATE = "GUESTVLANRANGE.DEDICATE";
+ public static final String EVENT_DEDICATED_GUEST_VLAN_RANGE_RELEASE = "GUESTVLANRANGE.RELEASE";
static {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f15f388/server/src/com/cloud/dc/DataCenterVnetVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DataCenterVnetVO.java b/server/src/com/cloud/dc/DataCenterVnetVO.java
index 5321441..9bae132 100755
--- a/server/src/com/cloud/dc/DataCenterVnetVO.java
+++ b/server/src/com/cloud/dc/DataCenterVnetVO.java
@@ -57,7 +57,7 @@ public class DataCenterVnetVO implements InternalIdentity {
@Column(name="reservation_id")
protected String reservationId;
- @Column(name="account_guest_vlan_map_id")
+ @Column(name="account_vnet_map_id")
protected Long accountGuestVlanMapId;
public Date getTakenAt() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f15f388/server/src/com/cloud/network/NetworkServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java
index 3f33b55..0387d39 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -2705,7 +2705,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
@Override
@DB
- // Generate action events
+ @ActionEvent(eventType = EventTypes.EVENT_DEDICATED_GUEST_VLAN_RANGE_DEDICATE, eventDescription = "dedicating guest vlan range", async = false)
public GuestVlan dedicateGuestVlanRange(DedicateGuestVlanRangeCmd cmd) {
String vlan = cmd.getVlan();
String accountName = cmd.getAccountName();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f15f388/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java b/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
old mode 100644
new mode 100755
index fb29469..d20c825
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
@@ -63,6 +63,7 @@ import com.cloud.network.NetworkManager;
import com.cloud.network.NetworkModel;
import com.cloud.network.NetworkService;
import com.cloud.network.StorageNetworkManager;
+import com.cloud.network.dao.AccountGuestVlanMapDaoImpl;
import com.cloud.network.dao.FirewallRulesCidrsDaoImpl;
import com.cloud.network.dao.FirewallRulesDaoImpl;
import com.cloud.network.dao.IPAddressDaoImpl;
@@ -131,7 +132,7 @@ import com.cloud.vm.dao.VMInstanceDaoImpl;
FirewallRulesCidrsDaoImpl.class, PhysicalNetworkDaoImpl.class, PhysicalNetworkTrafficTypeDaoImpl.class,
PhysicalNetworkServiceProviderDaoImpl.class, LoadBalancerDaoImpl.class, NetworkServiceMapDaoImpl.class,
PrimaryDataStoreDaoImpl.class, StoragePoolDetailsDaoImpl.class, AffinityGroupServiceImpl.class,
- ComponentContext.class, AffinityGroupProcessor.class, UserVmVO.class, EventUtils.class, UserVmVO.class
+ ComponentContext.class, AffinityGroupProcessor.class, UserVmVO.class, EventUtils.class, UserVmVO.class, AccountGuestVlanMapDaoImpl.class
}, includeFilters = { @Filter(value = AffinityApiTestConfiguration.Library.class, type = FilterType.CUSTOM) }, useDefaultFilters = false)
public class AffinityApiTestConfiguration {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f15f388/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
old mode 100644
new mode 100755
index f1163ef..d484872
--- a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
+++ b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
@@ -59,6 +59,7 @@ import com.cloud.network.NetworkManager;
import com.cloud.network.NetworkModel;
import com.cloud.network.NetworkService;
import com.cloud.network.StorageNetworkManager;
+import com.cloud.network.dao.AccountGuestVlanMapDaoImpl;
import com.cloud.network.dao.FirewallRulesCidrsDaoImpl;
import com.cloud.network.dao.FirewallRulesDaoImpl;
import com.cloud.network.dao.IPAddressDaoImpl;
@@ -156,7 +157,8 @@ import com.cloud.vm.dao.VMInstanceDaoImpl;
LoadBalancerDaoImpl.class,
NetworkServiceMapDaoImpl.class,
PrimaryDataStoreDaoImpl.class,
- StoragePoolDetailsDaoImpl.class
+ StoragePoolDetailsDaoImpl.class,
+ AccountGuestVlanMapDaoImpl.class
},
includeFilters={@Filter(value=ChildTestConfiguration.Library.class, type=FilterType.CUSTOM)},
useDefaultFilters=false
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f15f388/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 1626721..9737e59 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -1112,18 +1112,18 @@ CREATE VIEW `cloud`.`account_view` AS
alter table `cloud_usage`.`usage_network_offering` add column nic_id bigint(20) unsigned NOT NULL;
-CREATE TABLE `cloud`.`account_guest_vlan_map` (
+CREATE TABLE `cloud`.`account_vnet_map` (
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
`uuid` varchar(255) UNIQUE,
- `guest_vlan_range` varchar(255) NOT NULL COMMENT 'dedicated guest vlan range',
+ `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_guest_vlan_map__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network` (`id`) ON DELETE CASCADE,
- INDEX `i_account_guest_vlan_map__physical_network_id`(`physical_network_id`),
- CONSTRAINT `fk_account_guest_vlan_map__account_id` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE,
- INDEX `i_account_guest_vlan_map__account_id`(`account_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_guest_vlan_map_id bigint unsigned;
-ALTER TABLE `cloud`.`op_dc_vnet_alloc` ADD CONSTRAINT `fk_op_dc_vnet_alloc__account_guest_vlan_map_id` FOREIGN KEY `fk_op_dc_vnet_alloc__account_guest_vlan_map_id` (`account_guest_vlan_map_id`) REFERENCES `account_guest_vlan_map` (`id`);
+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`);