[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-08-03 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cloudstack/pull/638


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread Sanjeev N
LGTM

On Fri, Jul 31, 2015 at 4:42 PM, nitt10prashant  wrote:

> Github user nitt10prashant commented on the pull request:
>
> https://github.com/apache/cloudstack/pull/638#issuecomment-126656909
>
> LGTM
>
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---
>


[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread nitt10prashant
Github user nitt10prashant commented on the pull request:

https://github.com/apache/cloudstack/pull/638#issuecomment-126656909
  
LGTM



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread pritisarap12
Github user pritisarap12 commented on the pull request:

https://github.com/apache/cloudstack/pull/638#issuecomment-126637367
  
Testcase Result-

Test hypervisor max limits effect ... === TestName: 
test_check_hypervisor_max_limit_effect | Status : SUCCESS ===
ok

Ran 1 test in 159.787s

OK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread pritisarap12
Github user pritisarap12 commented on the pull request:

https://github.com/apache/cloudstack/pull/638#issuecomment-126636676
  
Updated the testcase for:
 -Count SSVM's on selected host
 -Count VR on the host
 -Count user VM's on the host
 -Then update the maxguestlimit for that host as(ssvm+vr+user_vm+1)
 -Added validateList for host list


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread Sanjeev N
How your logic works if there are no system vms on a host (ssvm, cpvm and
VR)? I mean if the cluster has more than one host and system vms were
deployed on another host in the cluster?

On Fri, Jul 31, 2015 at 2:01 PM, pritisarap12  wrote:

> Github user pritisarap12 commented on a diff in the pull request:
>
> https://github.com/apache/cloudstack/pull/638#discussion_r35955311
>
> --- Diff: test/integration/testpaths/testpath_hypervisor_limit.py ---
> @@ -0,0 +1,198 @@
> +# 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.
> +""" Test cases for Testing Max Hypervisor Limit
> +"""
> +from nose.plugins.attrib import attr
> +from marvin.cloudstackTestCase import cloudstackTestCase
> +from marvin.lib.utils import (cleanup_resources,
> +  validateList)
> +from marvin.lib.base import (Account,
> + ServiceOffering,
> + VirtualMachine,
> + Host
> + )
> +from marvin.lib.common import (get_domain,
> +   get_zone,
> +   get_template,
> +   list_virtual_machines
> +   )
> +
> +
> +from marvin.cloudstackAPI import (updateHypervisorCapabilities,
> +  listHypervisorCapabilities)
> +
> +from marvin.codes import PASS
> +
> +
> +class TestMaxHyperviosrLimit(cloudstackTestCase):
> +
> +@classmethod
> +def setUpClass(cls):
> +testClient = super(TestMaxHyperviosrLimit,
> cls).getClsTestClient()
> +cls.apiclient = testClient.getApiClient()
> +cls.testdata = testClient.getParsedTestDataConfig()
> +
> +cls.hypervisor = cls.testClient.getHypervisorInfo()
> +# Get Zone, Domain and templates
> +
> +cls.domain = get_domain(cls.apiclient)
> +cls.zone = get_zone(cls.apiclient,
> testClient.getZoneForTests())
> +
> +cls.template = get_template(
> +cls.apiclient,
> +cls.zone.id,
> +cls.testdata["ostype"])
> +
> +cls._cleanup = []
> +hostList = Host.list(cls.apiclient, zoneid=cls.zone.id,
> type="Routing")
> +cls.host = Host(hostList[0].__dict__)
> +Host.update(cls.apiclient, id=cls.host.id, hosttags="host1")
> +try:
> +cls.skiptest = False
> +if cls.hypervisor.lower() not in ['xenserver']:
> +cls.skiptest = True
> +return
> +
> +# Create an account
> +cls.account = Account.create(
> +cls.apiclient,
> +cls.testdata["account"],
> +domainid=cls.domain.id
> +)
> +
> +# Create user api client of the account
> +cls.userapiclient = testClient.getUserApiClient(
> +UserName=cls.account.name,
> +DomainName=cls.account.domain
> +)
> +# Create Service offering
> +cls.service_offering = ServiceOffering.create(
> +cls.apiclient,
> +cls.testdata["service_offering"],
> +hosttags="host1"
> +)
> +
> +cls._cleanup = [
> +cls.account,
> +cls.service_offering,
> +]
> +except Exception as e:
> +cls.tearDownClass()
> +raise e
> +return
> +
> +@classmethod
> +def tearDownClass(cls):
> +try:
> +cleanup_resources(cls.apiclient, cls._cleanup)
> +except Exception as e:
> +raise Exception("Warning: Exception during cleanup : %s"
> % e)
> +
> +def setUp(self):
> +self.cleanup = []
> +if self.skiptest:

[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread pritisarap12
Github user pritisarap12 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/638#discussion_r35955311
  
--- Diff: test/integration/testpaths/testpath_hypervisor_limit.py ---
@@ -0,0 +1,198 @@
+# 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.
+""" Test cases for Testing Max Hypervisor Limit
+"""
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+  validateList)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ VirtualMachine,
+ Host
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   list_virtual_machines
+   )
+
+
+from marvin.cloudstackAPI import (updateHypervisorCapabilities,
+  listHypervisorCapabilities)
+
+from marvin.codes import PASS
+
+
+class TestMaxHyperviosrLimit(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestMaxHyperviosrLimit, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+# Get Zone, Domain and templates
+
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata["ostype"])
+
+cls._cleanup = []
+hostList = Host.list(cls.apiclient, zoneid=cls.zone.id, 
type="Routing")
+cls.host = Host(hostList[0].__dict__)
+Host.update(cls.apiclient, id=cls.host.id, hosttags="host1")
+try:
+cls.skiptest = False
+if cls.hypervisor.lower() not in ['xenserver']:
+cls.skiptest = True
+return
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+
+# Create user api client of the account
+cls.userapiclient = testClient.getUserApiClient(
+UserName=cls.account.name,
+DomainName=cls.account.domain
+)
+# Create Service offering
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata["service_offering"],
+hosttags="host1"
+)
+
+cls._cleanup = [
+cls.account,
+cls.service_offering,
+]
+except Exception as e:
+cls.tearDownClass()
+raise e
+return
+
+@classmethod
+def tearDownClass(cls):
+try:
+cleanup_resources(cls.apiclient, cls._cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+def setUp(self):
+self.cleanup = []
+if self.skiptest:
+self.skipTest("This test is to be checked on xenserver \
+only  Hence, skip for %s" % self.hypervisor)
+
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+def tearDown(self):
+try:
+
+cmd = 
updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd()
+cmd.id = self.hostCapId
+

[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread sanju1010
Github user sanju1010 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/638#discussion_r35955013
  
--- Diff: test/integration/testpaths/testpath_hypervisor_limit.py ---
@@ -0,0 +1,198 @@
+# 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.
+""" Test cases for Testing Max Hypervisor Limit
+"""
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+  validateList)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ VirtualMachine,
+ Host
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   list_virtual_machines
+   )
+
+
+from marvin.cloudstackAPI import (updateHypervisorCapabilities,
+  listHypervisorCapabilities)
+
+from marvin.codes import PASS
+
+
+class TestMaxHyperviosrLimit(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestMaxHyperviosrLimit, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+# Get Zone, Domain and templates
+
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata["ostype"])
+
+cls._cleanup = []
+hostList = Host.list(cls.apiclient, zoneid=cls.zone.id, 
type="Routing")
+cls.host = Host(hostList[0].__dict__)
+Host.update(cls.apiclient, id=cls.host.id, hosttags="host1")
+try:
+cls.skiptest = False
+if cls.hypervisor.lower() not in ['xenserver']:
+cls.skiptest = True
+return
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+
+# Create user api client of the account
+cls.userapiclient = testClient.getUserApiClient(
+UserName=cls.account.name,
+DomainName=cls.account.domain
+)
+# Create Service offering
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata["service_offering"],
+hosttags="host1"
+)
+
+cls._cleanup = [
+cls.account,
+cls.service_offering,
+]
+except Exception as e:
+cls.tearDownClass()
+raise e
+return
+
+@classmethod
+def tearDownClass(cls):
+try:
+cleanup_resources(cls.apiclient, cls._cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+def setUp(self):
+self.cleanup = []
+if self.skiptest:
+self.skipTest("This test is to be checked on xenserver \
+only  Hence, skip for %s" % self.hypervisor)
+
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+def tearDown(self):
+try:
+
+cmd = 
updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd()
+cmd.id = self.hostCapId
+   

[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread sanju1010
Github user sanju1010 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/638#discussion_r35954965
  
--- Diff: test/integration/testpaths/testpath_hypervisor_limit.py ---
@@ -0,0 +1,198 @@
+# 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.
+""" Test cases for Testing Max Hypervisor Limit
+"""
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+  validateList)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ VirtualMachine,
+ Host
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   list_virtual_machines
+   )
+
+
+from marvin.cloudstackAPI import (updateHypervisorCapabilities,
+  listHypervisorCapabilities)
+
+from marvin.codes import PASS
+
+
+class TestMaxHyperviosrLimit(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestMaxHyperviosrLimit, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+# Get Zone, Domain and templates
+
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata["ostype"])
+
+cls._cleanup = []
+hostList = Host.list(cls.apiclient, zoneid=cls.zone.id, 
type="Routing")
+cls.host = Host(hostList[0].__dict__)
+Host.update(cls.apiclient, id=cls.host.id, hosttags="host1")
+try:
+cls.skiptest = False
+if cls.hypervisor.lower() not in ['xenserver']:
+cls.skiptest = True
+return
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+
+# Create user api client of the account
+cls.userapiclient = testClient.getUserApiClient(
+UserName=cls.account.name,
+DomainName=cls.account.domain
+)
+# Create Service offering
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata["service_offering"],
+hosttags="host1"
+)
+
+cls._cleanup = [
+cls.account,
+cls.service_offering,
+]
+except Exception as e:
+cls.tearDownClass()
+raise e
+return
+
+@classmethod
+def tearDownClass(cls):
+try:
+cleanup_resources(cls.apiclient, cls._cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+def setUp(self):
+self.cleanup = []
+if self.skiptest:
+self.skipTest("This test is to be checked on xenserver \
+only  Hence, skip for %s" % self.hypervisor)
+
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+def tearDown(self):
+try:
+
+cmd = 
updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd()
+cmd.id = self.hostCapId
+   

[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread pritisarap12
Github user pritisarap12 commented on the pull request:

https://github.com/apache/cloudstack/pull/638#issuecomment-126606147
  
Modified test to check for empty vmList and updating maxguestlimit 
accordingly.
And the test result is-

Test hypervisor max limits effect ... === TestName: 
test_check_hypervisor_max_limit_effect | Status : SUCCESS ===
ok

--
Ran 1 test in 142.770s

OK



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-31 Thread nitt10prashant
Github user nitt10prashant commented on the pull request:

https://github.com/apache/cloudstack/pull/638#issuecomment-126589627
  
can you post test results ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-30 Thread pritisarap12
Github user pritisarap12 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/638#discussion_r35862152
  
--- Diff: test/integration/testpaths/testpath_hypervisor_limit.py ---
@@ -0,0 +1,191 @@
+# 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.
+
+""" Test cases to Verify effect of changing value of XenServer
+Max guest limit on previously added hosts
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+validateList)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ VirtualMachine,
+ Host
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+  )
+
+
+from marvin.cloudstackAPI import (updateHypervisorCapabilities,
+  listHypervisorCapabilities)
+
+from marvin.codes import PASS
+
+
+
+class TestMaxHyperviosrLimit(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestMaxHyperviosrLimit, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+# Get Zone, Domain and templates
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata["ostype"])
+
+cls._cleanup = []
+hostList = Host.list(cls.apiclient, zoneid=cls.zone.id, 
type="Routing")
+cls.host = Host(hostList[0].__dict__)
+try:
+
+cls.skiptest = False
+if cls.hypervisor.lower() not in ['xenserver']:
+cls.skiptest = True
+return
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+
+# Create user api client of the account
+cls.userapiclient = testClient.getUserApiClient(
+UserName=cls.account.name,
+DomainName=cls.account.domain
+)
+# Create Service offering
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata["service_offering"],
+)
+
+cls._cleanup = [
+cls.account,
+cls.service_offering,
+]
+except Exception as e:
+cls.tearDownClass()
+raise e
+return
+
+@classmethod
+def tearDownClass(cls):
+try:
+cleanup_resources(cls.apiclient, cls._cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+def setUp(self):
+self.cleanup = []
+if self.skiptest:
+self.skipTest("This test is to be checked on xenserver \
+only  Hence, skip for %s"  % self.hypervisor)
+
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+def tearDown(self):
+try:
+
+cmd = 
updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd()
+cmd.id = self.hostCapId
+cmd.maxguestslimit = self.originalLimit
+self.apiclient.updateHypervis

[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-30 Thread sanju1010
Github user sanju1010 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/638#discussion_r35848734
  
--- Diff: test/integration/testpaths/testpath_hypervisor_limit.py ---
@@ -0,0 +1,191 @@
+# 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.
+
+""" Test cases to Verify effect of changing value of XenServer
+Max guest limit on previously added hosts
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+validateList)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ VirtualMachine,
+ Host
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+  )
+
+
+from marvin.cloudstackAPI import (updateHypervisorCapabilities,
+  listHypervisorCapabilities)
+
+from marvin.codes import PASS
+
+
+
+class TestMaxHyperviosrLimit(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestMaxHyperviosrLimit, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+# Get Zone, Domain and templates
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata["ostype"])
+
+cls._cleanup = []
+hostList = Host.list(cls.apiclient, zoneid=cls.zone.id, 
type="Routing")
+cls.host = Host(hostList[0].__dict__)
+try:
+
+cls.skiptest = False
+if cls.hypervisor.lower() not in ['xenserver']:
+cls.skiptest = True
+return
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+
+# Create user api client of the account
+cls.userapiclient = testClient.getUserApiClient(
+UserName=cls.account.name,
+DomainName=cls.account.domain
+)
+# Create Service offering
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata["service_offering"],
+)
+
+cls._cleanup = [
+cls.account,
+cls.service_offering,
+]
+except Exception as e:
+cls.tearDownClass()
+raise e
+return
+
+@classmethod
+def tearDownClass(cls):
+try:
+cleanup_resources(cls.apiclient, cls._cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+def setUp(self):
+self.cleanup = []
+if self.skiptest:
+self.skipTest("This test is to be checked on xenserver \
+only  Hence, skip for %s"  % self.hypervisor)
+
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+def tearDown(self):
+try:
+
+cmd = 
updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd()
+cmd.id = self.hostCapId
+cmd.maxguestslimit = self.originalLimit
+self.apiclient.updateHypervisorC

[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-30 Thread sanju1010
Github user sanju1010 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/638#discussion_r35848618
  
--- Diff: test/integration/testpaths/testpath_hypervisor_limit.py ---
@@ -0,0 +1,191 @@
+# 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.
+
+""" Test cases to Verify effect of changing value of XenServer
+Max guest limit on previously added hosts
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+validateList)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ VirtualMachine,
+ Host
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+  )
+
+
+from marvin.cloudstackAPI import (updateHypervisorCapabilities,
+  listHypervisorCapabilities)
+
+from marvin.codes import PASS
+
+
+
+class TestMaxHyperviosrLimit(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestMaxHyperviosrLimit, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+# Get Zone, Domain and templates
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata["ostype"])
+
+cls._cleanup = []
+hostList = Host.list(cls.apiclient, zoneid=cls.zone.id, 
type="Routing")
+cls.host = Host(hostList[0].__dict__)
+try:
+
+cls.skiptest = False
+if cls.hypervisor.lower() not in ['xenserver']:
+cls.skiptest = True
+return
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+
+# Create user api client of the account
+cls.userapiclient = testClient.getUserApiClient(
+UserName=cls.account.name,
+DomainName=cls.account.domain
+)
+# Create Service offering
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata["service_offering"],
+)
+
+cls._cleanup = [
+cls.account,
+cls.service_offering,
+]
+except Exception as e:
+cls.tearDownClass()
+raise e
+return
+
+@classmethod
+def tearDownClass(cls):
+try:
+cleanup_resources(cls.apiclient, cls._cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+def setUp(self):
+self.cleanup = []
+if self.skiptest:
+self.skipTest("This test is to be checked on xenserver \
+only  Hence, skip for %s"  % self.hypervisor)
+
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+def tearDown(self):
+try:
+
+cmd = 
updateHypervisorCapabilities.updateHypervisorCapabilitiesCmd()
+cmd.id = self.hostCapId
+cmd.maxguestslimit = self.originalLimit
+self.apiclient.updateHypervisorC

[GitHub] cloudstack pull request: CLOUDSTACK-8689: Verify effect of changin...

2015-07-30 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

https://github.com/apache/cloudstack/pull/638

CLOUDSTACK-8689: Verify effect of changing value of XenServer Max guest 
limit

Verify effect of changing value of "Max guest limit" of XenServer on 
previously added hosts
-Check if it reads changed value and act accordingly

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8689-Verify-effect-of-changing-value-of-XenServer-Max-guest-limitis-on-previously-added-hosts

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/638.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #638


commit e2c578f7fa29404213a26c80458e1e51fc494759
Author: Priti Sarap 
Date:   2015-07-30T07:30:39Z

CLOUDSTACK-8689: Verify effect of changing value of XenServer Max guest 
limitis on previously added hosts




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---