You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2013/04/15 15:10:00 UTC

[01/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Updated Branches:
  refs/heads/cisco-vnmc-api-integration 735c4c895 -> 7ce45ea10


CLOUDSTACK-1968: affinity_groups: Column 'deployment planner' cannot be null when creating a service offering

Added default value to all constructors..


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7201eb9e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7201eb9e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7201eb9e

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 7201eb9ee492e3faad5c70db81906fa32e1861bb
Parents: 943aef7
Author: Prachi Damle <pr...@cloud.com>
Authored: Mon Apr 8 11:04:01 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:23:37 2013 -0700

----------------------------------------------------------------------
 .../src/com/cloud/service/ServiceOfferingVO.java   |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7201eb9e/server/src/com/cloud/service/ServiceOfferingVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/service/ServiceOfferingVO.java b/server/src/com/cloud/service/ServiceOfferingVO.java
index 40f817d..a3da904 100755
--- a/server/src/com/cloud/service/ServiceOfferingVO.java
+++ b/server/src/com/cloud/service/ServiceOfferingVO.java
@@ -87,6 +87,7 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering
         this.volatileVm = false;
         this.default_use = defaultUse;
         this.vm_type = vm_type == null ? null : vm_type.toString().toLowerCase();
+        this.deploymentPlanner = "FirstFitPlanner";
     }
 
     public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA, boolean limitCpuUse, boolean volatileVm, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, VirtualMachine.Type vm_type, Long domainId) {
@@ -100,11 +101,13 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering
         this.limitCpuUse = limitCpuUse;
         this.volatileVm = volatileVm;
         this.vm_type = vm_type == null ? null : vm_type.toString().toLowerCase();
+        this.deploymentPlanner = "FirstFitPlanner";
     }
 
     public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA, boolean limitResourceUse, boolean volatileVm, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, VirtualMachine.Type vm_type, Long domainId, String hostTag) {
         this(name, cpu, ramSize, speed, rateMbps, multicastRateMbps, offerHA, limitResourceUse, volatileVm, displayText, useLocalStorage, recreatable, tags, systemUse, vm_type, domainId);
         this.hostTag = hostTag;
+        this.deploymentPlanner = "FirstFitPlanner";
     }
 
     public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, Integer rateMbps, Integer multicastRateMbps,
@@ -113,7 +116,11 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering
             String hostTag, String deploymentPlanner) {
         this(name, cpu, ramSize, speed, rateMbps, multicastRateMbps, offerHA, limitResourceUse, volatileVm,
                 displayText, useLocalStorage, recreatable, tags, systemUse, vm_type, domainId, hostTag);
-        this.deploymentPlanner = deploymentPlanner;
+        if (deploymentPlanner != null) {
+            this.deploymentPlanner = deploymentPlanner;
+        } else {
+            this.deploymentPlanner = "FirstFitPlanner";
+        }
     }
 
     @Override


[27/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Revert "Fixed Primary typo"

This reverts commit 4e5a8a0f8adcc665755229ee3d18f40913d15913.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3b35063a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3b35063a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3b35063a

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 3b35063adf1b7ddf70b226358c58c64f08c7d538
Parents: 85b1519
Author: Chip Childers <ch...@gmail.com>
Authored: Fri Apr 12 15:18:02 2013 +0100
Committer: Chip Childers <ch...@gmail.com>
Committed: Fri Apr 12 15:18:02 2013 +0100

----------------------------------------------------------------------
 .../cloudstack/storage/test/DirectAgentTest.java   |    4 ++--
 .../command/CreateVolumeFromBaseImageCommand.java  |    6 +++---
 .../storage/to/ImageOnPrimayDataStoreTO.java       |    4 ++--
 .../xen/resource/XenServerStorageResource.java     |    4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b35063a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
index fc4aea8..2d6b94f 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
@@ -23,7 +23,7 @@ import java.util.UUID;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.storage.to.ImageDataStoreTO;
-import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
 import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.TemplateTO;
 import org.mockito.Mockito;
@@ -126,7 +126,7 @@ public class DirectAgentTest extends CloudStackTestNGBase {
     
     @Test
     public void testDownloadTemplate() {
-        ImageOnPrimaryDataStoreTO image = Mockito.mock(ImageOnPrimaryDataStoreTO.class);
+        ImageOnPrimayDataStoreTO image = Mockito.mock(ImageOnPrimayDataStoreTO.class);
         PrimaryDataStoreTO primaryStore = Mockito.mock(PrimaryDataStoreTO.class);
         Mockito.when(primaryStore.getUuid()).thenReturn(this.getLocalStorageUuid());
         Mockito.when(image.getPrimaryDataStore()).thenReturn(primaryStore);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b35063a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
index 1734bc4..f4be067 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
@@ -18,14 +18,14 @@
  */
 package org.apache.cloudstack.storage.command;
 
-import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
 import org.apache.cloudstack.storage.to.VolumeTO;
 
 import com.cloud.agent.api.Command;
 
 public class CreateVolumeFromBaseImageCommand extends Command implements StorageSubSystemCommand {
     private final VolumeTO volume;
-    private final ImageOnPrimaryDataStoreTO image;
+    private final ImageOnPrimayDataStoreTO image;
 
     public CreateVolumeFromBaseImageCommand(VolumeTO volume, String image) {
         this.volume = volume;
@@ -36,7 +36,7 @@ public class CreateVolumeFromBaseImageCommand extends Command implements Storage
         return this.volume;
     }
     
-    public ImageOnPrimaryDataStoreTO getImage() {
+    public ImageOnPrimayDataStoreTO getImage() {
         return this.image;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b35063a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
index a9a3cc4..18743d7 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
@@ -20,11 +20,11 @@ package org.apache.cloudstack.storage.to;
 
 import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;
 
-public class ImageOnPrimaryDataStoreTO {
+public class ImageOnPrimayDataStoreTO {
     private final String pathOnPrimaryDataStore;
     private  PrimaryDataStoreTO dataStore;
     private final TemplateTO template;
-    public ImageOnPrimaryDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
+    public ImageOnPrimayDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
         this.pathOnPrimaryDataStore = template.getPath();
         //this.dataStore = template.getPrimaryDataStore().getDataStoreTO();
         this.template = new TemplateTO(template.getTemplate());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3b35063a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
index 7e0ccbe..9c29149 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
@@ -39,7 +39,7 @@ import org.apache.cloudstack.storage.command.CreatePrimaryDataStoreCmd;
 import org.apache.cloudstack.storage.command.CreateVolumeFromBaseImageCommand;
 import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import org.apache.cloudstack.storage.datastore.protocol.DataStoreProtocol;
-import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
 import org.apache.cloudstack.storage.to.VolumeTO;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
@@ -207,7 +207,7 @@ public class XenServerStorageResource {
     
     protected Answer execute(CreateVolumeFromBaseImageCommand cmd) {
         VolumeTO volume = cmd.getVolume();
-        ImageOnPrimaryDataStoreTO baseImage = cmd.getImage();
+        ImageOnPrimayDataStoreTO baseImage = cmd.getImage();
         Connection conn = hypervisorResource.getConnection();
         
         try {


[04/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Adding pretty toString() to AffinityGroup


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bbf79007
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bbf79007
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bbf79007

Branch: refs/heads/cisco-vnmc-api-integration
Commit: bbf7900732d46e60a4708901b4767e3ef73dbb10
Parents: fc248cb
Author: Prachi Damle <pr...@cloud.com>
Authored: Wed Apr 10 14:18:36 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:23:43 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/affinity/AffinityGroupVO.java       |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bbf79007/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
index fab3835..b6c4a02 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
@@ -104,4 +104,11 @@ public class AffinityGroupVO implements AffinityGroup {
         return type;
     }
 
+    @Override
+    public String toString() {
+        StringBuilder buf = new StringBuilder("AffinityGroup[");
+        buf.append(id).append("|").append(name).append("|").append(type).append("]");
+        return buf.toString();
+    }
+
 }


[32/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
moving the integration test to the smoke folder

The smoke folder is for the bvts and that's where maven+marvin will pick
up the tests tagged for the simulator run.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fd84c56b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fd84c56b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fd84c56b

Branch: refs/heads/cisco-vnmc-api-integration
Commit: fd84c56bf96aba134fa2656cf2de525ad4fc2f25
Parents: 8f865c5
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Apr 10 16:22:29 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Fri Apr 12 23:27:42 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_public_ip_range.py |  173 ---------------
 test/integration/smoke/test_public_ip_range.py     |  173 +++++++++++++++
 2 files changed, 173 insertions(+), 173 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fd84c56b/test/integration/component/test_public_ip_range.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_public_ip_range.py b/test/integration/component/test_public_ip_range.py
deleted file mode 100755
index f2c967f..0000000
--- a/test/integration/component/test_public_ip_range.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# 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.
-""" P1 tests for Dedicating Public IP addresses
-"""
-#Import Local Modules
-import marvin
-from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-import datetime
-
-class Services:
-    """Test Dedicating Public IP addresses
-    """
-
-    def __init__(self):
-        self.services = {
-                        "domain": {
-                                   "name": "Domain",
-                                   },
-                        "account": {
-                                    "email": "test@test.com",
-                                    "firstname": "Test",
-                                    "lastname": "User",
-                                    "username": "test",
-                                    "password": "password",
-                         },
-                        "gateway": "10.102.197.1",
-                        "netmask": "255.255.255.0",
-                        "forvirtualnetwork": "true",
-                        "startip": "10.102.197.70",
-                        "endip": "10.102.197.73",
-                        "zoneid": "1",
-                        "podid": "",
-                        "vlan": "101",
-                    }
-
-class TesDedicatePublicIPRange(cloudstackTestCase):
-
-    @classmethod
-    def setUpClass(cls):
-        cls.api_client = super(TesDedicatePublicIPRange, cls).getClsTestClient().getApiClient()
-        cls.services = Services().services
-        # Get Zone, Domain
-        cls.domain = get_domain(cls.api_client, cls.services)
-        cls.zone = get_zone(cls.api_client, cls.services)
-
-        # Create Account
-        cls.account = Account.create(
-                            cls.api_client,
-                            cls.services["account"],
-                            domainid=cls.domain.id
-                            )
-        cls._cleanup = [
-                        cls.account,
-                        ]
-        return
-
-    @classmethod
-    def tearDownClass(cls):
-        try:
-            # Cleanup resources used
-            cleanup_resources(cls.api_client, cls._cleanup)
-        except Exception as e:
-            raise Exception("Warning: Exception during cleanup : %s" % e)
-        return
-
-    def setUp(self):
-        self.apiclient = self.testClient.getApiClient()
-        self.dbclient = self.testClient.getDbConnection()
-        self.cleanup = []
-        return
-
-    def tearDown(self):
-        try:
-            # Clean up
-            cleanup_resources(self.apiclient, self.cleanup)
-        except Exception as e:
-            raise Exception("Warning: Exception during cleanup : %s" % e)
-        return
-
-    @attr(tags = ["publiciprange", "dedicate", "release"])
-    def test_dedicatePublicIpRange(self):
-        """Test public IP range dedication
-        """
-
-        # Validate the following:
-        # 1. Create a Public IP range
-        # 2. Created IP range should be present, verify with listVlanIpRanges
-        # 3. Dedicate the created IP range to user account
-        # 4. Verify IP range is dedicated, verify with listVlanIpRanges
-        # 5. Release the dedicated Public IP range back to the system
-        # 6. Verify IP range has been released, verify with listVlanIpRanges
-        # 7. Delete the Public IP range
-
-        self.debug("Creating Public IP range")
-        self.public_ip_range = PublicIpRange.create(
-                                    self.api_client,
-                                    self.services
-                               )
-        list_public_ip_range_response = PublicIpRange.list(
-                                            self.apiclient,
-                                            id=self.public_ip_range.vlan.id
-                                        )
-        self.debug(
-                "Verify listPublicIpRanges response for public ip ranges: %s" \
-                % self.public_ip_range.vlan.id
-            )
-        self.assertEqual(
-                         isinstance(list_public_ip_range_response, list),
-                         True,
-                         "Check for list Public IP range response"
-                         )
-        public_ip_response = list_public_ip_range_response[0]
-        self.assertEqual(
-                            public_ip_response.id,
-                            self.public_ip_range.vlan.id,
-                            "Check public ip range response id is in listVlanIpRanges"
-                        )
-
-        self.debug("Dedicating Public IP range");
-        dedicate_public_ip_range_response = PublicIpRange.dedicate(
-                                                self.apiclient,
-                                                self.public_ip_range.vlan.id,
-                                                account=self.account.account.name,
-                                                domainid=self.account.account.domainid
-                                            )
-        list_public_ip_range_response = PublicIpRange.list(
-                                            self.apiclient,
-                                            id=self.public_ip_range.vlan.id
-                                        )
-        public_ip_response = list_public_ip_range_response[0]
-        self.assertEqual(
-                            public_ip_response.account,
-                            self.account.account.name,
-                            "Check account name is in listVlanIpRanges as the account public ip range is dedicated to"
-                        )
-
-        self.debug("Releasing Public IP range");
-        self.public_ip_range.release(self.apiclient)
-        list_public_ip_range_response = PublicIpRange.list(
-                                            self.apiclient,
-                                            id=self.public_ip_range.vlan.id
-                                        )
-        public_ip_response = list_public_ip_range_response[0]
-        self.assertEqual(
-                            public_ip_response.account,
-                            "system",
-                            "Check account name is system account in listVlanIpRanges"
-                        )
-
-        self.debug("Deleting Public IP range");
-        self.public_ip_range.delete(self.apiclient)
-
-        return
-

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fd84c56b/test/integration/smoke/test_public_ip_range.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py
new file mode 100755
index 0000000..a7aad6b
--- /dev/null
+++ b/test/integration/smoke/test_public_ip_range.py
@@ -0,0 +1,173 @@
+# 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.
+""" P1 tests for Dedicating Public IP addresses
+"""
+#Import Local Modules
+import marvin
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.integration.lib.utils import *
+from marvin.integration.lib.base import *
+from marvin.integration.lib.common import *
+import datetime
+
+class Services:
+    """Test Dedicating Public IP addresses
+    """
+
+    def __init__(self):
+        self.services = {
+                        "domain": {
+                                   "name": "Domain",
+                                   },
+                        "account": {
+                                    "email": "test@test.com",
+                                    "firstname": "Test",
+                                    "lastname": "User",
+                                    "username": "test",
+                                    "password": "password",
+                         },
+                        "gateway": "10.102.197.1",
+                        "netmask": "255.255.255.0",
+                        "forvirtualnetwork": "true",
+                        "startip": "10.102.197.70",
+                        "endip": "10.102.197.73",
+                        "zoneid": "1",
+                        "podid": "",
+                        "vlan": "101",
+                    }
+
+class TesDedicatePublicIPRange(cloudstackTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        cls.api_client = super(TesDedicatePublicIPRange, cls).getClsTestClient().getApiClient()
+        cls.services = Services().services
+        # Get Zone, Domain
+        cls.domain = get_domain(cls.api_client, cls.services)
+        cls.zone = get_zone(cls.api_client, cls.services)
+
+        # Create Account
+        cls.account = Account.create(
+                            cls.api_client,
+                            cls.services["account"],
+                            domainid=cls.domain.id
+                            )
+        cls._cleanup = [
+                        cls.account,
+                        ]
+        return
+
+    @classmethod
+    def tearDownClass(cls):
+        try:
+            # Cleanup resources used
+            cleanup_resources(cls.api_client, cls._cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return
+
+    def setUp(self):
+        self.apiclient = self.testClient.getApiClient()
+        self.dbclient = self.testClient.getDbConnection()
+        self.cleanup = []
+        return
+
+    def tearDown(self):
+        try:
+            # Clean up
+            cleanup_resources(self.apiclient, self.cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return
+
+    @attr(tags = ["simulator", "publiciprange", "dedicate", "release"])
+    def test_dedicatePublicIpRange(self):
+        """Test public IP range dedication
+        """
+
+        # Validate the following:
+        # 1. Create a Public IP range
+        # 2. Created IP range should be present, verify with listVlanIpRanges
+        # 3. Dedicate the created IP range to user account
+        # 4. Verify IP range is dedicated, verify with listVlanIpRanges
+        # 5. Release the dedicated Public IP range back to the system
+        # 6. Verify IP range has been released, verify with listVlanIpRanges
+        # 7. Delete the Public IP range
+
+        self.debug("Creating Public IP range")
+        self.public_ip_range = PublicIpRange.create(
+                                    self.api_client,
+                                    self.services
+                               )
+        list_public_ip_range_response = PublicIpRange.list(
+                                            self.apiclient,
+                                            id=self.public_ip_range.vlan.id
+                                        )
+        self.debug(
+                "Verify listPublicIpRanges response for public ip ranges: %s" \
+                % self.public_ip_range.vlan.id
+            )
+        self.assertEqual(
+                         isinstance(list_public_ip_range_response, list),
+                         True,
+                         "Check for list Public IP range response"
+                         )
+        public_ip_response = list_public_ip_range_response[0]
+        self.assertEqual(
+                            public_ip_response.id,
+                            self.public_ip_range.vlan.id,
+                            "Check public ip range response id is in listVlanIpRanges"
+                        )
+
+        self.debug("Dedicating Public IP range");
+        dedicate_public_ip_range_response = PublicIpRange.dedicate(
+                                                self.apiclient,
+                                                self.public_ip_range.vlan.id,
+                                                account=self.account.account.name,
+                                                domainid=self.account.account.domainid
+                                            )
+        list_public_ip_range_response = PublicIpRange.list(
+                                            self.apiclient,
+                                            id=self.public_ip_range.vlan.id
+                                        )
+        public_ip_response = list_public_ip_range_response[0]
+        self.assertEqual(
+                            public_ip_response.account,
+                            self.account.account.name,
+                            "Check account name is in listVlanIpRanges as the account public ip range is dedicated to"
+                        )
+
+        self.debug("Releasing Public IP range");
+        self.public_ip_range.release(self.apiclient)
+        list_public_ip_range_response = PublicIpRange.list(
+                                            self.apiclient,
+                                            id=self.public_ip_range.vlan.id
+                                        )
+        public_ip_response = list_public_ip_range_response[0]
+        self.assertEqual(
+                            public_ip_response.account,
+                            "system",
+                            "Check account name is system account in listVlanIpRanges"
+                        )
+
+        self.debug("Deleting Public IP range");
+        self.public_ip_range.delete(self.apiclient)
+
+        return
+


[15/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1993: fixed the issue of not sending syslog messages for alertType 0

Signed-off-by: Anshul Gangwar <an...@citrix.com>
Signed-off-by: Sateesh Chodapuneedi <sa...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7fb63be6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7fb63be6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7fb63be6

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 7fb63be6e1c2ed2b6d2de02dae3ec0f77f1748f3
Parents: c1a8540
Author: Anshul Gangwar <an...@citrix.com>
Authored: Wed Apr 10 14:07:42 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Fri Apr 12 07:15:06 2013 +0530

----------------------------------------------------------------------
 .../cloudstack/syslog/AlertsSyslogAppender.java    |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fb63be6/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java
----------------------------------------------------------------------
diff --git a/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java b/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java
index d2f2565..09563da 100644
--- a/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java
+++ b/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java
@@ -217,7 +217,7 @@ public class AlertsSyslogAppender extends AppenderSkeleton {
             message.append("unknown" + MESSAGE_DELIMITER_STRING);
         }
 
-        if (alertType > 0) {
+        if (alertType >= 0) {
             message.append("alertType").append(_keyValueDelimiter).append(" ").append(alertsMap.get(alertType))
                 .append(MESSAGE_DELIMITER_STRING);
             if (dataCenterId != 0) {
@@ -333,4 +333,4 @@ public class AlertsSyslogAppender extends AppenderSkeleton {
     public void setKeyValueDelimiter(String keyValueDelimiter) {
         this._keyValueDelimiter = keyValueDelimiter;
     }
-}
\ No newline at end of file
+}


[14/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Single AffinityGroupProcessor could process multiple groups of same type.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c1a85401
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c1a85401
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c1a85401

Branch: refs/heads/cisco-vnmc-api-integration
Commit: c1a85401ae6f7387341c529f829fe5578a15ec5a
Parents: 370a7fd
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Apr 11 17:18:24 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 17:29:42 2013 -0700

----------------------------------------------------------------------
 .../affinity/HostAntiAffinityProcessor.java        |   50 ++++++++-------
 .../affinity/dao/AffinityGroupVMMapDao.java        |    2 +-
 .../affinity/dao/AffinityGroupVMMapDaoImpl.java    |    4 +-
 3 files changed, 29 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1a85401/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
index 430cf92..4c2c7f1 100644
--- a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
+++ b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
@@ -52,35 +52,37 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements
             ExcludeList avoid)
             throws AffinityConflictException {
         VirtualMachine vm = vmProfile.getVirtualMachine();
-        AffinityGroupVMMapVO vmGroupMapping = _affinityGroupVMMapDao.findByVmIdType(vm.getId(), getType());
+        List<AffinityGroupVMMapVO> vmGroupMappings = _affinityGroupVMMapDao.findByVmIdType(vm.getId(), getType());
 
-        if (vmGroupMapping != null) {
-            AffinityGroupVO group = _affinityGroupDao.findById(vmGroupMapping.getAffinityGroupId());
+        for (AffinityGroupVMMapVO vmGroupMapping : vmGroupMappings) {
+            if (vmGroupMapping != null) {
+                AffinityGroupVO group = _affinityGroupDao.findById(vmGroupMapping.getAffinityGroupId());
 
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Processing affinity group " + group.getName() + " for VM Id: " + vm.getId());
-            }
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Processing affinity group " + group.getName() + " for VM Id: " + vm.getId());
+                }
 
-            List<Long> groupVMIds = _affinityGroupVMMapDao.listVmIdsByAffinityGroup(group.getId());
-            groupVMIds.remove(vm.getId());
+                List<Long> groupVMIds = _affinityGroupVMMapDao.listVmIdsByAffinityGroup(group.getId());
+                groupVMIds.remove(vm.getId());
 
-            for (Long groupVMId : groupVMIds) {
-                VMInstanceVO groupVM = _vmInstanceDao.findById(groupVMId);
-                if (groupVM != null && !groupVM.isRemoved()) {
-                    if (groupVM.getHostId() != null) {
-                        avoid.addHost(groupVM.getHostId());
-                        if (s_logger.isDebugEnabled()) {
-                            s_logger.debug("Added host " + groupVM.getHostId() + " to avoid set, since VM "
-                                    + groupVM.getId() + " is present on the host");
-                        }
-                    } else if (VirtualMachine.State.Stopped.equals(groupVM.getState())
-                            && groupVM.getLastHostId() != null) {
-                        avoid.addHost(groupVM.getLastHostId());
-                        if (s_logger.isDebugEnabled()) {
-                            s_logger.debug("Added host " + groupVM.getLastHostId() + " to avoid set, since VM "
-                                    + groupVM.getId() + " is present on the host, in Stopped state");
-                        }
+                for (Long groupVMId : groupVMIds) {
+                    VMInstanceVO groupVM = _vmInstanceDao.findById(groupVMId);
+                    if (groupVM != null && !groupVM.isRemoved()) {
+                        if (groupVM.getHostId() != null) {
+                            avoid.addHost(groupVM.getHostId());
+                            if (s_logger.isDebugEnabled()) {
+                                s_logger.debug("Added host " + groupVM.getHostId() + " to avoid set, since VM "
+                                        + groupVM.getId() + " is present on the host");
+                            }
+                        } else if (VirtualMachine.State.Stopped.equals(groupVM.getState())
+                                && groupVM.getLastHostId() != null) {
+                            avoid.addHost(groupVM.getLastHostId());
+                            if (s_logger.isDebugEnabled()) {
+                                s_logger.debug("Added host " + groupVM.getLastHostId() + " to avoid set, since VM "
+                                        + groupVM.getId() + " is present on the host, in Stopped state");
+                            }
 
+                        }
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1a85401/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDao.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDao.java b/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDao.java
index a98ae0f..f2951bc 100644
--- a/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDao.java
+++ b/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDao.java
@@ -41,7 +41,7 @@ public interface AffinityGroupVMMapDao extends GenericDao<AffinityGroupVMMapVO,
 
     int deleteVM(long instanceId);
 
-    AffinityGroupVMMapVO findByVmIdType(long instanceId, String type);
+    List<AffinityGroupVMMapVO> findByVmIdType(long instanceId, String type);
 
     void updateMap(Long vmId, List<Long> affinityGroupIds);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1a85401/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java b/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
index abc2a2b..e03e73c 100644
--- a/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/dao/AffinityGroupVMMapDaoImpl.java
@@ -140,11 +140,11 @@ public class AffinityGroupVMMapDaoImpl extends GenericDaoBase<AffinityGroupVMMap
 	}
 
     @Override
-    public AffinityGroupVMMapVO findByVmIdType(long instanceId, String type) {
+    public List<AffinityGroupVMMapVO> findByVmIdType(long instanceId, String type) {
         SearchCriteria<AffinityGroupVMMapVO> sc = ListByVmIdType.create();
         sc.setParameters("instanceId", instanceId);
         sc.setJoinParameters("groupSearch", "type", type);
-        return findOneBy(sc);
+        return listBy(sc);
     }
 
     @Override


[07/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixing rat. Merge with master missed the header change


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bfed74c4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bfed74c4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bfed74c4

Branch: refs/heads/cisco-vnmc-api-integration
Commit: bfed74c4119d23dd88ccd2c3e7b15d9a9ac66ea3
Parents: 6137d32
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Apr 11 13:37:03 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:37:03 2013 -0700

----------------------------------------------------------------------
 .../cloud/exception/AffinityConflictException.java |   16 +++++++++++++++
 .../apache/cloudstack/affinity/AffinityGroup.java  |   16 +++++++++++++++
 .../affinity/AffinityGroupProcessor.java           |   16 +++++++++++++++
 .../cloudstack/affinity/AffinityGroupService.java  |   16 +++++++++++++++
 .../cloud/deploy/DeploymentPlanningManager.java    |   16 +++++++++++++++
 .../deploy/DeploymentPlanningManagerImpl.java      |   16 +++++++++++++++
 .../affinity/AffinityGroupServiceImpl.java         |   16 +++++++++++++++
 7 files changed, 112 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfed74c4/api/src/com/cloud/exception/AffinityConflictException.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/exception/AffinityConflictException.java b/api/src/com/cloud/exception/AffinityConflictException.java
index da7148f..8b18778 100644
--- a/api/src/com/cloud/exception/AffinityConflictException.java
+++ b/api/src/com/cloud/exception/AffinityConflictException.java
@@ -1,3 +1,19 @@
+// 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.exception;
 
 import com.cloud.utils.SerialVersionUID;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfed74c4/api/src/org/apache/cloudstack/affinity/AffinityGroup.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroup.java b/api/src/org/apache/cloudstack/affinity/AffinityGroup.java
index b8215a2..ac2eb61 100644
--- a/api/src/org/apache/cloudstack/affinity/AffinityGroup.java
+++ b/api/src/org/apache/cloudstack/affinity/AffinityGroup.java
@@ -1,3 +1,19 @@
+// 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 org.apache.cloudstack.affinity;
 
 import org.apache.cloudstack.acl.ControlledEntity;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfed74c4/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
index 9bdd051..60b8e4c 100644
--- a/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
+++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
@@ -1,3 +1,19 @@
+// 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 org.apache.cloudstack.affinity;
 
 import com.cloud.deploy.DeploymentPlan;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfed74c4/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java
index b6bf2ab..26c32c8 100644
--- a/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java
+++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java
@@ -1,3 +1,19 @@
+// 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 org.apache.cloudstack.affinity;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfed74c4/server/src/com/cloud/deploy/DeploymentPlanningManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManager.java b/server/src/com/cloud/deploy/DeploymentPlanningManager.java
index 4ac71e3..13f1c67 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManager.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManager.java
@@ -1,3 +1,19 @@
+// 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.deploy;
 
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfed74c4/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index 11e5b82..92aac37 100644
--- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -1,3 +1,19 @@
+// 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.deploy;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bfed74c4/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
index 2ea887c..2b490ef 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -1,3 +1,19 @@
+// 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 org.apache.cloudstack.affinity;
 
 import java.util.ArrayList;


[41/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Removing DISCLAIMER as we're no longer in the Incubator.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/886fe012
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/886fe012
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/886fe012

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 886fe0128ecd13ceac0ae928ce7d45b70a65964c
Parents: 2061459
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Sat Apr 13 16:18:22 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Sat Apr 13 16:18:22 2013 -0500

----------------------------------------------------------------------
 DISCLAIMER |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/886fe012/DISCLAIMER
----------------------------------------------------------------------
diff --git a/DISCLAIMER b/DISCLAIMER
deleted file mode 100644
index fa1e926..0000000
--- a/DISCLAIMER
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache CloudStack is an effort undergoing incubation at The Apache Software Foundation (ASF), 
-sponsored by the Apache Incubator. Incubation is required of all newly accepted 
-projects until a further review indicates that the infrastructure, communications, and 
-decision making process have stabilized in a manner consistent with other successful ASF 
-projects. While incubation status is not necessarily a reflection of the completeness or 
-stability of the code, it does indicate that the project has yet to be fully endorsed by 
-the ASF.


[13/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1884: fix the unit test issue


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/370a7fdf
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/370a7fdf
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/370a7fdf

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 370a7fdfd66cefbd38c3bc8f2844d4f889bfee51
Parents: 4958070
Author: Kelven Yang <ke...@gmail.com>
Authored: Thu Apr 11 17:23:49 2013 -0700
Committer: Kelven Yang <ke...@gmail.com>
Committed: Thu Apr 11 17:23:49 2013 -0700

----------------------------------------------------------------------
 server/pom.xml                                     |    3 --
 .../affinity/AffinityApiTestConfiguration.java     |   18 ++++++++++++--
 .../cloudstack/affinity/AffinityApiUnitTest.java   |   10 +++++---
 .../networkoffering/ChildTestConfiguration.java    |    7 +++++-
 .../networkoffering/CreateNetworkOfferingTest.java |    1 -
 5 files changed, 27 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/370a7fdf/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index a4f315b..ca56851 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -158,9 +158,6 @@
             <exclude>com/cloud/network/vpn/RemoteAccessVpnTest.java</exclude>
             <exclude>com/cloud/network/security/SecurityGroupManagerImpl2Test.java</exclude>
             <exclude>com/cloud/network/security/SecurityGroupManagerImpl2Test.java</exclude>
-            <!-- see CLOUDSTACK-1884 -->
-            <exclude>org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java</exclude>
-            <exclude>org/apache/cloudstack/affinity/AffinityApiUnitTest.java</exclude>
           </excludes>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/370a7fdf/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
index c6a0755..fb29469 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
@@ -42,6 +42,7 @@ import com.cloud.dc.dao.AccountVlanMapDaoImpl;
 import com.cloud.dc.dao.ClusterDaoImpl;
 import com.cloud.dc.dao.DataCenterDaoImpl;
 import com.cloud.dc.dao.DataCenterIpAddressDaoImpl;
+import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDao;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterVnetDaoImpl;
 import com.cloud.dc.dao.DcDetailsDaoImpl;
@@ -51,6 +52,7 @@ import com.cloud.dc.dao.PodVlanMapDaoImpl;
 import com.cloud.dc.dao.VlanDaoImpl;
 import com.cloud.domain.dao.DomainDaoImpl;
 import com.cloud.event.EventUtils;
+import com.cloud.event.dao.EventDao;
 import com.cloud.event.dao.EventDaoImpl;
 import com.cloud.event.dao.UsageEventDaoImpl;
 import com.cloud.host.dao.HostDaoImpl;
@@ -122,15 +124,15 @@ import com.cloud.vm.dao.VMInstanceDaoImpl;
         UserAccountJoinDaoImpl.class, CapacityDaoImpl.class, SnapshotDaoImpl.class, HostDaoImpl.class,
         VMInstanceDaoImpl.class, HostTransferMapDaoImpl.class, PortForwardingRulesDaoImpl.class,
         PrivateIpDaoImpl.class, UsageEventDaoImpl.class, PodVlanMapDaoImpl.class, DiskOfferingDaoImpl.class,
-        DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, DataCenterLinkLocalIpAddressDaoImpl.class,
+        DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, 
         DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, DcDetailsDaoImpl.class, NicSecondaryIpDaoImpl.class,
         UserIpv6AddressDaoImpl.class, S3DaoImpl.class, UserDaoImpl.class, NicDaoImpl.class, NetworkDomainDaoImpl.class,
         HostDetailsDaoImpl.class, HostTagsDaoImpl.class, ClusterDaoImpl.class, FirewallRulesDaoImpl.class,
         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,
-        EventDaoImpl.class }, includeFilters = { @Filter(value = AffinityApiTestConfiguration.Library.class, type = FilterType.CUSTOM) }, useDefaultFilters = false)
+        ComponentContext.class, AffinityGroupProcessor.class, UserVmVO.class, EventUtils.class, UserVmVO.class
+        }, includeFilters = { @Filter(value = AffinityApiTestConfiguration.Library.class, type = FilterType.CUSTOM) }, useDefaultFilters = false)
 public class AffinityApiTestConfiguration {
 
     @Bean
@@ -308,6 +310,11 @@ public class AffinityApiTestConfiguration {
     public NetworkOfferingDao networkOfferingDao() {
         return Mockito.mock(NetworkOfferingDao.class);
     }
+    
+    @Bean
+    public EventDao eventDao() {
+        return Mockito.mock(EventDao.class);
+    }
 
     @Bean
     public NetworkDao networkDao() {
@@ -319,6 +326,11 @@ public class AffinityApiTestConfiguration {
         return Mockito.mock(NetworkOfferingServiceMapDao.class);
     }
 
+    @Bean
+    public DataCenterLinkLocalIpAddressDao datacenterLinkLocalIpAddressDao() {
+    	return Mockito.mock(DataCenterLinkLocalIpAddressDao.class);
+    }
+    
     public static class Library implements TypeFilter {
 
         @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/370a7fdf/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
index a044611..a5e6d15 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
@@ -21,9 +21,7 @@ import static org.mockito.Matchers.anyLong;
 import static org.mockito.Mockito.*;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.cloudstack.affinity.dao.AffinityGroupDao;
 import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
@@ -36,15 +34,15 @@ import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 import com.cloud.event.EventUtils;
+import com.cloud.event.EventVO;
+import com.cloud.event.dao.EventDao;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.ResourceInUseException;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.user.Account;
 import com.cloud.user.AccountManager;
-import com.cloud.user.AccountManagerImpl;
 import com.cloud.user.AccountVO;
 import com.cloud.user.UserContext;
-import com.cloud.user.UserContextInitializer;
 import com.cloud.user.dao.AccountDao;
 import com.cloud.utils.component.ComponentContext;
 import com.cloud.vm.UserVmVO;
@@ -84,6 +82,9 @@ public class AffinityApiUnitTest {
 
     @Inject
     AccountDao _accountDao;
+    
+    @Inject
+    EventDao _eventDao;
 
     private static long domainId = 5L;
 
@@ -113,6 +114,7 @@ public class AffinityApiUnitTest {
         Mockito.when(_affinityGroupDao.findByAccountAndName(Mockito.anyLong(), Mockito.anyString())).thenReturn(group);
         Mockito.when(_affinityGroupDao.lockRow(Mockito.anyLong(), anyBoolean())).thenReturn(group);
         Mockito.when(_affinityGroupDao.expunge(Mockito.anyLong())).thenReturn(true);
+        Mockito.when(_eventDao.persist(Mockito.any(EventVO.class))).thenReturn(new EventVO());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/370a7fdf/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
index 895a5d4..f1163ef 100644
--- a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
+++ b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java
@@ -41,6 +41,7 @@ import com.cloud.dc.dao.AccountVlanMapDaoImpl;
 import com.cloud.dc.dao.ClusterDaoImpl;
 import com.cloud.dc.dao.DataCenterDaoImpl;
 import com.cloud.dc.dao.DataCenterIpAddressDaoImpl;
+import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDao;
 import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl;
 import com.cloud.dc.dao.DataCenterVnetDaoImpl;
 import com.cloud.dc.dao.DcDetailsDaoImpl;
@@ -135,7 +136,6 @@ import com.cloud.vm.dao.VMInstanceDaoImpl;
         DiskOfferingDaoImpl.class,
         DataCenterDaoImpl.class,
         DataCenterIpAddressDaoImpl.class,
-        DataCenterLinkLocalIpAddressDaoImpl.class,
         DataCenterVnetDaoImpl.class,
         PodVlanDaoImpl.class,
         DcDetailsDaoImpl.class,
@@ -319,6 +319,11 @@ public class ChildTestConfiguration {
         return Mockito.mock(NetworkOfferingServiceMapDao.class);
     }
     
+    @Bean
+    public DataCenterLinkLocalIpAddressDao datacenterLinkLocalIpAddressDao() {
+    	return Mockito.mock(DataCenterLinkLocalIpAddressDao.class);
+    }
+    
     public static class Library implements TypeFilter {
 
         @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/370a7fdf/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java b/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
index 67fae33..cbb6c00 100644
--- a/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
+++ b/server/test/org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java
@@ -49,7 +49,6 @@ import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
 import com.cloud.user.AccountManager;
 import com.cloud.user.AccountVO;
 import com.cloud.user.UserContext;
-import com.cloud.user.UserContextInitializer;
 import com.cloud.user.UserVO;
 import com.cloud.utils.component.ComponentContext;
 


[03/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
ACl on affinity group


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fc248cb9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fc248cb9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fc248cb9

Branch: refs/heads/cisco-vnmc-api-integration
Commit: fc248cb99c2febfa165e215dc2d2c38fddf980b5
Parents: 9de7a68
Author: Prachi Damle <pr...@cloud.com>
Authored: Mon Apr 8 13:27:18 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:23:41 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fc248cb9/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 8b6ad3b..d281e5b 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -2289,6 +2289,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Use
                 AffinityGroupVO ag = _affinityGroupDao.findById(affinityGroupId);
                 if (ag == null) {
                     throw new InvalidParameterValueException("Unable to find affinity group by id " + affinityGroupId);
+                } else {
+                    // verify permissions
+                    _accountMgr.checkAccess(caller, null, true, owner, ag);
                 }
             }
         }


[43/50] [abbrv] Adding issues fixed in 4.1.0

Posted by ko...@apache.org.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0bbffb7/docs/en-US/Release_Notes.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml
index b8c5c01..5b9571e 100644
--- a/docs/en-US/Release_Notes.xml
+++ b/docs/en-US/Release_Notes.xml
@@ -27,6 +27,3942 @@ under the License.
         <para>This document contains information specific to this release of &PRODUCT;, including upgrade instructions from prior releases, new features added to &PRODUCT;, API changes, and issues fixed in the release. For installation instructions, please see the <ulink url="http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.1.0/html/Installation_Guide/index.html">Installation Guide</ulink>. For usage and administration instructions, please see the <ulink url="http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.1.0/html/Admin_Guide/index.html">&PRODUCT; Administrator's Guide</ulink>. Developers and users who wish to work with the API will find instruction in the <ulink url="http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/index.html">&PRODUCT; API Developer's Guide</ulink></para>
         <para>If you find any errors or problems in this guide, please see <xref linkend="feedback" />. We hope you enjoy working with &PRODUCT;!</para>
     </chapter>
+    <chapter id="version-4.1">
+        <title>Version 4.1.0</title>
+        <section id="what-new-in-4.1">
+            <title>What’s New in 4.1</title>
+            <para>Apache CloudStack 4.1.0 includes many new features. This section covers the most prominent new features and changes.</para>
+            <section id="localization">
+                <title>Localization</title>
+                <para>The 4.1.0 release adds partial User Interface (UI) support for Catalan, Chinese, French, German, Italian, Japanese, Korean, Norwegian, Portuguese, Russian, and Spanish. Not all languages are complete.</para>
+                <para>The 4.1.0 release also adds documentation translations for Chinese, Chinese (Taiwan), Italian, Japanese, Korean, and Portuguese.</para>
+            </section>
+        </section>
+        <section id="issues-fixed-4.0">
+            <title>Issues Fixed in 4.1.0</title>
+            <para>Apache CloudStack uses <ulink url="https://issues.apache.org/jira/browse/CLOUDSTACK">Jira</ulink>
+                to track its issues. All new features and bugs for 4.1.0 have been tracked in Jira, and have 
+                a standard naming convention of "CLOUDSTACK-NNNN" where "NNNN" is the issue number.</para>
+            <para>This section includes a summary of known issues against 4.0.0 that were fixed in 4.1.0. Approximately 470 bugs were resolved or closed in the 4.1.0 cycle.</para>
+            <informaltable>
+                <tgroup cols="2" align="left" colsep="1" rowsep="1">
+                    <colspec colwidth="1*" colname="1" colnum="1"/>
+                    <colspec colwidth="2*" colname="2" colnum="2"/>
+                    <thead>
+                        <row>
+                            <entry>
+                                <para>Defect</para>
+                            </entry>
+                            <entry>
+                                <para>Description</para>
+                            </entry>
+                        </row>
+                    </thead>
+                    <tbody>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-46</para>
+                            </entry>
+                            <entry>
+                                <para>Remnants of mycloud remain.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-70</para>
+                            </entry>
+                            <entry>
+                                <para>Improve Network Restart Behaviour for Basic Zone: Restarting Network Fail</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-94</para>
+                            </entry>
+                            <entry>
+                                <para>"API command, listIsos documentation clarity</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-95</para>
+                            </entry>
+                            <entry>
+                                <para>IP address allocation not working when a user tries to allocate IP addresses in a Project</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-97</para>
+                            </entry>
+                            <entry>
+                                <para>Vmware network labels are ignored when creating a Zone using basic networkin</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-108</para>
+                            </entry>
+                            <entry>
+                                <para>VM should not be allowed to be deployed on two Isolated Networks of an Account that were created from DefaultNetworkOfferingwithSourceNATService</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-118</para>
+                            </entry>
+                            <entry>
+                                <para>"Status of host resorce stuck in ""ErrorInMaintenance""</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-119</para>
+                            </entry>
+                            <entry>
+                                <para>Move Agent-Simulator in to the hypervisor plugin mode</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-130</para>
+                            </entry>
+                            <entry>
+                                <para>Clarify docs on tags parameter in API referenc</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-152</para>
+                            </entry>
+                            <entry>
+                                <para>Routes on the User VM are programmed incorrectly on a VM present on both Isolated and Shared Guest Network</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-178</para>
+                            </entry>
+                            <entry>
+                                <para>Expose name parameter of VM in list Vm view</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-198</para>
+                            </entry>
+                            <entry>
+                                <para>vpn:failto add VPN Users deletes all the existing Vpn use</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-222</para>
+                            </entry>
+                            <entry>
+                                <para>Admin UI prompts to restart Management server with cancel edit operatio</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-225</para>
+                            </entry>
+                            <entry>
+                                <para>API Docs: Request params repeated with different description</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-226</para>
+                            </entry>
+                            <entry>
+                                <para>UpdatePhysicalNetworkcommand failed due to java.sql.BatchUpdateException ; Tried to extend the existing Guest VLAN Range of one physical network into the Guest VLAN range of the other physical networ</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-227</para>
+                            </entry>
+                            <entry>
+                                <para>ReconnectHostCmd: NullPointerException: Unable to get host Information for XenServer 6.0.2 host - on intentionally changing the traffic labels on the physical networ</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-228</para>
+                            </entry>
+                            <entry>
+                                <para>UI provides an option to reconnect a disconnected host - ServerApiException is thrown on an attemp</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-232</para>
+                            </entry>
+                            <entry>
+                                <para>Zone infrastructure chart -- disable resource total displa</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-235</para>
+                            </entry>
+                            <entry>
+                                <para>Network rate can be set in 2 places. Clarify docs on how this works</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-249</para>
+                            </entry>
+                            <entry>
+                                <para>Add host id to failed VM deploy alert</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-250</para>
+                            </entry>
+                            <entry>
+                                <para>Incorrect description of maintenance mode in admin guid</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-256</para>
+                            </entry>
+                            <entry>
+                                <para>"vpn:As an admin user, not able to delete VPN user which is present in a regular user's network.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-271</para>
+                            </entry>
+                            <entry>
+                                <para>updatePhysicalNetwork dies with an NPE when the vlan range is empt</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-274</para>
+                            </entry>
+                            <entry>
+                                <para>Two error codes mapped to same value in AP</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-275</para>
+                            </entry>
+                            <entry>
+                                <para>hostid not always a UUI</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-277</para>
+                            </entry>
+                            <entry>
+                                <para>Message during CloudStack management server Installation: cannot access /usr/share/cloud/bridge/lib: No such file or director</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-279</para>
+                            </entry>
+                            <entry>
+                                <para>deleteProject fails when executed by the regular user (works fine for root/domain admin</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-284</para>
+                            </entry>
+                            <entry>
+                                <para>listVirtualMachines does not return deleted machines when zone is specifie</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-290</para>
+                            </entry>
+                            <entry>
+                                <para>3.0.0 template also needed for 2.2.14 to 3.0.5 direct upgrade</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-293</para>
+                            </entry>
+                            <entry>
+                                <para>"We do awful, hacky things in our spec file for client</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-304</para>
+                            </entry>
+                            <entry>
+                                <para>Add synchronization for createSnapshot command per host basi</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-309</para>
+                            </entry>
+                            <entry>
+                                <para>iptables rules being deleted from wrong VM after a migratio</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-318</para>
+                            </entry>
+                            <entry>
+                                <para>Adding XenServer Host Fails - 6.0.2 fails with 4.0.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-320</para>
+                            </entry>
+                            <entry>
+                                <para>"sessionKey query parameter should be case-insensitive, now only sessionkey is accepted</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-322</para>
+                            </entry>
+                            <entry>
+                                <para>During upgrade displays error - a foreign key constraint fails (`cloud/#sql-f34_6e`..</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-332</para>
+                            </entry>
+                            <entry>
+                                <para>"""count"" property in list* API response should be equal to how many entries in database, not how many objects in API response</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-333</para>
+                            </entry>
+                            <entry>
+                                <para>When Datacenter name in VCenter has spaces Primary Storage (VMFS) discovery will fai</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-335</para>
+                            </entry>
+                            <entry>
+                                <para>KVM VPC load balancer not workin</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-336</para>
+                            </entry>
+                            <entry>
+                                <para>listZones doesn't honour pagin</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-343</para>
+                            </entry>
+                            <entry>
+                                <para>"Document what tools and packages are required to build, package and install CloudStack 4.0</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-346</para>
+                            </entry>
+                            <entry>
+                                <para>Cannot add Vmware cluster with class loader conflict exceptio</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-347</para>
+                            </entry>
+                            <entry>
+                                <para>listNetworks API: return vlan information only when the caller is ROOT admi</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-348</para>
+                            </entry>
+                            <entry>
+                                <para>deleteNetwork does not clean up network resource count correctl</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-354</para>
+                            </entry>
+                            <entry>
+                                <para>Display of storage statistics is wrong</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-355</para>
+                            </entry>
+                            <entry>
+                                <para>"Fix ""count"" in a bunch of API commands</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-357</para>
+                            </entry>
+                            <entry>
+                                <para>"ISOs can be deleted while still attached to a running VM, and they subsequently cannot be detached from a running VM</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-359</para>
+                            </entry>
+                            <entry>
+                                <para>PropagateResourceEventCommand failes in cluster configuratio</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-361</para>
+                            </entry>
+                            <entry>
+                                <para>Wrong creation of guest networks on a KVM host in Multiple Physical Networks with guest traffi</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-364</para>
+                            </entry>
+                            <entry>
+                                <para>Docs point to download.cloud.com for AWS API scrip</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-368</para>
+                            </entry>
+                            <entry>
+                                <para>OVM - cannot create guest V</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-369</para>
+                            </entry>
+                            <entry>
+                                <para>ASF 4.0 - unable to support XenServer 6.1 hos</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-373</para>
+                            </entry>
+                            <entry>
+                                <para>"static NAT and Firewall is not working on external firewall device SRX, it needs to be implemented</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-377</para>
+                            </entry>
+                            <entry>
+                                <para>provide deployment config access to marvin's testcas</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-378</para>
+                            </entry>
+                            <entry>
+                                <para>mavenize marvin on maste</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-390</para>
+                            </entry>
+                            <entry>
+                                <para>Install Guide: Section 4.5.7 (Prepare the System VM Template): Links go to cloud.co</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-397</para>
+                            </entry>
+                            <entry>
+                                <para>Install Guide: Section 11.1 (Guest Traffic): Diagram is the wrong diagra</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-398</para>
+                            </entry>
+                            <entry>
+                                <para>Install Guide: Section 11.17.3 (Using VPN with Mac OSX): Not complete</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-404</para>
+                            </entry>
+                            <entry>
+                                <para>Update docs on the usage of cloud-setup-database</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-412</para>
+                            </entry>
+                            <entry>
+                                <para>Data truncation: Out of range value for column 'ram' at row </para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-415</para>
+                            </entry>
+                            <entry>
+                                <para>restartNetwork call causes VM to be unreachable when Nicira based SDN is used</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-416</para>
+                            </entry>
+                            <entry>
+                                <para>XCP 1.6beta2 (61002c) - can't add a hos</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-417</para>
+                            </entry>
+                            <entry>
+                                <para>Handle password server securely to run on port 8080 on V</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-424</para>
+                            </entry>
+                            <entry>
+                                <para>Updated userdata not propagating to the VR</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-427</para>
+                            </entry>
+                            <entry>
+                                <para>Change hardcoded step number references to dynamic link</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-428</para>
+                            </entry>
+                            <entry>
+                                <para>Storage capacity shown in UI is incorrec</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-435</para>
+                            </entry>
+                            <entry>
+                                <para>Vmware network labels are ignored when creating a Zone using basic networkin</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-441</para>
+                            </entry>
+                            <entry>
+                                <para>Running mgmt server using jetty fails to start api serve</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-446</para>
+                            </entry>
+                            <entry>
+                                <para>"Host going to alert state, if you are adding already added host</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-448</para>
+                            </entry>
+                            <entry>
+                                <para>SSVM bootstrap failure on XenServer hosts with E3 CP</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-456</para>
+                            </entry>
+                            <entry>
+                                <para>License tag in SPEC isn't what RPM is expectin</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-459</para>
+                            </entry>
+                            <entry>
+                                <para>[Optional Public IP assignment for EIP with Basic Zone] Associate IP Checkbox in Create Network Offering Dialog is Displayed When Elastic LB is Selecte</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-462</para>
+                            </entry>
+                            <entry>
+                                <para>A few corrections to make to the 4.0.0 installation guid</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-464</para>
+                            </entry>
+                            <entry>
+                                <para>"Regression in AWSAPI docs, entire sections removed</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-465</para>
+                            </entry>
+                            <entry>
+                                <para>French language file quotes are dropping javascript syntax error</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-467</para>
+                            </entry>
+                            <entry>
+                                <para>Developer's Guide points to cloud.com for API referenc</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-479</para>
+                            </entry>
+                            <entry>
+                                <para>UpdateVirtualMachine api fails to propagate userdata to dom</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-481</para>
+                            </entry>
+                            <entry>
+                                <para>Installation Guide Doc Erro</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-493</para>
+                            </entry>
+                            <entry>
+                                <para>2.2.x-3.0 DB upgrade support for Advance SG enabled network</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-499</para>
+                            </entry>
+                            <entry>
+                                <para>cloudmonkey CLI can't accept complex parameter</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-500</para>
+                            </entry>
+                            <entry>
+                                <para>Passwd-server iptables rules are dropped on domr on fresh start or on reboot.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-501</para>
+                            </entry>
+                            <entry>
+                                <para>Apidocs and marvin does not know how to handle Autoscaling docs.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-504</para>
+                            </entry>
+                            <entry>
+                                <para>Duplicate guest password scripts in codebase.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-507</para>
+                            </entry>
+                            <entry>
+                                <para>fix api docs for listSSHKeyPair</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-508</para>
+                            </entry>
+                            <entry>
+                                <para>CLVM copies template to primary storage unnecessarily.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-510</para>
+                            </entry>
+                            <entry>
+                                <para>Add button not visible when adding public IPs to physical network.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-514</para>
+                            </entry>
+                            <entry>
+                                <para>Marvin and Cloudmonkey don't work when an API target uses https or an alternate path.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-518</para>
+                            </entry>
+                            <entry>
+                                <para>API refactoring -- change @Parameter annotation and remove the @IdentityMapper annotation.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-520</para>
+                            </entry>
+                            <entry>
+                                <para>Dependency jar names mismatch with install-non-oss.s</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-521</para>
+                            </entry>
+                            <entry>
+                                <para>Build will hung up when doing test for TestAgentShel</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-522</para>
+                            </entry>
+                            <entry>
+                                <para>Log requests in cloudmonkey's log file.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-527</para>
+                            </entry>
+                            <entry>
+                                <para>List API performance optimization by using DB views and removing UUID conversion</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-534</para>
+                            </entry>
+                            <entry>
+                                <para>Failed to add hos</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-536</para>
+                            </entry>
+                            <entry>
+                                <para>remove citrix cloudpatform from 4.0 build - CloudStack is ASF project.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-539</para>
+                            </entry>
+                            <entry>
+                                <para>Cropped Text in UI under Quick View.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-552</para>
+                            </entry>
+                            <entry>
+                                <para>]Quick view details for a volume displays scroll bar in place of name of the volume when the name of the volume has more no of characters.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-553</para>
+                            </entry>
+                            <entry>
+                                <para>"SRX - When adding SRX device make "Public Network" - default to "untrusted" and "Private Network" - default to "trusted" as un-editable fields.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-556</para>
+                            </entry>
+                            <entry>
+                                <para>Erratic window behavior in Quick View tooltip.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-559</para>
+                            </entry>
+                            <entry>
+                                <para>source code import problem</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-560</para>
+                            </entry>
+                            <entry>
+                                <para>Usage server doesn't work in 4.0.0 due to missing db changes</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-572</para>
+                            </entry>
+                            <entry>
+                                <para>SG Enabled Advanced Zone - Not able to deploy a VM in an account specific shared network</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-573</para>
+                            </entry>
+                            <entry>
+                                <para>"NPE at ""com.cloud.network.NetworkManagerImpl.networkOfferingIsConfiguredForExternalNetworking(NetworkManagerImpl.java:4345)"" when create network from the network offering having NULL provider for the service</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-578</para>
+                            </entry>
+                            <entry>
+                                <para>The already deleted same hostname is not deleted from /etc/hosts of vRouter</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-584</para>
+                            </entry>
+                            <entry>
+                                <para>"typos in ""Apache_CloudStack-4.0.0-incubating-CloudStack_Nicira_NVP_Guide-en-US""</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-590</para>
+                            </entry>
+                            <entry>
+                                <para>Incorrect Network Gateways Assigned to System VM</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-592</para>
+                            </entry>
+                            <entry>
+                                <para>"API bloat, unknown apis cmd classes</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-593</para>
+                            </entry>
+                            <entry>
+                                <para>"2 guest network, auto create vlan error</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-596</para>
+                            </entry>
+                            <entry>
+                                <para>DeployVM command takes a lot of time to return job id.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-599</para>
+                            </entry>
+                            <entry>
+                                <para>DhcpEntryCommand fails on Router VM on CS4.0 and vSphere5 with Advanced Network Zone.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-600</para>
+                            </entry>
+                            <entry>
+                                <para>When rebooting KVM local storage VM host, libvirt definitions deleted</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-605</para>
+                            </entry>
+                            <entry>
+                                <para>Host physical CPU is incorrectly calculated for Vmware host</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-606</para>
+                            </entry>
+                            <entry>
+                                <para>Starting VM fails with 'ConcurrentOperationException' in a clustered MS scenari</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-614</para>
+                            </entry>
+                            <entry>
+                                <para>"ListTemplates API is not returning ""Enable SSH Key"" attribute for any given template</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-617</para>
+                            </entry>
+                            <entry>
+                                <para>Unable to edit a Sub domai</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-639</para>
+                            </entry>
+                            <entry>
+                                <para>API Refactoring: Adapters for AC</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-648</para>
+                            </entry>
+                            <entry>
+                                <para>The normal users could change their own login password.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-660</para>
+                            </entry>
+                            <entry>
+                                <para>Network Traffic Labels are not functional in Marvin</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-683</para>
+                            </entry>
+                            <entry>
+                                <para>Image Is Missing in the Accessing VM Section</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-689</para>
+                            </entry>
+                            <entry>
+                                <para>RVR: Stop pending flag is not cleared when user start the disconnected router from another hos</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-691</para>
+                            </entry>
+                            <entry>
+                                <para>A warning dialog box shows after reloading the welcome page.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-693</para>
+                            </entry>
+                            <entry>
+                                <para>Adding a VPC virtual router to a NiciraNVP enabled network fails.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-694</para>
+                            </entry>
+                            <entry>
+                                <para>"Create a new VPC network offering with "connectivity" option needed for SDN networking) is not allowed / VPC support for SDN networks</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-717</para>
+                            </entry>
+                            <entry>
+                                <para>cloudmonkey fails to parse/print response.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-720</para>
+                            </entry>
+                            <entry>
+                                <para>Fail to load a png image when accessing the web console.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-721</para>
+                            </entry>
+                            <entry>
+                                <para>Bytes sent/received in user statistics is empty (CloudStack 4.0)</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-725</para>
+                            </entry>
+                            <entry>
+                                <para>UI: Error when the Egress rules tab is selected for a network.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-734</para>
+                            </entry>
+                            <entry>
+                                <para>api_refactoring: CreateAccountCmd fails to send response due to NPE in service layer</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-735</para>
+                            </entry>
+                            <entry>
+                                <para>Integration smoke tests: Fix expunge vm test on api_refactoring</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-736</para>
+                            </entry>
+                            <entry>
+                                <para>Integration smoke tests: Fix check for vm name for the deployvm smoke test.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-793</para>
+                            </entry>
+                            <entry>
+                                <para>"Create cloudmonkey-helper, a plugin that helps autodiscover and sync api info via an api over some endpoint</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-798</para>
+                            </entry>
+                            <entry>
+                                <para>Move usage related cmd classes from cloud-server to cloud-api</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-799</para>
+                            </entry>
+                            <entry>
+                                <para>[Load Test] Check router statistics falls behind in gathering stats by more than 2 times the set value</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-819</para>
+                            </entry>
+                            <entry>
+                                <para>Create Account/User API logging password in access log</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-863</para>
+                            </entry>
+                            <entry>
+                                <para>Non-printable characters (ASCII control character) such as %00 or %0025 are getting stored in raw/non encoded form in the database</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-870</para>
+                            </entry>
+                            <entry>
+                                <para>Client UI: Wrong character encoding for some language</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-928</para>
+                            </entry>
+                            <entry>
+                                <para>[Simulator] Latency for Agent Commands - change unit of wait from seconds to millisecond</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-938</para>
+                            </entry>
+                            <entry>
+                                <para>s2s VPN trouble</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-959</para>
+                            </entry>
+                            <entry>
+                                <para>Missing sub-sections in document section System Service Offering</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-968</para>
+                            </entry>
+                            <entry>
+                                <para>marvin: vlan should be an attribute of the physical_network and not the zon</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-977</para>
+                            </entry>
+                            <entry>
+                                <para>Document how to use openvswitch with KVM hypervisor</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-978</para>
+                            </entry>
+                            <entry>
+                                <para>TypeError: instance.displayname is undefined while adding VM's to the LB rule</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-985</para>
+                            </entry>
+                            <entry>
+                                <para>Different MAC address for RvR caused issue in short term network outrag</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-987</para>
+                            </entry>
+                            <entry>
+                                <para>Sections missing in Working With Snapshot</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-993</para>
+                            </entry>
+                            <entry>
+                                <para>"admin"" user is not getting created when management server is started.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-995</para>
+                            </entry>
+                            <entry>
+                                <para>Not able to add the KVM host</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1002</para>
+                            </entry>
+                            <entry>
+                                <para>Not able to start VM</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1006</para>
+                            </entry>
+                            <entry>
+                                <para>need to disable service libvirt-guests in CentOS packaging RPMs, or in installation docs</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1008</para>
+                            </entry>
+                            <entry>
+                                <para>"Egress"" tab should not be presented in the UI for Shared Networks</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1010</para>
+                            </entry>
+                            <entry>
+                                <para>Host count and Secondary storage count always shows 1 in UI</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1011</para>
+                            </entry>
+                            <entry>
+                                <para>KVM host getting disconnected in cluster environment</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1013</para>
+                            </entry>
+                            <entry>
+                                <para>running cloudstack overwrites default public/private ssh key</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1014</para>
+                            </entry>
+                            <entry>
+                                <para>Merge ManagementServer and ManagementServerEx</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1016</para>
+                            </entry>
+                            <entry>
+                                <para>Not able to deploy VM</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1021</para>
+                            </entry>
+                            <entry>
+                                <para>the vlan is not creat to right nic. when i creat multi guest network</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1024</para>
+                            </entry>
+                            <entry>
+                                <para>Regression: Unable to add Xenserver host with latest build.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1027</para>
+                            </entry>
+                            <entry>
+                                <para>"Update SSL certificate" button should properly reflect its functionality</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1029</para>
+                            </entry>
+                            <entry>
+                                <para>Enter the token to specified project is malfunctioned</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1037</para>
+                            </entry>
+                            <entry>
+                                <para>"Make cloudmonkey awesome-er: Online help docs and api discovery, better colored output, parameter value autocompletion</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1050</para>
+                            </entry>
+                            <entry>
+                                <para>No Documentation on Adding a Load Balancer Rule</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1051</para>
+                            </entry>
+                            <entry>
+                                <para>API dispatcher unable to find objectVO corresponding to DeleteTemplatecm</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1055</para>
+                            </entry>
+                            <entry>
+                                <para>"The overlay still exists when the ""Recurring Snapshots"" dialog is canceled by pressing esc key.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1056</para>
+                            </entry>
+                            <entry>
+                                <para>S3 secondary storage fails to upload systemvm template due to KVMHA director</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1057</para>
+                            </entry>
+                            <entry>
+                                <para>regression of changeServiceForVirtualMachine API - fails to find service offering by serviceOfferingId parameter</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1063</para>
+                            </entry>
+                            <entry>
+                                <para>"SG Enabled Advanced Zone - "Add Guest Networks" - When user tries to add a guest Network with scope as "Account" he should NOT be presented with ""Offering for shared security group enabled""</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1064</para>
+                            </entry>
+                            <entry>
+                                <para>A type error occurs when trying to add account/register template...</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1068</para>
+                            </entry>
+                            <entry>
+                                <para>Names in VR list is useles</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1070</para>
+                            </entry>
+                            <entry>
+                                <para>javelin: NPE on executing registerIso AP</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1071</para>
+                            </entry>
+                            <entry>
+                                <para>Netscaler element is not getting loaded as part of LoadBalancing Service Providers</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1078</para>
+                            </entry>
+                            <entry>
+                                <para>Not able to start System Vms on Rhel 6.3 KVM hos</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1079</para>
+                            </entry>
+                            <entry>
+                                <para>Deploying AWSAPI with mvn -pl :cloud-awsapi jetty:run fail</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1082</para>
+                            </entry>
+                            <entry>
+                                <para>UI doesn't throw any error message when trying to delete ip range from a network that is in use.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1083</para>
+                            </entry>
+                            <entry>
+                                <para>listUsageRecords api: removed project results in NP</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1087</para>
+                            </entry>
+                            <entry>
+                                <para>Update the Developer Guide for ASFCS 4.1 Releas</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1088</para>
+                            </entry>
+                            <entry>
+                                <para>EnableStaticNat error will clear the data in databas</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1094</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - hostname/hostname --fqdn does not return the name of the VM. But i am able to reach the Vm using their names</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1095</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - dhclient command needs to be run manually on the Vms to get the Ipv6 address</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1100</para>
+                            </entry>
+                            <entry>
+                                <para>Expunge thread is not kicked off based on global configuration if the global setting is less than 60 second</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1103</para>
+                            </entry>
+                            <entry>
+                                <para>"IpV6 - listNetwork() command does not retrun gateway,netmask,cidr</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1104</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - listVlanIpRanges() returns error 530</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1105</para>
+                            </entry>
+                            <entry>
+                                <para>"IpV6 - listVirtualMachines() does not return netmask, gateway,ipaddress.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1107</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - Unable to extend Ip range for a Ipv6 network using craeteVlanIpRange() command - Error code 530 returned</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1108</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - Not able to restart Networks</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1109</para>
+                            </entry>
+                            <entry>
+                                <para>"Ipv6 - Unable to expunge User Vms that are ""Destroyed"".</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1111</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - listRouters() does not return guestipaddress</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1112</para>
+                            </entry>
+                            <entry>
+                                <para>"Errors in ""Prepare the System VM Template""</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1113</para>
+                            </entry>
+                            <entry>
+                                <para>"Ipv6 - Not able to deploy a new VM in this network because of ""Unable to allocate Unique Ipv6 address""</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1114</para>
+                            </entry>
+                            <entry>
+                                <para>unable to execute listegressfirewallrules API due invalid value i</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1115</para>
+                            </entry>
+                            <entry>
+                                <para>In multiple shared network unable to login with default nic - KV</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1123</para>
+                            </entry>
+                            <entry>
+                                <para>ListStoragePools API broken by refacto</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1138</para>
+                            </entry>
+                            <entry>
+                                <para>"Providing invalid values for gateway, netmask etc in the zoneWizard blocks the VLAN container to load, throwing an error</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1139</para>
+                            </entry>
+                            <entry>
+                                <para>"After the Vm is "Expunged" we see the entry still being present in the router in /etc/dhcphosts.txt</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1141</para>
+                            </entry>
+                            <entry>
+                                <para>"Ipv6 - After network restart (and reboot router), we do not see the existing vms dnsentries not being programmed in the router.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1152</para>
+                            </entry>
+                            <entry>
+                                <para>Missing tag in host-add.xm</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1153</para>
+                            </entry>
+                            <entry>
+                                <para>"Ipv6 - Vm deployment fails with "n must be positive" error.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1154</para>
+                            </entry>
+                            <entry>
+                                <para>Account/Users related API failed due to RegionService inject exception.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1157</para>
+                            </entry>
+                            <entry>
+                                <para>No API Documentation on Listing Custom User Templates Using CS4 API</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1160</para>
+                            </entry>
+                            <entry>
+                                <para>References to version=3.0.3|4|5|6 in API classes needs to be removed.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1161</para>
+                            </entry>
+                            <entry>
+                                <para>Differences between 4.1 and master in ongoing-config-of-external-firewalls-lb.xml</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1163</para>
+                            </entry>
+                            <entry>
+                                <para>Failed with NPE while creating firewall rule</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1168</para>
+                            </entry>
+                            <entry>
+                                <para>Create firewall rule broke</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1173</para>
+                            </entry>
+                            <entry>
+                                <para>ConsoleProxyResource instantiation exception.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1174</para>
+                            </entry>
+                            <entry>
+                                <para>Snapshots related SQL error.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1176</para>
+                            </entry>
+                            <entry>
+                                <para>Issue with snapshots(create/list</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1181</para>
+                            </entry>
+                            <entry>
+                                <para>mvn deploy db failing with NP</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1190</para>
+                            </entry>
+                            <entry>
+                                <para>Make APIChecker interface throw a single sensible exception.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1200</para>
+                            </entry>
+                            <entry>
+                                <para>"Unknown column 'vm_instance.disk_offering_id' in table vm_instance, db exception shown in MS log</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1201</para>
+                            </entry>
+                            <entry>
+                                <para>"Failed to create ssh key for user "cloud" /var/lib/cloud/management/.ssh/id_rsa and failed to start management server</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1202</para>
+                            </entry>
+                            <entry>
+                                <para>Fail to install KVM cloud-agent.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1203</para>
+                            </entry>
+                            <entry>
+                                <para>Fail to create advance zone with SG enabled when UI allows SG enabled option.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1204</para>
+                            </entry>
+                            <entry>
+                                <para>Fail to create advance zone due to fail to add host</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1205</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - Ubuntu 12.10 guest Vms loses default route (after it expiration time ~ 30 mts) when ipv6.autoconfig parameters are disabled except for net.ipv6.conf.lo.autoconf which is enabled.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1206</para>
+                            </entry>
+                            <entry>
+                                <para>Failure in Copy of System template</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1210</para>
+                            </entry>
+                            <entry>
+                                <para>Make all pluggable services return list of api cmd classes</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1216</para>
+                            </entry>
+                            <entry>
+                                <para>UUID is null for admin and failed to register user key with 4.0</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1218</para>
+                            </entry>
+                            <entry>
+                                <para>"IPv6: Shared Network - After network restart with clean option, router is assigned a different address. Name resolution for the existing guest Vms in the network fails.</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1219</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - Provide better error messages when deploying a Vm with Ip an address that is outside the network's ip range / if the ip address already is assigned to another Vm</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1220</para>
+                            </entry>
+                            <entry>
+                                <para>Ipv6 - Better error message when deploy Vm fails to get a free Ip address</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1222</para>
+                            </entry>
+                            <entry>
+                                <para>API rate limit configs: removed double quote in upgrade script</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1223</para>
+                            </entry>
+                            <entry>
+                                <para>Exception while starting jetty server: org.springframework.beans.factory.BeanCreationException Error creating bean with name 'apiServer'</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1224</para>
+                            </entry>
+                            <entry>
+                                <para>Volume snapshot creation failing</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1226</para>
+                            </entry>
+                            <entry>
+                                <para>Error while running Cloudstack-setup-database</para>
+                            </entry>
+                        </row>
+                        <row>
+                            <entry>
+                                <para>CLOUDSTACK-1228</para>
+                            </entry>
+                            <entry>
+                           

<TRUNCATED>

[29/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixed Primary typo


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/95cbb790
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/95cbb790
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/95cbb790

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 95cbb790f3e65d42182a52032a4ad6827391e57e
Parents: 69b0c14
Author: Pascal Borreli <pa...@borreli.com>
Authored: Fri Apr 12 15:06:11 2013 +0000
Committer: Chip Childers <ch...@gmail.com>
Committed: Fri Apr 12 16:20:11 2013 +0100

----------------------------------------------------------------------
 .../cloudstack/storage/test/DirectAgentTest.java   |    4 +-
 .../command/CreateVolumeFromBaseImageCommand.java  |    6 +-
 .../provider/DataStoreProviderManagerImpl.java     |    4 +-
 .../storage/to/ImageOnPrimaryDataStoreTO.java      |   44 +++++++++++++++
 .../storage/to/ImageOnPrimayDataStoreTO.java       |   44 ---------------
 .../xen/resource/XenServerStorageResource.java     |    4 +-
 6 files changed, 53 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95cbb790/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
index 2d6b94f..fc4aea8 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
@@ -23,7 +23,7 @@ import java.util.UUID;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.storage.to.ImageDataStoreTO;
-import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.TemplateTO;
 import org.mockito.Mockito;
@@ -126,7 +126,7 @@ public class DirectAgentTest extends CloudStackTestNGBase {
     
     @Test
     public void testDownloadTemplate() {
-        ImageOnPrimayDataStoreTO image = Mockito.mock(ImageOnPrimayDataStoreTO.class);
+        ImageOnPrimaryDataStoreTO image = Mockito.mock(ImageOnPrimaryDataStoreTO.class);
         PrimaryDataStoreTO primaryStore = Mockito.mock(PrimaryDataStoreTO.class);
         Mockito.when(primaryStore.getUuid()).thenReturn(this.getLocalStorageUuid());
         Mockito.when(image.getPrimaryDataStore()).thenReturn(primaryStore);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95cbb790/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
index f4be067..1734bc4 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
@@ -18,14 +18,14 @@
  */
 package org.apache.cloudstack.storage.command;
 
-import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.VolumeTO;
 
 import com.cloud.agent.api.Command;
 
 public class CreateVolumeFromBaseImageCommand extends Command implements StorageSubSystemCommand {
     private final VolumeTO volume;
-    private final ImageOnPrimayDataStoreTO image;
+    private final ImageOnPrimaryDataStoreTO image;
 
     public CreateVolumeFromBaseImageCommand(VolumeTO volume, String image) {
         this.volume = volume;
@@ -36,7 +36,7 @@ public class CreateVolumeFromBaseImageCommand extends Command implements Storage
         return this.volume;
     }
     
-    public ImageOnPrimayDataStoreTO getImage() {
+    public ImageOnPrimaryDataStoreTO getImage() {
         return this.image;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95cbb790/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
index 91b6c63..40a65dc 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java
@@ -64,7 +64,7 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
         return null;
     }
     
-    public List<StorageProviderResponse> getPrimayrDataStoreProviders() {
+    public List<StorageProviderResponse> getPrimaryDataStoreProviders() {
         List<StorageProviderResponse> providers = new ArrayList<StorageProviderResponse>();
         for (DataStoreProvider provider : providerMap.values()) {
             if (provider instanceof PrimaryDataStoreProvider) {
@@ -138,7 +138,7 @@ public class DataStoreProviderManagerImpl extends ManagerBase implements DataSto
             throw new InvalidParameterValueException("Invalid parameter, need to specify type: either primary or image");
         }
         if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.PRIMARY.toString())) {
-            return this.getPrimayrDataStoreProviders();
+            return this.getPrimaryDataStoreProviders();
         } else if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.IMAGE.toString())) {
             return this.getImageDataStoreProviders();
         } else {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95cbb790/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimaryDataStoreTO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimaryDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimaryDataStoreTO.java
new file mode 100644
index 0000000..a9a3cc4
--- /dev/null
+++ b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimaryDataStoreTO.java
@@ -0,0 +1,44 @@
+/*
+ * 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 org.apache.cloudstack.storage.to;
+
+import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;
+
+public class ImageOnPrimaryDataStoreTO {
+    private final String pathOnPrimaryDataStore;
+    private  PrimaryDataStoreTO dataStore;
+    private final TemplateTO template;
+    public ImageOnPrimaryDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
+        this.pathOnPrimaryDataStore = template.getPath();
+        //this.dataStore = template.getPrimaryDataStore().getDataStoreTO();
+        this.template = new TemplateTO(template.getTemplate());
+    }
+    
+    public String getPathOnPrimaryDataStore() {
+        return this.pathOnPrimaryDataStore;
+    }
+    
+    public PrimaryDataStoreTO getPrimaryDataStore() {
+        return this.dataStore;
+    }
+    
+    public TemplateTO getTemplate() {
+        return this.template;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95cbb790/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
deleted file mode 100644
index 18743d7..0000000
--- a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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 org.apache.cloudstack.storage.to;
-
-import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;
-
-public class ImageOnPrimayDataStoreTO {
-    private final String pathOnPrimaryDataStore;
-    private  PrimaryDataStoreTO dataStore;
-    private final TemplateTO template;
-    public ImageOnPrimayDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
-        this.pathOnPrimaryDataStore = template.getPath();
-        //this.dataStore = template.getPrimaryDataStore().getDataStoreTO();
-        this.template = new TemplateTO(template.getTemplate());
-    }
-    
-    public String getPathOnPrimaryDataStore() {
-        return this.pathOnPrimaryDataStore;
-    }
-    
-    public PrimaryDataStoreTO getPrimaryDataStore() {
-        return this.dataStore;
-    }
-    
-    public TemplateTO getTemplate() {
-        return this.template;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/95cbb790/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
index 9c29149..7e0ccbe 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
@@ -39,7 +39,7 @@ import org.apache.cloudstack.storage.command.CreatePrimaryDataStoreCmd;
 import org.apache.cloudstack.storage.command.CreateVolumeFromBaseImageCommand;
 import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import org.apache.cloudstack.storage.datastore.protocol.DataStoreProtocol;
-import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.VolumeTO;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
@@ -207,7 +207,7 @@ public class XenServerStorageResource {
     
     protected Answer execute(CreateVolumeFromBaseImageCommand cmd) {
         VolumeTO volume = cmd.getVolume();
-        ImageOnPrimayDataStoreTO baseImage = cmd.getImage();
+        ImageOnPrimaryDataStoreTO baseImage = cmd.getImage();
         Connection conn = hypervisorResource.getConnection();
         
         try {


[36/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Added the AffinityGroupProcessor definition to nonossComponentContext.xml.in to avoid auto-wiring failure for non-oss build


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e354807e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e354807e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e354807e

Branch: refs/heads/cisco-vnmc-api-integration
Commit: e354807e05312ba9d586544964ae99371803d145
Parents: 4b1a9f1
Author: Prachi Damle <pr...@cloud.com>
Authored: Fri Apr 12 15:31:16 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Fri Apr 12 15:32:44 2013 -0700

----------------------------------------------------------------------
 client/tomcatconf/nonossComponentContext.xml.in |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e354807e/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in
index fc8a9cd..3ede263 100644
--- a/client/tomcatconf/nonossComponentContext.xml.in
+++ b/client/tomcatconf/nonossComponentContext.xml.in
@@ -339,5 +339,13 @@
       </list>
     </property>
   </bean>
+  
+  <!--
+   AffinityGroup Processors
+  -->
+    <bean id="HostAntiAffinityProcessor" class="org.apache.cloudstack.affinity.HostAntiAffinityProcessor">
+    	<property name="name" value="HostAntiAffinityProcessor"/>
+    	<property name="type" value="host anti-affinity"/>
+ 	</bean>
 
 </beans>


[28/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Revert "CLOUDSTACK-574: Add Ceph RBD documentation"

This reverts commit 7753275b3777a3ae69d083d7e1df430f34b7f936.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/69b0c149
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/69b0c149
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/69b0c149

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 69b0c149d832be6554e4c5d53bb647d26ff69bd7
Parents: 3b35063
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Fri Apr 12 09:32:17 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Fri Apr 12 09:32:17 2013 -0500

----------------------------------------------------------------------
 .../hypervisor-host-install-primary-storage.xml    |   62 ---------------
 docs/en-US/hypervisor-kvm-install-flow.xml         |    1 -
 docs/en-US/primary-storage-add.xml                 |    5 -
 3 files changed, 0 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69b0c149/docs/en-US/hypervisor-host-install-primary-storage.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/hypervisor-host-install-primary-storage.xml b/docs/en-US/hypervisor-host-install-primary-storage.xml
deleted file mode 100644
index 3e76bfb..0000000
--- a/docs/en-US/hypervisor-host-install-primary-storage.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
-%BOOK_ENTITIES;
-]>
-
-<!-- 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.
--->
-
-<section id="hypervisor-host-install-primary-storage">
-    <title>Adding Primary Storage to a KVM hypervisor</title>
-    <para>For most Primary Storages there are no special requirements to add primary storage,
-               it's all done via the management server.</para>
-    <para>The follow subchapters however describe a couple of prerequisites for adding primary storage to a KVM cluster/hypervisor.</para>
-
-    <section id="hypervisor-host-install-primary-storage-nfs">
-        <title>Requirements for NFS primary storage</title>
-        <para>&PRODUCT; will handle the mounting of the NFS storage, no manual intervention is required.</para>
-        <para>Before adding the Primary Storage make sure the NFS client packages are installed. It's always useful to do a manual mount on one or
-            more hypervisors prior to adding the primary storage to make sure the mountpoint works.</para>
-    </section>
-    
-    <section id="hypervisor-host-install-primary-storage-iscsi">
-        <title>Requirements for iSCSI primary storage</title>
-        <para>When adding iSCSI Primary Storage the management server of &PRODUCT; will configure the iSCSI initiator. The requirement however is that
-            Open-iSCSI is installed on all hypervisors.</para>
-    </section>
-    
-    <section id="hypervisor-host-install-primary-storage-ceph">
-        <title>Requirements for Ceph primary storage</title>
-        <para>Support for RBD Primary Storage was added in &PRODUCT; 4.0 and requires a special version of libvirt.</para>
-        <para>With the KVM hypervisor &PRODUCT; relies on libvirt for handling it's storage pools. Most versions of libvirt
-            don't have the RBD storage pool support yet, so a manual compile of libvirt is required.</para>
-        <para>To use RBD primary storage make sure you hypervisors meet the following requirements</para>
-        <itemizedlist>
-            <listitem><para>Make sure librbd is installed on your system.</para></listitem>
-            <listitem><para>A RBD-enabled Qemu version is installed</para></listitem>
-            <listitem><para>Libivrt (>= 0.9.13) with RBD storage pool support enabled is installed</para></listitem>
-            <listitem><para>No /etc/ceph/ceph.conf configuration file is present on your hypervisors.</para></listitem>
-        </itemizedlist>
-        <para>After meeting these requirements you can add the RBD storage pool via the WebUI.</para>
-        <para>Hint: Ubuntu 13.04 meets all these requirements by default.</para>
-        <note><para>&PRODUCT; doesn't support multiple hostnames when adding a Primary Storage pool. If you have multiple Ceph monitor daemons
-            it's best to create a Round Robin-DNS record and use that as the hostname for the storage pool.</para></note>
-    </section>
-    
-</section>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69b0c149/docs/en-US/hypervisor-kvm-install-flow.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/hypervisor-kvm-install-flow.xml b/docs/en-US/hypervisor-kvm-install-flow.xml
index 7dfd47d..6cc73e4 100644
--- a/docs/en-US/hypervisor-kvm-install-flow.xml
+++ b/docs/en-US/hypervisor-kvm-install-flow.xml
@@ -34,5 +34,4 @@
     <xi:include href="hypervisor-host-install-network-openvswitch.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="hypervisor-host-install-firewall.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="hypervisor-host-install-finish.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-    <xi:include href="hypervisor-host-install-primary-storage.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 </section>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69b0c149/docs/en-US/primary-storage-add.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/primary-storage-add.xml b/docs/en-US/primary-storage-add.xml
index ddae418..067cf71 100644
--- a/docs/en-US/primary-storage-add.xml
+++ b/docs/en-US/primary-storage-add.xml
@@ -37,11 +37,6 @@
         <listitem><para>Primary storage cannot be added until a host has been added to the cluster.</para></listitem>
         <listitem><para>If you do not provision shared primary storage, you must set the global configuration parameter system.vm.local.storage.required to true, or else you will not be able to start VMs.</para></listitem>
     </itemizedlist>
-    <note><para>There are some differences between hypervisors regarding Primary Storage. See the list below for more information per hypervisor.</para></note>
-    <itemizedlist>
-        <listitem><para><xref linkend="hypervisor-host-install-primary-storage" /></para></listitem>
-        <listitem><para><xref linkend="xenserver-primary-storage-setup" /></para></listitem>
-    </itemizedlist>
     </section>
     <section id="adding-primary-storage">
     <title>Adding Primary Stroage</title>


[12/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Reopening CLOUDSTACK-1884. Adding back the unit test, but still excluded due to component loading issue.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4958070b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4958070b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4958070b

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 4958070b90bc153d55d0201776a4d1c4579dc707
Parents: 4600bd4
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Apr 11 15:43:12 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 15:43:54 2013 -0700

----------------------------------------------------------------------
 server/pom.xml                                     |    1 +
 .../cloudstack/affinity/AffinityApiUnitTest.java   |  154 ++++++++-------
 2 files changed, 81 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4958070b/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index a397195..a4f315b 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -160,6 +160,7 @@
             <exclude>com/cloud/network/security/SecurityGroupManagerImpl2Test.java</exclude>
             <!-- see CLOUDSTACK-1884 -->
             <exclude>org/apache/cloudstack/networkoffering/CreateNetworkOfferingTest.java</exclude>
+            <exclude>org/apache/cloudstack/affinity/AffinityApiUnitTest.java</exclude>
           </excludes>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4958070b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
index ee241de..a044611 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
@@ -31,6 +31,7 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.mockito.Mockito;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
@@ -94,86 +95,91 @@ public class AffinityApiUnitTest {
 
     @Before
     public void testSetUp() {
-        // ComponentContext.initComponentsLifeCycle();
-        /*
-         * AccountVO acct = new AccountVO(200L);
-         * acct.setType(Account.ACCOUNT_TYPE_NORMAL);
-         * acct.setAccountName("user"); acct.setDomainId(domainId);
-         *
-         * UserContext.registerContext(1, acct, null, true);
-         *
-         * when(_acctMgr.finalizeOwner((Account) anyObject(), anyString(),
-         * anyLong(), anyLong())).thenReturn(acct);
-         * when(_processor.getType()).thenReturn("mock");
-         * when(_accountDao.findByIdIncludingRemoved(0L)).thenReturn(acct);
-         */
+        ComponentContext.initComponentsLifeCycle();
+        AccountVO acct = new AccountVO(200L);
+        acct.setType(Account.ACCOUNT_TYPE_NORMAL);
+        acct.setAccountName("user");
+        acct.setDomainId(domainId);
+
+        UserContext.registerContext(1, acct, null, true);
+
+        when(_acctMgr.finalizeOwner((Account) anyObject(), anyString(), anyLong(), anyLong())).thenReturn(acct);
+        when(_processor.getType()).thenReturn("mock");
+        when(_accountDao.findByIdIncludingRemoved(0L)).thenReturn(acct);
+
+        AffinityGroupVO group = new AffinityGroupVO("group1", "mock", "mock group", domainId, 200L);
+        Mockito.when(_affinityGroupDao.persist(Mockito.any(AffinityGroupVO.class))).thenReturn(group);
+        Mockito.when(_affinityGroupDao.findById(Mockito.anyLong())).thenReturn(group);
+        Mockito.when(_affinityGroupDao.findByAccountAndName(Mockito.anyLong(), Mockito.anyString())).thenReturn(group);
+        Mockito.when(_affinityGroupDao.lockRow(Mockito.anyLong(), anyBoolean())).thenReturn(group);
+        Mockito.when(_affinityGroupDao.expunge(Mockito.anyLong())).thenReturn(true);
     }
 
     @Test
     public void createAffinityGroupTest() {
-        /*
-         * AffinityGroup group = _affinityService.createAffinityGroup("user",
-         * domainId, "group1", "mock", "affinity group one");
-         * assertNotNull("Affinity group 'group1' of type 'mock' failed to create "
-         * , group);
-         */
+        AffinityGroup group = _affinityService.createAffinityGroup("user", domainId, "group1", "mock",
+                "affinity group one");
+        assertNotNull("Affinity group 'group1' of type 'mock' failed to create ", group);
 
     }
 
-    /*
-     * @Test(expected = InvalidParameterValueException.class) public void
-     * invalidAffinityTypeTest() { AffinityGroup group =
-     * _affinityService.createAffinityGroup("user", domainId, "group1",
-     * "invalid", "affinity group one");
-     *
-     * }
-     *
-     * @Test(expected = InvalidParameterValueException.class) public void
-     * uniqueAffinityNameTest() { when(_groupDao.isNameInUse(anyLong(),
-     * anyLong(), eq("group1"))).thenReturn(true); AffinityGroup group2 =
-     * _affinityService.createAffinityGroup("user", domainId, "group1", "mock",
-     * "affinity group two"); }
-     *
-     * @Test(expected = InvalidParameterValueException.class) public void
-     * deleteAffinityGroupInvalidIdTest() throws ResourceInUseException {
-     * when(_groupDao.findById(20L)).thenReturn(null);
-     * _affinityService.deleteAffinityGroup(20L, "user", domainId, "group1"); }
-     *
-     * @Test(expected = InvalidParameterValueException.class) public void
-     * deleteAffinityGroupInvalidIdName() throws ResourceInUseException {
-     * when(_groupDao.findByAccountAndName(200L, "group1")).thenReturn(null);
-     * _affinityService.deleteAffinityGroup(null, "user", domainId, "group1"); }
-     *
-     * @Test(expected = InvalidParameterValueException.class) public void
-     * deleteAffinityGroupNullIdName() throws ResourceInUseException {
-     * _affinityService.deleteAffinityGroup(null, "user", domainId, null); }
-     *
-     * @Test(expected = ResourceInUseException.class) public void
-     * deleteAffinityGroupInUse() throws ResourceInUseException {
-     * List<AffinityGroupVMMapVO> affinityGroupVmMap = new
-     * ArrayList<AffinityGroupVMMapVO>(); AffinityGroupVMMapVO mapVO = new
-     * AffinityGroupVMMapVO(20L, 10L); affinityGroupVmMap.add(mapVO);
-     * when(_affinityGroupVMMapDao
-     * .listByAffinityGroup(20L)).thenReturn(affinityGroupVmMap);
-     *
-     * AffinityGroupVO groupVO = new AffinityGroupVO();
-     * when(_groupDao.findById(20L)).thenReturn(groupVO);
-     * when(_groupDao.lockRow(20L, true)).thenReturn(groupVO);
-     *
-     * _affinityService.deleteAffinityGroup(20L, "user", domainId, null); }
-     *
-     * @Test(expected = InvalidParameterValueException.class) public void
-     * updateAffinityGroupVMRunning() throws ResourceInUseException {
-     *
-     * UserVmVO vm = new UserVmVO(10L, "test", "test", 101L, HypervisorType.Any,
-     * 21L, false, false, domainId, 200L, 5L, "", "test", 1L);
-     * vm.setState(VirtualMachine.State.Running);
-     * when(_vmDao.findById(10L)).thenReturn(vm);
-     *
-     * List<Long> affinityGroupIds = new ArrayList<Long>();
-     * affinityGroupIds.add(20L);
-     *
-     * _affinityService.updateVMAffinityGroups(10L, affinityGroupIds); }
-     */
+    @Test(expected = InvalidParameterValueException.class)
+    public void invalidAffinityTypeTest() {
+        AffinityGroup group = _affinityService.createAffinityGroup("user", domainId, "group1", "invalid",
+                "affinity group one");
+
+    }
+
+    @Test(expected = InvalidParameterValueException.class)
+    public void uniqueAffinityNameTest() {
+        when(_groupDao.isNameInUse(anyLong(), anyLong(), eq("group1"))).thenReturn(true);
+        AffinityGroup group2 = _affinityService.createAffinityGroup("user", domainId, "group1", "mock",
+                "affinity group two");
+    }
+
+    @Test(expected = InvalidParameterValueException.class)
+    public void deleteAffinityGroupInvalidIdTest() throws ResourceInUseException {
+        when(_groupDao.findById(20L)).thenReturn(null);
+        _affinityService.deleteAffinityGroup(20L, "user", domainId, "group1");
+    }
+
+    @Test(expected = InvalidParameterValueException.class)
+    public void deleteAffinityGroupInvalidIdName() throws ResourceInUseException {
+        when(_groupDao.findByAccountAndName(200L, "group1")).thenReturn(null);
+        _affinityService.deleteAffinityGroup(null, "user", domainId, "group1");
+    }
+
+    @Test(expected = InvalidParameterValueException.class)
+    public void deleteAffinityGroupNullIdName() throws ResourceInUseException {
+        _affinityService.deleteAffinityGroup(null, "user", domainId, null);
+    }
+
+    @Test(expected = ResourceInUseException.class)
+    public void deleteAffinityGroupInUse() throws ResourceInUseException {
+        List<AffinityGroupVMMapVO> affinityGroupVmMap = new ArrayList<AffinityGroupVMMapVO>();
+        AffinityGroupVMMapVO mapVO = new AffinityGroupVMMapVO(20L, 10L);
+        affinityGroupVmMap.add(mapVO);
+        when(_affinityGroupVMMapDao.listByAffinityGroup(20L)).thenReturn(affinityGroupVmMap);
+
+        AffinityGroupVO groupVO = new AffinityGroupVO();
+        when(_groupDao.findById(20L)).thenReturn(groupVO);
+        when(_groupDao.lockRow(20L, true)).thenReturn(groupVO);
+
+        _affinityService.deleteAffinityGroup(20L, "user", domainId, null);
+    }
+
+    @Test(expected = InvalidParameterValueException.class)
+    public void updateAffinityGroupVMRunning() throws ResourceInUseException {
+
+        UserVmVO vm = new UserVmVO(10L, "test", "test", 101L, HypervisorType.Any, 21L, false, false, domainId, 200L,
+                5L, "", "test", 1L);
+        vm.setState(VirtualMachine.State.Running);
+        when(_vmDao.findById(10L)).thenReturn(vm);
+
+        List<Long> affinityGroupIds = new ArrayList<Long>();
+        affinityGroupIds.add(20L);
+
+        _affinityService.updateVMAffinityGroups(10L, affinityGroupIds);
+    }
 
 }


[35/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fix CLOUDSTACK-1987: Deleted service offering still shows for domain users. Also extend this fix for Disk offering as well.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4b1a9f14
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4b1a9f14
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4b1a9f14

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 4b1a9f146c7316ba885d0889bd10ae09074e1169
Parents: 7b4e195
Author: Min Chen <mi...@citrix.com>
Authored: Fri Apr 12 11:29:16 2013 -0700
Committer: Min Chen <mi...@citrix.com>
Committed: Fri Apr 12 13:47:45 2013 -0700

----------------------------------------------------------------------
 .../src/com/cloud/api/query/QueryManagerImpl.java  |   65 ++++----------
 1 files changed, 19 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b1a9f14/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index ea58427..5ffc2db 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -1941,7 +1941,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         Boolean isAscending = Boolean.parseBoolean(_configDao.getValue("sortkey.algorithm"));
         isAscending = (isAscending == null ? true : isAscending);
         Filter searchFilter = new Filter(DiskOfferingJoinVO.class, "sortKey", isAscending, cmd.getStartIndex(), cmd.getPageSizeVal());
-        SearchBuilder<DiskOfferingJoinVO> sb = _diskOfferingJoinDao.createSearchBuilder();
+        SearchCriteria<DiskOfferingJoinVO> sc = _diskOfferingJoinDao.createSearchCriteria();
 
 
         Account account = UserContext.current().getCaller();
@@ -1956,9 +1956,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             if (account.getType() == Account.ACCOUNT_TYPE_ADMIN || isPermissible(account.getDomainId(), domainId) ) {
                 // check if the user's domain == do's domain || user's domain is
                 // a child of so's domain for non-root users
-                sb.and("domainId", sb.entity().getDomainId(), SearchCriteria.Op.EQ);
-                SearchCriteria<DiskOfferingJoinVO> sc = sb.create();
-                sc.setParameters("domainId", domainId);
+                sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
                 return _diskOfferingJoinDao.searchAndCount(sc, searchFilter);
             } else {
                     throw new PermissionDeniedException("The account:" + account.getAccountName()
@@ -1966,11 +1964,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             }
         }
 
-        sb.and("name", sb.entity().getName(), SearchCriteria.Op.LIKE);
-        sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
-
 
-        boolean includePublicOfferings = false;
         List<Long> domainIds = null;
         // For non-root users, only return all offerings for the user's domain, and everything above till root
         if ((account.getType() == Account.ACCOUNT_TYPE_NORMAL || account.getType() == Account.ACCOUNT_TYPE_DOMAIN_ADMIN)
@@ -1987,16 +1981,17 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                 domainRecord = _domainDao.findById(domainRecord.getParent());
                 domainIds.add(domainRecord.getId());
             }
-            sb.and("domainIdIn", sb.entity().getDomainId(), SearchCriteria.Op.IN);
+            
+            SearchCriteria<DiskOfferingJoinVO> spc = _diskOfferingJoinDao.createSearchCriteria();
 
-            // include also public offering if no keyword, name and id specified
-            if ( keyword == null && name == null && id == null ){
-                includePublicOfferings = true;
-            }
+            spc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray());
+            spc.addOr("domainId", SearchCriteria.Op.NULL); // include public offering as where
+            sc.addAnd("domainId", SearchCriteria.Op.SC, spc);
+            sc.addAnd("systemUse", SearchCriteria.Op.EQ, false); // non-root users should not see system offering at all
+            
         }
 
-        SearchCriteria<DiskOfferingJoinVO> sc = sb.create();
-        if (keyword != null) {
+         if (keyword != null) {
             SearchCriteria<DiskOfferingJoinVO> ssc = _diskOfferingJoinDao.createSearchCriteria();
             ssc.addOr("displayText", SearchCriteria.Op.LIKE, "%" + keyword + "%");
             ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%");
@@ -2004,26 +1999,14 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             sc.addAnd("name", SearchCriteria.Op.SC, ssc);
         }
 
-        if (name != null) {
-            sc.setParameters("name", "%" + name + "%");
-        }
-
         if (id != null) {
-            sc.setParameters("id", id);
-        }
-
-        if (domainIds != null ){
-            sc.setParameters("domainIdIn", domainIds.toArray());
+            sc.addAnd("id", SearchCriteria.Op.EQ, id);
         }
 
-        if (includePublicOfferings){
-            SearchCriteria<DiskOfferingJoinVO> spc = _diskOfferingJoinDao.createSearchCriteria();
-            spc.addAnd("domainId", SearchCriteria.Op.NULL);
-            spc.addAnd("systemUse", SearchCriteria.Op.EQ, false);
-
-            sc.addOr("systemUse", SearchCriteria.Op.SC, spc);
+        if (name != null) {
+            sc.addAnd("name", SearchCriteria.Op.EQ, name);
         }
-
+        
         // FIXME: disk offerings should search back up the hierarchy for
         // available disk offerings...
         /*
@@ -2100,10 +2083,10 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             }
         }
 
-        boolean includePublicOfferings = false;
+       // boolean includePublicOfferings = false;
         if ((caller.getType() == Account.ACCOUNT_TYPE_NORMAL || caller.getType() == Account.ACCOUNT_TYPE_DOMAIN_ADMIN)
                 || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) {
-            // For non-root users
+            // For non-root users. 
             if (isSystem) {
                 throw new InvalidParameterValueException("Only root admins can access system's offering");
             }
@@ -2122,13 +2105,9 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
             SearchCriteria<ServiceOfferingJoinVO> spc = _srvOfferingJoinDao.createSearchCriteria();
 
             spc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray());
-            spc.addOr("domainId", SearchCriteria.Op.NULL);
+            spc.addOr("domainId", SearchCriteria.Op.NULL); // include public offering as where
             sc.addAnd("domainId", SearchCriteria.Op.SC, spc);
 
-            // include also public offering if no keyword, name and id specified
-            if ( keyword == null && name == null && id == null ){
-                includePublicOfferings = true;
-            }
         }
         else {
             // for root users
@@ -2171,24 +2150,18 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
         }
 
         if (isSystem != null) {
+            // note that for non-root users, isSystem is always false when control comes to here
             sc.addAnd("systemUse", SearchCriteria.Op.EQ, isSystem);
         }
 
         if (name != null) {
-            sc.addAnd("name", SearchCriteria.Op.LIKE, "%" + name + "%");
+            sc.addAnd("name", SearchCriteria.Op.EQ, name);
         }
 
         if (vmTypeStr != null) {
             sc.addAnd("vm_type", SearchCriteria.Op.EQ, vmTypeStr);
         }
 
-        if (includePublicOfferings){
-            SearchCriteria<ServiceOfferingJoinVO> spc = _srvOfferingJoinDao.createSearchCriteria();
-            spc.addAnd("domainId", SearchCriteria.Op.NULL);
-            spc.addAnd("systemUse", SearchCriteria.Op.EQ, false);
-            sc.addOr("systemUse", SearchCriteria.Op.SC, spc);
-        }
-
         return _srvOfferingJoinDao.searchAndCount(sc, searchFilter);
 
     }


[25/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixed Primary typo

Conflicts:

	client/WEB-INF/classes/resources/messages_de_DE.properties


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4e5a8a0f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4e5a8a0f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4e5a8a0f

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 4e5a8a0f8adcc665755229ee3d18f40913d15913
Parents: 0f8a46c
Author: Pascal Borreli <pa...@borreli.com>
Authored: Fri Apr 12 03:53:51 2013 +0000
Committer: Chip Childers <ch...@gmail.com>
Committed: Fri Apr 12 14:14:44 2013 +0100

----------------------------------------------------------------------
 .../cloudstack/storage/test/DirectAgentTest.java   |    4 ++--
 .../command/CreateVolumeFromBaseImageCommand.java  |    6 +++---
 .../storage/to/ImageOnPrimayDataStoreTO.java       |    4 ++--
 .../xen/resource/XenServerStorageResource.java     |    4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5a8a0f/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
index 2d6b94f..fc4aea8 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java
@@ -23,7 +23,7 @@ import java.util.UUID;
 import javax.inject.Inject;
 
 import org.apache.cloudstack.storage.to.ImageDataStoreTO;
-import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.PrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.TemplateTO;
 import org.mockito.Mockito;
@@ -126,7 +126,7 @@ public class DirectAgentTest extends CloudStackTestNGBase {
     
     @Test
     public void testDownloadTemplate() {
-        ImageOnPrimayDataStoreTO image = Mockito.mock(ImageOnPrimayDataStoreTO.class);
+        ImageOnPrimaryDataStoreTO image = Mockito.mock(ImageOnPrimaryDataStoreTO.class);
         PrimaryDataStoreTO primaryStore = Mockito.mock(PrimaryDataStoreTO.class);
         Mockito.when(primaryStore.getUuid()).thenReturn(this.getLocalStorageUuid());
         Mockito.when(image.getPrimaryDataStore()).thenReturn(primaryStore);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5a8a0f/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
index f4be067..1734bc4 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java
@@ -18,14 +18,14 @@
  */
 package org.apache.cloudstack.storage.command;
 
-import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.VolumeTO;
 
 import com.cloud.agent.api.Command;
 
 public class CreateVolumeFromBaseImageCommand extends Command implements StorageSubSystemCommand {
     private final VolumeTO volume;
-    private final ImageOnPrimayDataStoreTO image;
+    private final ImageOnPrimaryDataStoreTO image;
 
     public CreateVolumeFromBaseImageCommand(VolumeTO volume, String image) {
         this.volume = volume;
@@ -36,7 +36,7 @@ public class CreateVolumeFromBaseImageCommand extends Command implements Storage
         return this.volume;
     }
     
-    public ImageOnPrimayDataStoreTO getImage() {
+    public ImageOnPrimaryDataStoreTO getImage() {
         return this.image;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5a8a0f/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
index 18743d7..a9a3cc4 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimayDataStoreTO.java
@@ -20,11 +20,11 @@ package org.apache.cloudstack.storage.to;
 
 import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;
 
-public class ImageOnPrimayDataStoreTO {
+public class ImageOnPrimaryDataStoreTO {
     private final String pathOnPrimaryDataStore;
     private  PrimaryDataStoreTO dataStore;
     private final TemplateTO template;
-    public ImageOnPrimayDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
+    public ImageOnPrimaryDataStoreTO(TemplateOnPrimaryDataStoreInfo template) {
         this.pathOnPrimaryDataStore = template.getPath();
         //this.dataStore = template.getPrimaryDataStore().getDataStoreTO();
         this.template = new TemplateTO(template.getTemplate());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e5a8a0f/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
index 9c29149..7e0ccbe 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageResource.java
@@ -39,7 +39,7 @@ import org.apache.cloudstack.storage.command.CreatePrimaryDataStoreCmd;
 import org.apache.cloudstack.storage.command.CreateVolumeFromBaseImageCommand;
 import org.apache.cloudstack.storage.command.StorageSubSystemCommand;
 import org.apache.cloudstack.storage.datastore.protocol.DataStoreProtocol;
-import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO;
+import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO;
 import org.apache.cloudstack.storage.to.VolumeTO;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
@@ -207,7 +207,7 @@ public class XenServerStorageResource {
     
     protected Answer execute(CreateVolumeFromBaseImageCommand cmd) {
         VolumeTO volume = cmd.getVolume();
-        ImageOnPrimayDataStoreTO baseImage = cmd.getImage();
+        ImageOnPrimaryDataStoreTO baseImage = cmd.getImage();
         Connection conn = hypervisorResource.getConnection();
         
         try {


[20/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Summary: Add support for nested hypervisors to the VmWare resource.

Add a flag VmDetailConstants.NESTED_VIRTUALIZATION_FLAG
Add an advanced config uption VmwareEnableNestedVirtualization

Depending on the settings of the flags and the capabilities of the target hypervisor the nested virtualization option will be set on guest VMs. It's a global setting intended only for developers to support cloud-in-a-cloud deployments.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/accfccd8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/accfccd8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/accfccd8

Branch: refs/heads/cisco-vnmc-api-integration
Commit: accfccd83e11d0b12eccebde940c705e49eec913
Parents: c041979
Author: Hugo Trippaers <tr...@gmail.com>
Authored: Fri Apr 12 12:54:57 2013 +0200
Committer: Hugo Trippaers <tr...@gmail.com>
Committed: Fri Apr 12 13:49:42 2013 +0200

----------------------------------------------------------------------
 core/src/com/cloud/vm/VmDetailConstants.java       |    1 +
 .../src/com/cloud/hypervisor/guru/VMwareGuru.java  |   19 ++++++++++++++-
 .../hypervisor/vmware/resource/VmwareResource.java |   18 ++++++++++++++
 server/src/com/cloud/configuration/Config.java     |    1 +
 4 files changed, 38 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/accfccd8/core/src/com/cloud/vm/VmDetailConstants.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/vm/VmDetailConstants.java b/core/src/com/cloud/vm/VmDetailConstants.java
index 90068d1..5ff3ce0 100644
--- a/core/src/com/cloud/vm/VmDetailConstants.java
+++ b/core/src/com/cloud/vm/VmDetailConstants.java
@@ -20,4 +20,5 @@ public interface VmDetailConstants {
 	public static final String KEYBOARD = "keyboard";
 	public static final String NIC_ADAPTER = "nicAdapter";
 	public static final String ROOK_DISK_CONTROLLER = "rootDiskController";
+	public static final String NESTED_VIRTUALIZATION_FLAG = "nestedVirtualizationFlag";
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/accfccd8/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
index 2014697..f6f0923 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
@@ -27,6 +27,7 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.cloudstack.api.ApiConstants.VMDetails;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
@@ -40,6 +41,8 @@ import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand;
 import com.cloud.agent.api.to.NicTO;
 import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.cluster.ClusterManager;
+import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
@@ -84,6 +87,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru {
     @Inject VmwareManager _vmwareMgr;
     @Inject SecondaryStorageVmManager _secStorageMgr;
     @Inject NetworkModel _networkMgr;
+    @Inject ConfigurationDao _configDao;
 
     protected VMwareGuru() {
         super();
@@ -212,8 +216,21 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru {
             sbMacSequence.deleteCharAt(sbMacSequence.length() - 1);
             String bootArgs = to.getBootArgs();
             to.setBootArgs(bootArgs + " nic_macs=" + sbMacSequence.toString());
+            
+        }
+        
+        // Don't do this if the virtual machine is one of the special types
+        // Should only be done on user machines
+        if(!(vm.getVirtualMachine() instanceof DomainRouterVO || vm.getVirtualMachine() instanceof ConsoleProxyVO 
+                || vm.getVirtualMachine() instanceof SecondaryStorageVmVO)) {
+            String nestedVirt = _configDao.getValue(Config.VmwareEnableNestedVirtualization.key());
+            if (nestedVirt != null) {
+                s_logger.debug("Nested virtualization requested, adding flag to vm configuration");
+                details.put(VmDetailConstants.NESTED_VIRTUALIZATION_FLAG, nestedVirt);
+                to.setDetails(details);
+                
+            }
         }
-
         // Determine the VM's OS description
         GuestOSVO guestOS = _guestOsDao.findById(vm.getVirtualMachine().getGuestOSId());
         to.setOs(guestOS.getDisplayName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/accfccd8/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 634827b..f569595 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -232,6 +232,7 @@ import com.vmware.vim25.ClusterDasConfigInfo;
 import com.vmware.vim25.ComputeResourceSummary;
 import com.vmware.vim25.DatastoreSummary;
 import com.vmware.vim25.DynamicProperty;
+import com.vmware.vim25.HostCapability;
 import com.vmware.vim25.HostFirewallInfo;
 import com.vmware.vim25.HostFirewallRuleset;
 import com.vmware.vim25.HostNetworkTrafficShapingPolicy;
@@ -2147,6 +2148,23 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             VmwareHelper.setBasicVmConfig(vmConfigSpec, vmSpec.getCpus(), vmSpec.getMaxSpeed(),
             vmSpec.getMinSpeed(),(int) (vmSpec.getMaxRam()/(1024*1024)), ramMb,
             translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value(), vmSpec.getLimitCpuUse());
+           
+            if ("true".equals(vmSpec.getDetails().get(VmDetailConstants.NESTED_VIRTUALIZATION_FLAG))) {
+                s_logger.debug("Nested Virtualization enabled in configuration, checking hypervisor capability");
+                ManagedObjectReference hostMor = vmMo.getRunningHost().getMor();
+                ManagedObjectReference computeMor = context.getVimClient().getMoRefProp(hostMor, "parent");
+                ManagedObjectReference environmentBrowser = 
+                        context.getVimClient().getMoRefProp(computeMor, "environmentBrowser");
+                HostCapability hostCapability = context.getService().queryTargetCapabilities(environmentBrowser, hostMor);
+                if (hostCapability.isNestedHVSupported()) {
+                    s_logger.debug("Hypervisor supports nested virtualization, enabling for VM " + vmSpec.getName());
+                    vmConfigSpec.setNestedHVEnabled(true);                   
+                }
+                else {
+                	s_logger.warn("Hypervisor doesn't support nested virtualization, unable to set config for VM " +vmSpec.getName());
+                	vmConfigSpec.setNestedHVEnabled(false);
+                }
+            }
 
             VirtualDeviceConfigSpec[] deviceConfigSpecArray = new VirtualDeviceConfigSpec[totalChangeDevices];
             int i = 0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/accfccd8/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java
index 2137c00..e3e3053 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -276,6 +276,7 @@ public enum Config {
     VmwareRootDiskControllerType("Advanced", ManagementServer.class, String.class, "vmware.root.disk.controller", "ide", "Specify the default disk controller for root volumes, valid values are scsi, ide", null),
     VmwareSystemVmNicDeviceType("Advanced", ManagementServer.class, String.class, "vmware.systemvm.nic.device.type", "E1000", "Specify the default network device type for system VMs, valid values are E1000, PCNet32, Vmxnet2, Vmxnet3", null),
     VmwareRecycleHungWorker("Advanced", ManagementServer.class, Boolean.class, "vmware.recycle.hung.wokervm", "false", "Specify whether or not to recycle hung worker VMs", null),
+    VmwareEnableNestedVirtualization("Advanced", ManagementServer.class, Boolean.class, "vmware.nested.virtualization", "false", "When set to true this will enable nested virtualization when this is supported by the hypervisor", null),
 
     // Midonet
     MidoNetAPIServerAddress("Network", ManagementServer.class, String.class, "midonet.apiserver.address", "http://localhost:8081", "Specify the address at which the Midonet API server can be contacted (if using Midonet)", null),


[34/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
QuickCloud: accidental commit, removing


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7b4e1953
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7b4e1953
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7b4e1953

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 7b4e1953d87555d432386ea34aebd15bce257f16
Parents: 45f852b
Author: Chiradeep Vittal <ch...@apache.org>
Authored: Fri Apr 12 12:08:01 2013 -0700
Committer: Chiradeep Vittal <ch...@apache.org>
Committed: Fri Apr 12 12:08:13 2013 -0700

----------------------------------------------------------------------
 .../AgentBasedConsoleProxyManager.java.orig        |  298 ---------------
 1 files changed, 0 insertions(+), 298 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7b4e1953/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java.orig
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java.orig b/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java.orig
deleted file mode 100755
index 134d59d..0000000
--- a/server/src/com/cloud/consoleproxy/AgentBasedConsoleProxyManager.java.orig
+++ /dev/null
@@ -1,298 +0,0 @@
-// 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.consoleproxy;
-
-import java.util.Map;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.agent.AgentManager;
-import com.cloud.agent.api.GetVncPortAnswer;
-import com.cloud.agent.api.GetVncPortCommand;
-import com.cloud.agent.api.StartupProxyCommand;
-import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.host.HostVO;
-import com.cloud.host.dao.HostDao;
-import com.cloud.info.ConsoleProxyInfo;
-import com.cloud.keystore.KeystoreManager;
-import com.cloud.utils.NumbersUtil;
-import com.cloud.utils.component.ManagerBase;
-import com.cloud.vm.ConsoleProxyVO;
-import com.cloud.vm.UserVmVO;
-import com.cloud.vm.VMInstanceVO;
-import com.cloud.vm.VirtualMachineManager;
-import com.cloud.vm.dao.ConsoleProxyDao;
-import com.cloud.vm.dao.UserVmDao;
-import com.cloud.vm.dao.VMInstanceDao;
-
-@Local(value = { ConsoleProxyManager.class })
-public class AgentBasedConsoleProxyManager extends ManagerBase implements ConsoleProxyManager {
-    private static final Logger s_logger = Logger.getLogger(AgentBasedConsoleProxyManager.class);
-
-    @Inject
-    protected HostDao _hostDao;
-    @Inject
-    protected UserVmDao _userVmDao;
-    private String _instance;
-    protected String _consoleProxyUrlDomain;
-    @Inject
-    private VMInstanceDao _instanceDao;
-    private ConsoleProxyListener _listener;
-    protected int _consoleProxyUrlPort = ConsoleProxyManager.DEFAULT_PROXY_URL_PORT;
-    protected int _consoleProxyPort = ConsoleProxyManager.DEFAULT_PROXY_VNC_PORT;
-    protected boolean _sslEnabled = false;
-    @Inject
-    AgentManager _agentMgr;
-    @Inject
-    VirtualMachineManager _itMgr;
-    @Inject
-    protected ConsoleProxyDao _cpDao;
-    @Inject
-    protected KeystoreManager _ksMgr;
-
-    @Inject ConfigurationDao _configDao;
-
-    public class AgentBasedAgentHook extends AgentHookBase {
-
-        public AgentBasedAgentHook(VMInstanceDao instanceDao, HostDao hostDao, ConfigurationDao cfgDao,
-                KeystoreManager ksMgr, AgentManager agentMgr) {
-            super(instanceDao, hostDao, cfgDao, ksMgr, agentMgr);
-        }
-
-        @Override
-        protected HostVO findConsoleProxyHost(StartupProxyCommand cmd) {
-            return _hostDao.findByGuid(cmd.getGuid());
-        }
-
-    }
-
-    public int getVncPort(VMInstanceVO vm) {
-        if (vm.getHostId() == null) {
-            return -1;
-        }
-        GetVncPortAnswer answer = (GetVncPortAnswer) _agentMgr.easySend(vm.getHostId(), new GetVncPortCommand(vm.getId(), vm.getHostName()));
-        return (answer == null || !answer.getResult()) ? -1 : answer.getPort();
-    }
-
-    @Override
-    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
-
-        if (s_logger.isInfoEnabled()) {
-            s_logger.info("Start configuring AgentBasedConsoleProxyManager");
-        }
-
-        Map<String, String> configs = _configDao.getConfiguration("management-server", params);
-        String value = configs.get("consoleproxy.url.port");
-        if (value != null) {
-            _consoleProxyUrlPort = NumbersUtil.parseInt(value, ConsoleProxyManager.DEFAULT_PROXY_URL_PORT);
-        }
-
-        value = configs.get("consoleproxy.port");
-        if (value != null) {
-            _consoleProxyPort = NumbersUtil.parseInt(value, ConsoleProxyManager.DEFAULT_PROXY_VNC_PORT);
-        }
-
-        value = configs.get("consoleproxy.sslEnabled");
-        if (value != null && value.equalsIgnoreCase("true")) {
-            _sslEnabled = true;
-        }
-
-        _instance = configs.get("instance.name");
-
-        _consoleProxyUrlDomain = configs.get("consoleproxy.url.domain");
-
-        _listener =
-                new ConsoleProxyListener(new AgentBasedAgentHook(_instanceDao, _hostDao, _configDao, _ksMgr, _agentMgr));
-        _agentMgr.registerForHostEvents(_listener, true, true, false);
-
-        if (s_logger.isInfoEnabled()) {
-            s_logger.info("AgentBasedConsoleProxyManager has been configured. SSL enabled: " + _sslEnabled);
-        }
-        return true;
-    }
-
-    HostVO findHost(VMInstanceVO vm) {
-        return _hostDao.findById(vm.getHostId());
-    }
-
-    @Override
-    public ConsoleProxyInfo assignProxy(long dataCenterId, long userVmId) {
-        UserVmVO userVm = _userVmDao.findById(userVmId);
-        if (userVm == null) {
-            s_logger.warn("User VM " + userVmId + " no longer exists, return a null proxy for user vm:" + userVmId);
-            return null;
-        }
-
-        HostVO host = findHost(userVm);
-        if (host != null) {
-            if (s_logger.isDebugEnabled()) {
-                s_logger.debug("Assign embedded console proxy running at " + host.getName() + " to user vm " + userVmId + " with public IP "
-                        + host.getPublicIpAddress());
-            }
-
-            // only private IP, public IP, host id have meaningful values, rest
-            // of all are place-holder values
-            String publicIp = host.getPublicIpAddress();
-            if (publicIp == null) {
-                if (s_logger.isDebugEnabled()) {
-                    s_logger.debug("Host " + host.getName() + "/" + host.getPrivateIpAddress()
-                            + " does not have public interface, we will return its private IP for cosole proxy.");
-                }
-                publicIp = host.getPrivateIpAddress();
-            }
-
-            int urlPort = _consoleProxyUrlPort;
-
-            if (host.getProxyPort() != null && host.getProxyPort().intValue() > 0) {
-                urlPort = host.getProxyPort().intValue();
-            }
-
-            return new ConsoleProxyInfo(_sslEnabled, publicIp, _consoleProxyPort, urlPort, _consoleProxyUrlDomain);
-        } else {
-            s_logger.warn("Host that VM is running is no longer available, console access to VM " + userVmId + " will be temporarily unavailable.");
-        }
-        return null;
-    }
-
-
-
-
-    @Override
-    public ConsoleProxyVO startProxy(long proxyVmId) {
-        return null;
-    }
-
-    @Override
-    public boolean destroyProxy(long proxyVmId) {
-        return false;
-    }
-
-    @Override
-    public boolean rebootProxy(long proxyVmId) {
-        return false;
-    }
-
-    @Override
-    public boolean stopProxy(long proxyVmId) {
-        return false;
-    }
-
-    @Override
-    public void setManagementState(ConsoleProxyManagementState state) {
-    }
-
-    @Override
-    public ConsoleProxyManagementState getManagementState() {
-        return null;
-    }
-
-    @Override
-    public void resumeLastManagementState() {
-    }
-
-    @Override
-    public String getName() {
-        return _name;
-    }
-<<<<<<< HEAD
-
-    @Override
-    public Long convertToId(String vmName) {
-        if (!VirtualMachineName.isValidConsoleProxyName(vmName, _instance)) {
-            return null;
-        }
-        return VirtualMachineName.getConsoleProxyId(vmName);
-    }
-
-    @Override
-    public ConsoleProxyVO findByName(String name) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public ConsoleProxyVO findById(long id) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public ConsoleProxyVO persist(ConsoleProxyVO vm) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public boolean finalizeVirtualMachineProfile(VirtualMachineProfile<ConsoleProxyVO> profile, DeployDestination dest, ReservationContext context) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
-    public boolean finalizeDeployment(Commands cmds, VirtualMachineProfile<ConsoleProxyVO> profile, DeployDestination dest, ReservationContext context) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
-    public boolean finalizeCommandsOnStart(Commands cmds, VirtualMachineProfile<ConsoleProxyVO> profile) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
-    public boolean finalizeStart(VirtualMachineProfile<ConsoleProxyVO> profile, long hostId, Commands cmds, ReservationContext context) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
-    public void finalizeStop(VirtualMachineProfile<ConsoleProxyVO> profile, StopAnswer answer) {
-        // TODO Auto-generated method stub
-    }
-
-    @Override 
-    public void finalizeExpunge(ConsoleProxyVO proxy) {
-    }
-
-    @Override
-    public boolean plugNic(Network network, NicTO nic, VirtualMachineTO vm,
-            ReservationContext context, DeployDestination dest) throws ConcurrentOperationException, ResourceUnavailableException,
-            InsufficientCapacityException {
-        //not supported
-        throw new UnsupportedOperationException("Plug nic is not supported for vm of type " + vm.getType());
-    }
-
-
-    @Override
-    public boolean unplugNic(Network network, NicTO nic, VirtualMachineTO vm,
-            ReservationContext context, DeployDestination dest) throws ConcurrentOperationException, ResourceUnavailableException {
-        //not supported
-        throw new UnsupportedOperationException("Unplug nic is not supported for vm of type " + vm.getType());
-    }
-
-    @Override
-    public void prepareStop(VirtualMachineProfile<ConsoleProxyVO> profile) {
-    }
-}
-=======
-}
->>>>>>> QuickCloud: refactor to avoid copy paste of authentication and startup code


[19/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1934: NPE with listSupportedNetworkServices

For 'connectivity' network service current set of providers (MidoNet,
NiciraNcp) not necessarily part of OSS builds. So handle the case where
there are no providers for a service


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c0419791
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c0419791
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c0419791

Branch: refs/heads/cisco-vnmc-api-integration
Commit: c0419791ede331fff7151a5cee9a358c0400c272
Parents: 4ae3e5d
Author: Murali Reddy <mu...@citrix.com>
Authored: Fri Apr 12 16:44:03 2013 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Fri Apr 12 16:47:50 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkModelImpl.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c0419791/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index b82f90c..c5930d9 100755
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -1013,7 +1013,10 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
         Set<Provider> supportedProviders = new HashSet<Provider>();
     
         if (service != null) {
-            supportedProviders.addAll(s_serviceToImplementedProvidersMap.get(service));
+            List<Provider> providers = s_serviceToImplementedProvidersMap.get(service);
+            if (providers != null && !providers.isEmpty()) {
+                supportedProviders.addAll(providers);
+            }
         } else {
             for (List<Provider> pList : s_serviceToImplementedProvidersMap.values()) {
                 supportedProviders.addAll(pList);


[46/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1995: Enhance resize volume tests to support xenserver hypervisor and fix few test flow errors

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0abfe240
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0abfe240
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0abfe240

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 0abfe240c31e410e286169ac1f75aa564f267280
Parents: 48c1c00
Author: Talluri <Sr...@citrix.com>
Authored: Mon Apr 15 16:47:34 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Apr 15 12:00:08 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_volumes.py |   55 ++++++++++++++++++++++-----
 1 files changed, 45 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0abfe240/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index 36eb5de..7d910d4 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -78,13 +78,13 @@ class Services:
                         "password": "password",
                         "ssh_port": 22,
                         "diskname": "TestDiskServ",
-                        "hypervisor": 'XenServer',
+                        "hypervisor": 'KVM',
                         "privateport": 22,
                         "publicport": 22,
                         "protocol": 'TCP',
                         "diskdevice": "/dev/xvdb",
-                        "ostype": 'CentOS 5.3 (64-bit)',
-                        "mode": 'basic',
+                        "ostype": 'CentOS 5.5 (64-bit)',
+                        "mode": 'advanced',
                         "sleep": 10,
                         "timeout": 600,
                     }
@@ -358,6 +358,12 @@ class TestVolumes(cloudstackTestCase):
     def setUp(self):
         self.apiClient = self.testClient.getApiClient()
         self.dbclient = self.testClient.getDbConnection()
+        self.cleanup = []
+
+    def tearDown(self):
+        #Clean up, terminate the created volumes
+        cleanup_resources(self.apiClient, self.cleanup)
+        return
 
     @attr(tags = ["advanced", "advancedns", "smoke"])
     def test_02_attach_volume(self):
@@ -535,9 +541,13 @@ class TestVolumes(cloudstackTestCase):
         try:
             response = self.apiClient.resizeVolume(cmd)
         except Exception as ex:
-            if str(ex) == "HTTP Error 431: 431":
+            #print str(ex)
+            if "HTTP Error 431:" in str(ex):
                 success = True
-        self.assertEqual(success, True, "ResizeVolume - verify invalid id is handled appropriately")
+        self.assertEqual(
+                success,
+                True,
+                "ResizeVolume - verify invalid id is handled appropriately")
 
         # Next, we'll try an invalid disk offering id
         cmd.id             = self.volume.id
@@ -546,16 +556,29 @@ class TestVolumes(cloudstackTestCase):
         try:
             response = self.apiClient.resizeVolume(cmd)
         except Exception as ex:
-            if "need to specify a disk offering" in str(ex):
+            if "HTTP Error 431:" in str(ex):
                 success = True
-        self.assertEqual(success, True, "ResizeVolume - verify disk offering is handled appropriately")
-
+        self.assertEqual(
+                success,
+                True,
+                "ResizeVolume - verify disk offering is handled appropriately")
         # Ok, now let's try and resize a volume that is not custom.
         cmd.id             = self.volume.id
         cmd.diskofferingid = self.services['diskofferingid']
         cmd.size           = 4
         currentSize        = self.volume.size
 
+        self.debug(
+                "Attaching volume (ID: %s) to VM (ID: %s)" % (
+                                                    self.volume.id,
+                                                    self.virtual_machine.id)
+                 )
+        #attach the volume
+        self.virtual_machine.attach_volume(self.apiClient, self.volume)
+        #stop the vm if it is on xenserver
+        if self.services['hypervisor'].lower() == "xenserver":
+            self.virtual_machine.stop(self.apiClient)
+
         self.apiClient.resizeVolume(cmd)
         count = 0
         success = True
@@ -566,7 +589,7 @@ class TestVolumes(cloudstackTestCase):
                                                 type='DATADISK'
                                                 )
             for vol in list_volume_response:
-                if vol.id == self.volume.id and vol.size != currentSize:
+                if vol.id == self.volume.id and vol.size != currentSize and vol.state != "Resizing":
                     success = False
             if success:
                 break
@@ -579,12 +602,21 @@ class TestVolumes(cloudstackTestCase):
                          True,
                          "Verify the volume did not resize"
                          )
-
+        self.virtual_machine.detach_volume(self.apiClient, self.volume)
+        self.cleanup.append(self.volume)
 
     @attr(tags = ["advanced", "advancedns", "smoke"])
     def test_08_resize_volume(self):
         """Resize a volume"""
         # Verify the size is the new size is what we wanted it to be.
+        self.debug(
+                "Attaching volume (ID: %s) to VM (ID: %s)" % (
+                                                    self.volume.id,
+                                                    self.virtual_machine.id
+                                                    ))
+        self.virtual_machine.attach_volume(self.apiClient, self.volume)
+        if self.services['hypervisor'].lower() == "xenserver":
+            self.virtual_machine.stop(self.apiClient)
         self.debug("Resize Volume ID: %s" % self.volume.id)
 
         cmd                = resizeVolume.resizeVolumeCmd()
@@ -616,6 +648,9 @@ class TestVolumes(cloudstackTestCase):
                          "Check if the volume resized appropriately"
                          )
 
+        self.virtual_machine.detach_volume(self.apiClient, self.volume)
+        self.cleanup.append(self.volume)
+
     @attr(tags = ["advanced", "advancedns", "smoke"])
     def test_09_delete_detached_volume(self):
         """Delete a Volume unattached to an VM


[09/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - make loginCmdText local.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5f8a2781
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5f8a2781
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5f8a2781

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 5f8a2781967971e28bc2751d0903d9c99ea4e28e
Parents: b1f67a0
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Apr 11 13:38:25 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Apr 11 13:39:04 2013 -0700

----------------------------------------------------------------------
 ui/scripts/cloudStack.js        |    4 ++--
 ui/scripts/ui-custom/regions.js |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f8a2781/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index 0cf80b0..a8bca91 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -255,11 +255,11 @@
           array1.push("&domain=" + encodeURIComponent("/"));
         }
 				
-        g_loginCmdText = array1.join("");			
+        var loginCmdText = array1.join("");			
 				
         $.ajax({
           type: "POST",
-          data: "command=login" + g_loginCmdText + "&response=json",					
+          data: "command=login" + loginCmdText + "&response=json",					
           dataType: "json",
           async: false,
           success: function(json) {			

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f8a2781/ui/scripts/ui-custom/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/regions.js b/ui/scripts/ui-custom/regions.js
index 2f61dfd..0469638 100644
--- a/ui/scripts/ui-custom/regions.js
+++ b/ui/scripts/ui-custom/regions.js
@@ -89,7 +89,7 @@
       closeRegionSelector({
         complete: function() {
           $('#container').prepend($('<div>').addClass('loading-overlay'));
-          window.name = g_loginCmdText;
+          //window.name = g_loginCmdText;
           document.location.href = url;
         }
       });


[21/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1989: Without this fix you can't query service offerings
that don't have a domain id set (null).

Tested via: Called "listServiceOfferings" using a simple perl script,
once with an ID, and once without an ID specified.

Signed-off-by: Chip Childers <ch...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/38df6286
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/38df6286
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/38df6286

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 38df62865d905aeac49fac7c32b66c7099036867
Parents: accfccd
Author: Ryan Dietrich <ry...@betterservers.com>
Authored: Fri Apr 12 14:00:41 2013 +0100
Committer: Chip Childers <ch...@gmail.com>
Committed: Fri Apr 12 14:03:28 2013 +0100

----------------------------------------------------------------------
 .../src/com/cloud/api/query/QueryManagerImpl.java  |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/38df6286/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index a498c18..ea58427 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2119,7 +2119,11 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
                 domainRecord = _domainDao.findById(domainRecord.getParent());
                 domainIds.add(domainRecord.getId());
             }
-            sc.addAnd("domainId", SearchCriteria.Op.IN, domainIds.toArray());
+            SearchCriteria<ServiceOfferingJoinVO> spc = _srvOfferingJoinDao.createSearchCriteria();
+
+            spc.addOr("domainId", SearchCriteria.Op.IN, domainIds.toArray());
+            spc.addOr("domainId", SearchCriteria.Op.NULL);
+            sc.addAnd("domainId", SearchCriteria.Op.SC, spc);
 
             // include also public offering if no keyword, name and id specified
             if ( keyword == null && name == null && id == null ){


[22/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-574: Add Ceph RBD documentation

This commit also add some extra information about NFS and iSCSI
Primary Storage on a KVM hypervisor.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7753275b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7753275b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7753275b

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 7753275b3777a3ae69d083d7e1df430f34b7f936
Parents: 6d4b035
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Fri Apr 12 15:02:53 2013 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Fri Apr 12 15:07:53 2013 +0200

----------------------------------------------------------------------
 .../hypervisor-host-install-primary-storage.xml    |   62 +++++++++++++++
 docs/en-US/hypervisor-kvm-install-flow.xml         |    1 +
 docs/en-US/primary-storage-add.xml                 |    5 +
 3 files changed, 68 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7753275b/docs/en-US/hypervisor-host-install-primary-storage.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/hypervisor-host-install-primary-storage.xml b/docs/en-US/hypervisor-host-install-primary-storage.xml
new file mode 100644
index 0000000..3e76bfb
--- /dev/null
+++ b/docs/en-US/hypervisor-host-install-primary-storage.xml
@@ -0,0 +1,62 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
+%BOOK_ENTITIES;
+]>
+
+<!-- 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.
+-->
+
+<section id="hypervisor-host-install-primary-storage">
+    <title>Adding Primary Storage to a KVM hypervisor</title>
+    <para>For most Primary Storages there are no special requirements to add primary storage,
+               it's all done via the management server.</para>
+    <para>The follow subchapters however describe a couple of prerequisites for adding primary storage to a KVM cluster/hypervisor.</para>
+
+    <section id="hypervisor-host-install-primary-storage-nfs">
+        <title>Requirements for NFS primary storage</title>
+        <para>&PRODUCT; will handle the mounting of the NFS storage, no manual intervention is required.</para>
+        <para>Before adding the Primary Storage make sure the NFS client packages are installed. It's always useful to do a manual mount on one or
+            more hypervisors prior to adding the primary storage to make sure the mountpoint works.</para>
+    </section>
+    
+    <section id="hypervisor-host-install-primary-storage-iscsi">
+        <title>Requirements for iSCSI primary storage</title>
+        <para>When adding iSCSI Primary Storage the management server of &PRODUCT; will configure the iSCSI initiator. The requirement however is that
+            Open-iSCSI is installed on all hypervisors.</para>
+    </section>
+    
+    <section id="hypervisor-host-install-primary-storage-ceph">
+        <title>Requirements for Ceph primary storage</title>
+        <para>Support for RBD Primary Storage was added in &PRODUCT; 4.0 and requires a special version of libvirt.</para>
+        <para>With the KVM hypervisor &PRODUCT; relies on libvirt for handling it's storage pools. Most versions of libvirt
+            don't have the RBD storage pool support yet, so a manual compile of libvirt is required.</para>
+        <para>To use RBD primary storage make sure you hypervisors meet the following requirements</para>
+        <itemizedlist>
+            <listitem><para>Make sure librbd is installed on your system.</para></listitem>
+            <listitem><para>A RBD-enabled Qemu version is installed</para></listitem>
+            <listitem><para>Libivrt (>= 0.9.13) with RBD storage pool support enabled is installed</para></listitem>
+            <listitem><para>No /etc/ceph/ceph.conf configuration file is present on your hypervisors.</para></listitem>
+        </itemizedlist>
+        <para>After meeting these requirements you can add the RBD storage pool via the WebUI.</para>
+        <para>Hint: Ubuntu 13.04 meets all these requirements by default.</para>
+        <note><para>&PRODUCT; doesn't support multiple hostnames when adding a Primary Storage pool. If you have multiple Ceph monitor daemons
+            it's best to create a Round Robin-DNS record and use that as the hostname for the storage pool.</para></note>
+    </section>
+    
+</section>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7753275b/docs/en-US/hypervisor-kvm-install-flow.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/hypervisor-kvm-install-flow.xml b/docs/en-US/hypervisor-kvm-install-flow.xml
index 6cc73e4..7dfd47d 100644
--- a/docs/en-US/hypervisor-kvm-install-flow.xml
+++ b/docs/en-US/hypervisor-kvm-install-flow.xml
@@ -34,4 +34,5 @@
     <xi:include href="hypervisor-host-install-network-openvswitch.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="hypervisor-host-install-firewall.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="hypervisor-host-install-finish.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+    <xi:include href="hypervisor-host-install-primary-storage.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 </section>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7753275b/docs/en-US/primary-storage-add.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/primary-storage-add.xml b/docs/en-US/primary-storage-add.xml
index 067cf71..ddae418 100644
--- a/docs/en-US/primary-storage-add.xml
+++ b/docs/en-US/primary-storage-add.xml
@@ -37,6 +37,11 @@
         <listitem><para>Primary storage cannot be added until a host has been added to the cluster.</para></listitem>
         <listitem><para>If you do not provision shared primary storage, you must set the global configuration parameter system.vm.local.storage.required to true, or else you will not be able to start VMs.</para></listitem>
     </itemizedlist>
+    <note><para>There are some differences between hypervisors regarding Primary Storage. See the list below for more information per hypervisor.</para></note>
+    <itemizedlist>
+        <listitem><para><xref linkend="hypervisor-host-install-primary-storage" /></para></listitem>
+        <listitem><para><xref linkend="xenserver-primary-storage-setup" /></para></listitem>
+    </itemizedlist>
     </section>
     <section id="adding-primary-storage">
     <title>Adding Primary Stroage</title>


[23/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
tools: A small fix for the script to build the docs with


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6d4b035f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6d4b035f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6d4b035f

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 6d4b035f2cf2d5ee9d1e7c6def9b802d74ed6d6b
Parents: 38df628
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Fri Apr 12 13:50:08 2013 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Fri Apr 12 15:07:53 2013 +0200

----------------------------------------------------------------------
 tools/build/build_docs.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d4b035f/tools/build/build_docs.sh
----------------------------------------------------------------------
diff --git a/tools/build/build_docs.sh b/tools/build/build_docs.sh
index 8bb63e3..c1b1f13 100755
--- a/tools/build/build_docs.sh
+++ b/tools/build/build_docs.sh
@@ -48,6 +48,11 @@ if [ ! -x "$publican_path" ]; then
     exit 1
 fi
 
+if [ ! -d "$sourcedir/docs" ]; then
+    echo "$sourcedir/docs doesn't seem to exist? Maybe set -s?"
+    exit 1
+fi
+
 cd $sourcedir/docs
 cp -R /usr/share/publican/Common_Content .
 ln -s $sourcedir/docs/publican-cloudstack Common_Content/cloudstack


[10/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
 Excluding this unit test for a while, since it fails because ComponentContext.initComponentsLifeCycle(); is failing when DB is unavailable


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/69f49e76
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/69f49e76
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/69f49e76

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 69f49e76cf7315852caf9b8515cb457fef9f3852
Parents: 5f8a278
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Apr 11 14:50:14 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 14:50:35 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/affinity/AffinityApiUnitTest.java   |  149 ++++++++-------
 1 files changed, 77 insertions(+), 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69f49e76/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
index 86cf017..ee241de 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
@@ -76,6 +76,9 @@ public class AffinityApiUnitTest {
     AffinityGroupVMMapDao _affinityGroupVMMapDao;
 
     @Inject
+    AffinityGroupDao _affinityGroupDao;
+
+    @Inject
     EventUtils _eventUtils;
 
     @Inject
@@ -91,84 +94,86 @@ public class AffinityApiUnitTest {
 
     @Before
     public void testSetUp() {
-        ComponentContext.initComponentsLifeCycle();
-        AccountVO acct = new AccountVO(200L);
-        acct.setType(Account.ACCOUNT_TYPE_NORMAL);
-        acct.setAccountName("user");
-        acct.setDomainId(domainId);
-
-        UserContext.registerContext(1, acct, null, true);
-
-        when(_acctMgr.finalizeOwner((Account) anyObject(), anyString(), anyLong(), anyLong())).thenReturn(acct);
-        when(_processor.getType()).thenReturn("mock");
-        when(_accountDao.findByIdIncludingRemoved(0L)).thenReturn(acct);
+        // ComponentContext.initComponentsLifeCycle();
+        /*
+         * AccountVO acct = new AccountVO(200L);
+         * acct.setType(Account.ACCOUNT_TYPE_NORMAL);
+         * acct.setAccountName("user"); acct.setDomainId(domainId);
+         *
+         * UserContext.registerContext(1, acct, null, true);
+         *
+         * when(_acctMgr.finalizeOwner((Account) anyObject(), anyString(),
+         * anyLong(), anyLong())).thenReturn(acct);
+         * when(_processor.getType()).thenReturn("mock");
+         * when(_accountDao.findByIdIncludingRemoved(0L)).thenReturn(acct);
+         */
     }
 
     @Test
     public void createAffinityGroupTest() {
-        AffinityGroup group = _affinityService.createAffinityGroup("user", domainId, "group1", "mock",
-                "affinity group one");
-        assertNotNull("Affinity group 'group1' of type 'mock' failed to create ", group);
-
-    }
+        /*
+         * AffinityGroup group = _affinityService.createAffinityGroup("user",
+         * domainId, "group1", "mock", "affinity group one");
+         * assertNotNull("Affinity group 'group1' of type 'mock' failed to create "
+         * , group);
+         */
 
-    @Test(expected = InvalidParameterValueException.class)
-    public void invalidAffinityTypeTest() {
-        AffinityGroup group = _affinityService.createAffinityGroup("user", domainId, "group1", "invalid",
-                "affinity group one");
-
-    }
-
-    @Test(expected = InvalidParameterValueException.class)
-    public void uniqueAffinityNameTest() {
-        when(_groupDao.isNameInUse(anyLong(), anyLong(), eq("group1"))).thenReturn(true);
-        AffinityGroup group2 = _affinityService.createAffinityGroup("user", domainId, "group1", "mock",
-                "affinity group two");
     }
 
-    @Test(expected = InvalidParameterValueException.class)
-    public void deleteAffinityGroupInvalidIdTest() throws ResourceInUseException {
-        when(_groupDao.findById(20L)).thenReturn(null);
-        _affinityService.deleteAffinityGroup(20L, "user", domainId, "group1");
-    }
-
-    @Test(expected = InvalidParameterValueException.class)
-    public void deleteAffinityGroupInvalidIdName() throws ResourceInUseException {
-        when(_groupDao.findByAccountAndName(200L, "group1")).thenReturn(null);
-        _affinityService.deleteAffinityGroup(null, "user", domainId, "group1");
-    }
-
-    @Test(expected = InvalidParameterValueException.class)
-    public void deleteAffinityGroupNullIdName() throws ResourceInUseException {
-        _affinityService.deleteAffinityGroup(null, "user", domainId, null);
-    }
-
-    @Test(expected = ResourceInUseException.class)
-    public void deleteAffinityGroupInUse() throws ResourceInUseException {
-        List<AffinityGroupVMMapVO> affinityGroupVmMap = new ArrayList<AffinityGroupVMMapVO>();
-        AffinityGroupVMMapVO mapVO = new AffinityGroupVMMapVO(20L, 10L);
-        affinityGroupVmMap.add(mapVO);
-        when(_affinityGroupVMMapDao.listByAffinityGroup(20L)).thenReturn(affinityGroupVmMap);
-
-        AffinityGroupVO groupVO = new AffinityGroupVO();
-        when(_groupDao.findById(20L)).thenReturn(groupVO);
-        when(_groupDao.lockRow(20L, true)).thenReturn(groupVO);
-
-        _affinityService.deleteAffinityGroup(20L, "user", domainId, null);
-    }
-
-    @Test(expected = InvalidParameterValueException.class)
-    public void updateAffinityGroupVMRunning() throws ResourceInUseException {
-
-        UserVmVO vm = new UserVmVO(10L, "test", "test", 101L, HypervisorType.Any, 21L, false, false, domainId, 200L,
-                5L, "", "test", 1L);
-        vm.setState(VirtualMachine.State.Running);
-        when(_vmDao.findById(10L)).thenReturn(vm);
-
-        List<Long> affinityGroupIds = new ArrayList<Long>();
-        affinityGroupIds.add(20L);
-
-        _affinityService.updateVMAffinityGroups(10L, affinityGroupIds);
-    }
+    /*
+     * @Test(expected = InvalidParameterValueException.class) public void
+     * invalidAffinityTypeTest() { AffinityGroup group =
+     * _affinityService.createAffinityGroup("user", domainId, "group1",
+     * "invalid", "affinity group one");
+     *
+     * }
+     *
+     * @Test(expected = InvalidParameterValueException.class) public void
+     * uniqueAffinityNameTest() { when(_groupDao.isNameInUse(anyLong(),
+     * anyLong(), eq("group1"))).thenReturn(true); AffinityGroup group2 =
+     * _affinityService.createAffinityGroup("user", domainId, "group1", "mock",
+     * "affinity group two"); }
+     *
+     * @Test(expected = InvalidParameterValueException.class) public void
+     * deleteAffinityGroupInvalidIdTest() throws ResourceInUseException {
+     * when(_groupDao.findById(20L)).thenReturn(null);
+     * _affinityService.deleteAffinityGroup(20L, "user", domainId, "group1"); }
+     *
+     * @Test(expected = InvalidParameterValueException.class) public void
+     * deleteAffinityGroupInvalidIdName() throws ResourceInUseException {
+     * when(_groupDao.findByAccountAndName(200L, "group1")).thenReturn(null);
+     * _affinityService.deleteAffinityGroup(null, "user", domainId, "group1"); }
+     *
+     * @Test(expected = InvalidParameterValueException.class) public void
+     * deleteAffinityGroupNullIdName() throws ResourceInUseException {
+     * _affinityService.deleteAffinityGroup(null, "user", domainId, null); }
+     *
+     * @Test(expected = ResourceInUseException.class) public void
+     * deleteAffinityGroupInUse() throws ResourceInUseException {
+     * List<AffinityGroupVMMapVO> affinityGroupVmMap = new
+     * ArrayList<AffinityGroupVMMapVO>(); AffinityGroupVMMapVO mapVO = new
+     * AffinityGroupVMMapVO(20L, 10L); affinityGroupVmMap.add(mapVO);
+     * when(_affinityGroupVMMapDao
+     * .listByAffinityGroup(20L)).thenReturn(affinityGroupVmMap);
+     *
+     * AffinityGroupVO groupVO = new AffinityGroupVO();
+     * when(_groupDao.findById(20L)).thenReturn(groupVO);
+     * when(_groupDao.lockRow(20L, true)).thenReturn(groupVO);
+     *
+     * _affinityService.deleteAffinityGroup(20L, "user", domainId, null); }
+     *
+     * @Test(expected = InvalidParameterValueException.class) public void
+     * updateAffinityGroupVMRunning() throws ResourceInUseException {
+     *
+     * UserVmVO vm = new UserVmVO(10L, "test", "test", 101L, HypervisorType.Any,
+     * 21L, false, false, domainId, 200L, 5L, "", "test", 1L);
+     * vm.setState(VirtualMachine.State.Running);
+     * when(_vmDao.findById(10L)).thenReturn(vm);
+     *
+     * List<Long> affinityGroupIds = new ArrayList<Long>();
+     * affinityGroupIds.add(20L);
+     *
+     * _affinityService.updateVMAffinityGroups(10L, affinityGroupIds); }
+     */
 
 }


[26/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
GlobalLoadBalancerResponse should contain the service type details and
GSLB rule is defaulted to have source IP as sticky method


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/85b1519f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/85b1519f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/85b1519f

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 85b1519fe5d09e7f0fa51c914ac725c5d928800f
Parents: 4e5a8a0
Author: Murali Reddy <mu...@citrix.com>
Authored: Fri Apr 12 19:16:36 2013 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Fri Apr 12 19:27:46 2013 +0530

----------------------------------------------------------------------
 .../ha/gslb/CreateGlobalLoadBalancerRuleCmd.java   |    3 +++
 .../api/response/GlobalLoadBalancerResponse.java   |    8 ++++++++
 server/src/com/cloud/api/ApiResponseHelper.java    |    2 ++
 3 files changed, 13 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/85b1519f/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
index cd559d8..b08b6ae 100644
--- a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java
@@ -93,6 +93,9 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd {
     }
 
     public String getStickyMethod() {
+        if (stickyMethod == null) {
+            return "sourceip";
+        }
         return stickyMethod;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/85b1519f/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
index 0fd064f..38e080b 100644
--- a/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java
@@ -50,6 +50,10 @@ public class GlobalLoadBalancerResponse extends BaseResponse implements Controll
     @Param(description = "session persistence method used for the global load balancer")
     private String stickyMethod;
 
+    @SerializedName(ApiConstants.GSLB_SERVICE_TYPE)
+    @Param(description = "GSLB service type")
+    private String serviceType;
+
     @SerializedName(ApiConstants.REGION_ID)
     @Param(description = "Region Id in which global load balancer is created")
     private Integer regionId;
@@ -96,6 +100,10 @@ public class GlobalLoadBalancerResponse extends BaseResponse implements Controll
         this.stickyMethod = stickyMethod;
     }
 
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
     public void setServiceDomainName(String domainName) {
         this.gslbDomainName = domainName;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/85b1519f/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 651a8be..50c137a 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -768,11 +768,13 @@ public class ApiResponseHelper implements ResponseGenerator {
         GlobalLoadBalancerResponse response = new GlobalLoadBalancerResponse();
         response.setAlgorithm(globalLoadBalancerRule.getAlgorithm());
         response.setStickyMethod(globalLoadBalancerRule.getPersistence());
+        response.setServiceType(globalLoadBalancerRule.getServiceType());
         response.setServiceDomainName(globalLoadBalancerRule.getGslbDomain());
         response.setName(globalLoadBalancerRule.getName());
         response.setDescription(globalLoadBalancerRule.getDescription());
         response.setRegionIdId(globalLoadBalancerRule.getRegion());
         response.setId(globalLoadBalancerRule.getUuid());
+        response.setObjectName("globalloadbalancer");
         return response;
     }
 


[44/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Adding issues fixed in 4.1.0


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b0bbffb7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b0bbffb7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b0bbffb7

Branch: refs/heads/cisco-vnmc-api-integration
Commit: b0bbffb79ebb169355fbce499397a2a1c4f83af2
Parents: bc3e184
Author: Joe Brockmeier <jz...@zonker.net>
Authored: Sun Apr 14 23:08:08 2013 -0500
Committer: Joe Brockmeier <jz...@zonker.net>
Committed: Sun Apr 14 23:08:08 2013 -0500

----------------------------------------------------------------------
 docs/en-US/Release_Notes.xml | 4176 +++++++++++++++++++++++++++++++++++--
 1 files changed, 3954 insertions(+), 222 deletions(-)
----------------------------------------------------------------------



[45/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Scale UP VM form functionality for choosing a service offering


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/48c1c008
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/48c1c008
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/48c1c008

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 48c1c008913b0db7e4fde96dadd119a8ad263a6e
Parents: b0bbffb
Author: Pranav Saxena <pr...@citrix.com>
Authored: Mon Apr 15 11:01:59 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Mon Apr 15 11:01:59 2013 +0530

----------------------------------------------------------------------
 ui/scripts/instances.js |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48c1c008/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 1c4c38c..21b58ae 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1082,9 +1082,36 @@
 
           scaleUp:{
             label:'scaleUp VM',
+            createForm:{
+              title:'Scale UP Virtual Machine',
+              label:'Scale UP Virtual Machine',
+              fields:{
+                  serviceOffering: {
+                  label: 'label.compute.offering',
+                  select: function(args) {
+                    $.ajax({
+                      url: createURL("listServiceOfferings&VirtualMachineId=" + args.context.instances[0].id),
+                      dataType: "json",
+                      async: true,
+                      success: function(json) {
+                        var serviceofferings = json.listserviceofferingsresponse.serviceoffering;
+                        var items = [];
+                        $(serviceofferings).each(function() {
+                          items.push({id: this.id, description: this.displaytext});
+                        });
+                        args.response.success({data: items});
+                      }
+                    });
+                  }
+                }
+
+
+               }
+            },
+
             action: function(args) {
               $.ajax({
-                url: createURL("scaleVirtualMachine&id=" + args.context.instances[0].id + "&serviceofferingid=" + args.context.instances[0].serviceofferingid),
+                url: createURL("scaleVirtualMachine&id=" + args.context.instances[0].id + "&serviceofferingid=" + args.data.serviceOffering),
                 dataType: "json",
                 async: true,
                 success: function(json) {


[17/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1534 Disable/Enable-unmanaged/manage cluster is setting CPU overcommit and memory overcommit ratio to 1 (defalut value).

Signed-off-by: Abhinandan Prateek <ap...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/580731cc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/580731cc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/580731cc

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 580731ccc0b03b54dde544ead30ae44eebc8f2f5
Parents: cbcb83b
Author: Bharat Kumar <bh...@citrix.com>
Authored: Tue Apr 9 10:27:05 2013 +0530
Committer: Abhinandan Prateek <ap...@apache.org>
Committed: Fri Apr 12 15:30:02 2013 +0530

----------------------------------------------------------------------
 .../command/admin/cluster/UpdateClusterCmd.java    |   15 +++++++---
 .../com/cloud/resource/ResourceManagerImpl.java    |   22 +++-----------
 2 files changed, 16 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/580731cc/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java
index 95728dd..c513058 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java
@@ -111,14 +111,14 @@ public class UpdateClusterCmd extends BaseCmd {
         if(cpuovercommitratio != null){
             return Float.parseFloat(cpuovercommitratio);
         }
-        return 1.0f;
+        return null;
     }
 
     public Float getMemoryOvercommitRaito (){
         if (memoryovercommitratio != null){
             return Float.parseFloat(memoryovercommitratio);
         }
-        return 1.0f;
+        return null;
     }
 
     @Override
@@ -127,9 +127,16 @@ public class UpdateClusterCmd extends BaseCmd {
         if (cluster == null) {
             throw new InvalidParameterValueException("Unable to find the cluster by id=" + getId());
         }
+        if (getMemoryOvercommitRaito() !=null){
+            if ((getMemoryOvercommitRaito().compareTo(1f) < 0)) {
+                throw new InvalidParameterValueException("Memory overcommit ratio  should be greater than or equal to one");
+            }
+        }
 
-        if ((getMemoryOvercommitRaito().compareTo(1f) < 0) | (getCpuOvercommitRatio().compareTo(1f) < 0)) {
-            throw new InvalidParameterValueException("Cpu and ram overcommit ratios  should be greater than one");
+        if (getCpuOvercommitRatio() !=null){
+            if (getCpuOvercommitRatio().compareTo(1f) < 0) {
+                throw new InvalidParameterValueException("Cpu overcommit ratio  should be greater than or equal to one");
+            }
         }
 
         Cluster result = _resourceService.updateCluster(cluster, getClusterType(), getHypervisor(), getAllocationState(), getManagedstate(), getMemoryOvercommitRaito(), getCpuOvercommitRatio());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/580731cc/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java
index 82bca51..c9c3f9c 100755
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -1181,29 +1181,17 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
             }
         }
 
-       ClusterDetailsVO memory_detail = _clusterDetailsDao.findDetail(cluster.getId(),"memoryOvercommitRatio");
-       if( memory_detail == null){
-           if (memoryovercommitratio.compareTo(1f) > 0){
-               memory_detail = new ClusterDetailsVO(cluster.getId(),"memoryOvercommitRatio",Float.toString(memoryovercommitratio));
-               _clusterDetailsDao.persist(memory_detail);
-           }
-       }
-       else {
+       if (memoryovercommitratio != null) {
+           ClusterDetailsVO memory_detail = _clusterDetailsDao.findDetail(cluster.getId(),"memoryOvercommitRatio");
            memory_detail.setValue(Float.toString(memoryovercommitratio));
            _clusterDetailsDao.update(memory_detail.getId(),memory_detail);
        }
 
-        ClusterDetailsVO cpu_detail = _clusterDetailsDao.findDetail(cluster.getId(),"cpuOvercommitRatio");
-        if( cpu_detail == null){
-            if (cpuovercommitratio.compareTo(1f) > 0){
-                cpu_detail = new ClusterDetailsVO(cluster.getId(),"cpuOvercommitRatio",Float.toString(cpuovercommitratio));
-                _clusterDetailsDao.persist(cpu_detail);
-            }
-        }
-        else {
+       if (cpuovercommitratio != null) {
+            ClusterDetailsVO cpu_detail = _clusterDetailsDao.findDetail(cluster.getId(),"cpuOvercommitRatio");
             cpu_detail.setValue(Float.toString(cpuovercommitratio));
             _clusterDetailsDao.update(cpu_detail.getId(),cpu_detail);
-        }
+       }
 
 
         if (doUpdate) {


[42/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-312: enable L4-L7 network services in the shared network in
the advanced zone

Squashed commit of the following:

commit 3021cb917b2446f6a04f6cbb01bc56ebc5484bff
Merge: 77c6991 886fe01
Author: Murali Reddy <mu...@citrix.com>
Date:   Sun Apr 14 17:22:05 2013 +0530

    Merge branch 'master' into sharednetworkservices

commit 77c69918be5f15656a95fc325da9f0c99a08e782
Author: Murali Reddy <mu...@citrix.com>
Date:   Tue Apr 9 17:16:57 2013 +0530

    Trying to fit both isolated and shared network life cycle with single state
    machine may need addtional work. So set network state for shared network explicitly now.

commit 365ed73a0c10a5e445be34b6e6c5d99e1224a537
Author: Murali Reddy <mu...@citrix.com>
Date:   Tue Apr 2 17:14:11 2013 +0530

    - associateIpAddress API to associate a public IP with shared network
    - shared network with services to go through the implement and shutwdon
      phases


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bc3e184b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bc3e184b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bc3e184b

Branch: refs/heads/cisco-vnmc-api-integration
Commit: bc3e184b7273da605177b0ac4ed7186f7fa36fbd
Parents: 886fe01
Author: Murali Reddy <mu...@citrix.com>
Authored: Sun Apr 14 17:50:15 2013 +0530
Committer: Murali Reddy <mu...@citrix.com>
Committed: Sun Apr 14 17:50:15 2013 +0530

----------------------------------------------------------------------
 api/src/com/cloud/network/NetworkService.java      |    2 +-
 .../command/user/address/AssociateIPAddrCmd.java   |   31 +--
 .../element/F5ExternalLoadBalancerElement.java     |   15 +-
 .../element/JuniperSRXExternalFirewallElement.java |   58 +---
 .../cloud/network/element/NetscalerElement.java    |    3 +-
 .../src/com/cloud/network/NetworkManagerImpl.java  |  272 +++++++--------
 .../src/com/cloud/network/NetworkServiceImpl.java  |  100 +++---
 .../com/cloud/network/MockNetworkManagerImpl.java  |   38 +--
 .../test/com/cloud/vpc/MockNetworkManagerImpl.java |   54 +--
 9 files changed, 242 insertions(+), 331 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/api/src/com/cloud/network/NetworkService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkService.java b/api/src/com/cloud/network/NetworkService.java
index ab6d7bf..066009b 100755
--- a/api/src/com/cloud/network/NetworkService.java
+++ b/api/src/com/cloud/network/NetworkService.java
@@ -46,7 +46,7 @@ public interface NetworkService {
 
     List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
 
-    IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) throws ResourceAllocationException,
+    IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException,
         InsufficientAddressCapacityException, ConcurrentOperationException;
 
     boolean releaseIpAddress(long ipAddressId) throws InsufficientAddressCapacityException;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
index 406f782..28fbae4 100644
--- a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
@@ -16,38 +16,21 @@
 // under the License.
 package org.apache.cloudstack.api.command.user.address;
 
-import java.util.List;
-
-import org.apache.cloudstack.api.APICommand;
-import org.apache.cloudstack.api.ApiConstants;
-import org.apache.cloudstack.api.ApiErrorCode;
-import org.apache.cloudstack.api.BaseAsyncCmd;
-import org.apache.cloudstack.api.BaseAsyncCreateCmd;
-import org.apache.cloudstack.api.Parameter;
-import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.DomainResponse;
-import org.apache.cloudstack.api.response.IPAddressResponse;
-import org.apache.cloudstack.api.response.NetworkResponse;
-import org.apache.cloudstack.api.response.ProjectResponse;
-import org.apache.cloudstack.api.response.VpcResponse;
-import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
-
 import com.cloud.async.AsyncJob;
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.event.EventTypes;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.exception.*;
 import com.cloud.network.IpAddress;
 import com.cloud.network.Network;
 import com.cloud.network.vpc.Vpc;
 import com.cloud.user.Account;
 import com.cloud.user.UserContext;
+import org.apache.cloudstack.api.*;
+import org.apache.cloudstack.api.response.*;
+import org.apache.log4j.Logger;
+
+import java.util.List;
 
 @APICommand(name = "associateIpAddress", description="Acquires and associates a public IP to an account.", responseObject=IPAddressResponse.class)
 public class AssociateIPAddrCmd extends BaseAsyncCreateCmd {
@@ -213,7 +196,7 @@ public class AssociateIPAddrCmd extends BaseAsyncCreateCmd {
     @Override
     public void create() throws ResourceAllocationException{
         try {
-            IpAddress ip =  _networkService.allocateIP(_accountService.getAccount(getEntityOwnerId()), false, getZoneId());
+            IpAddress ip =  _networkService.allocateIP(_accountService.getAccount(getEntityOwnerId()),  getZoneId(), getNetworkId());
 
             if (ip != null) {
                 this.setEntityId(ip.getId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
index 77f6b60..e384e3c 100644
--- a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
+++ b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
@@ -16,19 +16,6 @@
 // under the License.
 package com.cloud.network.element;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.response.ExternalLoadBalancerResponse;
-import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
-import org.apache.log4j.Logger;
-
 import com.cloud.agent.api.to.LoadBalancerTO;
 import com.cloud.api.ApiDBUtils;
 import com.cloud.api.commands.*;
@@ -101,7 +88,7 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan
     ConfigurationDao _configDao;
 
     private boolean canHandle(Network config) {
-        if (config.getGuestType() != Network.GuestType.Isolated || config.getTrafficType() != TrafficType.Guest) {
+        if ((config.getGuestType() != Network.GuestType.Isolated && config.getGuestType() != Network.GuestType.Shared) || config.getTrafficType() != TrafficType.Guest) {
             s_logger.trace("Not handling network with Type  " + config.getGuestType() + " and traffic type " + config.getTrafficType());
             return false;
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
index 64b0f5a..a429306 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
@@ -16,28 +16,8 @@
 // under the License.
 package com.cloud.network.element;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-
-import org.apache.cloudstack.api.response.ExternalFirewallResponse;
-import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
-import org.apache.log4j.Logger;
-
 import com.cloud.api.ApiDBUtils;
-import com.cloud.api.commands.AddExternalFirewallCmd;
-import com.cloud.api.commands.AddSrxFirewallCmd;
-import com.cloud.api.commands.ConfigureSrxFirewallCmd;
-import com.cloud.api.commands.DeleteExternalFirewallCmd;
-import com.cloud.api.commands.DeleteSrxFirewallCmd;
-import com.cloud.api.commands.ListExternalFirewallsCmd;
-import com.cloud.api.commands.ListSrxFirewallNetworksCmd;
-import com.cloud.api.commands.ListSrxFirewallsCmd;
+import com.cloud.api.commands.*;
 import com.cloud.api.response.SrxFirewallResponse;
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
@@ -47,35 +27,16 @@ import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.deploy.DeployDestination;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientNetworkCapacityException;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.exception.*;
 import com.cloud.host.Host;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.host.dao.HostDetailsDao;
-import com.cloud.network.ExternalFirewallDeviceManagerImpl;
-import com.cloud.network.Network;
+import com.cloud.network.*;
 import com.cloud.network.Network.Capability;
 import com.cloud.network.Network.Provider;
 import com.cloud.network.Network.Service;
-import com.cloud.network.NetworkModel;
-import com.cloud.network.PhysicalNetwork;
-import com.cloud.network.PhysicalNetworkServiceProvider;
-import com.cloud.network.PublicIpAddress;
-import com.cloud.network.RemoteAccessVpn;
-import com.cloud.network.VpnUser;
-import com.cloud.network.dao.ExternalFirewallDeviceDao;
-import com.cloud.network.dao.ExternalFirewallDeviceVO;
-import com.cloud.network.dao.NetworkDao;
-import com.cloud.network.dao.NetworkExternalFirewallDao;
-import com.cloud.network.dao.NetworkExternalFirewallVO;
-import com.cloud.network.dao.NetworkServiceMapDao;
-import com.cloud.network.dao.NetworkVO;
-import com.cloud.network.dao.PhysicalNetworkDao;
-import com.cloud.network.dao.PhysicalNetworkVO;
+import com.cloud.network.dao.*;
 import com.cloud.network.dao.ExternalFirewallDeviceVO.FirewallDeviceState;
 import com.cloud.network.resource.JuniperSrxResource;
 import com.cloud.network.rules.FirewallRule;
@@ -89,6 +50,13 @@ import com.cloud.vm.NicProfile;
 import com.cloud.vm.ReservationContext;
 import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
+import org.apache.cloudstack.api.response.ExternalFirewallResponse;
+import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice;
+import org.apache.log4j.Logger;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import java.util.*;
 
 @Local(value = {NetworkElement.class, FirewallServiceProvider.class, 
         PortForwardingServiceProvider.class, IpDeployer.class, 
@@ -129,7 +97,9 @@ PortForwardingServiceProvider, RemoteAccessVPNServiceProvider, IpDeployer, Junip
 
     private boolean canHandle(Network network, Service service) {
         DataCenter zone = _configMgr.getZone(network.getDataCenterId());
-        if ((zone.getNetworkType() == NetworkType.Advanced && network.getGuestType() != Network.GuestType.Isolated) || (zone.getNetworkType() == NetworkType.Basic && network.getGuestType() != Network.GuestType.Shared)) {
+        if ((zone.getNetworkType() == NetworkType.Advanced && !(network.getGuestType() == Network.GuestType.Isolated ||
+                network.getGuestType() == Network.GuestType.Shared )) ||
+                (zone.getNetworkType() == NetworkType.Basic && network.getGuestType() != Network.GuestType.Shared)) {
             s_logger.trace("Element " + getProvider().getName() + "is not handling network type = " + network.getGuestType());
             return false;
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
index 17bb7cc..2bbdb04 100644
--- a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
+++ b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
@@ -124,7 +124,8 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
 
     private boolean canHandle(Network config, Service service) {
         DataCenter zone = _dcDao.findById(config.getDataCenterId());
-        boolean handleInAdvanceZone = (zone.getNetworkType() == NetworkType.Advanced && config.getGuestType() == Network.GuestType.Isolated && config.getTrafficType() == TrafficType.Guest);
+        boolean handleInAdvanceZone = (zone.getNetworkType() == NetworkType.Advanced &&
+                (config.getGuestType() == Network.GuestType.Isolated || config.getGuestType() == Network.GuestType.Shared) && config.getTrafficType() == TrafficType.Guest);
         boolean handleInBasicZone = (zone.getNetworkType() == NetworkType.Basic && config.getGuestType() == Network.GuestType.Shared && config.getTrafficType() == TrafficType.Guest);
 
         if (!(handleInAdvanceZone || handleInBasicZone)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 5b60466..7332ef3 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -16,42 +16,9 @@
 // under the License.
 package com.cloud.network;
 
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-
-import org.apache.cloudstack.acl.ControlledEntity.ACLType;
-import org.apache.cloudstack.acl.SecurityChecker.AccessType;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.Listener;
-import com.cloud.agent.api.AgentControlAnswer;
-import com.cloud.agent.api.AgentControlCommand;
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.CheckNetworkAnswer;
-import com.cloud.agent.api.CheckNetworkCommand;
-import com.cloud.agent.api.Command;
-import com.cloud.agent.api.StartupCommand;
-import com.cloud.agent.api.StartupRoutingCommand;
+import com.cloud.agent.api.*;
 import com.cloud.agent.api.to.NicTO;
 import com.cloud.alert.AlertManager;
 import com.cloud.api.ApiDBUtils;
@@ -59,15 +26,9 @@ import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.configuration.Resource.ResourceType;
 import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.dc.AccountVlanMapVO;
-import com.cloud.dc.DataCenter;
+import com.cloud.dc.*;
 import com.cloud.dc.DataCenter.NetworkType;
-import com.cloud.dc.DataCenterVO;
-import com.cloud.dc.Pod;
-import com.cloud.dc.PodVlanMapVO;
-import com.cloud.dc.Vlan;
 import com.cloud.dc.Vlan.VlanType;
-import com.cloud.dc.VlanVO;
 import com.cloud.dc.dao.AccountVlanMapDao;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.PodVlanMapDao;
@@ -80,66 +41,25 @@ import com.cloud.domain.dao.DomainDao;
 import com.cloud.event.EventTypes;
 import com.cloud.event.UsageEventUtils;
 import com.cloud.event.dao.UsageEventDao;
-import com.cloud.exception.AccountLimitException;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.ConnectionException;
-import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.PermissionDeniedException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.exception.UnsupportedServiceException;
+import com.cloud.exception.*;
 import com.cloud.host.Host;
 import com.cloud.host.HostVO;
 import com.cloud.host.Status;
 import com.cloud.host.dao.HostDao;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.IpAddress.State;
-import com.cloud.network.Network.Capability;
-import com.cloud.network.Network.Event;
-import com.cloud.network.Network.GuestType;
-import com.cloud.network.Network.Provider;
-import com.cloud.network.Network.Service;
+import com.cloud.network.Network.*;
 import com.cloud.network.Networks.AddressFormat;
 import com.cloud.network.Networks.BroadcastDomainType;
 import com.cloud.network.Networks.IsolationType;
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.network.addr.PublicIp;
-import com.cloud.network.dao.FirewallRulesDao;
-import com.cloud.network.dao.IPAddressDao;
-import com.cloud.network.dao.IPAddressVO;
-import com.cloud.network.dao.LoadBalancerDao;
-import com.cloud.network.dao.NetworkDao;
-import com.cloud.network.dao.NetworkDomainDao;
-import com.cloud.network.dao.NetworkServiceMapDao;
-import com.cloud.network.dao.NetworkServiceMapVO;
-import com.cloud.network.dao.NetworkVO;
-import com.cloud.network.dao.PhysicalNetworkDao;
-import com.cloud.network.dao.PhysicalNetworkServiceProviderDao;
-import com.cloud.network.dao.PhysicalNetworkTrafficTypeDao;
-import com.cloud.network.dao.PhysicalNetworkTrafficTypeVO;
-import com.cloud.network.dao.PhysicalNetworkVO;
-import com.cloud.network.dao.UserIpv6AddressDao;
-import com.cloud.network.element.DhcpServiceProvider;
-import com.cloud.network.element.IpDeployer;
-import com.cloud.network.element.IpDeployingRequester;
-import com.cloud.network.element.LoadBalancingServiceProvider;
-import com.cloud.network.element.NetworkElement;
-import com.cloud.network.element.StaticNatServiceProvider;
-import com.cloud.network.element.UserDataServiceProvider;
+import com.cloud.network.dao.*;
+import com.cloud.network.element.*;
 import com.cloud.network.guru.NetworkGuru;
 import com.cloud.network.lb.LoadBalancingRulesManager;
-import com.cloud.network.rules.FirewallManager;
-import com.cloud.network.rules.FirewallRule;
+import com.cloud.network.rules.*;
 import com.cloud.network.rules.FirewallRule.Purpose;
-import com.cloud.network.rules.FirewallRuleVO;
-import com.cloud.network.rules.PortForwardingRuleVO;
-import com.cloud.network.rules.RulesManager;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.rules.StaticNatRule;
-import com.cloud.network.rules.StaticNatRuleImpl;
 import com.cloud.network.rules.dao.PortForwardingRulesDao;
 import com.cloud.network.vpc.NetworkACLManager;
 import com.cloud.network.vpc.VpcManager;
@@ -152,49 +72,40 @@ import com.cloud.offerings.NetworkOfferingVO;
 import com.cloud.offerings.dao.NetworkOfferingDao;
 import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
 import com.cloud.org.Grouping;
-import com.cloud.user.Account;
-import com.cloud.user.AccountManager;
-import com.cloud.user.ResourceLimitService;
-import com.cloud.user.User;
-import com.cloud.user.UserContext;
-import com.cloud.user.UserVO;
+import com.cloud.user.*;
 import com.cloud.user.dao.AccountDao;
 import com.cloud.user.dao.UserDao;
 import com.cloud.utils.Journal;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.Pair;
 import com.cloud.utils.component.AdapterBase;
-import com.cloud.utils.component.ComponentContext;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.concurrency.NamedThreadFactory;
-import com.cloud.utils.db.DB;
-import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.*;
 import com.cloud.utils.db.JoinBuilder.JoinType;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.SearchCriteria.Op;
-import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.fsm.NoTransitionException;
 import com.cloud.utils.fsm.StateMachine2;
 import com.cloud.utils.net.Ip;
 import com.cloud.utils.net.NetUtils;
-import com.cloud.vm.Nic;
+import com.cloud.vm.*;
 import com.cloud.vm.Nic.ReservationStrategy;
-import com.cloud.vm.NicProfile;
-import com.cloud.vm.NicVO;
-import com.cloud.vm.ReservationContext;
-import com.cloud.vm.ReservationContextImpl;
-import com.cloud.vm.UserVmVO;
-import com.cloud.vm.VMInstanceVO;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachine.Type;
-import com.cloud.vm.VirtualMachineProfile;
-import com.cloud.vm.dao.NicDao;
-import com.cloud.vm.dao.NicSecondaryIpDao;
-import com.cloud.vm.dao.NicSecondaryIpVO;
-import com.cloud.vm.dao.UserVmDao;
-import com.cloud.vm.dao.VMInstanceDao;
+import com.cloud.vm.dao.*;
+import org.apache.cloudstack.acl.ControlledEntity.ACLType;
+import org.apache.cloudstack.acl.SecurityChecker.AccessType;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.net.URI;
+import java.util.*;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
 
 /**
  * NetworkManagerImpl implements NetworkManager.
@@ -663,7 +574,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
 
     @DB
     @Override
-    public IpAddress allocateIp(Account ipOwner, boolean isSystem, Account caller, long callerUserId, DataCenter zone) 
+    public IpAddress allocateIp(Account ipOwner, boolean isSystem, Account caller, long callerUserId, DataCenter zone)
             throws ConcurrentOperationException, ResourceAllocationException,
             InsufficientAddressCapacityException {
 
@@ -788,7 +699,22 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
 
         IPAddressVO ipToAssoc = _ipAddressDao.findById(ipId);
         if (ipToAssoc != null) {
-            _accountMgr.checkAccess(caller, null, true, ipToAssoc);
+            Network network = _networksDao.findById(networkId);
+            if (network == null) {
+                throw new InvalidParameterValueException("Invalid network id is given");
+            }
+
+            DataCenter zone = _configMgr.getZone(network.getDataCenterId());
+            if (network.getGuestType() == Network.GuestType.Shared && zone.getNetworkType() == NetworkType.Advanced) {
+                if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId())) {
+                    _accountMgr.checkAccess(UserContext.current().getCaller(), AccessType.UseNetwork, false, network);
+                } else {
+                    throw new InvalidParameterValueException("IP can be associated with guest network of 'shared' type only if " +
+                        "network services Source Nat, Static Nat, Port Forwarding, Load balancing, firewall are enabled in the network");
+                }
+            } else {
+                _accountMgr.checkAccess(caller, null, true, ipToAssoc);
+            }
             owner = _accountMgr.getAccount(ipToAssoc.getAllocatedToAccountId());
         } else {
             s_logger.debug("Unable to find ip address by id: " + ipId);
@@ -815,16 +741,21 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             throw new InvalidParameterValueException("Ip address can be associated to the network with trafficType " + TrafficType.Guest);
         }
 
-        // Check that network belongs to IP owner - skip this check for Basic zone as there is just one guest network,
-        // and it belongs to the system
-        if (zone.getNetworkType() != NetworkType.Basic && network.getAccountId() != owner.getId()) {
-            throw new InvalidParameterValueException("The owner of the network is not the same as owner of the IP");
+        // Check that network belongs to IP owner - skip this check
+        //     - if zone is basic zone as there is just one guest network,
+        //     - if shared network in Advanced zone
+        //     - and it belongs to the system
+        if (network.getAccountId() != owner.getId()) {
+            if (zone.getNetworkType() != NetworkType.Basic && !(zone.getNetworkType() == NetworkType.Advanced && network.getGuestType() == Network.GuestType.Shared)) {
+                throw new InvalidParameterValueException("The owner of the network is not the same as owner of the IP");
+            }
         }
 
-        // In Advance zone only allow to do IP assoc for Isolated networks with source nat service enabled
+        // In Advance zone only allow to do IP assoc
+        //      - for Isolated networks with source nat service enabled
+        //      - for shared networks with source nat service enabled
         if (zone.getNetworkType() == NetworkType.Advanced &&
-            !(network.getGuestType() == GuestType.Isolated && _networkModel.areServicesSupportedInNetwork(network.getId(),
-                Service.SourceNat))) {
+            !(_networkModel.areServicesSupportedInNetwork(network.getId(), Service.SourceNat))) {
             throw new InvalidParameterValueException("In zone of type " + NetworkType.Advanced +
                     " ip address can be associated only to the network of guest type " + GuestType.Isolated + " with the "
                     + Service.SourceNat.getName() + " enabled");
@@ -1496,12 +1427,21 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
         try {
             NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName());
             Network.State state = network.getState();
-            if (state == Network.State.Implemented || state == Network.State.Setup || state == Network.State.Implementing) {
+            if (state == Network.State.Implemented || state == Network.State.Implementing) {
                 s_logger.debug("Network id=" + networkId + " is already implemented");
                 implemented.set(guru, network);
                 return implemented;
             }
 
+            if (state == Network.State.Setup) {
+                DataCenterVO zone = _dcDao.findById(network.getDataCenterId());
+                if (!isSharedNetworkOfferingWithServices(network.getNetworkOfferingId()) || (zone.getNetworkType() == NetworkType.Basic)) {
+                    s_logger.debug("Network id=" + networkId + " is already implemented");
+                    implemented.set(guru, network);
+                    return implemented;
+                }
+            }
+
             if (s_logger.isDebugEnabled()) {
                 s_logger.debug("Asking " + guru.getName() + " to implement " + network);
             }
@@ -1509,7 +1449,11 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             NetworkOfferingVO offering = _networkOfferingDao.findById(network.getNetworkOfferingId());
 
             network.setReservationId(context.getReservationId());
-            stateTransitTo(network, Event.ImplementNetwork);
+            if (isSharedNetworkWithServices(network)) {
+                network.setState(Network.State.Implementing);
+            } else {
+                stateTransitTo(network, Event.ImplementNetwork);
+            }
 
             Network result = guru.implement(network, offering, dest, context);
             network.setCidr(result.getCidr());
@@ -1522,7 +1466,11 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             // implement network elements and re-apply all the network rules
             implementNetworkElementsAndResources(dest, context, network, offering);
 
-            stateTransitTo(network,Event.OperationSucceeded);
+            if (isSharedNetworkWithServices(network)) {
+                network.setState(Network.State.Implemented);
+            } else {
+                stateTransitTo(network,Event.OperationSucceeded);
+            }
 
             network.setRestartRequired(false);
             _networksDao.update(network.getId(), network);
@@ -1535,7 +1483,12 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             if (implemented.first() == null) {
                 s_logger.debug("Cleaning up because we're unable to implement the network " + network);
                 try {
-                    stateTransitTo(network,Event.OperationFailed);
+                    if (isSharedNetworkWithServices(network)) {
+                        network.setState(Network.State.Shutdown);
+                        _networksDao.update(networkId, network);
+                    } else {
+                        stateTransitTo(network,Event.OperationFailed);
+                    }
                 } catch (NoTransitionException e) {
                     s_logger.error(e.getMessage());
                 }
@@ -1560,14 +1513,17 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
                                                       NetworkVO network, NetworkOfferingVO offering)
             throws ConcurrentOperationException, InsufficientAddressCapacityException, ResourceUnavailableException, InsufficientCapacityException {
 
-        // If this is a 1) guest virtual network 2) network has sourceNat service 3) network offering does not support a
-        // Shared source NAT rule,
-        // associate a source NAT IP (if one isn't already associated with the network)
+        // Associate a source NAT IP (if one isn't already associated with the network) if this is a
+        //     1) 'Isolated' or 'Shared' guest virtual network in the advance zone
+        //     2) network has sourceNat service
+        //     3) network offering does not support a shared source NAT rule
 
         boolean sharedSourceNat = offering.getSharedSourceNat();
-        if (network.getGuestType() == Network.GuestType.Isolated
-               && _networkModel.areServicesSupportedInNetwork(network.getId(), Service.SourceNat)
-               && !sharedSourceNat) {
+        DataCenter zone = _dcDao.findById(network.getDataCenterId());
+
+        if (!sharedSourceNat && _networkModel.areServicesSupportedInNetwork(network.getId(), Service.SourceNat)
+                && (network.getGuestType() == Network.GuestType.Isolated ||
+                (network.getGuestType() == Network.GuestType.Shared && zone.getNetworkType() == NetworkType.Advanced))) {
 
             List<IPAddressVO> ips = null;
             if (network.getVpcId() != null) {
@@ -2031,10 +1987,12 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
                 throw new InvalidParameterValueException("Network with vlan " + vlanId + " already exists in zone " + zoneId);
             }
             } else {
-                //don't allow to create Shared network with Vlan that already exists in the zone for Isolated networks
-                if (_networksDao.countByZoneUriAndGuestType(zoneId, uri, GuestType.Isolated) > 0) {
-                    throw new InvalidParameterValueException("Isolated network with vlan " + vlanId + " already exists " +
-                            "in zone " + zoneId);
+                // don't allow to creating shared network with given Vlan ID, if there already exists a isolated network or
+                // shared network with same Vlan ID in the zone
+                if (_networksDao.countByZoneUriAndGuestType(zoneId, uri, GuestType.Isolated) > 0 ||
+                        _networksDao.countByZoneUriAndGuestType(zoneId, uri, GuestType.Shared) > 0) {
+                    throw new InvalidParameterValueException("There is a isolated/shared network with vlan id: " +
+                            vlanId + " already exists " + "in zone " + zoneId);
                 }
         }
         }
@@ -2166,6 +2124,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
     @DB
     public boolean shutdownNetwork(long networkId, ReservationContext context, boolean cleanupElements) {
         boolean result = false;
+        Transaction txn = Transaction.currentTxn();
 
         NetworkVO network = _networksDao.lockRow(networkId, true);
         if (network == null) {
@@ -2176,16 +2135,23 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             s_logger.debug("Network is not implemented: " + network);
             return false;
         }
-        try {
-            stateTransitTo(network, Event.DestroyNetwork);
-        } catch (NoTransitionException e) {
+
+        txn.start();
+        if (isSharedNetworkWithServices(network)) {
             network.setState(Network.State.Shutdown);
             _networksDao.update(network.getId(), network);
+        } else {
+            try {
+                stateTransitTo(network, Event.DestroyNetwork);
+            } catch (NoTransitionException e) {
+                network.setState(Network.State.Shutdown);
+                _networksDao.update(network.getId(), network);
+            }
         }
+        txn.commit();
 
         boolean success = shutdownNetworkElementsAndResources(context, cleanupElements, network);
 
-        Transaction txn = Transaction.currentTxn();
         txn.start();
         if (success) {
             if (s_logger.isDebugEnabled()) {
@@ -2196,11 +2162,16 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             guru.shutdown(profile, _networkOfferingDao.findById(network.getNetworkOfferingId()));
 
             applyProfileToNetwork(network, profile);
-            try {
-                stateTransitTo(network, Event.OperationSucceeded);
-            } catch (NoTransitionException e) {
-                network.setState(Network.State.Allocated);
-                network.setRestartRequired(false);
+            DataCenterVO zone = _dcDao.findById(network.getDataCenterId());
+            if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId()) && (zone.getNetworkType() == NetworkType.Advanced)) {
+                network.setState(Network.State.Setup);
+            } else {
+                try {
+                    stateTransitTo(network, Event.OperationSucceeded);
+                } catch (NoTransitionException e) {
+                    network.setState(Network.State.Allocated);
+                    network.setRestartRequired(false);
+                }
             }
             _networksDao.update(network.getId(), network);
             _networksDao.clearCheckForGc(networkId);
@@ -2816,6 +2787,17 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
         return (UserDataServiceProvider)_networkModel.getElementImplementingProvider(SSHKeyProvider);
     }
 
+    protected boolean isSharedNetworkWithServices(Network network) {
+        assert(network != null);
+        DataCenter zone = _configMgr.getZone(network.getDataCenterId());
+        if (network.getGuestType() == Network.GuestType.Shared &&
+                zone.getNetworkType() == NetworkType.Advanced &&
+                isSharedNetworkOfferingWithServices(network.getNetworkOfferingId())) {
+            return true;
+        }
+        return false;
+    }
+
     protected boolean isSharedNetworkOfferingWithServices(long networkOfferingId) {
         NetworkOfferingVO networkOffering = _networkOfferingDao.findById(networkOfferingId);
         if ( (networkOffering.getGuestType()  == Network.GuestType.Shared) && (

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/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 a8cbaa7..70d1d0d 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -16,44 +16,13 @@
 // under the License.
 package com.cloud.network;
 
-import java.net.InetAddress;
-import java.net.Inet6Address;
-import java.net.UnknownHostException;
-import java.security.InvalidParameterException;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-
-import org.apache.cloudstack.acl.ControlledEntity.ACLType;
-import org.apache.cloudstack.acl.SecurityChecker.AccessType;
-import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
-import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
-import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
-import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
-import org.bouncycastle.util.IPAddress;
-
 import com.cloud.configuration.Config;
 import com.cloud.configuration.ConfigurationManager;
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.DataCenter;
-import com.cloud.dc.Pod;
 import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.dc.DataCenterVO;
+import com.cloud.dc.Pod;
 import com.cloud.dc.Vlan.VlanType;
 import com.cloud.dc.VlanVO;
 import com.cloud.dc.dao.AccountVlanMapDao;
@@ -70,10 +39,8 @@ import com.cloud.event.UsageEventUtils;
 import com.cloud.event.dao.EventDao;
 import com.cloud.event.dao.UsageEventDao;
 import com.cloud.exception.*;
-import com.cloud.host.Host;
 import com.cloud.host.dao.HostDao;
 import com.cloud.network.IpAddress.State;
-import com.cloud.vm.Nic;
 import com.cloud.network.Network.Capability;
 import com.cloud.network.Network.GuestType;
 import com.cloud.network.Network.Provider;
@@ -89,10 +56,10 @@ import com.cloud.network.element.VirtualRouterElement;
 import com.cloud.network.element.VpcVirtualRouterElement;
 import com.cloud.network.guru.NetworkGuru;
 import com.cloud.network.rules.FirewallRule.Purpose;
-import com.cloud.network.rules.dao.PortForwardingRulesDao;
 import com.cloud.network.rules.FirewallRuleVO;
 import com.cloud.network.rules.PortForwardingRuleVO;
 import com.cloud.network.rules.RulesManager;
+import com.cloud.network.rules.dao.PortForwardingRulesDao;
 import com.cloud.network.vpc.PrivateIpVO;
 import com.cloud.network.vpc.Vpc;
 import com.cloud.network.vpc.VpcManager;
@@ -114,19 +81,33 @@ import com.cloud.utils.AnnotationHelper;
 import com.cloud.utils.Journal;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.Pair;
-import com.cloud.utils.component.ComponentContext;
-import com.cloud.utils.component.Manager;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.db.*;
 import com.cloud.utils.db.SearchCriteria.Op;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.net.NetUtils;
 import com.cloud.vm.*;
-import com.cloud.vm.dao.NicDao;
-import com.cloud.vm.dao.NicSecondaryIpDao;
-import com.cloud.vm.dao.NicSecondaryIpVO;
-import com.cloud.vm.dao.UserVmDao;
-import com.cloud.vm.dao.VMInstanceDao;
+import com.cloud.vm.dao.*;
+import org.apache.cloudstack.acl.ControlledEntity.ACLType;
+import org.apache.cloudstack.acl.SecurityChecker.AccessType;
+import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
+import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
+import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
+import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
+import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.security.InvalidParameterException;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
 import java.util.*;
 
 /**
@@ -433,7 +414,40 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
 
     @Override
     @ActionEvent(eventType = EventTypes.EVENT_NET_IP_ASSIGN, eventDescription = "allocating Ip", create = true)
-    public IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) 
+    public IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId)
+             throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException {
+
+        if (networkId != null) {
+            Network network = _networksDao.findById(networkId);
+            if (network == null) {
+                throw new InvalidParameterValueException("Invalid network id is given");
+            }
+            if (network.getGuestType() == Network.GuestType.Shared) {
+                DataCenter zone = _configMgr.getZone(zoneId);
+                if (zone == null) {
+                    throw new InvalidParameterValueException("Invalid zone Id is given");
+                }
+
+                // if shared network in the advanced zone, then check the caller against the network for 'AccessType.UseNetwork'
+                if (isSharedNetworkOfferingWithServices(network.getNetworkOfferingId()) && zone.getNetworkType() == NetworkType.Advanced) {
+                    Account caller = UserContext.current().getCaller();
+                    long callerUserId = UserContext.current().getCallerUserId();
+                    _accountMgr.checkAccess(caller, AccessType.UseNetwork, false, network);
+                    if (s_logger.isDebugEnabled()) {
+                        s_logger.debug("Associate IP address called by the user " + callerUserId + " account " + ipOwner.getId());
+                    }
+                    return _networkMgr.allocateIp(ipOwner, false, caller, callerUserId, zone);
+                } else {
+                    throw new InvalidParameterValueException("Associate IP address can only be called on the shared networks in the advanced zone" +
+                        " with Firewall/Source Nat/Static Nat/Port Forwarding/Load balancing services enabled");
+                }
+            }
+        }
+
+        return allocateIP(ipOwner, false,  zoneId);
+    }
+
+    public IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId)
             throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException {
         Account caller = UserContext.current().getCaller();
         // check permissions

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/server/test/com/cloud/network/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/network/MockNetworkManagerImpl.java b/server/test/com/cloud/network/MockNetworkManagerImpl.java
index 18eae08..9042f03 100755
--- a/server/test/com/cloud/network/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/network/MockNetworkManagerImpl.java
@@ -16,33 +16,13 @@
 // under the License.
 package com.cloud.network;
 
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.ejb.Local;
-import javax.naming.ConfigurationException;
-
-import org.apache.cloudstack.acl.ControlledEntity.ACLType;
-import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
-import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
-import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
-import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
-import org.springframework.stereotype.Component;
-import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
-
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.Pod;
 import com.cloud.dc.Vlan.VlanType;
 import com.cloud.deploy.DataCenterDeployment;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.exception.*;
 import com.cloud.network.Network.Provider;
 import com.cloud.network.Network.Service;
 import com.cloud.network.Networks.TrafficType;
@@ -62,7 +42,6 @@ import com.cloud.offerings.NetworkOfferingVO;
 import com.cloud.user.Account;
 import com.cloud.user.User;
 import com.cloud.utils.Pair;
-import com.cloud.utils.component.Manager;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.vm.Nic;
 import com.cloud.vm.NicProfile;
@@ -74,6 +53,19 @@ import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachine.Type;
 import com.cloud.vm.VirtualMachineProfile;
 import com.cloud.vm.VirtualMachineProfileImpl;
+import org.apache.cloudstack.acl.ControlledEntity.ACLType;
+import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
+import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
+import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
+import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
+import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.naming.ConfigurationException;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 @Component
 @Local(value = { NetworkManager.class, NetworkService.class })
@@ -824,7 +816,7 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
      * @see com.cloud.network.NetworkService#allocateIP(com.cloud.user.Account, boolean, long)
      */
     @Override
-    public IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) throws ResourceAllocationException,
+    public IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException,
     InsufficientAddressCapacityException, ConcurrentOperationException {
         // TODO Auto-generated method stub
         return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc3e184b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
index bd4fd67..3a585ce 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -16,49 +16,17 @@
 // under the License.
 package com.cloud.vpc;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-
-import org.apache.cloudstack.acl.ControlledEntity.ACLType;
-import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
-import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
-import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
-import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
-import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.Pod;
 import com.cloud.dc.Vlan.VlanType;
 import com.cloud.deploy.DataCenterDeployment;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientAddressCapacityException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.network.IpAddress;
-import com.cloud.network.Network;
+import com.cloud.exception.*;
+import com.cloud.network.*;
 import com.cloud.network.Network.Provider;
 import com.cloud.network.Network.Service;
-import com.cloud.network.NetworkManager;
-import com.cloud.network.NetworkProfile;
-import com.cloud.network.NetworkRuleApplier;
-import com.cloud.network.NetworkService;
 import com.cloud.network.Networks.TrafficType;
-import com.cloud.network.PhysicalNetwork;
-import com.cloud.network.PhysicalNetworkServiceProvider;
-import com.cloud.network.PhysicalNetworkTrafficType;
-import com.cloud.network.PublicIpAddress;
-import com.cloud.network.UserIpv6Address;
 import com.cloud.network.addr.PublicIp;
 import com.cloud.network.dao.IPAddressVO;
 import com.cloud.network.dao.NetworkServiceMapDao;
@@ -78,7 +46,6 @@ import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
 import com.cloud.user.Account;
 import com.cloud.user.User;
 import com.cloud.utils.Pair;
-import com.cloud.utils.component.Manager;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.vm.Nic;
 import com.cloud.vm.NicProfile;
@@ -90,6 +57,21 @@ import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachine.Type;
 import com.cloud.vm.VirtualMachineProfile;
 import com.cloud.vm.VirtualMachineProfileImpl;
+import org.apache.cloudstack.acl.ControlledEntity.ACLType;
+import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
+import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
+import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
+import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
+import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Component
 @Local(value = { NetworkManager.class, NetworkService.class })
@@ -188,7 +170,7 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
      * @see com.cloud.network.NetworkService#allocateIP(com.cloud.user.Account, long, java.lang.Long)
      */
     @Override
-    public IpAddress allocateIP(Account ipOwner, boolean isSystem, long networkId) throws ResourceAllocationException,
+    public IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException,
             InsufficientAddressCapacityException, ConcurrentOperationException {
         // TODO Auto-generated method stub
         return null;


[40/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixed typos

Signed-off-by: Milamber <mi...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20614598
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20614598
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20614598

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 20614598bfd91f09c0d4407265df0701896c26a1
Parents: ed2aa9f
Author: Pascal Borreli <pa...@borreli.com>
Authored: Sat Apr 13 00:09:15 2013 +0000
Committer: Milamber <mi...@apache.org>
Committed: Sat Apr 13 13:28:32 2013 +0000

----------------------------------------------------------------------
 api/src/com/cloud/vm/DiskProfile.java              |    2 +-
 client/tomcatconf/applicationContext.xml.in        |    6 +-
 .../subsystem/api/storage/CommandResult.java       |    2 +-
 .../api/storage/ObjectInDataStoreStateMachine.java |    2 +-
 .../image/motion/DefaultImageMotionStrategy.java   |    4 +-
 .../test/MockHypervisorHostEndPointRpcServer.java  |   72 +++++++
 .../test/MockHypervsiorHostEndPointRpcServer.java  |   72 -------
 .../integration-test/test/resource/component.xml   |    2 +-
 .../storage/HypervisorHostEndPointRpcServer.java   |  119 +++++++++++
 .../storage/HypervsiorHostEndPointRpcServer.java   |  119 -----------
 .../allocator/AbstractStoragePoolAllocator.java    |    2 +-
 .../allocator/ZoneWideStoragePoolAllocator.java    |    2 +-
 .../storage/datastore/DataObjectManagerImpl.java   |    6 +-
 .../driver/DefaultPrimaryDataStoreDriverImpl.java  |    4 +-
 .../DefaultPrimaryDatastoreProviderImpl.java       |    6 +-
 .../volume/TemplateInstallStrategyImpl.java        |    6 +-
 .../dns-notifier/resources/components-example.xml  |    2 +-
 .../CloudStackPrimaryDataStoreProviderImpl.java    |    6 +-
 .../cloud/network/ExteralIpAddressAllocator.java   |  165 ---------------
 .../cloud/network/ExternalIpAddressAllocator.java  |  165 +++++++++++++++
 server/src/com/cloud/network/IpAddrAllocator.java  |    2 +-
 .../com/cloud/template/TemplateManagerImpl.java    |    2 +-
 server/test/resources/network-mgr-component.xml    |    2 +-
 .../cloud/utils/component/ComponentContext.java    |    4 +-
 24 files changed, 387 insertions(+), 387 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/api/src/com/cloud/vm/DiskProfile.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/DiskProfile.java b/api/src/com/cloud/vm/DiskProfile.java
index e34a334..e3a3386 100644
--- a/api/src/com/cloud/vm/DiskProfile.java
+++ b/api/src/com/cloud/vm/DiskProfile.java
@@ -139,7 +139,7 @@ public class DiskProfile {
         this.hyperType = hyperType;
     }
 
-    public HypervisorType getHypersorType() {
+    public HypervisorType getHypervisorType() {
         return this.hyperType;
     }
     

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 0d13877..15cd6fe 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -454,11 +454,11 @@
     <property name="name" value="Balance"/>
   </bean>
 
-  <bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator">
+  <bean id="ExternalIpAddressAllocator" class="com.cloud.network.ExternalIpAddressAllocator">
     <property name="name" value="Basic"/>
   </bean>
 
-  <bean id="hyervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" />
+  <bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter" />
   <bean id="clusterAlertAdapter" class="com.cloud.alert.ClusterAlertAdapter" />
   <bean id="consoleProxyAlertAdapter" class="com.cloud.alert.ConsoleProxyAlertAdapter" />
   <bean id="secondaryStorageVmAlertAdapter" class="com.cloud.alert.SecondaryStorageVmAlertAdapter" />
@@ -733,7 +733,7 @@
   <bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" />
   <bean id="defaultPrimaryDataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.manager.DefaultPrimaryDataStoreProviderManagerImpl" />
   <bean id="eventUtils" class="com.cloud.event.EventUtils" />
-  <bean id="hypervsiorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervsiorHostEndPointRpcServer" />
+  <bean id="hypervisorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervisorHostEndPointRpcServer" />
   <bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
   <bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
   <bean id="imageDataFactoryImpl" class="org.apache.cloudstack.storage.image.ImageDataFactoryImpl" />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java
index 6b6139b..cc45914 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java
@@ -34,7 +34,7 @@ public class CommandResult {
         return !this.success;
     }
     
-    public void setSucess(boolean success) {
+    public void setSuccess(boolean success) {
         this.success = success;
     }
     

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java
index 726ce08..f619ef4 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java
@@ -26,7 +26,7 @@ public interface ObjectInDataStoreStateMachine extends StateObject<ObjectInDataS
         Creating2("This is only used with createOnlyRequested event"),
         Creating("The object is being creating on data store"),
         Created("The object is created"),
-        Ready("Template downloading is complished"),
+        Ready("Template downloading is accomplished"),
         Copying("The object is being coping"),
         Destroying("Template is destroying"),
         Destroyed("Template is destroyed"),

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java
index c49a521..a70fd8a 100644
--- a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java
+++ b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java
@@ -70,12 +70,12 @@ public class DefaultImageMotionStrategy implements ImageMotionStrategy {
         CommandResult result = new CommandResult();
        
         if (!answer.getResult()) {
-            result.setSucess(answer.getResult());
+            result.setSuccess(answer.getResult());
             result.setResult(answer.getDetails());
         } else {
             TemplateOnPrimaryDataStoreInfo templateStore = context.getTemplate();
             templateStore.setPath(answer.getPath());
-            result.setSucess(true);
+            result.setSuccess(true);
         }
 
         parentCall.complete(result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java
new file mode 100644
index 0000000..8fc161b
--- /dev/null
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java
@@ -0,0 +1,72 @@
+/*
+ * 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 org.apache.cloudstack.storage.test;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.storage.HostEndpointRpcServer;
+import org.apache.cloudstack.storage.HypervisorHostEndPoint;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.Command;
+
+public class MockHypervisorHostEndPointRpcServer implements HostEndpointRpcServer {
+    private ScheduledExecutorService executor;
+    public MockHypervisorHostEndPointRpcServer() {
+        executor = Executors.newScheduledThreadPool(10);
+    }
+    
+    protected class MockRpcCallBack implements Runnable {
+        private final Command cmd;
+        private final AsyncCompletionCallback<Answer> callback; 
+        public MockRpcCallBack(Command cmd, final AsyncCompletionCallback<Answer> callback) {
+            this.cmd = cmd;
+            this.callback = callback;
+        }
+        @Override
+        public void run() {
+            try {
+            Answer answer = new Answer(cmd, false, "unknown command");
+            /*if (cmd instanceof CopyTemplateToPrimaryStorageCmd) {
+                answer = new CopyTemplateToPrimaryStorageAnswer(cmd, UUID.randomUUID().toString());
+            } else if (cmd instanceof CreateVolumeFromBaseImageCommand) {
+                answer = new CreateVolumeAnswer(cmd, UUID.randomUUID().toString());
+            }*/
+            
+           callback.complete(answer);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        
+    }
+    
+    public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) {
+        executor.schedule(new MockRpcCallBack(command, callback), 10, TimeUnit.SECONDS);
+    }
+    
+    @Override
+    public Answer sendCommand(HypervisorHostEndPoint host, Command command) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java
deleted file mode 100644
index d698576..0000000
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervsiorHostEndPointRpcServer.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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 org.apache.cloudstack.storage.test;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
-import org.apache.cloudstack.storage.HostEndpointRpcServer;
-import org.apache.cloudstack.storage.HypervisorHostEndPoint;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-
-public class MockHypervsiorHostEndPointRpcServer implements HostEndpointRpcServer {
-    private ScheduledExecutorService executor;
-    public MockHypervsiorHostEndPointRpcServer() {
-        executor = Executors.newScheduledThreadPool(10);
-    }
-    
-    protected class MockRpcCallBack implements Runnable {
-        private final Command cmd;
-        private final AsyncCompletionCallback<Answer> callback; 
-        public MockRpcCallBack(Command cmd, final AsyncCompletionCallback<Answer> callback) {
-            this.cmd = cmd;
-            this.callback = callback;
-        }
-        @Override
-        public void run() {
-            try {
-            Answer answer = new Answer(cmd, false, "unknown command");
-            /*if (cmd instanceof CopyTemplateToPrimaryStorageCmd) {
-                answer = new CopyTemplateToPrimaryStorageAnswer(cmd, UUID.randomUUID().toString());
-            } else if (cmd instanceof CreateVolumeFromBaseImageCommand) {
-                answer = new CreateVolumeAnswer(cmd, UUID.randomUUID().toString());
-            }*/
-            
-           callback.complete(answer);
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        
-    }
-    
-    public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) {
-        executor.schedule(new MockRpcCallBack(command, callback), 10, TimeUnit.SECONDS);
-    }
-    
-    @Override
-    public Answer sendCommand(HypervisorHostEndPoint host, Command command) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/integration-test/test/resource/component.xml
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/resource/component.xml b/engine/storage/integration-test/test/resource/component.xml
index 0368ad4..5ba87e8 100644
--- a/engine/storage/integration-test/test/resource/component.xml
+++ b/engine/storage/integration-test/test/resource/component.xml
@@ -75,7 +75,7 @@
   </bean>
 
  
-  <bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator">
+  <bean id="ExternalIpAddressAllocator" class="com.cloud.network.ExternalIpAddressAllocator">
     <property name="name" value="Basic"/>
   </bean>
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java
new file mode 100644
index 0000000..bc21776
--- /dev/null
+++ b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java
@@ -0,0 +1,119 @@
+/*
+ * 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 org.apache.cloudstack.storage;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
+import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
+import org.apache.cloudstack.framework.async.AsyncRpcConext;
+import org.apache.cloudstack.framework.rpc.RpcCallbackListener;
+import org.apache.cloudstack.framework.rpc.RpcException;
+import org.apache.cloudstack.framework.rpc.RpcProvider;
+import org.apache.cloudstack.framework.rpc.RpcServiceDispatcher;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.Command;
+import com.cloud.utils.exception.CloudRuntimeException;
+
+@Component
+public class HypervisorHostEndPointRpcServer implements HostEndpointRpcServer {
+    private static final Logger s_logger = Logger.getLogger(HypervisorHostEndPointRpcServer.class);
+    
+    @Inject
+    private RpcProvider rpcProvider;
+    
+    public HypervisorHostEndPointRpcServer() {
+    }
+    
+    public HypervisorHostEndPointRpcServer(RpcProvider rpcProvider) {
+        rpcProvider = rpcProvider;
+        rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this));
+    }
+    
+    @PostConstruct
+    public void Initialize() {
+        rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this));
+    }
+    
+    @Override
+    public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) {
+        rpcProvider.newCall(host.getHostAddr()).addCallbackListener(new RpcCallbackListener<Answer>() {
+            @Override
+            public void onSuccess(Answer result) {
+                callback.complete(result);
+            }
+
+            @Override
+            public void onFailure(RpcException e) {
+                Answer answer = new Answer(command, false, e.toString());
+                callback.complete(answer);
+            }
+        }).apply();
+    }
+    
+    private class SendCommandContext<T> extends AsyncRpcConext<T> {
+        private T answer;
+       
+        public SendCommandContext(AsyncCompletionCallback<T> callback) {
+            super(callback);
+        }
+        
+        public void setAnswer(T answer) {
+            this.answer = answer;
+        }
+        
+        public T getAnswer() {
+            return this.answer;
+        }
+        
+    }
+
+    @Override
+    public Answer sendCommand(HypervisorHostEndPoint host, Command command) {
+        SendCommandContext<Answer> context = new SendCommandContext<Answer>(null);
+        AsyncCallbackDispatcher<HypervisorHostEndPointRpcServer, Answer> caller = AsyncCallbackDispatcher.create(this);
+        caller.setCallback(caller.getTarget().sendCommandCallback(null, null))
+        .setContext(context);
+        
+        this.sendCommandAsync(host, command, caller);
+        
+        synchronized (context) {
+            try {
+                context.wait();
+            } catch (InterruptedException e) {
+                s_logger.debug(e.toString());
+                throw new CloudRuntimeException("wait on context is interrupted", e);
+            }
+        }
+        
+        return context.getAnswer();
+    }
+    
+    protected Object sendCommandCallback(AsyncCallbackDispatcher<HypervisorHostEndPointRpcServer, Answer> callback, SendCommandContext<Answer> context) {
+        context.setAnswer((Answer)callback.getResult());
+        synchronized(context) {
+            context.notify();
+        }
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java b/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
deleted file mode 100644
index f441f39..0000000
--- a/engine/storage/src/org/apache/cloudstack/storage/HypervsiorHostEndPointRpcServer.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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 org.apache.cloudstack.storage;
-
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-
-import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher;
-import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
-import org.apache.cloudstack.framework.async.AsyncRpcConext;
-import org.apache.cloudstack.framework.rpc.RpcCallbackListener;
-import org.apache.cloudstack.framework.rpc.RpcException;
-import org.apache.cloudstack.framework.rpc.RpcProvider;
-import org.apache.cloudstack.framework.rpc.RpcServiceDispatcher;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-import com.cloud.utils.exception.CloudRuntimeException;
-
-@Component
-public class HypervsiorHostEndPointRpcServer implements HostEndpointRpcServer {
-    private static final Logger s_logger = Logger.getLogger(HypervsiorHostEndPointRpcServer.class);
-    
-    @Inject
-    private RpcProvider rpcProvider;
-    
-    public HypervsiorHostEndPointRpcServer() {
-    }
-    
-    public HypervsiorHostEndPointRpcServer(RpcProvider rpcProvider) {
-        rpcProvider = rpcProvider;
-        rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this));
-    }
-    
-    @PostConstruct
-    public void Initialize() {
-        rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this));
-    }
-    
-    @Override
-    public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback<Answer> callback) {
-        rpcProvider.newCall(host.getHostAddr()).addCallbackListener(new RpcCallbackListener<Answer>() {
-            @Override
-            public void onSuccess(Answer result) {
-                callback.complete(result);
-            }
-
-            @Override
-            public void onFailure(RpcException e) {
-                Answer answer = new Answer(command, false, e.toString());
-                callback.complete(answer);
-            }
-        }).apply();
-    }
-    
-    private class SendCommandContext<T> extends AsyncRpcConext<T> {
-        private T answer;
-       
-        public SendCommandContext(AsyncCompletionCallback<T> callback) {
-            super(callback);
-        }
-        
-        public void setAnswer(T answer) {
-            this.answer = answer;
-        }
-        
-        public T getAnswer() {
-            return this.answer;
-        }
-        
-    }
-
-    @Override
-    public Answer sendCommand(HypervisorHostEndPoint host, Command command) {
-        SendCommandContext<Answer> context = new SendCommandContext<Answer>(null);
-        AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer, Answer> caller = AsyncCallbackDispatcher.create(this);
-        caller.setCallback(caller.getTarget().sendCommandCallback(null, null))
-        .setContext(context);
-        
-        this.sendCommandAsync(host, command, caller);
-        
-        synchronized (context) {
-            try {
-                context.wait();
-            } catch (InterruptedException e) {
-                s_logger.debug(e.toString());
-                throw new CloudRuntimeException("wait on context is interrupted", e);
-            }
-        }
-        
-        return context.getAnswer();
-    }
-    
-    protected Object sendCommandCallback(AsyncCallbackDispatcher<HypervsiorHostEndPointRpcServer, Answer> callback, SendCommandContext<Answer> context) {
-        context.setAnswer((Answer)callback.getResult());
-        synchronized(context) {
-            context.notify();
-        }
-        return null;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
index 6334ca7..3a66b85 100755
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
@@ -176,7 +176,7 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
         
 		Long clusterId = pool.getClusterId();
 		ClusterVO cluster = _clusterDao.findById(clusterId);
-		if (!(cluster.getHypervisorType() == dskCh.getHypersorType())) {
+		if (!(cluster.getHypervisorType() == dskCh.getHypervisorType())) {
     		if (s_logger.isDebugEnabled()) {
                 s_logger.debug("StoragePool's Cluster does not have required hypervisorType, skipping this pool");
             }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
index 7c6c946..1d3cd81 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -57,7 +57,7 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
 			DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {
 	    s_logger.debug("ZoneWideStoragePoolAllocator to find storage pool");
 		List<StoragePool> suitablePools = new ArrayList<StoragePool>();
-		HypervisorType hypervisor = dskCh.getHypersorType();
+		HypervisorType hypervisor = dskCh.getHypervisorType();
 		if (hypervisor != null) {
 			if (hypervisor != HypervisorType.KVM) {
 				s_logger.debug("Only kvm supports zone wide storage");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
index 218f901..9d1afbe 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
@@ -109,7 +109,7 @@ public class DataObjectManagerImpl implements DataObjectManager {
                 if (obj == null) {
                     CreateCmdResult result = new CreateCmdResult(
                             null, null);
-                    result.setSucess(false);
+                    result.setSuccess(false);
                     result.setResult(e.toString());
                     callback.complete(result);
                     return;
@@ -124,7 +124,7 @@ public class DataObjectManagerImpl implements DataObjectManager {
                         data, store);
             } catch (Exception e) {
                 CreateCmdResult result = new CreateCmdResult(null, null);
-                result.setSucess(false);
+                result.setSuccess(false);
                 result.setResult(e.toString());
                 callback.complete(result);
                 return;
@@ -153,7 +153,7 @@ public class DataObjectManagerImpl implements DataObjectManager {
                 s_logger.debug("state transation failed", e1);
             }
             CreateCmdResult result = new CreateCmdResult(null, null);
-            result.setSucess(false);
+            result.setSuccess(false);
             result.setResult(e.toString());
             callback.complete(result);
             return;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java
index 6d0c2c6..e5ee742 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java
@@ -144,12 +144,12 @@ public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
         CreateVolumeAnswer answer = (CreateVolumeAnswer)callback.getResult();
         CommandResult result = new CommandResult();
         if (answer == null || answer.getDetails() != null) {
-            result.setSucess(false);
+            result.setSuccess(false);
             if (answer != null) {
                 result.setResult(answer.getDetails());
             }
         } else {
-            result.setSucess(true);
+            result.setSuccess(true);
             VolumeObject volume = context.getVolume();
             volume.setPath(answer.getVolumeUuid());
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
index 46fa738..8c674dc 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java
@@ -42,7 +42,7 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv
     @Inject
     PrimaryDataStoreProviderManager storeMgr;
 
-    protected DataStoreLifeCycle lifecyle;
+    protected DataStoreLifeCycle lifecycle;
     protected String uuid;
     protected long id;
     @Override
@@ -52,12 +52,12 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv
 
     @Override
     public DataStoreLifeCycle getDataStoreLifeCycle() {
-        return this.lifecyle;
+        return this.lifecycle;
     }
 
     @Override
     public boolean configure(Map<String, Object> params) {
-        lifecyle = ComponentContext.inject(DefaultPrimaryDataStoreLifeCycleImpl.class);
+        lifecycle = ComponentContext.inject(DefaultPrimaryDataStoreLifeCycleImpl.class);
         driver = ComponentContext.inject(DefaultPrimaryDataStoreDriverImpl.class);
         listener = ComponentContext.inject(DefaultHostListener.class);
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java
index 5f1735c..e099619 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java
@@ -107,7 +107,7 @@ public class TemplateInstallStrategyImpl implements TemplateInstallStrategy {
                 if (obj == null) {
                     CreateBaseImageResult result = new CreateBaseImageResult(
                             null);
-                    result.setSucess(false);
+                    result.setSuccess(false);
                     result.setResult(e.toString());
                     callback.complete(result);
                     return null;
@@ -122,7 +122,7 @@ public class TemplateInstallStrategyImpl implements TemplateInstallStrategy {
                         template, store);
             } catch (Exception e) {
                 CreateBaseImageResult result = new CreateBaseImageResult(null);
-                result.setSucess(false);
+                result.setSuccess(false);
                 result.setResult(e.toString());
                 callback.complete(result);
                 return null;
@@ -145,7 +145,7 @@ public class TemplateInstallStrategyImpl implements TemplateInstallStrategy {
                 s_logger.debug("state transation failed", e1);
             }
             CreateBaseImageResult result = new CreateBaseImageResult(null);
-            result.setSucess(false);
+            result.setSuccess(false);
             result.setResult(e.toString());
             callback.complete(result);
             return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/plugins/network-elements/dns-notifier/resources/components-example.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/dns-notifier/resources/components-example.xml b/plugins/network-elements/dns-notifier/resources/components-example.xml
index 6493e74..2e9c5be 100755
--- a/plugins/network-elements/dns-notifier/resources/components-example.xml
+++ b/plugins/network-elements/dns-notifier/resources/components-example.xml
@@ -86,7 +86,7 @@ under the License.
             <adapter name="Balance" class="com.cloud.storage.secondary.SecondaryStorageVmDefaultAllocator"/>
         </adapters>
         <adapters key="com.cloud.network.IpAddrAllocator">
-            <adapter name="Basic" class="com.cloud.network.ExteralIpAddressAllocator"/>
+            <adapter name="Basic" class="com.cloud.network.ExternalIpAddressAllocator"/>
         </adapters>
         <adapters key="com.cloud.server.auth.UserAuthenticator">
             <!-- <adapter name="SHA256SALT" class="com.cloud.server.auth.SHA256SaltedUserAuthenticator"/> -->

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java
index 4d46d99..826f07a 100644
--- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java
+++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/provider/CloudStackPrimaryDataStoreProviderImpl.java
@@ -37,7 +37,7 @@ public class CloudStackPrimaryDataStoreProviderImpl implements
     private final String providerName = "ancient primary data store provider";
     protected PrimaryDataStoreDriver driver;
     protected HypervisorHostListener listener;
-    protected DataStoreLifeCycle lifecyle;
+    protected DataStoreLifeCycle lifecycle;
 
     CloudStackPrimaryDataStoreProviderImpl() {
         
@@ -50,12 +50,12 @@ public class CloudStackPrimaryDataStoreProviderImpl implements
 
     @Override
     public DataStoreLifeCycle getDataStoreLifeCycle() {
-        return this.lifecyle;
+        return this.lifecycle;
     }
 
     @Override
     public boolean configure(Map<String, Object> params) {
-        lifecyle = ComponentContext.inject(CloudStackPrimaryDataStoreLifeCycleImpl.class);
+        lifecycle = ComponentContext.inject(CloudStackPrimaryDataStoreLifeCycleImpl.class);
         driver = ComponentContext.inject(CloudStackPrimaryDataStoreDriverImpl.class);
         listener = ComponentContext.inject(DefaultHostListener.class);
         return true;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/network/ExteralIpAddressAllocator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExteralIpAddressAllocator.java b/server/src/com/cloud/network/ExteralIpAddressAllocator.java
deleted file mode 100644
index 2b78712..0000000
--- a/server/src/com/cloud/network/ExteralIpAddressAllocator.java
+++ /dev/null
@@ -1,165 +0,0 @@
-// 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;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Map;
-
-import javax.ejb.Local;
-import javax.inject.Inject;
-import javax.naming.ConfigurationException;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.configuration.dao.ConfigurationDao;
-import com.cloud.dc.dao.VlanDao;
-import com.cloud.network.dao.IPAddressDao;
-import com.cloud.utils.component.AdapterBase;
-import com.cloud.utils.exception.CloudRuntimeException;
-
-@Local(value=IpAddrAllocator.class)
-public class ExteralIpAddressAllocator extends AdapterBase implements IpAddrAllocator{
-    private static final Logger s_logger = Logger.getLogger(ExteralIpAddressAllocator.class);
-    String _name;
-    @Inject ConfigurationDao _configDao = null;
-    @Inject IPAddressDao _ipAddressDao = null;
-    @Inject VlanDao _vlanDao;
-    private boolean _isExternalIpAllocatorEnabled = false;
-    private String _externalIpAllocatorUrl = null;
-
-
-    @Override
-    public IpAddr getPrivateIpAddress(String macAddr, long dcId, long podId) {
-        if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) {
-            return new IpAddr();
-        }
-        String urlString = this._externalIpAllocatorUrl + "?command=getIpAddr&mac=" + macAddr + "&dc=" + dcId + "&pod=" + podId;
-        s_logger.debug("getIP:" + urlString);
-
-        BufferedReader in = null;
-        try {
-            URL url = new URL(urlString);
-            URLConnection conn = url.openConnection();
-            conn.setReadTimeout(30000);
-
-            in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
-            String inputLine;
-            while ((inputLine = in.readLine()) != null) {
-                s_logger.debug(inputLine);
-                String[] tokens = inputLine.split(",");
-                if (tokens.length != 3) {
-                    s_logger.debug("the return value should be: mac,netmask,gateway");
-                    return new IpAddr();
-                }
-                return new IpAddr(tokens[0], tokens[1], tokens[2]);
-            }
-
-            return new IpAddr();
-        } catch (MalformedURLException e) {
-            throw new CloudRuntimeException("URL is malformed " + urlString, e);
-        } catch (IOException e) {
-            return new IpAddr();
-        } finally {
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (IOException e) {
-                }
-            }
-        }
-
-    }
-
-    @Override
-    public IpAddr getPublicIpAddress(String macAddr, long dcId, long podId) {
-        /*TODO: call API to get  ip address from external DHCP server*/
-        return getPrivateIpAddress(macAddr, dcId, podId);
-    }
-
-    @Override
-    public boolean releasePrivateIpAddress(String ip, long dcId, long podId) {
-        /*TODO: call API to release the ip address from external DHCP server*/
-        if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) {
-            return false;
-        }
-
-        String urlString = this._externalIpAllocatorUrl + "?command=releaseIpAddr&ip=" + ip + "&dc=" + dcId + "&pod=" + podId;
-
-        s_logger.debug("releaseIP:" + urlString);
-        BufferedReader in = null;
-        try {
-            URL url = new URL(urlString);
-            URLConnection conn = url.openConnection();
-            conn.setReadTimeout(30000);
-
-            in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
-
-            return true;
-        } catch (MalformedURLException e) {
-            throw new CloudRuntimeException("URL is malformed " + urlString, e);
-        } catch (IOException e) {
-            return false;
-        } finally {
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (IOException e) {
-                }
-            }
-        }
-    }
-
-    @Override
-    public boolean releasePublicIpAddress(String ip, long dcId, long podId) {
-        /*TODO: call API to release the ip address from external DHCP server*/
-        return releasePrivateIpAddress(ip, dcId, podId);
-    }
-
-    @Override
-    public boolean exteralIpAddressAllocatorEnabled() {
-        return _isExternalIpAllocatorEnabled;
-    }
-
-    @Override
-    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
-        _isExternalIpAllocatorEnabled = Boolean.parseBoolean(_configDao.getValue("direct.attach.network.externalIpAllocator.enabled"));
-        _externalIpAllocatorUrl = _configDao.getValue("direct.attach.network.externalIpAllocator.url");
-        _name = name;
-
-        return true;
-    }
-
-    @Override
-    public String getName() {
-        return _name;
-    }
-
-    @Override
-    public boolean start() {
-        return true;
-    }
-
-    @Override
-    public boolean stop() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/network/ExternalIpAddressAllocator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalIpAddressAllocator.java b/server/src/com/cloud/network/ExternalIpAddressAllocator.java
new file mode 100644
index 0000000..f24fa2d
--- /dev/null
+++ b/server/src/com/cloud/network/ExternalIpAddressAllocator.java
@@ -0,0 +1,165 @@
+// 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;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Map;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import org.apache.log4j.Logger;
+
+import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.dc.dao.VlanDao;
+import com.cloud.network.dao.IPAddressDao;
+import com.cloud.utils.component.AdapterBase;
+import com.cloud.utils.exception.CloudRuntimeException;
+
+@Local(value=IpAddrAllocator.class)
+public class ExternalIpAddressAllocator extends AdapterBase implements IpAddrAllocator{
+    private static final Logger s_logger = Logger.getLogger(ExternalIpAddressAllocator.class);
+    String _name;
+    @Inject ConfigurationDao _configDao = null;
+    @Inject IPAddressDao _ipAddressDao = null;
+    @Inject VlanDao _vlanDao;
+    private boolean _isExternalIpAllocatorEnabled = false;
+    private String _externalIpAllocatorUrl = null;
+
+
+    @Override
+    public IpAddr getPrivateIpAddress(String macAddr, long dcId, long podId) {
+        if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) {
+            return new IpAddr();
+        }
+        String urlString = this._externalIpAllocatorUrl + "?command=getIpAddr&mac=" + macAddr + "&dc=" + dcId + "&pod=" + podId;
+        s_logger.debug("getIP:" + urlString);
+
+        BufferedReader in = null;
+        try {
+            URL url = new URL(urlString);
+            URLConnection conn = url.openConnection();
+            conn.setReadTimeout(30000);
+
+            in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+            String inputLine;
+            while ((inputLine = in.readLine()) != null) {
+                s_logger.debug(inputLine);
+                String[] tokens = inputLine.split(",");
+                if (tokens.length != 3) {
+                    s_logger.debug("the return value should be: mac,netmask,gateway");
+                    return new IpAddr();
+                }
+                return new IpAddr(tokens[0], tokens[1], tokens[2]);
+            }
+
+            return new IpAddr();
+        } catch (MalformedURLException e) {
+            throw new CloudRuntimeException("URL is malformed " + urlString, e);
+        } catch (IOException e) {
+            return new IpAddr();
+        } finally {
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+
+    }
+
+    @Override
+    public IpAddr getPublicIpAddress(String macAddr, long dcId, long podId) {
+        /*TODO: call API to get  ip address from external DHCP server*/
+        return getPrivateIpAddress(macAddr, dcId, podId);
+    }
+
+    @Override
+    public boolean releasePrivateIpAddress(String ip, long dcId, long podId) {
+        /*TODO: call API to release the ip address from external DHCP server*/
+        if (_externalIpAllocatorUrl == null || this._externalIpAllocatorUrl.equalsIgnoreCase("")) {
+            return false;
+        }
+
+        String urlString = this._externalIpAllocatorUrl + "?command=releaseIpAddr&ip=" + ip + "&dc=" + dcId + "&pod=" + podId;
+
+        s_logger.debug("releaseIP:" + urlString);
+        BufferedReader in = null;
+        try {
+            URL url = new URL(urlString);
+            URLConnection conn = url.openConnection();
+            conn.setReadTimeout(30000);
+
+            in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+
+            return true;
+        } catch (MalformedURLException e) {
+            throw new CloudRuntimeException("URL is malformed " + urlString, e);
+        } catch (IOException e) {
+            return false;
+        } finally {
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+    }
+
+    @Override
+    public boolean releasePublicIpAddress(String ip, long dcId, long podId) {
+        /*TODO: call API to release the ip address from external DHCP server*/
+        return releasePrivateIpAddress(ip, dcId, podId);
+    }
+
+    @Override
+    public boolean externalIpAddressAllocatorEnabled() {
+        return _isExternalIpAllocatorEnabled;
+    }
+
+    @Override
+    public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
+        _isExternalIpAllocatorEnabled = Boolean.parseBoolean(_configDao.getValue("direct.attach.network.externalIpAllocator.enabled"));
+        _externalIpAllocatorUrl = _configDao.getValue("direct.attach.network.externalIpAllocator.url");
+        _name = name;
+
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        return _name;
+    }
+
+    @Override
+    public boolean start() {
+        return true;
+    }
+
+    @Override
+    public boolean stop() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/network/IpAddrAllocator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/IpAddrAllocator.java b/server/src/com/cloud/network/IpAddrAllocator.java
index d79125b..6cdf597 100644
--- a/server/src/com/cloud/network/IpAddrAllocator.java
+++ b/server/src/com/cloud/network/IpAddrAllocator.java
@@ -52,5 +52,5 @@ public interface IpAddrAllocator extends Adapter {
 	public IpAddr getPrivateIpAddress(String macAddr, long dcId, long podId);
 	public boolean releasePublicIpAddress(String ip, long dcId, long podId);
 	public boolean releasePrivateIpAddress(String ip, long dcId, long podId);
-	public boolean exteralIpAddressAllocatorEnabled();
+	public boolean externalIpAddressAllocatorEnabled();
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/src/com/cloud/template/TemplateManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java
index 2892e00..576440a 100755
--- a/server/src/com/cloud/template/TemplateManagerImpl.java
+++ b/server/src/com/cloud/template/TemplateManagerImpl.java
@@ -273,7 +273,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
     	if (type == HypervisorType.BareMetal) {
     		adapter = AdapterBase.getAdapterByName(_adapters, TemplateAdapterType.BareMetal.getName());
     	} else {
-    		// see HyervisorTemplateAdapter
+    		// see HypervisorTemplateAdapter
     		adapter =  AdapterBase.getAdapterByName(_adapters, TemplateAdapterType.Hypervisor.getName());
     	}
     	

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/server/test/resources/network-mgr-component.xml
----------------------------------------------------------------------
diff --git a/server/test/resources/network-mgr-component.xml b/server/test/resources/network-mgr-component.xml
index 42d3c2e..b55a68b 100644
--- a/server/test/resources/network-mgr-component.xml
+++ b/server/test/resources/network-mgr-component.xml
@@ -78,7 +78,7 @@ under the License.
             <!--<adapter name="NiciraNvpGuestNetworkGuru" class="com.cloud.network.guru.NiciraNvpGuestNetworkGuru"/> -->
         </adapters>
         <adapters key="com.cloud.network.IpAddrAllocator">
-            <adapter name="Basic" class="com.cloud.network.ExteralIpAddressAllocator"/>
+            <adapter name="Basic" class="com.cloud.network.ExternalIpAddressAllocator"/>
         </adapters>
         <adapters key="com.cloud.network.element.NetworkElement">
             <adapter name="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement"/>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20614598/utils/src/com/cloud/utils/component/ComponentContext.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/component/ComponentContext.java b/utils/src/com/cloud/utils/component/ComponentContext.java
index 796d4ec..5c5194c 100644
--- a/utils/src/com/cloud/utils/component/ComponentContext.java
+++ b/utils/src/com/cloud/utils/component/ComponentContext.java
@@ -71,14 +71,14 @@ public class ComponentContext implements ApplicationContextAware {
     		beanFactory.configureBean(bean, entry.getKey());
     	}
     	
-    	Map<String, ComponentLifecycle> lifecyleComponents = getApplicationContext().getBeansOfType(ComponentLifecycle.class);
+    	Map<String, ComponentLifecycle> lifecycleComponents = getApplicationContext().getBeansOfType(ComponentLifecycle.class);
  
     	Map[] classifiedComponents = new Map[ComponentLifecycle.MAX_RUN_LEVELS];
     	for(int i = 0; i < ComponentLifecycle.MAX_RUN_LEVELS; i++) {
     		classifiedComponents[i] = new HashMap<String, ComponentLifecycle>();
     	}
     	
-    	for(Map.Entry<String, ComponentLifecycle> entry : lifecyleComponents.entrySet()) {
+    	for(Map.Entry<String, ComponentLifecycle> entry : lifecycleComponents.entrySet()) {
     		classifiedComponents[entry.getValue().getRunLevel()].put(entry.getKey(), entry.getValue());
     	}
 


[05/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixes for issues found while testing after the merge


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eea0ed5c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eea0ed5c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eea0ed5c

Branch: refs/heads/cisco-vnmc-api-integration
Commit: eea0ed5c4e9b55b4ded12dc268c93f1cf3bb20a0
Parents: bbf7900
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Apr 11 12:17:31 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:23:46 2013 -0700

----------------------------------------------------------------------
 .../user/affinitygroup/DeleteAffinityGroupCmd.java |    2 +-
 .../affinity/HostAntiAffinityProcessor.java        |    1 +
 .../affinity/AffinityGroupServiceImpl.java         |   10 +++++++++-
 3 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eea0ed5c/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
index 4ceba29..ea4a010 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
@@ -52,7 +52,7 @@ public class DeleteAffinityGroupCmd extends BaseAsyncCmd {
     @Parameter(name = ApiConstants.ID, type = CommandType.UUID, description = "The ID of the affinity group. Mutually exclusive with name parameter", entityType = AffinityGroupResponse.class)
     private Long id;
 
-    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The ID of the affinity group. Mutually exclusive with id parameter")
+    @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the affinity group. Mutually exclusive with id parameter")
     private String name;
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eea0ed5c/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
index 4011c02..430cf92 100644
--- a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
+++ b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
@@ -62,6 +62,7 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements
             }
 
             List<Long> groupVMIds = _affinityGroupVMMapDao.listVmIdsByAffinityGroup(group.getId());
+            groupVMIds.remove(vm.getId());
 
             for (Long groupVMId : groupVMIds) {
                 VMInstanceVO groupVM = _vmInstanceDao.findById(groupVMId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eea0ed5c/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
index 5c7edc5..613c095 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -130,7 +130,9 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
             throw new InvalidParameterValueException(
                     "Either the affinity group Id or group name must be specified to delete the group");
         }
-
+        if (affinityGroupId == null) {
+            affinityGroupId = group.getId();
+        }
         // check permissions
         _accountMgr.checkAccess(caller, null, true, group);
 
@@ -302,11 +304,17 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
                     + "; make sure the virtual machine is stopped and not in an error state before updating.");
         }
 
+        Account caller = UserContext.current().getCaller();
+        Account owner = _accountMgr.getAccount(vmInstance.getAccountId());
+
         // check that the affinity groups exist
         for (Long affinityGroupId : affinityGroupIds) {
             AffinityGroupVO ag = _affinityGroupDao.findById(affinityGroupId);
             if (ag == null) {
                 throw new InvalidParameterValueException("Unable to find affinity group by id " + affinityGroupId);
+            } else {
+                // verify permissions
+                _accountMgr.checkAccess(caller, null, true, owner, ag);
             }
         }
         _affinityGroupVMMapDao.updateMap(vmId, affinityGroupIds);


[33/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
nose won't discover the test if it is executable.

Changing test_public_ip_range.py to 644

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/45f852be
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/45f852be
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/45f852be

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 45f852bec261c9a05e04c3424bf408859268fef3
Parents: 0b17b62
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Apr 10 17:15:47 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Fri Apr 12 23:27:43 2013 +0530

----------------------------------------------------------------------
 0 files changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/45f852be/test/integration/smoke/test_public_ip_range.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py
old mode 100755
new mode 100644


[08/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - set autocomplete off.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b1f67a08
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b1f67a08
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b1f67a08

Branch: refs/heads/cisco-vnmc-api-integration
Commit: b1f67a08816f683ed44456fd7c4124ba2a82f495
Parents: bfed74c
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Apr 11 13:37:30 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Apr 11 13:39:03 2013 -0700

----------------------------------------------------------------------
 ui/index.jsp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b1f67a08/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index 3b8f378..46f49f0 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -56,7 +56,7 @@ under the License.
             <!-- Password -->
             <div class="field password">
               <label for="password"><fmt:message key="label.password"/></label>
-              <input type="password" name="password" class="required" />
+              <input type="password" name="password" class="required" autocomplete="off" />
             </div>
             <!-- Domain -->
             <div class="field domain">


[49/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Merge branch 'master' into cisco-vnmc-api-integration

Conflicts:
	api/src/org/apache/cloudstack/api/ApiConstants.java
	client/tomcatconf/commands.properties.in
	setup/db/db/schema-410to420.sql
	tools/marvin/marvin/integration/lib/base.py


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0232048f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0232048f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0232048f

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 0232048f904b850700899d65ded089d8d7e7ab83
Parents: 735c4c8 97911e9
Author: Koushik Das <ko...@citrix.com>
Authored: Mon Apr 15 17:05:59 2013 +0530
Committer: Koushik Das <ko...@citrix.com>
Committed: Mon Apr 15 17:05:59 2013 +0530

----------------------------------------------------------------------
 DISCLAIMER                                         |    7 -
 agent/src/com/cloud/agent/AgentShell.java          |    3 +-
 .../consoleproxy/ConsoleProxyResource.java         |    4 +-
 api/src/com/cloud/agent/api/to/FirewallRuleTO.java |    6 +
 .../api/commands/CreatePrivateNetworkCmd.java      |  197 -
 .../cloud/api/commands/DestroyConsoleProxyCmd.java |   93 -
 api/src/com/cloud/async/AsyncJob.java              |    3 +-
 .../cloud/configuration/ConfigurationService.java  |    6 +
 .../cloud/consoleproxy/ConsoleProxyService.java    |   23 -
 api/src/com/cloud/event/EventTypes.java            |   15 +-
 .../cloud/exception/AffinityConflictException.java |   34 +
 api/src/com/cloud/network/NetworkService.java      |    2 +-
 api/src/com/cloud/offering/NetworkOffering.java    |    1 +
 api/src/com/cloud/server/ManagementService.java    |    4 +-
 api/src/com/cloud/vm/DiskProfile.java              |    2 +-
 api/src/com/cloud/vm/UserVmService.java            |  183 +-
 .../apache/cloudstack/affinity/AffinityGroup.java  |   31 +
 .../affinity/AffinityGroupProcessor.java           |   49 +
 .../cloudstack/affinity/AffinityGroupResponse.java |  155 +
 .../cloudstack/affinity/AffinityGroupService.java  |   79 +
 .../affinity/AffinityGroupTypeResponse.java        |   48 +
 .../cloudstack/affinity/AffinityProcessorBase.java |   44 +
 .../org/apache/cloudstack/api/ApiConstants.java    |    6 +-
 api/src/org/apache/cloudstack/api/BaseCmd.java     |   10 +-
 .../apache/cloudstack/api/ResponseGenerator.java   |   18 +-
 .../command/admin/cluster/UpdateClusterCmd.java    |   15 +-
 .../admin/config/ListDeploymentPlannersCmd.java    |   71 +
 .../admin/offering/CreateServiceOfferingCmd.java   |    7 +
 .../admin/vlan/DedicatePublicIpRangeCmd.java       |  108 +
 .../admin/vlan/ReleasePublicIpRangeCmd.java        |   77 +
 .../command/user/address/AssociateIPAddrCmd.java   |   31 +-
 .../user/affinitygroup/CreateAffinityGroupCmd.java |  167 +
 .../user/affinitygroup/DeleteAffinityGroupCmd.java |  154 +
 .../affinitygroup/ListAffinityGroupTypesCmd.java   |   67 +
 .../user/affinitygroup/ListAffinityGroupsCmd.java  |   90 +
 .../affinitygroup/UpdateVMAffinityGroupCmd.java    |  164 +
 .../ha/gslb/CreateGlobalLoadBalancerRuleCmd.java   |    3 +
 .../ha/gslb/ListGlobalLoadBalancerRuleCmd.java     |    2 +-
 .../api/command/user/vm/DeployVMCmd.java           |   41 +-
 .../user/vmsnapshot/CreateVMSnapshotCmd.java       |    2 +-
 .../user/vmsnapshot/DeleteVMSnapshotCmd.java       |    2 +-
 .../command/user/vmsnapshot/ListVMSnapshotCmd.java |    2 +-
 .../user/vmsnapshot/RevertToSnapshotCmd.java       |    2 +-
 .../api/response/DeploymentPlannersResponse.java   |   37 +
 .../api/response/FirewallRuleResponse.java         |   12 +
 .../api/response/GlobalLoadBalancerResponse.java   |    8 +
 .../cloudstack/api/response/UserVmResponse.java    |   14 +
 .../org/apache/cloudstack/query/QueryService.java  |    4 +
 .../com/cloud/bridge/service/EC2RestServlet.java   |    2 +-
 client/pom.xml                                     |   23 +-
 client/tomcatconf/applicationContext.xml.in        |   19 +-
 client/tomcatconf/commands.properties.in           |   14 +-
 client/tomcatconf/componentContext.xml.in          |   11 +-
 client/tomcatconf/nonossComponentContext.xml.in    |   15 +-
 client/tomcatconf/simulatorComponentContext.xml.in |   23 +-
 .../cloud/hypervisor/HypervisorCapabilitiesVO.java |   13 +-
 .../src/com/cloud/resource/ServerResourceBase.java |    2 +-
 .../resource/CifsSecondaryStorageResource.java     |  755 --
 .../resource/LocalSecondaryStorageResource.java    |  246 -
 .../resource/NfsSecondaryStorageResource.java      | 1842 -----
 .../storage/resource/SecondaryStorageResource.java |   28 -
 .../resource/SecondaryStorageResourceHandler.java  |   24 -
 .../cloud/storage/template/DownloadManager.java    |  103 -
 .../storage/template/DownloadManagerImpl.java      | 1049 ---
 .../com/cloud/storage/template/UploadManager.java  |   85 -
 .../cloud/storage/template/UploadManagerImpl.java  |  645 --
 core/src/com/cloud/vm/VmDetailConstants.java       |    1 +
 debian/cloudstack-agent.install                    |    6 +-
 debian/cloudstack-awsapi.install                   |   10 +-
 debian/cloudstack-common.install                   |    8 +-
 debian/cloudstack-management.install               |   10 +-
 debian/rules                                       |   36 +-
 deps/install-non-oss.sh                            |   13 -
 docs/en-US/Book_Info.xml                           |   39 +-
 docs/en-US/Installation_Guide.xml                  |    2 +
 docs/en-US/Release_Notes.xml                       | 6030 ++++++++++++---
 docs/en-US/add-clusters-vsphere.xml                |   11 +-
 docs/en-US/added-API-commands-4.2.xml              |   43 +
 docs/en-US/added-API-commands.xml                  |    2 +-
 docs/en-US/aws-ec2-introduction.xml                |    2 +-
 docs/en-US/building-documentation.xml              |    2 +-
 docs/en-US/building-marvin.xml                     |    2 +-
 docs/en-US/building-translation.xml                |    2 +-
 ...change-console-proxy-ssl-certificate-domain.xml |    2 +-
 docs/en-US/citrix-xenserver-installation.xml       |    2 +-
 docs/en-US/configure-package-repository.xml        |    2 +-
 docs/en-US/configure-vpn.xml                       |    2 +-
 docs/en-US/console-proxy.xml                       |    2 +-
 docs/en-US/global-config.xml                       |   79 +
 docs/en-US/hypervisor-host-install-firewall.xml    |    4 +-
 docs/en-US/hypervisor-host-install-libvirt.xml     |    2 +-
 ...hypervisor-host-install-network-openvswitch.xml |    2 +-
 docs/en-US/hypervisor-host-install-network.xml     |   12 +-
 docs/en-US/hypervisor-installation.xml             |    1 +
 docs/en-US/hypervisor-kvm-install-flow.xml         |    1 +
 docs/en-US/lxc-install.xml                         |  110 +
 docs/en-US/lxc-topology-req.xml                    |   24 +
 .../en-US/management-server-install-prepare-os.xml |    2 +-
 docs/en-US/management-server-install-systemvm.xml  |    4 +
 docs/en-US/management-server-lb.xml                |    2 +-
 docs/en-US/minimum-system-requirements.xml         |    3 +-
 docs/en-US/multiple-ip-nic.xml                     |   91 +
 docs/en-US/networks.xml                            |    1 +
 docs/en-US/prepare-system-vm-template.xml          |    4 +
 docs/en-US/topology-req.xml                        |    3 +-
 docs/en-US/translating-documentation.xml           |    2 +-
 docs/en-US/using-sshkeys.xml                       |    2 +-
 docs/en-US/vmware-cluster-config-dvswitch.xml      |   35 +-
 docs/en-US/vmware-install.xml                      |    4 +-
 docs/en-US/vmware-requirements.xml                 |    2 +-
 docs/en-US/whats-new.xml                           |    6 +-
 docs/en-US/writing-new-documentation.xml           |    4 +-
 docs/publican-cloudstack/defaults.cfg              |    4 +-
 .../subsystem/api/storage/CommandResult.java       |    2 +-
 .../api/storage/ObjectInDataStoreStateMachine.java |    2 +-
 .../cloud/entity/api/VMEntityManagerImpl.java      |   84 +-
 .../platform/orchestration/CloudOrchestrator.java  |   63 +-
 .../image/motion/DefaultImageMotionStrategy.java   |    4 +-
 .../cloudstack/storage/test/DirectAgentTest.java   |    4 +-
 .../test/MockHypervisorHostEndPointRpcServer.java  |   72 +
 .../test/MockHypervsiorHostEndPointRpcServer.java  |   72 -
 .../integration-test/test/resource/component.xml   |    2 +-
 .../storage/HypervisorHostEndPointRpcServer.java   |  119 +
 .../storage/HypervsiorHostEndPointRpcServer.java   |  119 -
 .../allocator/AbstractStoragePoolAllocator.java    |    2 +-
 .../allocator/ZoneWideStoragePoolAllocator.java    |    2 +-
 .../command/CreateVolumeFromBaseImageCommand.java  |    6 +-
 .../storage/datastore/DataObjectManagerImpl.java   |    6 +-
 .../provider/DataStoreProviderManagerImpl.java     |    4 +-
 .../storage/to/ImageOnPrimaryDataStoreTO.java      |   44 +
 .../storage/to/ImageOnPrimayDataStoreTO.java       |   44 -
 .../driver/DefaultPrimaryDataStoreDriverImpl.java  |    4 +-
 .../DefaultPrimaryDatastoreProviderImpl.java       |    6 +-
 .../volume/TemplateInstallStrategyImpl.java        |    6 +-
 .../debian/config/etc/init.d/cloud-early-config    |   56 +-
 .../host-anti-affinity/pom.xml                     |   33 +
 .../affinity/HostAntiAffinityProcessor.java        |   93 +
 .../cloudstack/syslog/AlertsSyslogAppender.java    |    4 +-
 plugins/hypervisors/simulator/pom.xml              |    5 +
 .../com/cloud/resource/AgentStorageResource.java   |    2 +-
 .../resource/SimulatorSecondaryDiscoverer.java     |    3 +-
 plugins/hypervisors/vmware/pom.xml                 |    5 +
 .../src/com/cloud/hypervisor/guru/VMwareGuru.java  |   24 +-
 .../hypervisor/vmware/resource/VmwareResource.java |   18 +
 .../resource/PremiumSecondaryStorageResource.java  |    2 +
 .../VmwareSecondaryStorageResourceHandler.java     |    1 +
 .../xen/resource/CitrixResourceBase.java           |    2 +-
 .../xen/resource/XenServerStorageResource.java     |    4 +-
 .../dns-notifier/resources/components-example.xml  |    2 +-
 .../element/F5ExternalLoadBalancerElement.java     |   15 +-
 .../element/JuniperSRXExternalFirewallElement.java |   60 +-
 .../cloud/network/resource/JuniperSrxResource.java |  322 +-
 plugins/network-elements/netscaler/pom.xml         |    6 +-
 .../cloud/network/element/NetscalerElement.java    |    3 +-
 plugins/pom.xml                                    |    1 +
 .../CloudStackPrimaryDataStoreProviderImpl.java    |    6 +-
 pom.xml                                            |    4 +
 scripts/network/juniper/application-add.xml        |    2 +-
 scripts/network/juniper/security-policy-add.xml    |    4 +-
 scripts/vm/hypervisor/kvm/patchviasocket.pl        |    2 +-
 scripts/vm/systemvm/injectkeys.sh                  |   26 +-
 server/pom.xml                                     |    2 -
 server/src/com/cloud/api/ApiDBUtils.java           |   28 +-
 server/src/com/cloud/api/ApiResponseHelper.java    |   72 +-
 .../src/com/cloud/api/query/QueryManagerImpl.java  |  177 +-
 .../com/cloud/api/query/ViewResponseHelper.java    |   20 +-
 .../cloud/api/query/dao/AffinityGroupJoinDao.java  |   37 +
 .../api/query/dao/AffinityGroupJoinDaoImpl.java    |  142 +
 .../com/cloud/api/query/dao/UserVmJoinDaoImpl.java |   27 +
 .../cloud/api/query/vo/AffinityGroupJoinVO.java    |  248 +
 .../src/com/cloud/api/query/vo/UserVmJoinVO.java   |   37 +
 server/src/com/cloud/configuration/Config.java     |    5 +-
 .../cloud/configuration/ConfigurationManager.java  |    8 +-
 .../configuration/ConfigurationManagerImpl.java    |  179 +-
 .../AgentBasedConsoleProxyManager.java             |  184 +-
 .../src/com/cloud/consoleproxy/AgentHookBase.java  |  266 +
 .../cloud/consoleproxy/ConsoleProxyManager.java    |   17 +-
 .../consoleproxy/ConsoleProxyManagerImpl.java      |  380 +-
 .../cloud/consoleproxy/ConsoleProxyService.java    |   25 +
 .../consoleproxy/StaticConsoleProxyManager.java    |   84 +-
 .../cloud/deploy/DeploymentPlanningManager.java    |   45 +
 .../deploy/DeploymentPlanningManagerImpl.java      |   96 +
 server/src/com/cloud/deploy/FirstFitPlanner.java   |   95 +-
 server/src/com/cloud/domain/dao/DomainDaoImpl.java |   11 +-
 .../hypervisor/dao/HypervisorCapabilitiesDao.java  |    2 +
 .../dao/HypervisorCapabilitiesDaoImpl.java         |    7 +
 .../cloud/network/ExteralIpAddressAllocator.java   |  165 -
 .../network/ExternalFirewallDeviceManagerImpl.java |   12 +-
 .../cloud/network/ExternalIpAddressAllocator.java  |  165 +
 server/src/com/cloud/network/IpAddrAllocator.java  |    2 +-
 .../src/com/cloud/network/NetworkManagerImpl.java  |  333 +-
 server/src/com/cloud/network/NetworkModelImpl.java |   26 +-
 .../src/com/cloud/network/NetworkServiceImpl.java  |  109 +-
 .../src/com/cloud/network/vpc/VpcManagerImpl.java  |    7 +-
 .../com/cloud/resource/ResourceManagerImpl.java    |   22 +-
 .../PremiumSecondaryStorageManagerImpl.java        |    6 +-
 .../com/cloud/server/ConfigurationServerImpl.java  |   22 +-
 .../src/com/cloud/server/ManagementServerImpl.java |  124 +-
 .../src/com/cloud/service/ServiceOfferingVO.java   |   81 +-
 .../storage/download/DownloadMonitorImpl.java      |   28 +-
 .../secondary/SecondaryStorageDiscoverer.java      |  322 -
 .../secondary/SecondaryStorageManagerImpl.java     |   10 +-
 .../com/cloud/template/TemplateManagerImpl.java    |    2 +-
 .../src/com/cloud/upgrade/dao/Upgrade410to420.java |   60 +
 server/src/com/cloud/user/AccountManagerImpl.java  |   22 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java     |   90 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |  132 +-
 .../cloud/vm/snapshot/VMSnapshotManagerImpl.java   |   13 +-
 .../affinity/AffinityGroupServiceImpl.java         |  346 +
 .../cloudstack/affinity/AffinityGroupVMMapVO.java  |   66 +
 .../cloudstack/affinity/AffinityGroupVO.java       |  114 +
 .../cloudstack/affinity/dao/AffinityGroupDao.java  |   30 +
 .../affinity/dao/AffinityGroupDaoImpl.java         |  102 +
 .../affinity/dao/AffinityGroupVMMapDao.java        |   47 +
 .../affinity/dao/AffinityGroupVMMapDaoImpl.java    |  167 +
 .../configuration/ConfigurationManagerTest.java    |  413 +
 .../com/cloud/network/MockNetworkManagerImpl.java  |   38 +-
 .../test/com/cloud/vm/MockUserVmManagerImpl.java   |   16 +-
 .../cloud/vm/snapshot/VMSnapshotManagerTest.java   |   20 +-
 .../cloud/vpc/MockConfigurationManagerImpl.java    |   25 +-
 .../test/com/cloud/vpc/MockNetworkManagerImpl.java |   54 +-
 .../affinity/AffinityApiTestConfiguration.java     |  344 +
 .../cloudstack/affinity/AffinityApiUnitTest.java   |  187 +
 .../networkoffering/ChildTestConfiguration.java    |    7 +-
 .../networkoffering/CreateNetworkOfferingTest.java |    1 -
 server/test/resources/affinityContext.xml          |   47 +
 server/test/resources/network-mgr-component.xml    |    2 +-
 .../console-proxy/server/conf/agent.properties     |   17 -
 .../server/conf/environment.properties             |    2 +
 services/console-proxy/server/conf/log4j-cloud.xml |    2 +-
 services/console-proxy/server/pom.xml              |   41 +
 services/console-proxy/server/scripts/_run.sh      |    3 +-
 .../console-proxy/server/scripts/consoleproxy.sh   |   33 +
 .../console-proxy/server/scripts/secstorage.sh     |   33 +
 .../src/com/cloud/consoleproxy/ConsoleProxy.java   |   16 +-
 services/pom.xml                                   |    1 +
 services/secondary-storage/conf/agent.properties   |    2 +
 .../secondary-storage/conf/environment.properties  |    2 +
 services/secondary-storage/conf/log4j-cloud.xml    |  102 +
 services/secondary-storage/pom.xml                 |  103 +
 services/secondary-storage/scripts/_run.sh         |   64 +
 services/secondary-storage/scripts/config_auth.sh  |   69 +
 services/secondary-storage/scripts/config_ssl.sh   |  174 +
 services/secondary-storage/scripts/ipfirewall.sh   |   50 +
 services/secondary-storage/scripts/run-proxy.sh    |   48 +
 services/secondary-storage/scripts/run.bat         |   18 +
 services/secondary-storage/scripts/run.sh          |   45 +
 services/secondary-storage/scripts/ssvm-check.sh   |  136 +
 .../resource/CifsSecondaryStorageResource.java     |  755 ++
 .../resource/LocalSecondaryStorageResource.java    |  246 +
 .../resource/NfsSecondaryStorageResource.java      | 1882 +++++
 .../resource/SecondaryStorageDiscoverer.java       |  320 +
 .../storage/resource/SecondaryStorageResource.java |   28 +
 .../resource/SecondaryStorageResourceHandler.java  |   24 +
 .../storage/template/DownloadManager.java          |  105 +
 .../storage/template/DownloadManagerImpl.java      | 1074 +++
 .../cloudstack/storage/template/UploadManager.java |   87 +
 .../storage/template/UploadManagerImpl.java        |  648 ++
 setup/db/db/schema-40to410.sql                     |   29 -
 setup/db/db/schema-410to420.sql                    |  284 +-
 setup/dev/basic.cfg                                |    6 +-
 setup/dev/local.cfg                                |   44 +
 test/integration/smoke/test_ScaleVm.py             |    4 +-
 test/integration/smoke/test_affinity_groups.py     |  194 +
 test/integration/smoke/test_public_ip_range.py     |  173 +
 test/integration/smoke/test_volumes.py             |   55 +-
 tools/apidoc/build-apidoc.sh                       |    2 +-
 tools/apidoc/gen_toc.py                            |    4 +-
 tools/apidoc/pom.xml                               |    3 +-
 tools/appliance/build.sh                           |    5 +-
 .../definitions/systemvmtemplate/postinstall.sh    |   20 +-
 .../definitions/systemvmtemplate/preseed.cfg       |   14 +-
 .../definitions/systemvmtemplate64/postinstall.sh  |   20 +-
 .../definitions/systemvmtemplate64/preseed.cfg     |   14 +-
 tools/build/build_docs.sh                          |   19 +-
 tools/devcloud/devcloud.cfg                        |    1 +
 tools/devcloud/pom.xml                             |   33 +
 tools/devcloud/quickcloud.cfg                      |  121 +
 tools/marvin/marvin/cloudstackConnection.py        |    6 +-
 tools/marvin/marvin/deployDataCenter.py            |   19 +-
 tools/marvin/marvin/integration/lib/base.py        |   61 +-
 tools/marvin/pom.xml                               |   18 +-
 ui/index.jsp                                       |    2 +-
 ui/scripts/cloudStack.js                           |    4 +-
 ui/scripts/dashboard.js                            |    2 +-
 ui/scripts/instances.js                            |   33 +-
 ui/scripts/network.js                              |  414 +-
 ui/scripts/regions.js                              |  169 +-
 ui/scripts/sharedFunctions.js                      |   25 +
 ui/scripts/system.js                               |   89 +-
 ui/scripts/ui-custom/healthCheck.js                |   10 +-
 ui/scripts/ui-custom/regions.js                    |    2 +-
 ui/scripts/ui/widgets/listView.js                  |    6 +-
 ui/scripts/ui/widgets/multiEdit.js                 |   16 +-
 utils/src/com/cloud/utils/SerialVersionUID.java    |    1 +
 .../cloud/utils/component/ComponentContext.java    |    4 +-
 utils/src/com/cloud/utils/nio/NioClient.java       |    3 +-
 utils/src/com/cloud/utils/nio/NioConnection.java   |    2 +-
 .../vmware/util/VmwareGuestOsMapper.java           |    5 +
 299 files changed, 20350 insertions(+), 8696 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --cc api/src/org/apache/cloudstack/api/ApiConstants.java
index f4bcf36,b08e992..37cb59f
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@@ -473,9 -473,10 +473,11 @@@ public class ApiConstants 
      public static final String HEALTHCHECK_HEALTHY_THRESHOLD = "healthythreshold";
      public static final String HEALTHCHECK_UNHEALTHY_THRESHOLD = "unhealthythreshold";
      public static final String HEALTHCHECK_PINGPATH = "pingpath";
+     public static final String AFFINITY_GROUP_IDS = "affinitygroupids";
+     public static final String AFFINITY_GROUP_NAMES = "affinitygroupnames";
+     public static final String DEPLOYMENT_PLANNER = "deploymentplanner";
 +    public static final String ASA_INSIDE_PORT_PROFILE = "insideportprofile";
  
- 
      public enum HostDetails {
          all, capacity, events, stats, min;
      }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/client/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --cc client/tomcatconf/commands.properties.in
index 39ed714,798d226..10fcfe3
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@@ -569,12 -571,9 +571,20 @@@ revertToSnapshot=1
  #### Baremetal commands
  addBaremetalHost=1
  
- #### Cisco Vnmc command
+ #### Affinity group commands
+ createAffinityGroup=15
+ deleteAffinityGroup=15
+ listAffinityGroups=15
+ updateVMAffinityGroup=15
+ listAffinityGroupTypes=15
++
++#### Cisco Vnmc commands
 +addCiscoVnmcResource=1
 +deleteCiscoVnmcResource=1
 +listCiscoVnmcResources=1
 +
- #### Cisco Asa1000v command
++#### Cisco Asa1000v commands
 +addCiscoAsa1000vResource=1
 +deleteCiscoAsa1000vResource=1
 +listCiscoAsa1000vResources=1
++

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/client/tomcatconf/nonossComponentContext.xml.in
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
----------------------------------------------------------------------
diff --cc plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
index dcee367,f6f0923..122ba3b
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
@@@ -137,23 -139,11 +141,22 @@@ public class VMwareGuru extends Hypervi
          if (!(vm.getVirtualMachine() instanceof DomainRouterVO || vm.getVirtualMachine() instanceof ConsoleProxyVO 
              || vm.getVirtualMachine() instanceof SecondaryStorageVmVO)){
              // user vm
-             if (diskDeviceType != null){
-                 details.remove(VmDetailConstants.ROOK_DISK_CONTROLLER);
+             if (diskDeviceType == null){
+ 		    details.put(VmDetailConstants.ROOK_DISK_CONTROLLER, _vmwareMgr.getRootDiskController());
              }
-             details.put(VmDetailConstants.ROOK_DISK_CONTROLLER, _vmwareMgr.getRootDiskController());
          }
 -        
 +
 +        List<NicProfile> nicProfiles = vm.getNics();
 +
 +        for(NicProfile nicProfile : nicProfiles) {
 +            if(nicProfile.getTrafficType() == TrafficType.Guest) {
 +                if(_networkMgr.isProviderSupportServiceInNetwork(nicProfile.getNetworkId(), Service.Firewall, Provider.CiscoVnmc)) {
 +                    details.put("ConfigureVServiceInNexus", Boolean.TRUE.toString());
 +                }
 +                break;
 +            }
 +        }
 +
          to.setDetails(details);
  
          if(vm.getVirtualMachine() instanceof DomainRouterVO) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/plugins/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --cc setup/db/db/schema-410to420.sql
index dae4763,92b2d9c..fb760bf
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@@ -406,35 -438,249 +438,283 @@@ INSERT INTO `cloud`.`vm_template` (id, 
  
  -- END: support for LXC
  
+ CREATE TABLE `cloud`.`vm_snapshots` (
+   `id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Primary Key',
+   `uuid` varchar(40) NOT NULL,
+   `name` varchar(255) NOT NULL,
+   `display_name` varchar(255) default NULL,
+   `description` varchar(255) default NULL,
+   `vm_id` bigint(20) unsigned NOT NULL,
+   `account_id` bigint(20) unsigned NOT NULL,
+   `domain_id` bigint(20) unsigned NOT NULL,
+   `vm_snapshot_type` varchar(32) default NULL,
+   `state` varchar(32) NOT NULL,
+   `parent` bigint unsigned default NULL,
+   `current` int(1) unsigned default NULL,
+   `update_count` bigint unsigned NOT NULL DEFAULT 0,
+   `updated` datetime default NULL,
+   `created` datetime default NULL,
+   `removed` datetime default NULL,
+   PRIMARY KEY  (`id`),
+   CONSTRAINT UNIQUE KEY `uc_vm_snapshots_uuid` (`uuid`),
+   INDEX `vm_snapshots_name` (`name`),
+   INDEX `vm_snapshots_vm_id` (`vm_id`),
+   INDEX `vm_snapshots_account_id` (`account_id`),
+   INDEX `vm_snapshots_display_name` (`display_name`),
+   INDEX `vm_snapshots_removed` (`removed`),
+   INDEX `vm_snapshots_parent` (`parent`),
+   CONSTRAINT `fk_vm_snapshots_vm_id__vm_instance_id` FOREIGN KEY `fk_vm_snapshots_vm_id__vm_instance_id` (`vm_id`) REFERENCES `vm_instance` (`id`),
+   CONSTRAINT `fk_vm_snapshots_account_id__account_id` FOREIGN KEY `fk_vm_snapshots_account_id__account_id` (`account_id`) REFERENCES `account` (`id`),
+   CONSTRAINT `fk_vm_snapshots_domain_id__domain_id` FOREIGN KEY `fk_vm_snapshots_domain_id__domain_id` (`domain_id`) REFERENCES `domain` (`id`)
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+ 
+ ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `vm_snapshot_enabled` tinyint(1) DEFAULT 0 NOT NULL COMMENT 'Whether VM snapshot is supported by hypervisor';
+ UPDATE `cloud`.`hypervisor_capabilities` SET `vm_snapshot_enabled`=1 WHERE `hypervisor_type` in ('VMware', 'XenServer');
+ 
+ 			
+ DROP VIEW IF EXISTS `cloud`.`user_vm_view`;
+ CREATE VIEW `cloud`.`user_vm_view` AS
+     select 
+         vm_instance.id id,
+         vm_instance.name name,
+         user_vm.display_name display_name,
+         user_vm.user_data user_data,
+         account.id account_id,
+         account.uuid account_uuid,
+         account.account_name account_name,
+         account.type account_type,
+         domain.id domain_id,
+         domain.uuid domain_uuid,
+         domain.name domain_name,
+         domain.path domain_path,
+         projects.id project_id,
+         projects.uuid project_uuid,
+         projects.name project_name,
+         instance_group.id instance_group_id,
+         instance_group.uuid instance_group_uuid,
+         instance_group.name instance_group_name,
+         vm_instance.uuid uuid,
+         vm_instance.last_host_id last_host_id,
+         vm_instance.vm_type type,
+         vm_instance.vnc_password vnc_password,
+         vm_instance.limit_cpu_use limit_cpu_use,
+         vm_instance.created created,
+         vm_instance.state state,
+         vm_instance.removed removed,
+         vm_instance.ha_enabled ha_enabled,
+         vm_instance.hypervisor_type hypervisor_type,
+         vm_instance.instance_name instance_name,
+         vm_instance.guest_os_id guest_os_id,
+         guest_os.uuid guest_os_uuid,
+         vm_instance.pod_id pod_id,
+         host_pod_ref.uuid pod_uuid,
+         vm_instance.private_ip_address private_ip_address,
+         vm_instance.private_mac_address private_mac_address,
+         vm_instance.vm_type vm_type,
+         data_center.id data_center_id,
+         data_center.uuid data_center_uuid,
+         data_center.name data_center_name,
+         data_center.is_security_group_enabled security_group_enabled,
+         host.id host_id,
+         host.uuid host_uuid,
+         host.name host_name,
+         vm_template.id template_id,
+         vm_template.uuid template_uuid,
+         vm_template.name template_name,
+         vm_template.display_text template_display_text,
+         vm_template.enable_password password_enabled,
+         iso.id iso_id,
+         iso.uuid iso_uuid,
+         iso.name iso_name,
+         iso.display_text iso_display_text,
+         service_offering.id service_offering_id,
+         disk_offering.uuid service_offering_uuid,
+         service_offering.cpu cpu,
+         service_offering.speed speed,
+         service_offering.ram_size ram_size,
+         disk_offering.name service_offering_name,
+         storage_pool.id pool_id,
+         storage_pool.uuid pool_uuid,
+         storage_pool.pool_type pool_type,
+         volumes.id volume_id,
+         volumes.uuid volume_uuid,
+         volumes.device_id volume_device_id,
+         volumes.volume_type volume_type,
+         security_group.id security_group_id,
+         security_group.uuid security_group_uuid,
+         security_group.name security_group_name,
+         security_group.description security_group_description,
+         nics.id nic_id,
+         nics.uuid nic_uuid,
+         nics.network_id network_id,
+         nics.ip4_address ip_address,
+         nics.ip6_address ip6_address,
+         nics.ip6_gateway ip6_gateway,
+         nics.ip6_cidr ip6_cidr,
+         nics.default_nic is_default_nic,
+         nics.gateway gateway,
+         nics.netmask netmask,
+         nics.mac_address mac_address,
+         nics.broadcast_uri broadcast_uri,
+         nics.isolation_uri isolation_uri,
+         vpc.id vpc_id,
+         vpc.uuid vpc_uuid,
+         networks.uuid network_uuid,
+         networks.name network_name,
+         networks.traffic_type traffic_type,
+         networks.guest_type guest_type,
+         user_ip_address.id public_ip_id,
+         user_ip_address.uuid public_ip_uuid,
+         user_ip_address.public_ip_address public_ip_address,
+         ssh_keypairs.keypair_name keypair_name,
+         resource_tags.id tag_id,
+         resource_tags.uuid tag_uuid,
+         resource_tags.key tag_key,
+         resource_tags.value tag_value,
+         resource_tags.domain_id tag_domain_id,
+         resource_tags.account_id tag_account_id,
+         resource_tags.resource_id tag_resource_id,
+         resource_tags.resource_uuid tag_resource_uuid,
+         resource_tags.resource_type tag_resource_type,
+         resource_tags.customer tag_customer,
+         async_job.id job_id,
+         async_job.uuid job_uuid,
+         async_job.job_status job_status,
+         async_job.account_id job_account_id,
+ 		affinity_group.id affinity_group_id,
+         affinity_group.uuid affinity_group_uuid,
+         affinity_group.name affinity_group_name,
+         affinity_group.description affinity_group_description
+     from
+         `cloud`.`user_vm`
+             inner join
+         `cloud`.`vm_instance` ON vm_instance.id = user_vm.id
+             and vm_instance.removed is NULL
+             inner join
+         `cloud`.`account` ON vm_instance.account_id = account.id
+             inner join
+         `cloud`.`domain` ON vm_instance.domain_id = domain.id
+             left join
+         `cloud`.`guest_os` ON vm_instance.guest_os_id = guest_os.id
+             left join
+         `cloud`.`host_pod_ref` ON vm_instance.pod_id = host_pod_ref.id
+             left join
+         `cloud`.`projects` ON projects.project_account_id = account.id
+             left join
+         `cloud`.`instance_group_vm_map` ON vm_instance.id = instance_group_vm_map.instance_id
+             left join
+         `cloud`.`instance_group` ON instance_group_vm_map.group_id = instance_group.id
+             left join
+         `cloud`.`data_center` ON vm_instance.data_center_id = data_center.id
+             left join
+         `cloud`.`host` ON vm_instance.host_id = host.id
+             left join
+         `cloud`.`vm_template` ON vm_instance.vm_template_id = vm_template.id
+             left join
+         `cloud`.`vm_template` iso ON iso.id = user_vm.iso_id
+             left join
+         `cloud`.`service_offering` ON vm_instance.service_offering_id = service_offering.id
+             left join
+         `cloud`.`disk_offering` ON vm_instance.service_offering_id = disk_offering.id
+             left join
+         `cloud`.`volumes` ON vm_instance.id = volumes.instance_id
+             left join
+         `cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id
+             left join
+         `cloud`.`security_group_vm_map` ON vm_instance.id = security_group_vm_map.instance_id
+             left join
+         `cloud`.`security_group` ON security_group_vm_map.security_group_id = security_group.id
+             left join
+         `cloud`.`nics` ON vm_instance.id = nics.instance_id
+             left join
+         `cloud`.`networks` ON nics.network_id = networks.id
+             left join
+         `cloud`.`vpc` ON networks.vpc_id = vpc.id
+             left join
+         `cloud`.`user_ip_address` ON user_ip_address.vm_id = vm_instance.id
+             left join
+         `cloud`.`user_vm_details` ON user_vm_details.vm_id = vm_instance.id
+             and user_vm_details.name = 'SSH.PublicKey'
+             left join
+         `cloud`.`ssh_keypairs` ON ssh_keypairs.public_key = user_vm_details.value
+             left join
+         `cloud`.`resource_tags` ON resource_tags.resource_id = vm_instance.id
+             and resource_tags.resource_type = 'UserVm'
+             left join
+         `cloud`.`async_job` ON async_job.instance_id = vm_instance.id
+             and async_job.instance_type = 'VirtualMachine'
+             and async_job.job_status = 0
+             left join
+         `cloud`.`affinity_group_vm_map` ON vm_instance.id = affinity_group_vm_map.instance_id
+ 			left join
+         `cloud`.`affinity_group` ON affinity_group_vm_map.affinity_group_id = affinity_group.id;
+ 
+ DROP VIEW IF EXISTS `cloud`.`affinity_group_view`;
+ CREATE VIEW `cloud`.`affinity_group_view` AS
+     select 
+         affinity_group.id id,
+         affinity_group.name name,
+         affinity_group.description description,
+         affinity_group.uuid uuid,
+         account.id account_id,
+         account.uuid account_uuid,
+         account.account_name account_name,
+         account.type account_type,
+         domain.id domain_id,
+         domain.uuid domain_uuid,
+         domain.name domain_name,
+         domain.path domain_path,
+         vm_instance.id vm_id,
+         vm_instance.uuid vm_uuid,
+         vm_instance.name vm_name,
+         vm_instance.state vm_state,
+         user_vm.display_name vm_display_name
+     from
+         `cloud`.`affinity_group`
+             inner join
+         `cloud`.`account` ON affinity_group.account_id = account.id
+             inner join
+         `cloud`.`domain` ON affinity_group.domain_id = domain.id
+             left join
+         `cloud`.`affinity_group_vm_map` ON affinity_group.id = affinity_group_vm_map.affinity_group_id
+             left join
+         `cloud`.`vm_instance` ON vm_instance.id = affinity_group_vm_map.instance_id
+             left join
 -		`cloud`.`user_vm` ON user_vm.id = vm_instance.id;
 -		
++        `cloud`.`user_vm` ON user_vm.id = vm_instance.id;
++
 +CREATE TABLE `cloud`.`external_cisco_vnmc_devices` (
 +  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
 +  `uuid` varchar(255) UNIQUE,
 +  `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical network in to which cisco vnmc device is added',
 +  `provider_name` varchar(255) NOT NULL COMMENT 'Service Provider name corresponding to this cisco vnmc device',
 +  `device_name` varchar(255) NOT NULL COMMENT 'name of the cisco vnmc device',
 +  `host_id` bigint unsigned NOT NULL COMMENT 'host id coresponding to the external cisco vnmc device',
 +  PRIMARY KEY (`id`),
 +  CONSTRAINT `fk_external_cisco_vnmc_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE,
 +  CONSTRAINT `fk_external_cisco_vnmc_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +
 +CREATE TABLE `cloud`.`external_cisco_asa1000v_devices` (
 +  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
 +  `uuid` varchar(255) UNIQUE,
 +  `physical_network_id` bigint unsigned NOT NULL COMMENT 'id of the physical network in to which cisco asa1kv device is added',
 +  `management_ip` varchar(255) UNIQUE NOT NULL COMMENT 'mgmt. ip of cisco asa1kv device',
 +  `in_port_profile` varchar(255) NOT NULL COMMENT 'inside port profile name of cisco asa1kv device',
 +  `cluster_id` bigint unsigned NOT NULL COMMENT 'id of the Vmware cluster to which cisco asa1kv device is attached (cisco n1kv switch)',
 +  PRIMARY KEY (`id`),
 +  CONSTRAINT `fk_external_cisco_asa1000v_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE,
 +  CONSTRAINT `fk_external_cisco_asa1000v_devices__cluster_id` FOREIGN KEY (`cluster_id`) REFERENCES `cluster`(`id`) ON DELETE CASCADE
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 +
 +CREATE TABLE `cloud`.`network_asa1000v_map` (
 +  `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
 +  `network_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of guest network',
 +  `asa1000v_id` bigint unsigned NOT NULL UNIQUE COMMENT 'id of asa1000v device',
 +  PRIMARY KEY (`id`),
 +  CONSTRAINT `fk_network_asa1000v_map__network_id` FOREIGN KEY (`network_id`) REFERENCES `networks`(`id`) ON DELETE CASCADE,
 +  CONSTRAINT `fk_network_asa1000v_map__asa1000v_id` FOREIGN KEY (`asa1000v_id`) REFERENCES `external_cisco_asa1000v_devices`(`id`) ON DELETE CASCADE
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8;
++
+ -- Re-enable foreign key checking, at the end of the upgrade path
+ SET foreign_key_checks = 1;			
++

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0232048f/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --cc tools/marvin/marvin/integration/lib/base.py
index e930dfa,3df68ab..f3959b0
mode 100644,100755..100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@@ -2425,66 -2444,32 +2444,94 @@@ class VPC
          [setattr(cmd, k, v) for k, v in kwargs.items()]
          return(apiclient.listVPCs(cmd))
  
 -
+ class AffinityGroup:
+     def __init__(self, items):
+         self.__dict__.update(items)
+ 
+     @classmethod
 -    def create(cls, apiclient, services, account=None, domainid=None):
++        def create(cls, apiclient, services, account=None, domainid=None):
+         agCmd = createAffinityGroup.createAffinityGroupCmd()
+         agCmd.name = services['name']
+         agCmd.displayText = services['displaytext'] if 'displaytext' in services else services['name']
+         agCmd.type = services['type']
+         agCmd.account = services['account'] if 'account' in services else account
+         agCmd.domainid = services['domainid'] if 'domainid' in services else domainid
+         return AffinityGroup(apiclient.createAffinityGroup(agCmd).__dict__)
+ 
+     def update(self, apiclient):
+         pass
+ 
+     def delete(self, apiclient):
+         cmd = deleteAffinityGroup.deleteAffinityGroupCmd()
+         cmd.id = self.id
+         return apiclient.deleteVPC(cmd)
+ 
+ 
+     @classmethod
+     def list(cls, apiclient, **kwargs):
+         cmd = listAffinityGroups.listAffinityGroupsCmd()
+         [setattr(cmd, k, v) for k, v in kwargs.items()]
+         return(apiclient.listVPCs(cmd))
++
 +class VNMC:
 +    """Manage VNMC lifecycle"""
 +
 +    def __init__(self, items):
 +        self.__dict__.update(items)
 +
-     @classmethod
 +    def create(cls, apiclient, hostname, username, password, physicalnetworkid):
 +        """Registers VNMC appliance"""
 +
 +        cmd = addCiscoVnmcResource.addCiscoVnmcResourceCmd()
 +        cmd.hostname = hostname
 +        cmd.username = username
 +        cmd.password = password
 +        cmd.physicalnetworkid = physicalnetworkid
 +        return VNMC(apiclient.addCiscoVnmcResource(cmd))
 +
 +    def delete(self, apiclient):
 +        """Removes VNMC appliance"""
 +
 +        cmd = deleteCiscoVnmcResource.deleteCiscoVnmcResourceCmd()
 +        cmd.resourceid = self.resourceid
 +        return apiclient.deleteCiscoVnmcResource(cmd)
 +
 +    @classmethod
 +    def list(cls, apiclient, **kwargs):
 +        """List VNMC appliances"""
 +
 +        cmd = listCiscoVnmcResources.listCiscoVnmcResourcesCmd()
 +        [setattr(cmd, k, v) for k, v in kwargs.items()]
 +        return(apiclient.listCiscoVnmcResources(cmd))
 +
 +class ASA1000V:
 +    """Manage ASA 1000v lifecycle"""
 +
 +    def __init__(self, items):
 +        self.__dict__.update(items)
 +
 +    @classmethod
 +    def create(cls, apiclient, hostname, insideportprofile, clusterid, physicalnetworkid):
 +        """Registers ASA 1000v appliance"""
 +
 +        cmd = addCiscoAsa1000vResource.addCiscoAsa1000vResourceCmd()
 +        cmd.hostname = hostname
 +        cmd.insideportprofile = insideportprofile
 +        cmd.clusterid = clusterid
 +        cmd.physicalnetworkid = physicalnetworkid
 +        return ASA1000V(apiclient.addCiscoAsa1000vResource(cmd))
 +
 +    def delete(self, apiclient):
 +        """Removes ASA 1000v appliance"""
 +
 +        cmd = deleteCiscoAsa1000vResource.deleteCiscoAsa1000vResourceCmd()
 +        cmd.resourceid = self.resourceid
 +        return apiclient.deleteCiscoAsa1000vResource(cmd)
 +
 +    @classmethod
 +    def list(cls, apiclient, **kwargs):
 +        """List ASA 1000v appliances"""
 +
 +        cmd = listCiscoAsa1000vResources.listCiscoAsa1000vResourcesCmd()
 +        [setattr(cmd, k, v) for k, v in kwargs.items()]
 +        return(apiclient.listCiscoAsa1000vResources(cmd))


[16/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
fix CLOUDSTACK-1894 User is not able to deploy VMs in a project[permission denied to access the guest network)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cbcb83b0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cbcb83b0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cbcb83b0

Branch: refs/heads/cisco-vnmc-api-integration
Commit: cbcb83b086f4a87aa0703e18a03938b808ed044f
Parents: 7fb63be
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Fri Apr 12 14:57:56 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Fri Apr 12 15:39:36 2013 +0800

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkModelImpl.java |   21 ++++++++++++---
 1 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cbcb83b0/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
old mode 100644
new mode 100755
index 4c13c91..b82f90c
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -88,7 +88,9 @@ import com.cloud.offerings.NetworkOfferingServiceMapVO;
 import com.cloud.offerings.NetworkOfferingVO;
 import com.cloud.offerings.dao.NetworkOfferingDao;
 import com.cloud.offerings.dao.NetworkOfferingServiceMapDao;
+import com.cloud.projects.dao.ProjectAccountDao;
 import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
 import com.cloud.user.DomainManager;
 import com.cloud.user.dao.AccountDao;
 import com.cloud.utils.component.AdapterBase;
@@ -178,7 +180,8 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
     UserIpv6AddressDao _ipv6Dao;
     @Inject
     NicSecondaryIpDao _nicSecondaryIpDao;;
-
+    @Inject
+    private ProjectAccountDao _projectAccountDao;
 
     private final HashMap<String, NetworkOfferingVO> _systemNetworks = new HashMap<String, NetworkOfferingVO>(5);
     static Long _privateOfferingId = null;
@@ -1472,10 +1475,20 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel {
     public void checkNetworkPermissions(Account owner, Network network) {
         // Perform account permission check
         if (network.getGuestType() != Network.GuestType.Shared) {
-            List<NetworkVO> networkMap = _networksDao.listBy(owner.getId(), network.getId());
-            if (networkMap == null || networkMap.isEmpty()) {
-                throw new PermissionDeniedException("Unable to use network with id= " + network.getUuid() + ", permission denied");
+            AccountVO networkOwner = _accountDao.findById(network.getAccountId());
+            if(networkOwner == null)
+                throw new PermissionDeniedException("Unable to use network with id= " + network.getId() + ", network does not have an owner");
+            if(owner.getType() != Account.ACCOUNT_TYPE_PROJECT && networkOwner.getType() == Account.ACCOUNT_TYPE_PROJECT){
+                if(!_projectAccountDao.canAccessProjectAccount(owner.getAccountId(), network.getAccountId())){
+                    throw new PermissionDeniedException("Unable to use network with id= " + network.getId() + ", permission denied");
+                }
+            }else{
+                List<NetworkVO> networkMap = _networksDao.listBy(owner.getId(), network.getId());
+                if (networkMap == null || networkMap.isEmpty()) {
+                    throw new PermissionDeniedException("Unable to use network with id= " + network.getId() + ", permission denied");
+                }
             }
+
         } else {
             if (!isNetworkAvailableInDomain(network.getId(), owner.getDomainId())) {
                 throw new PermissionDeniedException("Shared network id=" + network.getUuid() + " is not available in domain id=" + owner.getDomainId());


[47/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1984:Wrong mapping of resource names to the capacity function on the dashboard


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e05defc0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e05defc0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e05defc0

Branch: refs/heads/cisco-vnmc-api-integration
Commit: e05defc0732541eba117909211e455ecb6ac8b23
Parents: 0abfe24
Author: Pranav Saxena <pr...@citrix.com>
Authored: Mon Apr 15 12:38:18 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Mon Apr 15 12:38:18 2013 +0530

----------------------------------------------------------------------
 ui/scripts/dashboard.js       |    2 +-
 ui/scripts/sharedFunctions.js |   25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e05defc0/ui/scripts/dashboard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/dashboard.js b/ui/scripts/dashboard.js
index 845ae52..e8ab6c5 100644
--- a/ui/scripts/dashboard.js
+++ b/ui/scripts/dashboard.js
@@ -238,7 +238,7 @@
                     return {
                       zoneID: capacity.zoneid, // Temporary fix for dashboard
                       zoneName: capacity.zonename,
-                      type: cloudStack.converters.toAlertType(capacity.type),
+                      type: cloudStack.converters.toCapacityCountType(capacity.type),
                       percent: parseInt(capacity.percentused),
                       used: cloudStack.converters.convertByType(capacity.type, capacity.capacityused),
                       total: cloudStack.converters.convertByType(capacity.type, capacity.capacitytotal)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e05defc0/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index 86fe7f6..19e1611 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -425,6 +425,31 @@ cloudStack.converters = {
     case 26 : return "Resource Limit Exceeded";
     }
   },
+
+  toCapacityCountType:function(capacityCode){
+   switch(capacityCode){
+    case 0 : return _l('label.memory');
+    case 1 : return _l('label.cpu');
+    case 2 : return _l('label.storage');
+    case 3 : return _l('label.primary.storage');
+    case 4 : return _l('label.public.ips');
+    case 5 : return _l('label.management.ips');
+    case 6 : return _l('label.secondary.storage');
+    case 7 : return _l('label.vlan');
+    case 8 : return _l('label.direct.ips');
+    case 9 : return _l('label.local.storage');
+    case 10 : return "Routing Host";
+    case 11 : return "Storage";
+    case 12 : return "Usage Server";
+    case 13 : return "Management Server";
+    case 14 : return "Domain Router";
+    case 15 : return "Console Proxy";
+    case 16 : return "User VM";
+    case 17 : return "VLAN";
+    case 18 : return "Secondary Storage VM";
+      }
+    },
+
   convertByType: function(alertCode, value) {
     switch(alertCode) {
       case 0: return cloudStack.converters.convertBytes(value);


[30/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Dedicate Public IP address range to an account


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8f865c5a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8f865c5a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8f865c5a

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 8f865c5a901d1fb066709e1809fd5538af3eea11
Parents: 95cbb79
Author: Likitha Shetty <li...@citrix.com>
Authored: Mon Apr 8 22:44:45 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Fri Apr 12 23:27:35 2013 +0530

----------------------------------------------------------------------
 .../cloud/configuration/ConfigurationService.java  |    6 +
 api/src/com/cloud/event/EventTypes.java            |    4 +
 .../admin/vlan/DedicatePublicIpRangeCmd.java       |  108 ++++
 .../admin/vlan/ReleasePublicIpRangeCmd.java        |   77 +++
 client/tomcatconf/commands.properties.in           |    2 +
 .../cloud/configuration/ConfigurationManager.java  |    5 +-
 .../configuration/ConfigurationManagerImpl.java    |  173 ++++++-
 .../src/com/cloud/network/NetworkManagerImpl.java  |   45 ++-
 .../src/com/cloud/network/NetworkServiceImpl.java  |    9 -
 .../src/com/cloud/server/ManagementServerImpl.java |    3 +
 server/src/com/cloud/user/AccountManagerImpl.java  |    6 +-
 .../configuration/ConfigurationManagerTest.java    |  413 +++++++++++++++
 .../cloud/vpc/MockConfigurationManagerImpl.java    |   23 +-
 test/integration/component/test_public_ip_range.py |  173 ++++++
 tools/marvin/marvin/integration/lib/base.py        |   19 +-
 15 files changed, 1017 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/api/src/com/cloud/configuration/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/configuration/ConfigurationService.java b/api/src/com/cloud/configuration/ConfigurationService.java
index e63fcec..6937d0b 100644
--- a/api/src/com/cloud/configuration/ConfigurationService.java
+++ b/api/src/com/cloud/configuration/ConfigurationService.java
@@ -35,7 +35,9 @@ import org.apache.cloudstack.api.command.admin.offering.UpdateServiceOfferingCmd
 import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd;
 import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd;
 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.ReleasePublicIpRangeCmd;
 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.UpdateZoneCmd;
@@ -234,6 +236,10 @@ public interface ConfigurationService {
 
     boolean deleteVlanIpRange(DeleteVlanIpRangeCmd cmd);
 
+    Vlan dedicatePublicIpRange(DedicatePublicIpRangeCmd cmd) throws ResourceAllocationException;
+
+    boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
+
     NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd);
 
     NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/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 6a26212..0ee7f40 100755
--- a/api/src/com/cloud/event/EventTypes.java
+++ b/api/src/com/cloud/event/EventTypes.java
@@ -226,6 +226,8 @@ public class EventTypes {
     // VLANs/IP ranges
     public static final String EVENT_VLAN_IP_RANGE_CREATE = "VLAN.IP.RANGE.CREATE";
     public static final String EVENT_VLAN_IP_RANGE_DELETE = "VLAN.IP.RANGE.DELETE";
+    public static final String EVENT_VLAN_IP_RANGE_DEDICATE = "VLAN.IP.RANGE.DEDICATE";
+    public static final String EVENT_VLAN_IP_RANGE_RELEASE = "VLAN.IP.RANGE.RELEASE";
 
     public static final String EVENT_STORAGE_IP_RANGE_CREATE = "STORAGE.IP.RANGE.CREATE";
     public static final String EVENT_STORAGE_IP_RANGE_DELETE = "STORAGE.IP.RANGE.DELETE";
@@ -545,6 +547,8 @@ public class EventTypes {
         // VLANs/IP ranges
         entityEventDetails.put(EVENT_VLAN_IP_RANGE_CREATE, Vlan.class.getName());
         entityEventDetails.put(EVENT_VLAN_IP_RANGE_DELETE,Vlan.class.getName());
+        entityEventDetails.put(EVENT_VLAN_IP_RANGE_DEDICATE, Vlan.class.getName());
+        entityEventDetails.put(EVENT_VLAN_IP_RANGE_RELEASE,Vlan.class.getName());
 
         entityEventDetails.put(EVENT_STORAGE_IP_RANGE_CREATE, StorageNetworkIpRange.class.getName());
         entityEventDetails.put(EVENT_STORAGE_IP_RANGE_DELETE, StorageNetworkIpRange.class.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/api/src/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java
new file mode 100755
index 0000000..e7b1105
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java
@@ -0,0 +1,108 @@
+// 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 org.apache.cloudstack.api.command.admin.vlan;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.ProjectResponse;
+import org.apache.cloudstack.api.response.VlanIpRangeResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.dc.Vlan;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.user.Account;
+
+@APICommand(name = "dedicatePublicIpRange", description="Dedicates a Public IP range to an account", responseObject=VlanIpRangeResponse.class)
+public class DedicatePublicIpRangeCmd extends BaseCmd {
+    public static final Logger s_logger = Logger.getLogger(DedicatePublicIpRangeCmd.class.getName());
+
+    private static final String s_name = "dedicatepubliciprangeresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = VlanIpRangeResponse.class,
+            required=true, description="the id of the VLAN IP range")
+    private Long id;
+
+    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true,
+            description="account who will own the VLAN")
+    private String accountName;
+
+    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class,
+            description="project who will own the VLAN")
+    private Long projectId;
+
+    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class,
+            required=true, description="domain ID of the account owning a VLAN")
+    private Long domainId;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+    public Long getId() {
+        return id;
+    }
+
+    public String getAccountName() {
+        return accountName;
+    }
+
+    public Long getDomainId() {
+        return domainId;
+    }
+
+    public Long getProjectId() {
+        return projectId;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+    @Override
+    public void execute() throws ResourceUnavailableException, ResourceAllocationException {
+        Vlan result = _configService.dedicatePublicIpRange(this);
+        if (result != null) {
+            VlanIpRangeResponse response = _responseGenerator.createVlanIpRangeResponse(result);
+            response.setResponseName(getCommandName());
+            this.setResponseObject(response);
+        } else {
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to dedicate vlan ip range");
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/api/src/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java
new file mode 100644
index 0000000..91cc7d3
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java
@@ -0,0 +1,77 @@
+// 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 org.apache.cloudstack.api.command.admin.vlan;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.SuccessResponse;
+import org.apache.cloudstack.api.response.VlanIpRangeResponse;
+import org.apache.log4j.Logger;
+
+import com.cloud.user.Account;
+
+@APICommand(name = "releasePublicIpRange", description="Releases a Public IP range back to the system pool", responseObject=SuccessResponse.class)
+public class ReleasePublicIpRangeCmd extends BaseCmd {
+    public static final Logger s_logger = Logger.getLogger(ReleasePublicIpRangeCmd.class.getName());
+
+    private static final String s_name = "releasepubliciprangeresponse";
+
+    /////////////////////////////////////////////////////
+    //////////////// API parameters /////////////////////
+    /////////////////////////////////////////////////////
+
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = VlanIpRangeResponse.class,
+            required=true, description="the id of the Public IP range")
+    private Long id;
+
+    /////////////////////////////////////////////////////
+    /////////////////// Accessors ///////////////////////
+    /////////////////////////////////////////////////////
+
+    public Long getId() {
+        return id;
+    }
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        return Account.ACCOUNT_ID_SYSTEM;
+    }
+
+    @Override
+    public void execute(){
+        boolean result = _configService.releasePublicIpRange(this);
+        if (result) {
+            SuccessResponse response = new SuccessResponse(getCommandName());
+            this.setResponseObject(response);
+        } else {
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release public ip range");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/client/tomcatconf/commands.properties.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in
index 4ce9fd3..798d226 100644
--- a/client/tomcatconf/commands.properties.in
+++ b/client/tomcatconf/commands.properties.in
@@ -124,6 +124,8 @@ listDiskOfferings=15
 createVlanIpRange=1
 deleteVlanIpRange=1
 listVlanIpRanges=1
+dedicatePublicIpRange=1
+releasePublicIpRange=1
 
 #### address commands
 associateIpAddress=15

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/server/src/com/cloud/configuration/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManager.java b/server/src/com/cloud/configuration/ConfigurationManager.java
old mode 100644
new mode 100755
index c5f65e9..d7faf19
--- a/server/src/com/cloud/configuration/ConfigurationManager.java
+++ b/server/src/com/cloud/configuration/ConfigurationManager.java
@@ -30,6 +30,7 @@ import com.cloud.dc.Vlan;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ResourceAllocationException;
 import com.cloud.network.Network;
 import com.cloud.network.Network.Capability;
 import com.cloud.network.Network.Provider;
@@ -150,6 +151,8 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
      */
     boolean deleteVlanAndPublicIpRange(long userId, long vlanDbId, Account caller);
 
+    boolean releasePublicIpRange(long userId, long vlanDbId, Account caller);
+
     /**
      * Converts a comma separated list of tags to a List
      * 
@@ -211,7 +214,7 @@ public interface ConfigurationManager extends ConfigurationService, Manager {
 
     ClusterVO getCluster(long id);
 
-    boolean deleteAccountSpecificVirtualRanges(long accountId);
+    boolean releaseAccountSpecificVirtualRanges(long accountId);
 
     /**
      * Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index ceeae1e..fce3c01 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -56,7 +56,9 @@ import org.apache.cloudstack.api.command.admin.offering.UpdateServiceOfferingCmd
 import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd;
 import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd;
 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.ReleasePublicIpRangeCmd;
 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.UpdateZoneCmd;
@@ -2306,9 +2308,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
             throw new InvalidParameterValueException("Gateway, netmask and zoneId have to be passed in for virtual and direct untagged networks");
         }
 
-        // if it's an account specific range, associate ip address list to the account
-        boolean associateIpRangeToAccount = false;
-
         if (forVirtualNetwork) {
             if (vlanOwner != null) {
 
@@ -2316,8 +2315,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
 
                 //check resource limits
                 _resourceLimitMgr.checkResourceLimit(vlanOwner, ResourceType.public_ip, accountIpRange);
-                
-                associateIpRangeToAccount = true;
             }
         }
 
@@ -2332,21 +2329,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
                 endIP, vlanGateway, vlanNetmask, vlanId, vlanOwner, startIPv6, endIPv6, ip6Gateway, ip6Cidr);
 
         txn.commit();
-        if (associateIpRangeToAccount) {
-            _networkMgr.associateIpAddressListToAccount(userId, vlanOwner.getId(), zoneId, vlan.getId(), null);
-        }
-
-        // Associate ips to the network
-        if (associateIpRangeToAccount) {
-            if (network.getState() == Network.State.Implemented) {
-                s_logger.debug("Applying ip associations for vlan id=" + vlanId + " in network " + network);
-                if (!_networkMgr.applyIpAssociations(network, false)) {
-                    s_logger.warn("Failed to apply ip associations for vlan id=1 as a part of add vlan range for account id=" + vlanOwner.getId());
-                }
-            } else {
-                s_logger.trace("Network id=" + network.getId() + " is not Implemented, no need to apply ipAssociations");
-            }
-        }
 
         return vlan;
     }
@@ -2699,6 +2681,149 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
     }
 
     @Override
+    @DB
+    @ActionEvent(eventType = EventTypes.EVENT_VLAN_IP_RANGE_DEDICATE, eventDescription = "dedicating vlan ip range", async = false)
+    public Vlan dedicatePublicIpRange(DedicatePublicIpRangeCmd cmd) throws ResourceAllocationException {
+        Long vlanDbId = cmd.getId();
+        String accountName = cmd.getAccountName();
+        Long domainId = cmd.getDomainId();
+        Long projectId = cmd.getProjectId();
+
+        // Check if account is valid
+        Account vlanOwner = null;
+        if (projectId != null) {
+            if (accountName != null) {
+                throw new InvalidParameterValueException("accountName and projectId are mutually exclusive");
+            }
+            Project project = _projectMgr.getProject(projectId);
+            if (project == null) {
+                throw new InvalidParameterValueException("Unable to find project by id " + projectId);
+            }
+            vlanOwner = _accountMgr.getAccount(project.getProjectAccountId());
+        }
+
+        if ((accountName != null) && (domainId != null)) {
+            vlanOwner = _accountDao.findActiveAccount(accountName, domainId);
+            if (vlanOwner == null) {
+                throw new InvalidParameterValueException("Please specify a valid account");
+            }
+        }
+
+        // Check if range is valid
+        VlanVO vlan = _vlanDao.findById(vlanDbId);
+        if (vlan == null) {
+            throw new InvalidParameterValueException("Please specify a valid Public IP range id");
+        }
+
+        // Check if range has already been dedicated
+        List<AccountVlanMapVO> maps = _accountVlanMapDao.listAccountVlanMapsByVlan(vlanDbId);
+        if (maps != null && !maps.isEmpty()) {
+            throw new InvalidParameterValueException("Specified Public IP range has already been dedicated");
+        }
+
+        // Verify that zone exists and is advanced
+        Long zoneId = vlan.getDataCenterId();
+        DataCenterVO zone = _zoneDao.findById(zoneId);
+        if (zone == null) {
+            throw new InvalidParameterValueException("Unable to find zone by id " + zoneId);
+        }
+        if (zone.getNetworkType() == NetworkType.Basic) {
+            throw new InvalidParameterValueException("Public IP range can be dedicated to an account only in the zone of type " + NetworkType.Advanced);
+        }
+
+        // Check Public IP resource limits
+        int accountPublicIpRange = _publicIpAddressDao.countIPs(zoneId, vlanDbId, false);
+        _resourceLimitMgr.checkResourceLimit(vlanOwner, ResourceType.public_ip, accountPublicIpRange);
+
+        // Check if any of the Public IP addresses is allocated to another account
+        List<IPAddressVO> ips = _publicIpAddressDao.listByVlanId(vlanDbId);
+        for (IPAddressVO ip : ips) {
+            Long allocatedToAccountId = ip.getAllocatedToAccountId();
+            if (allocatedToAccountId != null) {
+                Account accountAllocatedTo = _accountMgr.getActiveAccountById(allocatedToAccountId);
+                if (!accountAllocatedTo.getAccountName().equalsIgnoreCase(accountName))
+                    throw new InvalidParameterValueException("Public IP address in range is already allocated to another account");
+            }
+        }
+
+        Transaction txn = Transaction.currentTxn();
+        txn.start();
+
+        // Create an AccountVlanMapVO entry
+        AccountVlanMapVO accountVlanMapVO = new AccountVlanMapVO(vlanOwner.getId(), vlan.getId());
+        _accountVlanMapDao.persist(accountVlanMapVO);
+
+        txn.commit();
+
+        return vlan;
+    }
+
+    @Override
+    @ActionEvent(eventType = EventTypes.EVENT_VLAN_IP_RANGE_RELEASE, eventDescription = "releasing a public ip range", async = false)
+    public boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd) {
+        Long vlanDbId = cmd.getId();
+
+        VlanVO vlan = _vlanDao.findById(vlanDbId);
+        if (vlan == null) {
+            throw new InvalidParameterValueException("Please specify a valid IP range id.");
+        }
+
+        return releasePublicIpRange(vlanDbId, UserContext.current().getCallerUserId(), UserContext.current().getCaller());
+    }
+
+    @Override
+    @DB
+    public boolean releasePublicIpRange(long vlanDbId, long userId, Account caller) {
+        VlanVO vlan = _vlanDao.findById(vlanDbId);
+
+        List<AccountVlanMapVO> acctVln = _accountVlanMapDao.listAccountVlanMapsByVlan(vlanDbId);
+        // Verify range is dedicated
+        if (acctVln == null || acctVln.isEmpty()) {
+            throw new InvalidParameterValueException("Can't release Public IP range " + vlanDbId + " as it not dedicated to any account");
+        }
+
+        // Check if range has any allocated public IPs
+        long allocIpCount = _publicIpAddressDao.countIPs(vlan.getDataCenterId(), vlanDbId, true);
+        boolean success = true;
+        if (allocIpCount > 0) {
+            try {
+                vlan = _vlanDao.acquireInLockTable(vlanDbId, 30);
+                if (vlan == null) {
+                    throw new CloudRuntimeException("Unable to acquire vlan configuration: " + vlanDbId);
+                }
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("lock vlan " + vlanDbId + " is acquired");
+                }
+                List<IPAddressVO> ips = _publicIpAddressDao.listByVlanId(vlanDbId);
+                for (IPAddressVO ip : ips) {
+                    // Disassociate allocated IP's that are not in use
+                    if ( !ip.isOneToOneNat() && !(ip.isSourceNat() && _networkModel.getNetwork(ip.getAssociatedWithNetworkId()) != null) &&
+                            !(_firewallDao.countRulesByIpId(ip.getId()) > 0) ) {
+                        if (s_logger.isDebugEnabled()) {
+                            s_logger.debug("Releasing Public IP addresses" + ip  +" of vlan " + vlanDbId + " as part of Public IP" +
+                                    " range release to the system pool");
+                        }
+                        success = success && _networkMgr.disassociatePublicIpAddress(ip.getId(), userId, caller);
+                    }
+                }
+                if (!success) {
+                    s_logger.warn("Some Public IP addresses that were not in use failed to be released as a part of" +
+                            " vlan " + vlanDbId + "release to the system pool");
+                }
+            } finally {
+                _vlanDao.releaseFromLockTable(vlanDbId);
+            }
+        }
+
+        // A Public IP range can only be dedicated to one account at a time
+        if (_accountVlanMapDao.remove(acctVln.get(0).getId())) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
     public List<String> csvTagsToList(String tags) {
         List<String> tagsList = new ArrayList<String>();
 
@@ -3957,14 +4082,14 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
 
     @Override
     @DB
-    public boolean deleteAccountSpecificVirtualRanges(long accountId) {
+    public boolean releaseAccountSpecificVirtualRanges(long accountId) {
         List<AccountVlanMapVO> maps = _accountVlanMapDao.listAccountVlanMapsByAccount(accountId);
         boolean result = true;
         if (maps != null && !maps.isEmpty()) {
             Transaction txn = Transaction.currentTxn();
             txn.start();
             for (AccountVlanMapVO map : maps) {
-                if (!deleteVlanAndPublicIpRange(_accountMgr.getSystemUser().getId(), map.getVlanDbId(), 
+                if (!releasePublicIpRange(map.getVlanDbId(), _accountMgr.getSystemUser().getId(),
                         _accountMgr.getAccount(Account.ACCOUNT_ID_SYSTEM))) {
                     result = false;
                 }
@@ -3972,10 +4097,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
             if (result) {
                 txn.commit();
             } else {
-                s_logger.error("Failed to delete account specific virtual ip ranges for account id=" + accountId);
+                s_logger.error("Failed to release account specific virtual ip ranges for account id=" + accountId);
             }
         } else {
-            s_logger.trace("Account id=" + accountId + " has no account specific virtual ip ranges, nothing to delete");
+            s_logger.trace("Account id=" + accountId + " has no account specific virtual ip ranges, nothing to release");
         }
         return result;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index a97f2ce..5b60466 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -348,7 +348,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
     }
 
     @DB
-    public PublicIp fetchNewPublicIp(long dcId, Long podId, Long vlanDbId, Account owner, VlanType vlanUse,
+    public PublicIp fetchNewPublicIp(long dcId, Long podId, List<Long> vlanDbIds, Account owner, VlanType vlanUse,
             Long guestNetworkId, boolean sourceNat, boolean assign, String requestedIp, boolean isSystem, Long vpcId)
             throws InsufficientAddressCapacityException {
         StringBuilder errorMessage = new StringBuilder("Unable to get ip adress in ");
@@ -364,9 +364,9 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             errorMessage.append(" zone id=" + dcId);
         }
 
-        if (vlanDbId != null) {
-            sc.addAnd("vlanId", SearchCriteria.Op.EQ, vlanDbId);
-            errorMessage.append(", vlanId id=" + vlanDbId);
+        if ( vlanDbIds != null && !vlanDbIds.isEmpty() ) {
+            sc.setParameters("vlanId", vlanDbIds.toArray());
+            errorMessage.append(", vlanId id=" + vlanDbIds.toArray());
         }
 
         sc.setParameters("dc", dcId);
@@ -526,14 +526,14 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
             }
 
             // If account has Account specific ip ranges, try to allocate ip from there
-            Long vlanId = null;
+            List<Long> vlanIds = new ArrayList<Long>();
             List<AccountVlanMapVO> maps = _accountVlanMapDao.listAccountVlanMapsByAccount(ownerId);
             if (maps != null && !maps.isEmpty()) {
-                vlanId = maps.get(0).getVlanDbId();
+                vlanIds.add(maps.get(0).getVlanDbId());
             }
 
 
-            ip = fetchNewPublicIp(dcId, null, vlanId, owner, VlanType.VirtualNetwork, guestNtwkId,
+            ip = fetchNewPublicIp(dcId, null, vlanIds, owner, VlanType.VirtualNetwork, guestNtwkId,
                     isSourceNat, false, null, false, vpcId);
             IPAddressVO publicIp = ip.ip();
 
@@ -669,6 +669,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
 
         VlanType vlanType = VlanType.VirtualNetwork;
         boolean assign = false;
+        boolean allocateFromDedicatedRange = false;
 
         if (Grouping.AllocationState.Disabled == zone.getAllocationState() && !_accountMgr.isRootAdmin(caller.getType())) {
             // zone is of type DataCenter. See DataCenterVO.java.
@@ -702,8 +703,32 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
 
             txn.start();
 
-            ip = fetchNewPublicIp(zone.getId(), null, null, ipOwner, vlanType, null,
-                    false, assign, null, isSystem, null);
+            // If account has dedicated Public IP ranges, allocate IP from the dedicated range
+            List<Long> vlanDbIds = new ArrayList<Long>();
+            List<AccountVlanMapVO> maps = _accountVlanMapDao.listAccountVlanMapsByAccount(ipOwner.getId());
+            for (AccountVlanMapVO map : maps) {
+                vlanDbIds.add(map.getVlanDbId());
+            }
+            if (vlanDbIds != null && !vlanDbIds.isEmpty()) {
+                allocateFromDedicatedRange = true;
+            }
+
+            try {
+                if (allocateFromDedicatedRange) {
+                    ip = fetchNewPublicIp(zone.getId(), null, vlanDbIds, ipOwner, vlanType, null,
+                            false, assign, null, isSystem, null);
+                }
+            } catch(InsufficientAddressCapacityException e) {
+                s_logger.warn("All IPs dedicated to account " + ipOwner.getId() + " has been acquired." +
+                        " Now acquiring from the system pool");
+                txn.close();
+                allocateFromDedicatedRange = false;
+            }
+
+            if (!allocateFromDedicatedRange) {
+                ip = fetchNewPublicIp(zone.getId(), null, null, ipOwner, vlanType, null, false, assign, null,
+                       isSystem, null);
+            }
 
             if (ip == null) {
 
@@ -1082,7 +1107,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
         AssignIpAddressSearch = _ipAddressDao.createSearchBuilder();
         AssignIpAddressSearch.and("dc", AssignIpAddressSearch.entity().getDataCenterId(), Op.EQ);
         AssignIpAddressSearch.and("allocated", AssignIpAddressSearch.entity().getAllocatedTime(), Op.NULL);
-        AssignIpAddressSearch.and("vlanId", AssignIpAddressSearch.entity().getVlanId(), Op.EQ);
+        AssignIpAddressSearch.and("vlanId", AssignIpAddressSearch.entity().getVlanId(), Op.IN);
         SearchBuilder<VlanVO> vlanSearch = _vlanDao.createSearchBuilder();
         vlanSearch.and("type", vlanSearch.entity().getVlanType(), Op.EQ);
         vlanSearch.and("networkId", vlanSearch.entity().getNetworkId(), Op.EQ);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/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 4eb620c..a8cbaa7 100755
--- a/server/src/com/cloud/network/NetworkServiceImpl.java
+++ b/server/src/com/cloud/network/NetworkServiceImpl.java
@@ -697,15 +697,6 @@ public class NetworkServiceImpl extends ManagerBase implements  NetworkService {
             throw new IllegalArgumentException("only ip addresses that belong to a virtual network may be disassociated.");
         }
 
-        // Check for account wide pool. It will have an entry for account_vlan_map.
-        if (_accountVlanMapDao.findAccountVlanMap(ipVO.getAllocatedToAccountId(), ipVO.getVlanId()) != null) {            
-            //see IPaddressVO.java
-            InvalidParameterValueException ex = new InvalidParameterValueException("Sepcified IP address uuid belongs to" +
-                    " Account wide IP pool and cannot be disassociated");
-            ex.addProxyObject("user_ip_address", ipAddressId, "ipAddressId");
-            throw ex;
-        }
-
         // don't allow releasing system ip address
         if (ipVO.getSystem()) {
             InvalidParameterValueException ex = new InvalidParameterValueException("Can't release system IP address with specified id");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index b869d1e..d9a4317 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -59,6 +59,7 @@ 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.*;
@@ -2037,6 +2038,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
         cmdList.add(CreateVlanIpRangeCmd.class);
         cmdList.add(DeleteVlanIpRangeCmd.class);
         cmdList.add(ListVlanIpRangesCmd.class);
+        cmdList.add(DedicatePublicIpRangeCmd.class);
+        cmdList.add(ReleasePublicIpRangeCmd.class);
         cmdList.add(AssignVMCmd.class);
         cmdList.add(MigrateVMCmd.class);
         cmdList.add(RecoverVMCmd.class);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index fe714c5..e74c491 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -690,13 +690,13 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
                 accountCleanupNeeded = true;
             }
 
-            // delete account specific Virtual vlans (belong to system Public Network) - only when networks are cleaned
+            // release account specific Virtual vlans (belong to system Public Network) - only when networks are cleaned
             // up successfully
             if (networksDeleted) {
-                if (!_configMgr.deleteAccountSpecificVirtualRanges(accountId)) {
+                if (!_configMgr.releaseAccountSpecificVirtualRanges(accountId)) {
                     accountCleanupNeeded = true;
                 } else {
-                    s_logger.debug("Account specific Virtual IP ranges " + " are successfully deleted as a part of account id=" + accountId + " cleanup.");
+                    s_logger.debug("Account specific Virtual IP ranges " + " are successfully released as a part of account id=" + accountId + " cleanup.");
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/server/test/com/cloud/configuration/ConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/configuration/ConfigurationManagerTest.java b/server/test/com/cloud/configuration/ConfigurationManagerTest.java
new file mode 100755
index 0000000..ee98d53
--- /dev/null
+++ b/server/test/com/cloud/configuration/ConfigurationManagerTest.java
@@ -0,0 +1,413 @@
+// 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.configuration;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+import java.lang.reflect.Field;
+
+import org.apache.cloudstack.api.command.admin.vlan.DedicatePublicIpRangeCmd;
+import org.apache.cloudstack.api.command.admin.vlan.ReleasePublicIpRangeCmd;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import com.cloud.configuration.Resource.ResourceType;
+import com.cloud.dc.AccountVlanMapVO;
+import com.cloud.dc.DataCenterVO;
+import com.cloud.dc.Vlan;
+import com.cloud.dc.VlanVO;
+import com.cloud.dc.DataCenter.NetworkType;
+import com.cloud.dc.dao.AccountVlanMapDao;
+import com.cloud.dc.dao.DataCenterDao;
+import com.cloud.dc.dao.VlanDao;
+import com.cloud.network.NetworkManager;
+import com.cloud.network.dao.FirewallRulesDao;
+import com.cloud.network.dao.IPAddressDao;
+import com.cloud.network.dao.IPAddressVO;
+import com.cloud.projects.ProjectManager;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.user.AccountVO;
+import com.cloud.user.ResourceLimitService;
+import com.cloud.user.UserContext;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.db.Transaction;
+import com.cloud.utils.net.Ip;
+
+import junit.framework.Assert;
+
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.doNothing;
+
+public class ConfigurationManagerTest {
+
+    private static final Logger s_logger = Logger.getLogger(ConfigurationManagerTest.class);
+
+    ConfigurationManagerImpl configurationMgr = new ConfigurationManagerImpl();
+
+    DedicatePublicIpRangeCmd dedicatePublicIpRangesCmd = new DedicatePublicIpRangeCmdExtn();
+    Class<?> _dedicatePublicIpRangeClass = dedicatePublicIpRangesCmd.getClass().getSuperclass();
+
+    ReleasePublicIpRangeCmd releasePublicIpRangesCmd = new ReleasePublicIpRangeCmdExtn();
+    Class<?> _releasePublicIpRangeClass = releasePublicIpRangesCmd.getClass().getSuperclass();
+
+    @Mock AccountManager _accountMgr;
+    @Mock ProjectManager _projectMgr;
+    @Mock ResourceLimitService _resourceLimitMgr;
+    @Mock NetworkManager _networkMgr;
+    @Mock AccountDao _accountDao;
+    @Mock VlanDao _vlanDao;
+    @Mock AccountVlanMapDao _accountVlanMapDao;
+    @Mock IPAddressDao _publicIpAddressDao;
+    @Mock DataCenterDao _zoneDao;
+    @Mock FirewallRulesDao _firewallDao;
+
+    VlanVO vlan = new VlanVO(Vlan.VlanType.VirtualNetwork, "vlantag", "vlangateway","vlannetmask", 1L, "iprange", 1L, 1L, null, null, null);
+
+    @Before
+    public void setup() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        configurationMgr._accountMgr = _accountMgr;
+        configurationMgr._projectMgr = _projectMgr;
+        configurationMgr._resourceLimitMgr = _resourceLimitMgr;
+        configurationMgr._networkMgr = _networkMgr;
+        configurationMgr._accountDao = _accountDao;
+        configurationMgr._vlanDao = _vlanDao;
+        configurationMgr._accountVlanMapDao = _accountVlanMapDao;
+        configurationMgr._publicIpAddressDao = _publicIpAddressDao;
+        configurationMgr._zoneDao = _zoneDao;
+        configurationMgr._firewallDao = _firewallDao;
+
+        Account account = (Account) new AccountVO("testaccount", 1, "networkdomain", (short) 0, UUID.randomUUID().toString());
+        when(configurationMgr._accountMgr.getAccount(anyLong())).thenReturn(account);
+        when(configurationMgr._accountDao.findActiveAccount(anyString(), anyLong())).thenReturn(account);
+        when(configurationMgr._accountMgr.getActiveAccountById(anyLong())).thenReturn(account);
+
+        when(configurationMgr._publicIpAddressDao.countIPs(anyLong(), anyLong(), anyBoolean())).thenReturn(1);
+
+        doNothing().when(configurationMgr._resourceLimitMgr).checkResourceLimit(any(Account.class),
+                any(ResourceType.class), anyLong());
+
+        when(configurationMgr._accountVlanMapDao.persist(any(AccountVlanMapVO.class))).thenReturn(new AccountVlanMapVO());
+
+        when(configurationMgr._vlanDao.acquireInLockTable(anyLong(), anyInt())).thenReturn(vlan);
+
+        UserContext.registerContext(1, account, null, true);
+
+        Field dedicateIdField = _dedicatePublicIpRangeClass.getDeclaredField("id");
+        dedicateIdField.setAccessible(true);
+        dedicateIdField.set(dedicatePublicIpRangesCmd, 1L);
+
+        Field accountNameField = _dedicatePublicIpRangeClass.getDeclaredField("accountName");
+        accountNameField.setAccessible(true);
+        accountNameField.set(dedicatePublicIpRangesCmd, "accountname");
+
+        Field projectIdField = _dedicatePublicIpRangeClass.getDeclaredField("projectId");
+        projectIdField.setAccessible(true);
+        projectIdField.set(dedicatePublicIpRangesCmd, null);
+
+        Field domainIdField = _dedicatePublicIpRangeClass.getDeclaredField("domainId");
+        domainIdField.setAccessible(true);
+        domainIdField.set(dedicatePublicIpRangesCmd, 1L);
+
+        Field releaseIdField = _releasePublicIpRangeClass.getDeclaredField("id");
+        releaseIdField.setAccessible(true);
+        releaseIdField.set(releasePublicIpRangesCmd, 1L);
+    }
+
+    @Test
+    public void testDedicatePublicIpRange() throws Exception {
+
+        s_logger.info("Running tests for DedicatePublicIpRange API");
+
+        /*
+         * TEST 1: given valid parameters DedicatePublicIpRange should succeed
+         */
+        runDedicatePublicIpRangePostiveTest();
+
+        /*
+         * TEST 2: given invalid public ip range DedicatePublicIpRange should fail
+         */
+        runDedicatePublicIpRangeInvalidRange();
+         /*
+         * TEST 3: given public IP range that is already dedicated to a different account DedicatePublicIpRange should fail
+         */
+        runDedicatePublicIpRangeDedicatedRange();
+
+         /*
+         * TEST 4: given zone is of type Basic DedicatePublicIpRange should fail
+         */
+        runDedicatePublicIpRangeInvalidZone();
+
+        /*
+         * TEST 5: given range is already allocated to a different account DedicatePublicIpRange should fail
+         */
+        runDedicatePublicIpRangeIPAdressAllocated();
+    }
+
+    @Test
+    public void testReleasePublicIpRange() throws Exception {
+
+        s_logger.info("Running tests for DedicatePublicIpRange API");
+
+        /*
+         * TEST 1: given valid parameters and no allocated public ip's in the range ReleasePublicIpRange should succeed
+         */
+        runReleasePublicIpRangePostiveTest1();
+
+        /*
+         * TEST 2: given valid parameters ReleasePublicIpRange should succeed
+         */
+        runReleasePublicIpRangePostiveTest2();
+
+        /*
+         * TEST 3: given range doesn't exist
+         */
+        runReleasePublicIpRangeInvalidIpRange();
+
+        /*
+         * TEST 4: given range is not dedicated to any account
+         */
+        runReleaseNonDedicatedPublicIpRange();
+    }
+
+    void runDedicatePublicIpRangePostiveTest() throws Exception {
+        Transaction txn = Transaction.open("runDedicatePublicIpRangePostiveTest");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(vlan);
+
+        when(configurationMgr._accountVlanMapDao.listAccountVlanMapsByAccount(anyLong())).thenReturn(null);
+
+        DataCenterVO dc = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null,  "10.0.0.1/24",
+                null, null, NetworkType.Advanced, null, null, true,  true, null, null);
+        when(configurationMgr._zoneDao.findById(anyLong())).thenReturn(dc);
+
+        List<IPAddressVO> ipAddressList = new ArrayList<IPAddressVO>();
+        IPAddressVO ipAddress = new IPAddressVO(new Ip("75.75.75.75"), 1, 0xaabbccddeeffL, 10, false);
+        ipAddressList.add(ipAddress);
+        when(configurationMgr._publicIpAddressDao.listByVlanId(anyLong())).thenReturn(ipAddressList);
+
+        try {
+            Vlan result = configurationMgr.dedicatePublicIpRange(dedicatePublicIpRangesCmd);
+            Assert.assertNotNull(result);
+        } catch (Exception e) {
+            s_logger.info("exception in testing runDedicatePublicIpRangePostiveTest message: " + e.toString());
+        } finally {
+            txn.close("runDedicatePublicIpRangePostiveTest");
+        }
+    }
+
+    void runDedicatePublicIpRangeInvalidRange() throws Exception {
+        Transaction txn = Transaction.open("runDedicatePublicIpRangeInvalidRange");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(null);
+        try {
+            configurationMgr.dedicatePublicIpRange(dedicatePublicIpRangesCmd);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getMessage().contains("Please specify a valid Public IP range id"));
+        } finally {
+            txn.close("runDedicatePublicIpRangeInvalidRange");
+        }
+    }
+
+    void runDedicatePublicIpRangeDedicatedRange() throws Exception {
+        Transaction txn = Transaction.open("runDedicatePublicIpRangeDedicatedRange");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(vlan);
+
+        // public ip range is already dedicated
+        List<AccountVlanMapVO> accountVlanMaps = new ArrayList<AccountVlanMapVO>();
+        AccountVlanMapVO accountVlanMap = new AccountVlanMapVO(1, 1);
+        accountVlanMaps.add(accountVlanMap);
+        when(configurationMgr._accountVlanMapDao.listAccountVlanMapsByVlan(anyLong())).thenReturn(accountVlanMaps);
+
+        DataCenterVO dc = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null,  "10.0.0.1/24",
+                null, null, NetworkType.Advanced, null, null, true,  true, null, null);
+        when(configurationMgr._zoneDao.findById(anyLong())).thenReturn(dc);
+
+        List<IPAddressVO> ipAddressList = new ArrayList<IPAddressVO>();
+        IPAddressVO ipAddress = new IPAddressVO(new Ip("75.75.75.75"), 1, 0xaabbccddeeffL, 10, false);
+        ipAddressList.add(ipAddress);
+        when(configurationMgr._publicIpAddressDao.listByVlanId(anyLong())).thenReturn(ipAddressList);
+
+        try {
+            configurationMgr.dedicatePublicIpRange(dedicatePublicIpRangesCmd);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getMessage().contains("Public IP range has already been dedicated"));
+        } finally {
+            txn.close("runDedicatePublicIpRangePublicIpRangeDedicated");
+        }
+    }
+
+    void runDedicatePublicIpRangeInvalidZone() throws Exception {
+        Transaction txn = Transaction.open("runDedicatePublicIpRangeInvalidZone");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(vlan);
+
+        when(configurationMgr._accountVlanMapDao.listAccountVlanMapsByVlan(anyLong())).thenReturn(null);
+
+        // public ip range belongs to zone of type basic
+        DataCenterVO dc = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null,  "10.0.0.1/24",
+                null, null, NetworkType.Basic, null, null, true,  true, null, null);
+        when(configurationMgr._zoneDao.findById(anyLong())).thenReturn(dc);
+
+        List<IPAddressVO> ipAddressList = new ArrayList<IPAddressVO>();
+        IPAddressVO ipAddress = new IPAddressVO(new Ip("75.75.75.75"), 1, 0xaabbccddeeffL, 10, false);
+        ipAddressList.add(ipAddress);
+        when(configurationMgr._publicIpAddressDao.listByVlanId(anyLong())).thenReturn(ipAddressList);
+
+        try {
+            configurationMgr.dedicatePublicIpRange(dedicatePublicIpRangesCmd);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getMessage().contains("Public IP range can be dedicated to an account only in the zone of type Advanced"));
+        } finally {
+            txn.close("runDedicatePublicIpRangeInvalidZone");
+        }
+    }
+
+    void runDedicatePublicIpRangeIPAdressAllocated() throws Exception {
+        Transaction txn = Transaction.open("runDedicatePublicIpRangeIPAdressAllocated");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(vlan);
+
+        when(configurationMgr._accountVlanMapDao.listAccountVlanMapsByAccount(anyLong())).thenReturn(null);
+
+        DataCenterVO dc = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null,  "10.0.0.1/24",
+                null, null, NetworkType.Advanced, null, null, true,  true, null, null);
+        when(configurationMgr._zoneDao.findById(anyLong())).thenReturn(dc);
+
+        // one of the ip addresses of the range is allocated to different account
+        List<IPAddressVO> ipAddressList = new ArrayList<IPAddressVO>();
+        IPAddressVO ipAddress = new IPAddressVO(new Ip("75.75.75.75"), 1, 0xaabbccddeeffL, 10, false);
+        ipAddress.setAllocatedToAccountId(1L);
+        ipAddressList.add(ipAddress);
+        when(configurationMgr._publicIpAddressDao.listByVlanId(anyLong())).thenReturn(ipAddressList);
+
+        try {
+            configurationMgr.dedicatePublicIpRange(dedicatePublicIpRangesCmd);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getMessage().contains("Public IP address in range is already allocated to another account"));
+        } finally {
+            txn.close("runDedicatePublicIpRangeIPAdressAllocated");
+        }
+    }
+
+    void runReleasePublicIpRangePostiveTest1() throws Exception {
+        Transaction txn = Transaction.open("runReleasePublicIpRangePostiveTest1");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(vlan);
+
+        List<AccountVlanMapVO> accountVlanMaps = new ArrayList<AccountVlanMapVO>();
+        AccountVlanMapVO accountVlanMap = new AccountVlanMapVO(1, 1);
+        accountVlanMaps.add(accountVlanMap);
+        when(configurationMgr._accountVlanMapDao.listAccountVlanMapsByVlan(anyLong())).thenReturn(accountVlanMaps);
+
+        // no allocated ip's
+        when(configurationMgr._publicIpAddressDao.countIPs(anyLong(), anyLong(), anyBoolean())).thenReturn(0);
+
+        when(configurationMgr._accountVlanMapDao.remove(anyLong())).thenReturn(true);
+        try {
+            Boolean result = configurationMgr.releasePublicIpRange(releasePublicIpRangesCmd);
+            Assert.assertTrue(result);
+        } catch (Exception e) {
+            s_logger.info("exception in testing runReleasePublicIpRangePostiveTest1 message: " + e.toString());
+        } finally {
+            txn.close("runReleasePublicIpRangePostiveTest1");
+        }
+    }
+
+    void runReleasePublicIpRangePostiveTest2() throws Exception {
+        Transaction txn = Transaction.open("runReleasePublicIpRangePostiveTest2");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(vlan);
+
+        List<AccountVlanMapVO> accountVlanMaps = new ArrayList<AccountVlanMapVO>();
+        AccountVlanMapVO accountVlanMap = new AccountVlanMapVO(1, 1);
+        accountVlanMaps.add(accountVlanMap);
+        when(configurationMgr._accountVlanMapDao.listAccountVlanMapsByVlan(anyLong())).thenReturn(accountVlanMaps);
+
+        when(configurationMgr._publicIpAddressDao.countIPs(anyLong(), anyLong(), anyBoolean())).thenReturn(1);
+
+        List<IPAddressVO> ipAddressList = new ArrayList<IPAddressVO>();
+        IPAddressVO ipAddress = new IPAddressVO(new Ip("75.75.75.75"), 1, 0xaabbccddeeffL, 10, false);
+        ipAddressList.add(ipAddress);
+        when(configurationMgr._publicIpAddressDao.listByVlanId(anyLong())).thenReturn(ipAddressList);
+
+        when(configurationMgr._firewallDao.countRulesByIpId(anyLong())).thenReturn(0L);
+
+        when(configurationMgr._networkMgr.disassociatePublicIpAddress(anyLong(), anyLong(), any(Account.class))).thenReturn(true);
+
+        when(configurationMgr._vlanDao.releaseFromLockTable(anyLong())).thenReturn(true);
+
+        when(configurationMgr._accountVlanMapDao.remove(anyLong())).thenReturn(true);
+        try {
+            Boolean result = configurationMgr.releasePublicIpRange(releasePublicIpRangesCmd);
+            Assert.assertTrue(result);
+        } catch (Exception e) {
+            s_logger.info("exception in testing runReleasePublicIpRangePostiveTest2 message: " + e.toString());
+        } finally {
+            txn.close("runReleasePublicIpRangePostiveTest2");
+        }
+    }
+
+    void runReleasePublicIpRangeInvalidIpRange() throws Exception {
+        Transaction txn = Transaction.open("runReleasePublicIpRangeInvalidIpRange");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(null);
+        try {
+            configurationMgr.releasePublicIpRange(releasePublicIpRangesCmd);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getMessage().contains("Please specify a valid IP range id"));
+        } finally {
+            txn.close("runReleasePublicIpRangeInvalidIpRange");
+        }
+    }
+
+    void runReleaseNonDedicatedPublicIpRange() throws Exception {
+        Transaction txn = Transaction.open("runReleaseNonDedicatedPublicIpRange");
+
+        when(configurationMgr._vlanDao.findById(anyLong())).thenReturn(vlan);
+
+        when(configurationMgr._accountVlanMapDao.listAccountVlanMapsByVlan(anyLong())).thenReturn(null);
+        try {
+            configurationMgr.releasePublicIpRange(releasePublicIpRangesCmd);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getMessage().contains("as it not dedicated to any account"));
+        } finally {
+            txn.close("runReleaseNonDedicatedPublicIpRange");
+        }
+    }
+
+
+    public class DedicatePublicIpRangeCmdExtn extends DedicatePublicIpRangeCmd {
+        public long getEntityOwnerId() {
+            return 1;
+        }
+    }
+
+    public class ReleasePublicIpRangeCmdExtn extends ReleasePublicIpRangeCmd {
+        public long getEntityOwnerId() {
+            return 1;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
old mode 100644
new mode 100755
index b0063fa..a03e361
--- a/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockConfigurationManagerImpl.java
@@ -40,7 +40,9 @@ import org.apache.cloudstack.api.command.admin.offering.UpdateServiceOfferingCmd
 import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd;
 import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd;
 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.ReleasePublicIpRangeCmd;
 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.UpdateZoneCmd;
@@ -544,7 +546,7 @@ public class MockConfigurationManagerImpl extends ManagerBase implements Configu
      * @see com.cloud.configuration.ConfigurationManager#deleteAccountSpecificVirtualRanges(long)
      */
     @Override
-    public boolean deleteAccountSpecificVirtualRanges(long accountId) {
+    public boolean releaseAccountSpecificVirtualRanges(long accountId) {
         // TODO Auto-generated method stub
         return false;
     }
@@ -613,5 +615,24 @@ public class MockConfigurationManagerImpl extends ManagerBase implements Configu
         return null;
     }
 
+	@Override
+	public Vlan dedicatePublicIpRange(DedicatePublicIpRangeCmd cmd)
+			throws ResourceAllocationException {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public boolean releasePublicIpRange(long userId, long vlanDbId,
+			Account caller) {
+		// TODO Auto-generated method stub
+		return false;
+	}
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/test/integration/component/test_public_ip_range.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_public_ip_range.py b/test/integration/component/test_public_ip_range.py
new file mode 100755
index 0000000..f2c967f
--- /dev/null
+++ b/test/integration/component/test_public_ip_range.py
@@ -0,0 +1,173 @@
+# 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.
+""" P1 tests for Dedicating Public IP addresses
+"""
+#Import Local Modules
+import marvin
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.integration.lib.utils import *
+from marvin.integration.lib.base import *
+from marvin.integration.lib.common import *
+import datetime
+
+class Services:
+    """Test Dedicating Public IP addresses
+    """
+
+    def __init__(self):
+        self.services = {
+                        "domain": {
+                                   "name": "Domain",
+                                   },
+                        "account": {
+                                    "email": "test@test.com",
+                                    "firstname": "Test",
+                                    "lastname": "User",
+                                    "username": "test",
+                                    "password": "password",
+                         },
+                        "gateway": "10.102.197.1",
+                        "netmask": "255.255.255.0",
+                        "forvirtualnetwork": "true",
+                        "startip": "10.102.197.70",
+                        "endip": "10.102.197.73",
+                        "zoneid": "1",
+                        "podid": "",
+                        "vlan": "101",
+                    }
+
+class TesDedicatePublicIPRange(cloudstackTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        cls.api_client = super(TesDedicatePublicIPRange, cls).getClsTestClient().getApiClient()
+        cls.services = Services().services
+        # Get Zone, Domain
+        cls.domain = get_domain(cls.api_client, cls.services)
+        cls.zone = get_zone(cls.api_client, cls.services)
+
+        # Create Account
+        cls.account = Account.create(
+                            cls.api_client,
+                            cls.services["account"],
+                            domainid=cls.domain.id
+                            )
+        cls._cleanup = [
+                        cls.account,
+                        ]
+        return
+
+    @classmethod
+    def tearDownClass(cls):
+        try:
+            # Cleanup resources used
+            cleanup_resources(cls.api_client, cls._cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return
+
+    def setUp(self):
+        self.apiclient = self.testClient.getApiClient()
+        self.dbclient = self.testClient.getDbConnection()
+        self.cleanup = []
+        return
+
+    def tearDown(self):
+        try:
+            # Clean up
+            cleanup_resources(self.apiclient, self.cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return
+
+    @attr(tags = ["publiciprange", "dedicate", "release"])
+    def test_dedicatePublicIpRange(self):
+        """Test public IP range dedication
+        """
+
+        # Validate the following:
+        # 1. Create a Public IP range
+        # 2. Created IP range should be present, verify with listVlanIpRanges
+        # 3. Dedicate the created IP range to user account
+        # 4. Verify IP range is dedicated, verify with listVlanIpRanges
+        # 5. Release the dedicated Public IP range back to the system
+        # 6. Verify IP range has been released, verify with listVlanIpRanges
+        # 7. Delete the Public IP range
+
+        self.debug("Creating Public IP range")
+        self.public_ip_range = PublicIpRange.create(
+                                    self.api_client,
+                                    self.services
+                               )
+        list_public_ip_range_response = PublicIpRange.list(
+                                            self.apiclient,
+                                            id=self.public_ip_range.vlan.id
+                                        )
+        self.debug(
+                "Verify listPublicIpRanges response for public ip ranges: %s" \
+                % self.public_ip_range.vlan.id
+            )
+        self.assertEqual(
+                         isinstance(list_public_ip_range_response, list),
+                         True,
+                         "Check for list Public IP range response"
+                         )
+        public_ip_response = list_public_ip_range_response[0]
+        self.assertEqual(
+                            public_ip_response.id,
+                            self.public_ip_range.vlan.id,
+                            "Check public ip range response id is in listVlanIpRanges"
+                        )
+
+        self.debug("Dedicating Public IP range");
+        dedicate_public_ip_range_response = PublicIpRange.dedicate(
+                                                self.apiclient,
+                                                self.public_ip_range.vlan.id,
+                                                account=self.account.account.name,
+                                                domainid=self.account.account.domainid
+                                            )
+        list_public_ip_range_response = PublicIpRange.list(
+                                            self.apiclient,
+                                            id=self.public_ip_range.vlan.id
+                                        )
+        public_ip_response = list_public_ip_range_response[0]
+        self.assertEqual(
+                            public_ip_response.account,
+                            self.account.account.name,
+                            "Check account name is in listVlanIpRanges as the account public ip range is dedicated to"
+                        )
+
+        self.debug("Releasing Public IP range");
+        self.public_ip_range.release(self.apiclient)
+        list_public_ip_range_response = PublicIpRange.list(
+                                            self.apiclient,
+                                            id=self.public_ip_range.vlan.id
+                                        )
+        public_ip_response = list_public_ip_range_response[0]
+        self.assertEqual(
+                            public_ip_response.account,
+                            "system",
+                            "Check account name is system account in listVlanIpRanges"
+                        )
+
+        self.debug("Deleting Public IP range");
+        self.public_ip_range.delete(self.apiclient)
+
+        return
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f865c5a/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
old mode 100644
new mode 100755
index d27ab3b..3df68ab
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -1873,7 +1873,7 @@ class PublicIpRange:
         """Delete VlanIpRange"""
 
         cmd = deleteVlanIpRange.deleteVlanIpRangeCmd()
-        cmd.id = self.id
+        cmd.id = self.vlan.id
         apiclient.deleteVlanIpRange(cmd)
 
     @classmethod
@@ -1884,6 +1884,23 @@ class PublicIpRange:
         [setattr(cmd, k, v) for k, v in kwargs.items()]
         return(apiclient.listVlanIpRanges(cmd))
 
+    @classmethod
+    def dedicate(cls, apiclient, id, account=None, domainid=None, projectid=None):
+        """Dedicate VLAN IP range"""
+
+        cmd = dedicatePublicIpRange.dedicatePublicIpRangeCmd()
+        cmd.id = id
+        cmd.account = account
+        cmd.domainid = domainid
+        cmd.projectid = projectid
+        return PublicIpRange(apiclient.dedicatePublicIpRange(cmd).__dict__)
+
+    def release(self, apiclient):
+        """Release VLAN IP range"""
+
+        cmd = releasePublicIpRange.releasePublicIpRangeCmd()
+        cmd.id = self.vlan.id
+        return apiclient.releasePublicIpRange(cmd)
 
 class SecondaryStorage:
     """Manage Secondary storage"""


[18/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
scalevm test: adjust the tags to suit the environment

scalevm works with the xenserver hypervisortype only.

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4ae3e5de
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4ae3e5de
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4ae3e5de

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 4ae3e5de7f98147abf6f72f7b102c56125071035
Parents: 580731c
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Fri Apr 12 16:31:34 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Fri Apr 12 16:32:12 2013 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_ScaleVm.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ae3e5de/test/integration/smoke/test_ScaleVm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_ScaleVm.py b/test/integration/smoke/test_ScaleVm.py
index 710d2ad..64fe4dc 100644
--- a/test/integration/smoke/test_ScaleVm.py
+++ b/test/integration/smoke/test_ScaleVm.py
@@ -91,7 +91,7 @@ class Services:
             "sleep": 60,
             "timeout": 10,
             #Migrate VM to hostid
-            "ostype": 'CentOS 5.6 (64-bit)',
+            "ostype": 'CentOS 5.3 (64-bit)',
             # CentOS 5.3 (64-bit)
         }
 
@@ -164,7 +164,7 @@ class TestScaleVm(cloudstackTestCase):
         cleanup_resources(self.apiclient, self.cleanup)
         return
 
-    @attr(tags = ["advanced", "basic", "multicluster", "storagemotion", "xenserver"])
+    @attr(tags = ["xenserver", "advanced", "basic"])
     def test_01_scale_vm(self):
         """Test scale virtual machine 
         """


[48/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-779:Enabling Egress rules feature for SRX


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/97911e9f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/97911e9f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/97911e9f

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 97911e9fe6ba110b25a9b52a443e31ebfb42a4c8
Parents: e05defc
Author: Pranav Saxena <pr...@citrix.com>
Authored: Mon Apr 15 16:28:45 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Mon Apr 15 16:28:45 2013 +0530

----------------------------------------------------------------------
 ui/scripts/network.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/97911e9f/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index b6ed0fe..a759fb2 100755
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -923,7 +923,7 @@
                 hiddenTabs.push("addloadBalancer");
               }
 
-              if (isVPC || isAdvancedSGZone || hasSRXFirewall) {
+              if (isVPC || isAdvancedSGZone ) {
                  hiddenTabs.push('egressRules');
                }
               


[24/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
tools: Allow setting the output format for the docs


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0f8a46c5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0f8a46c5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0f8a46c5

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 0f8a46c5802be6534d8d38cca3eb7b06568738ce
Parents: 7753275
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Fri Apr 12 15:07:24 2013 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Fri Apr 12 15:07:54 2013 +0200

----------------------------------------------------------------------
 tools/build/build_docs.sh |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0f8a46c5/tools/build/build_docs.sh
----------------------------------------------------------------------
diff --git a/tools/build/build_docs.sh b/tools/build/build_docs.sh
index c1b1f13..62617a3 100755
--- a/tools/build/build_docs.sh
+++ b/tools/build/build_docs.sh
@@ -19,22 +19,25 @@
 sourcedir=~/incubator-cloudstack/
 common_content_dir=/usr/share/publican/Common_Content
 publican_path=/usr/bin/publican
+output_format="html,pdf"
 
 usage(){
     echo "usage: $0 [-s source dir] [-c publican common content] [-p path to publican]"
     echo "  -s sets the source directory (defaults to $sourcedir)"
     echo "  -c sets the public common content directory (defaults to $common_content_dir)"
     echo "  -p sets the path to the publican binary (defaults to $publican_path)"
+    echo "  -f sets the output format (defaults to $output_format)"
     echo "  -h"
 }
 
-while getopts v:s:c:p:h opt
+while getopts v:s:c:p:f:h opt
 do
     case "$opt" in
       v)  version="$OPTARG";;
       s)  sourcedir="$OPTARG";;
       c)  common_content_dir="$OPTARG";;
       p)  publican_path="$OPTARG";;
+      f)  output_format="$OPTARG";;
       h)  usage
           exit 0;;
       \?)
@@ -56,5 +59,5 @@ fi
 cd $sourcedir/docs
 cp -R /usr/share/publican/Common_Content .
 ln -s $sourcedir/docs/publican-cloudstack Common_Content/cloudstack
-publican build --config=publican-installation.cfg --formats html,pdf --langs en-US --common_content=$sourcedir/docs/Common_Content
+publican build --config=publican-installation.cfg --formats $output_format --langs en-US --common_content=$sourcedir/docs/Common_Content
 rm -r Common_Content
\ No newline at end of file


[39/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-574: Add Ceph RBD documentation

This commit also add some extra information about NFS and iSCSI
Primary Storage on a KVM hypervisor.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ed2aa9f9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ed2aa9f9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ed2aa9f9

Branch: refs/heads/cisco-vnmc-api-integration
Commit: ed2aa9f9da2afcb6c28eff1ebbf79baa5a2e25dd
Parents: c5b10a7
Author: Wido den Hollander <wi...@42on.com>
Authored: Sat Apr 13 11:13:26 2013 +0200
Committer: Wido den Hollander <wi...@42on.com>
Committed: Sat Apr 13 11:13:26 2013 +0200

----------------------------------------------------------------------
 docs/en-US/hypervisor-kvm-install-flow.xml |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed2aa9f9/docs/en-US/hypervisor-kvm-install-flow.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/hypervisor-kvm-install-flow.xml b/docs/en-US/hypervisor-kvm-install-flow.xml
index 6cc73e4..7dfd47d 100644
--- a/docs/en-US/hypervisor-kvm-install-flow.xml
+++ b/docs/en-US/hypervisor-kvm-install-flow.xml
@@ -34,4 +34,5 @@
     <xi:include href="hypervisor-host-install-network-openvswitch.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="hypervisor-host-install-firewall.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
     <xi:include href="hypervisor-host-install-finish.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+    <xi:include href="hypervisor-host-install-primary-storage.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
 </section>


[06/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixes to unit-test dues to changes in master


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6137d327
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6137d327
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6137d327

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 6137d327a8969e403c4fe0ae05c2bd1d7a12033e
Parents: eea0ed5
Author: Prachi Damle <pr...@cloud.com>
Authored: Thu Apr 11 13:09:49 2013 -0700
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:23:48 2013 -0700

----------------------------------------------------------------------
 .../affinity/AffinityGroupServiceImpl.java         |    3 +-
 .../affinity/AffinityApiTestConfiguration.java     |   18 +++++++++++-
 .../cloudstack/affinity/AffinityApiUnitTest.java   |   10 +++++++
 server/test/resources/affinityContext.xml          |   21 ++++++++------
 4 files changed, 40 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6137d327/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
index 613c095..2ea887c 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
@@ -64,6 +64,7 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
     private UserVmDao _userVmDao;
 
     @Override
+    @ActionEvent(eventType = EventTypes.EVENT_AFFINITY_GROUP_CREATE, eventDescription = "Creating Affinity Group", create = true)
     public AffinityGroup createAffinityGroup(String account, Long domainId, String affinityGroupName,
             String affinityGroupType, String description) {
 
@@ -106,7 +107,7 @@ public class AffinityGroupServiceImpl extends ManagerBase implements AffinityGro
 
     @DB
     @Override
-    @ActionEvent(eventType = EventTypes.EVENT_SECURITY_GROUP_DELETE, eventDescription = "deleting affinity group")
+    @ActionEvent(eventType = EventTypes.EVENT_AFFINITY_GROUP_DELETE, eventDescription = "Deleting affinity group")
     public boolean deleteAffinityGroup(Long affinityGroupId, String account, Long domainId, String affinityGroupName)
             throws ResourceInUseException {
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6137d327/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
index d778ed4..c6a0755 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiTestConfiguration.java
@@ -50,6 +50,8 @@ import com.cloud.dc.dao.PodVlanDaoImpl;
 import com.cloud.dc.dao.PodVlanMapDaoImpl;
 import com.cloud.dc.dao.VlanDaoImpl;
 import com.cloud.domain.dao.DomainDaoImpl;
+import com.cloud.event.EventUtils;
+import com.cloud.event.dao.EventDaoImpl;
 import com.cloud.event.dao.UsageEventDaoImpl;
 import com.cloud.host.dao.HostDaoImpl;
 import com.cloud.host.dao.HostDetailsDaoImpl;
@@ -100,6 +102,7 @@ import com.cloud.user.AccountManager;
 import com.cloud.user.ResourceLimitService;
 import com.cloud.user.UserContext;
 import com.cloud.user.UserContextInitializer;
+import com.cloud.user.dao.AccountDao;
 import com.cloud.user.dao.AccountDaoImpl;
 import com.cloud.user.dao.UserDaoImpl;
 import com.cloud.utils.component.SpringComponentScanUtils;
@@ -115,7 +118,7 @@ import com.cloud.vm.dao.VMInstanceDaoImpl;
 @Configuration
 @ComponentScan(basePackageClasses = { AccountVlanMapDaoImpl.class, VolumeDaoImpl.class, HostPodDaoImpl.class,
         DomainDaoImpl.class, SwiftDaoImpl.class, ServiceOfferingDaoImpl.class, VlanDaoImpl.class,
-        IPAddressDaoImpl.class, ResourceTagsDaoImpl.class, AccountDaoImpl.class, InstanceGroupDaoImpl.class,
+        IPAddressDaoImpl.class, ResourceTagsDaoImpl.class, InstanceGroupDaoImpl.class,
         UserAccountJoinDaoImpl.class, CapacityDaoImpl.class, SnapshotDaoImpl.class, HostDaoImpl.class,
         VMInstanceDaoImpl.class, HostTransferMapDaoImpl.class, PortForwardingRulesDaoImpl.class,
         PrivateIpDaoImpl.class, UsageEventDaoImpl.class, PodVlanMapDaoImpl.class, DiskOfferingDaoImpl.class,
@@ -126,10 +129,21 @@ 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 }, includeFilters = { @Filter(value = AffinityApiTestConfiguration.Library.class, type = FilterType.CUSTOM) }, useDefaultFilters = false)
+        ComponentContext.class, AffinityGroupProcessor.class, UserVmVO.class, EventUtils.class, UserVmVO.class,
+        EventDaoImpl.class }, includeFilters = { @Filter(value = AffinityApiTestConfiguration.Library.class, type = FilterType.CUSTOM) }, useDefaultFilters = false)
 public class AffinityApiTestConfiguration {
 
     @Bean
+    public AccountDao accountDao() {
+        return Mockito.mock(AccountDao.class);
+    }
+
+    @Bean
+    public EventUtils eventUtils() {
+        return Mockito.mock(EventUtils.class);
+    }
+
+    @Bean
     public AffinityGroupProcessor affinityGroupProcessor() {
         return Mockito.mock(AffinityGroupProcessor.class);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6137d327/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
----------------------------------------------------------------------
diff --git a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
index 17f165d..86cf017 100644
--- a/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
+++ b/server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java
@@ -34,6 +34,7 @@ import org.junit.runner.RunWith;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
+import com.cloud.event.EventUtils;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.ResourceInUseException;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
@@ -43,6 +44,7 @@ import com.cloud.user.AccountManagerImpl;
 import com.cloud.user.AccountVO;
 import com.cloud.user.UserContext;
 import com.cloud.user.UserContextInitializer;
+import com.cloud.user.dao.AccountDao;
 import com.cloud.utils.component.ComponentContext;
 import com.cloud.vm.UserVmVO;
 import com.cloud.vm.VirtualMachine;
@@ -73,6 +75,12 @@ public class AffinityApiUnitTest {
     @Inject
     AffinityGroupVMMapDao _affinityGroupVMMapDao;
 
+    @Inject
+    EventUtils _eventUtils;
+
+    @Inject
+    AccountDao _accountDao;
+
     private static long domainId = 5L;
 
 
@@ -83,6 +91,7 @@ public class AffinityApiUnitTest {
 
     @Before
     public void testSetUp() {
+        ComponentContext.initComponentsLifeCycle();
         AccountVO acct = new AccountVO(200L);
         acct.setType(Account.ACCOUNT_TYPE_NORMAL);
         acct.setAccountName("user");
@@ -92,6 +101,7 @@ public class AffinityApiUnitTest {
 
         when(_acctMgr.finalizeOwner((Account) anyObject(), anyString(), anyLong(), anyLong())).thenReturn(acct);
         when(_processor.getType()).thenReturn("mock");
+        when(_accountDao.findByIdIncludingRemoved(0L)).thenReturn(acct);
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6137d327/server/test/resources/affinityContext.xml
----------------------------------------------------------------------
diff --git a/server/test/resources/affinityContext.xml b/server/test/resources/affinityContext.xml
index 652905c..15476c1 100644
--- a/server/test/resources/affinityContext.xml
+++ b/server/test/resources/affinityContext.xml
@@ -23,13 +23,18 @@
      <context:annotation-config />
 
     <!-- @DB support -->
-    <aop:config proxy-target-class="true">
-    <aop:aspect id="dbContextBuilder" ref="transactionContextBuilder">
-    <aop:pointcut id="captureAnyMethod" expression="execution(* *(..))" />
-
-    <aop:around pointcut-ref="captureAnyMethod" method="AroundAnyMethod" />
-    </aop:aspect>
-    </aop:config>
+	<bean id="componentContext" class="com.cloud.utils.component.ComponentContext" />
+	
+	  <bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
+	  <bean id="actionEventInterceptor" class="com.cloud.event.ActionEventInterceptor" />
+	  <bean id="instantiatePostProcessor" class="com.cloud.utils.component.ComponentInstantiationPostProcessor">
+	    <property name="Interceptors">
+	        <list>
+	            <ref bean="transactionContextBuilder" />
+	            <ref bean="actionEventInterceptor" />
+	        </list>
+	    </property>
+	  </bean>
     
 
     <bean id="ConfigurationManager" class="com.cloud.configuration.ConfigurationManagerImpl">
@@ -38,7 +43,5 @@
   
     <bean class="org.apache.cloudstack.affinity.AffinityApiTestConfiguration" />
     
-    <bean id="transactionContextBuilder" class="com.cloud.utils.db.TransactionContextBuilder" />
-    
 
 </beans>
\ No newline at end of file


[11/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
CLOUDSTACK-1910: cloudstack UI - Regions menu - make Add/Delete/Edit Region action not available to regular-user/domain-admin.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4600bd4b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4600bd4b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4600bd4b

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 4600bd4b99a73b5344d789b9e3db212a42422443
Parents: 69f49e7
Author: Jessica Wang <je...@citrix.com>
Authored: Thu Apr 11 15:26:37 2013 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Thu Apr 11 15:27:11 2013 -0700

----------------------------------------------------------------------
 ui/scripts/regions.js |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4600bd4b/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 10057a6..ec5e21b 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -55,6 +55,12 @@
           actions: {
             add: {
               label: 'label.add.region',
+							preFilter: function(args) {
+                if(isAdmin())
+                  return true;
+                else
+                  return false;
+              },
               messages: {
                 notification: function() { return 'label.add.region'; }
               },
@@ -98,10 +104,9 @@
             $.ajax({
               url: createURL('listRegions&listAll=true'),
               success: function(json) {
-                var regions = json.listregionsresponse.region
-
-                args.response.success({
-                  data: regions ? regions : []
+                var items = json.listregionsresponse.region;
+                args.response.success({								 
+                  data: items
                 });
               },
               error: function(json) {
@@ -193,6 +198,7 @@
                       var region = json.listregionsresponse.region
 
                       args.response.success({
+											  actionFilter: regionActionfilter,
                         data: region ? region[0] : {}
                       });
                     },
@@ -382,4 +388,14 @@
       }
     }
   };
+		
+	var regionActionfilter = function(args) {	  
+    var allowedActions = [];    
+    if(isAdmin()) {        
+      allowedActions.push("edit");
+			allowedActions.push("remove");
+    } 
+    return allowedActions;
+  }	
+	
 })(cloudStack);


[02/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
affinitygroup bvt: changes to the bvt for affinity groups

Added tags for the test, base.py extensions for list, craete, delete and
fixes to the test

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9de7a68e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9de7a68e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9de7a68e

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 9de7a68e922951d9a92c6f6ac3ae1f06199a943c
Parents: 7201eb9
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Tue Apr 9 16:31:18 2013 +0530
Committer: Prachi Damle <pr...@cloud.com>
Committed: Thu Apr 11 13:23:39 2013 -0700

----------------------------------------------------------------------
 test/integration/smoke/test_affinity_groups.py |   23 +++++++++--------
 tools/marvin/marvin/integration/lib/base.py    |   25 +++++++++++-------
 2 files changed, 27 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9de7a68e/test/integration/smoke/test_affinity_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_affinity_groups.py b/test/integration/smoke/test_affinity_groups.py
index 0d06e64..832c4a4 100644
--- a/test/integration/smoke/test_affinity_groups.py
+++ b/test/integration/smoke/test_affinity_groups.py
@@ -52,12 +52,12 @@ class Services:
                 # In MBs
             },
             "ostype": 'CentOS 5.3 (64-bit)',
-            "mode": 'advanced',
             "virtual_machine" : {
                 "affinity": {
                     "name": "webvms",
                     "type": "host anti-affinity",
-                }
+                },
+                "hypervisor" : "XenServer",
             }
         }
 
@@ -98,19 +98,22 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
             cls.services["service_offering"]
         )
 
-        cls.ag = AffinityGroup.create(cls.api_client, cls.services["virtual_machine"]["affinity"], domainid=cls.domain.id)
+        cls.ag = AffinityGroup.create(cls.api_client, cls.services["virtual_machine"]["affinity"],
+            account=cls.services["account"], domainid=cls.domain.id)
 
         cls._cleanup = [
             cls.service_offering,
-            cls.disk_offering,
             cls.account,
         ]
         return
 
-    @attr(tags=["simulator", "basic", "advanced"])
+    @attr(tags=["simulator", "basic", "advanced", "multihost"])
     def test_DeployVmAntiAffinityGroup(self):
         """
-        Deploys a couple of VMs in the same affinity group and verifies they are not on the same host
+        test DeployVM in anti-affinity groups
+
+        deploy VM1 and VM2 in the same host-anti-affinity groups
+        Verify that the vms are deployed on separate hosts
         """
         #deploy VM1 in affinity group created in setUp
         vm1 = VirtualMachine.create(
@@ -120,8 +123,7 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
             accountid=self.account.account.name,
             domainid=self.account.account.domainid,
             serviceofferingid=self.service_offering.id,
-            affinitygroupnames=self.ag.name,
-            mode=self.services["mode"]
+            affinitygroupnames=[self.ag.name]
         )
 
         list_vm1 = list_virtual_machines(
@@ -154,12 +156,11 @@ class TestDeployVmWithAffinityGroup(cloudstackTestCase):
             accountid=self.account.account.name,
             domainid=self.account.account.domainid,
             serviceofferingid=self.service_offering.id,
-            affinitygroupnames=self.ag.name,
-            mode=self.services["mode"]
+            affinitygroupnames=[self.ag.name]
         )
         list_vm2 = list_virtual_machines(
             self.api_client,
-            id=self.vm1.id
+            id=vm2.id
         )
         self.assertEqual(
             isinstance(list_vm2, list),

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9de7a68e/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index 8c7470e..d27ab3b 100644
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -90,10 +90,7 @@ class Account:
         cmd.firstname = services["firstname"]
         cmd.lastname = services["lastname"]
 
-        # Password Encoding
-        mdf = hashlib.md5()
-        mdf.update(services["password"])
-        cmd.password = mdf.hexdigest()
+        cmd.password = services["password"]
         cmd.username = "-".join([services["username"], random_gen()])
 
         if domainid:
@@ -223,7 +220,7 @@ class VirtualMachine:
     def create(cls, apiclient, services, templateid=None, accountid=None,
                     domainid=None, zoneid=None, networkids=None, serviceofferingid=None,
                     securitygroupids=None, projectid=None, startvm=None,
-                    diskofferingid=None, affinitygroupname=None, hostid=None, mode='basic'):
+                    diskofferingid=None, affinitygroupnames=None, hostid=None, mode='basic'):
         """Create the instance"""
 
         cmd = deployVirtualMachine.deployVirtualMachineCmd()
@@ -270,6 +267,8 @@ class VirtualMachine:
 
         if "affinitygroupnames" in services:
             cmd.affinitygroupnames  = services["affinitygroupnames"]
+        elif affinitygroupnames:
+            cmd.affinitygroupnames  = affinitygroupnames
 
         if projectid:
             cmd.projectid = projectid
@@ -2441,13 +2440,19 @@ class AffinityGroup:
         agCmd.type = services['type']
         agCmd.account = services['account'] if 'account' in services else account
         agCmd.domainid = services['domainid'] if 'domainid' in services else domainid
+        return AffinityGroup(apiclient.createAffinityGroup(agCmd).__dict__)
 
-    def update(self):
+    def update(self, apiclient):
         pass
 
-    def delete(self):
-        pass
+    def delete(self, apiclient):
+        cmd = deleteAffinityGroup.deleteAffinityGroupCmd()
+        cmd.id = self.id
+        return apiclient.deleteVPC(cmd)
+
 
     @classmethod
-    def list(cls):
-        pass
\ No newline at end of file
+    def list(cls, apiclient, **kwargs):
+        cmd = listAffinityGroups.listAffinityGroupsCmd()
+        [setattr(cmd, k, v) for k, v in kwargs.items()]
+        return(apiclient.listVPCs(cmd))


[31/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixing the apidoc for the new api dedicatePublicIpRange

Signed-off-by: Prasanna Santhanam <ts...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0b17b624
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0b17b624
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0b17b624

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 0b17b624dbfa517e48cbcb09fb695370d4a8ac03
Parents: fd84c56
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Apr 10 16:32:19 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Fri Apr 12 23:27:42 2013 +0530

----------------------------------------------------------------------
 tools/apidoc/gen_toc.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0b17b624/tools/apidoc/gen_toc.py
----------------------------------------------------------------------
diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py
index 2d5292b..5403adb 100644
--- a/tools/apidoc/gen_toc.py
+++ b/tools/apidoc/gen_toc.py
@@ -83,6 +83,7 @@ known_categories = {
     'Configuration': 'Configuration',
     'Capabilities': 'Configuration',
     'Pod': 'Pod',
+    'PublicIpRange': 'Network',
     'Zone': 'Zone',
     'NetworkOffering': 'Network Offering',
     'NetworkACL': 'Network ACL',


[50/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
Fixed indentation and line ending


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7ce45ea1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7ce45ea1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7ce45ea1

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 7ce45ea1087407b87ff14d0f9ae5a7647c3f3ccc
Parents: 0232048
Author: Koushik Das <ko...@citrix.com>
Authored: Mon Apr 15 18:36:33 2013 +0530
Committer: Koushik Das <ko...@citrix.com>
Committed: Mon Apr 15 18:36:33 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_asa1000v_fw.py |  267 ++++++++++---------
 tools/marvin/marvin/integration/lib/base.py    |    3 +-
 2 files changed, 135 insertions(+), 135 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ce45ea1/test/integration/component/test_asa1000v_fw.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_asa1000v_fw.py b/test/integration/component/test_asa1000v_fw.py
index 58a971b..0b66f97 100755
--- a/test/integration/component/test_asa1000v_fw.py
+++ b/test/integration/component/test_asa1000v_fw.py
@@ -1,133 +1,134 @@
-# 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.
-
-""" Cisco ASA1000v external firewall
-"""
-#Import Local Modules
-import marvin
-from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-from marvin.remoteSSHClient import remoteSSHClient
-import datetime
-
-
-class Services:
-    """Test Cisco ASA1000v services
-    """
-
-    def __init__(self):
-        self.services = {
-                        "vnmc": {
-                                    "ipaddress": '10.147.28.236',
-                                    "username": 'admin',
-                                    "password": 'Password_123',
-                        },
-                        "asa": {
-                                    "ipaddress": '10.147.28.238',
-                                    "insideportprofile": 'asa-in123',
-                        },
-                        "network_offering": {
-                                    "name": 'CiscoVnmc',
-                                    "displaytext": 'CiscoVnmc',
-                                    "guestiptype": 'Isolated',
-                                    "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Firewall,UserData,StaticNat',
-                                    "traffictype": 'GUEST',
-                                    "availability": 'Optional',
-                                    "serviceProviderList": {
-                                            "Dhcp": 'VirtualRouter',
-                                            "Dns": 'VirtualRouter',
-                                            "SourceNat": 'CiscoVnmc',
-                                            "PortForwarding": 'CiscoVnmc',
-                                            "Firewall": 'CiscoVnmc',
-                                            "UserData": 'VirtualRouter',
-                                            "StaticNat": 'CiscoVnmc',
-                                    },
-                        },
-                        "network": {
-                                    "name": "CiscoVnmc",
-                                    "displaytext": "CiscoVnmc",
-                        },
-                    }
-
-class TestASASetup(cloudstackTestCase):
-
-    @classmethod
-    def setUpClass(cls):
-        cls.apiclient = super(
-                            TestASASetup,
-                            cls
-                            ).getClsTestClient().getApiClient()
-        cls.services = Services().services
-        cls.network_offering = NetworkOffering.create(
-                            cls.apiclient,
-                            cls.services["network_offering"],
-                            conservemode=True)
-        # Enable network offering
-        cls.network_offering.update(cls.apiclient, state='Enabled')
-
-        cls._cleanup = [
-                      cls.network_offering,
-                      ]
-        return
-
-    @classmethod
-    def tearDownClass(cls):
-        try:
-            # Cleanup
-            cleanup_resources(cls.apiclient, cls._cleanup)
-        except Exception as e:
-            raise Exception("Warning: Exception during cleanup : %s" % e)
-        return
-
-    def setUp(self):
-        self.apiclient = self.testClient.getApiClient()
-        self.dbclient = self.testClient.getDbConnection()
-
-        self.zone = get_zone(self.apiclient, self.services)
-        self.physicalnetworks = PhysicalNetwork.list(self.apiclient, zoneid=self.zone.id)
-        self.assertNotEqual(len(self.physicalnetworks), 0, "Check if the list physical network API returns a non-empty response")
-        self.clusters = Cluster.list(self.apiclient, hypervisor='VMware')
-        self.assertNotEqual(len(self.clusters), 0, "Check if the list cluster API returns a non-empty response")
-        return
-
-    def tearDown(self):
-        try:
-            self.debug("Cleaning up the resources")
-            # Cleanup
-            cleanup_resources(self.apiclient, self._cleanup)
-            self.debug("Cleanup complete!")
-        except Exception as e:
-            raise Exception("Warning: Exception during cleanup : %s" % e)
-        return
-
-    def test_registerVnmc(self):
-        Vnmc = VNMC.create(self.apiclient, self.services["vnmc"]["ipaddress"], self.services["vnmc"]["username"], self.services["vnmc"]["password"], self.physicalnetworks[0].id)
-        self.debug("Cisco VNMC appliance with id %s was deployed"%(Vnmc.id))
-
-        VnmcList = VNMC.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
-        self.assertNotEqual(len(VnmcList), 0, "Check if the list VNMC API returns a non-empty response")
-
-    def test_registerAsa1000v(self):
-        Asa = ASA1000V.create(self.apiclient, self.services["asa"]["ipaddress"], self.services["asa"]["insideportprofile"], self.clusters[0].id, self.physicalnetworks[0].id)
-        self.debug("Cisco ASA 1000v appliance with id %s was deployed"%(Asa.id))
-
-        AsaList = ASA1000V.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
-        self.assertNotEqual(len(AsaList), 0, "Check if the list ASA 1000v API returns a non-empty response")
+# 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.
+
+""" Cisco ASA1000v external firewall
+"""
+#Import Local Modules
+import marvin
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.integration.lib.utils import *
+from marvin.integration.lib.base import *
+from marvin.integration.lib.common import *
+from marvin.remoteSSHClient import remoteSSHClient
+import datetime
+
+
+class Services:
+    """Test Cisco ASA1000v services
+    """
+
+    def __init__(self):
+        self.services = {
+                        "vnmc": {
+                                    "ipaddress": '10.147.28.236',
+                                    "username": 'admin',
+                                    "password": 'Password_123',
+                        },
+                        "asa": {
+                                    "ipaddress": '10.147.28.238',
+                                    "insideportprofile": 'asa-in123',
+                        },
+                        "network_offering": {
+                                    "name": 'CiscoVnmc',
+                                    "displaytext": 'CiscoVnmc',
+                                    "guestiptype": 'Isolated',
+                                    "supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Firewall,UserData,StaticNat',
+                                    "traffictype": 'GUEST',
+                                    "availability": 'Optional',
+                                    "serviceProviderList": {
+                                            "Dhcp": 'VirtualRouter',
+                                            "Dns": 'VirtualRouter',
+                                            "SourceNat": 'CiscoVnmc',
+                                            "PortForwarding": 'CiscoVnmc',
+                                            "Firewall": 'CiscoVnmc',
+                                            "UserData": 'VirtualRouter',
+                                            "StaticNat": 'CiscoVnmc',
+                                    },
+                        },
+                        "network": {
+                                    "name": "CiscoVnmc",
+                                    "displaytext": "CiscoVnmc",
+                        },
+                    }
+
+class TestASASetup(cloudstackTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        cls.apiclient = super(
+                            TestASASetup,
+                            cls
+                            ).getClsTestClient().getApiClient()
+        cls.services = Services().services
+        cls.network_offering = NetworkOffering.create(
+                            cls.apiclient,
+                            cls.services["network_offering"],
+                            conservemode=True)
+        # Enable network offering
+        cls.network_offering.update(cls.apiclient, state='Enabled')
+
+        cls._cleanup = [
+                        cls.network_offering,
+                      ]
+        return
+
+    @classmethod
+    def tearDownClass(cls):
+        try:
+            # Cleanup
+            cleanup_resources(cls.apiclient, cls._cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return
+
+    def setUp(self):
+        self.apiclient = self.testClient.getApiClient()
+        self.dbclient = self.testClient.getDbConnection()
+
+        self.zone = get_zone(self.apiclient, self.services)
+        self.physicalnetworks = PhysicalNetwork.list(self.apiclient, zoneid=self.zone.id)
+        self.assertNotEqual(len(self.physicalnetworks), 0, "Check if the list physical network API returns a non-empty response")
+        self.clusters = Cluster.list(self.apiclient, hypervisor='VMware')
+        self.assertNotEqual(len(self.clusters), 0, "Check if the list cluster API returns a non-empty response")
+
+        return
+
+    def tearDown(self):
+        try:
+            self.debug("Cleaning up the resources")
+            # Cleanup
+            cleanup_resources(self.apiclient, self._cleanup)
+            self.debug("Cleanup complete!")
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return
+
+    def test_registerVnmc(self):
+        Vnmc = VNMC.create(self.apiclient, self.services["vnmc"]["ipaddress"], self.services["vnmc"]["username"], self.services["vnmc"]["password"], self.physicalnetworks[0].id)
+        self.debug("Cisco VNMC appliance with id %s deployed"%(Vnmc.id))
+        VnmcList = VNMC.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
+        self.assertNotEqual(len(VnmcList), 0, "List VNMC API returned an empty response")
+        Vnmc.delete(self.apiclient)
+
+    def test_registerAsa1000v(self):
+        Asa = ASA1000V.create(self.apiclient, self.services["asa"]["ipaddress"], self.services["asa"]["insideportprofile"], self.clusters[0].id, self.physicalnetworks[0].id)
+        self.debug("Cisco ASA 1000v appliance with id %s deployed"%(Asa.id))
+        AsaList = ASA1000V.list(self.apiclient, physicalnetworkid = self.physicalnetworks[0].id)
+        self.assertNotEqual(len(AsaList), 0, "List ASA 1000v API returned an empty response")
+        Asa.delete(self.apiclient)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7ce45ea1/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index f3959b0..0185c87 100755
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -2449,7 +2449,7 @@ class AffinityGroup:
         self.__dict__.update(items)
 
     @classmethod
-        def create(cls, apiclient, services, account=None, domainid=None):
+    def create(cls, apiclient, services, account=None, domainid=None):
         agCmd = createAffinityGroup.createAffinityGroupCmd()
         agCmd.name = services['name']
         agCmd.displayText = services['displaytext'] if 'displaytext' in services else services['name']
@@ -2466,7 +2466,6 @@ class AffinityGroup:
         cmd.id = self.id
         return apiclient.deleteVPC(cmd)
 
-
     @classmethod
     def list(cls, apiclient, **kwargs):
         cmd = listAffinityGroups.listAffinityGroupsCmd()


[37/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
debian: Package the AWSAPI bridge


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15c26195
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15c26195
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15c26195

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 15c26195c52e3cd0f276bbdf5c0a990b8a917af7
Parents: e354807
Author: Wido den Hollander <wi...@42on.com>
Authored: Thu Apr 11 10:25:46 2013 +0200
Committer: Wido den Hollander <wi...@42on.com>
Committed: Sat Apr 13 11:12:39 2013 +0200

----------------------------------------------------------------------
 debian/cloudstack-awsapi.install |   10 +++++++++-
 debian/rules                     |   20 +++++++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15c26195/debian/cloudstack-awsapi.install
----------------------------------------------------------------------
diff --git a/debian/cloudstack-awsapi.install b/debian/cloudstack-awsapi.install
index 02ba668..675b84d 100644
--- a/debian/cloudstack-awsapi.install
+++ b/debian/cloudstack-awsapi.install
@@ -15,4 +15,12 @@
 # specific language governing permissions and limitations
 # under the License.
 
-/var/log/cloudstack/awsapi
\ No newline at end of file
+/etc/cloudstack/management/cloud-bridge.properties
+/etc/cloudstack/management/commons-logging.properties
+/etc/cloudstack/management/crypto.properties
+/etc/cloudstack/management/xes.keystore
+/etc/cloudstack/management/ec2-service.properties
+/var/log/cloudstack/awsapi
+/usr/bin/cloudstack-setup-bridge
+/usr/bin/cloudstack-aws-api-register
+/usr/share/cloudstack-bridge
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15c26195/debian/rules
----------------------------------------------------------------------
diff --git a/debian/rules b/debian/rules
index 4e55c71..f5f68ab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,7 +34,7 @@ build: build-indep
 build-indep: build-indep-stamp
 
 build-indep-stamp: configure
-	mvn package -DskipTests -Dsystemvm \
+	mvn -Pawsapi package -DskipTests -Dsystemvm \
         -Dcs.replace.properties=replace.properties.tmp
 	touch $@
 
@@ -147,7 +147,25 @@ install:
 	install -D packaging/debian/init/cloud-usage $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-usage
 
 	# cloudstack-awsapi
+	mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/awsapi
 	mkdir $(DESTDIR)/var/log/$(PACKAGE)/awsapi
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-bridge
+	mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi
+	mkdir $(DESTDIR)/usr/share/$(PACKAGE)-bridge/setup
+	cp -r awsapi/target/cloud-awsapi-$(VERSION)-SNAPSHOT/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi
+	install -D awsapi-setup/setup/cloud-setup-bridge $(DESTDIR)/usr/bin/cloudstack-setup-bridge
+	install -D awsapi-setup/setup/cloudstack-aws-api-register $(DESTDIR)/usr/bin/cloudstack-aws-api-register
+	cp -r awsapi-setup/db/mysql/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/setup
+	for i in applicationContext.xml cloud-bridge.properties commons-logging.properties crypto.properties xes.keystore ec2-service.properties; do \
+		mv $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/$$i $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/; \
+	done
+	rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/log4j-vmops.xml
+	rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/log4j.properties
+	rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/db.properties
+	rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/LICENSE.txt
+	rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt
+	rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/services.xml
+	rm -rf $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/META-INF
 
 	dh_installdirs
 	dh_install


[38/50] [abbrv] git commit: updated refs/heads/cisco-vnmc-api-integration to 7ce45ea

Posted by ko...@apache.org.
tools: Add option to specify publican configuration file for building the docs


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c5b10a71
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c5b10a71
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c5b10a71

Branch: refs/heads/cisco-vnmc-api-integration
Commit: c5b10a71df67cd03b02ae9eb69fc17f9c7161a0b
Parents: 15c2619
Author: Wido den Hollander <wi...@42on.com>
Authored: Sat Apr 13 11:13:01 2013 +0200
Committer: Wido den Hollander <wi...@42on.com>
Committed: Sat Apr 13 11:13:01 2013 +0200

----------------------------------------------------------------------
 tools/build/build_docs.sh |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c5b10a71/tools/build/build_docs.sh
----------------------------------------------------------------------
diff --git a/tools/build/build_docs.sh b/tools/build/build_docs.sh
index 62617a3..11b2414 100755
--- a/tools/build/build_docs.sh
+++ b/tools/build/build_docs.sh
@@ -20,6 +20,7 @@ sourcedir=~/incubator-cloudstack/
 common_content_dir=/usr/share/publican/Common_Content
 publican_path=/usr/bin/publican
 output_format="html,pdf"
+config="publican-adminguide.cfg"
 
 usage(){
     echo "usage: $0 [-s source dir] [-c publican common content] [-p path to publican]"
@@ -27,10 +28,11 @@ usage(){
     echo "  -c sets the public common content directory (defaults to $common_content_dir)"
     echo "  -p sets the path to the publican binary (defaults to $publican_path)"
     echo "  -f sets the output format (defaults to $output_format)"
-    echo "  -h"
+    echo "  -g sets the publican config file (defaults to $config)"
+    echo "  -h show this help"
 }
 
-while getopts v:s:c:p:f:h opt
+while getopts v:s:c:p:f:g:h opt
 do
     case "$opt" in
       v)  version="$OPTARG";;
@@ -38,6 +40,7 @@ do
       c)  common_content_dir="$OPTARG";;
       p)  publican_path="$OPTARG";;
       f)  output_format="$OPTARG";;
+      g)  config="$OPTARG";;
       h)  usage
           exit 0;;
       \?)
@@ -59,5 +62,5 @@ fi
 cd $sourcedir/docs
 cp -R /usr/share/publican/Common_Content .
 ln -s $sourcedir/docs/publican-cloudstack Common_Content/cloudstack
-publican build --config=publican-installation.cfg --formats $output_format --langs en-US --common_content=$sourcedir/docs/Common_Content
-rm -r Common_Content
\ No newline at end of file
+publican build --config=$config --formats $output_format --langs en-US --common_content=$sourcedir/docs/Common_Content
+rm -r Common_Content