[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-07-17 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/229#issuecomment-122266368
  
testpath_snapshot_limits is already in the repo. the required_hardware does 
not make sense to me. This PR should be closed


---
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-8308-Adding-automation-test-ca...

2015-07-17 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 8308 Adding automation test ca...

2015-06-10 Thread pritisarap12
Github user pritisarap12 closed the pull request at:

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


---
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 8308 Adding automation test ca...

2015-06-05 Thread gauravaradhye
Github user gauravaradhye commented on the pull request:

https://github.com/apache/cloudstack/pull/359#issuecomment-109216009
  
Please rebase against latest master. The file looks as new file in the 
commit but it's already present in the repo.


---
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 8308 Adding automation test ca...

2015-06-05 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

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

Cloudstack 8308 Adding automation test cases for vm/volume snapshot hardning

Updating testcase as per the discussion that while volume snapshot is in 
progress that volume 
can not be attached to a VM in different cluster 

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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-hardning

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

https://github.com/apache/cloudstack/pull/359.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 #359


commit 93a59f52a7197316551c3ddcfa93fff7825d3037
Author: pritisarap12 
Date:   2015-05-26T07:28:18Z


CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-hardning:
--Automating testcases for volume snapshot hardning testpath

commit 4cfa771b6e1db392bf2f2d4b2985d8769aa7c937
Author: pritisarap12 
Date:   2015-06-05T08:41:51Z

CLOUDSTACK-8308-Add test cases for volume/VM snapshot test path:
--Modifying the testpath as per the discussion that while Volume
snapshot is in progress that volume can not be attached to VM in
different Cluster




---
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-8308-Adding-automation-test-ca...

2015-05-29 Thread bhaisaab
Github user bhaisaab commented on the pull request:

https://github.com/apache/cloudstack/pull/229#issuecomment-106907661
  
I don't have infra to test/run this, @pritisarap12 @gauravaradhye  - can 
you review/test/merge this. Thanks.


---
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-8308-Adding-automation-test-ca...

2015-05-27 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-8308-Adding-automation-test-ca...

2015-05-26 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

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

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-h…

…ardning:

--Automating testcases for volume snapshot hardning testpath

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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-hardning

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

https://github.com/apache/cloudstack/pull/301.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 #301


commit 93a59f52a7197316551c3ddcfa93fff7825d3037
Author: pritisarap12 
Date:   2015-05-26T07:28:18Z


CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-hardning:
--Automating testcases for volume snapshot hardning testpath




---
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-8308-Adding-automation-test-ca...

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

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


---
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-8308-Adding-automation-test-ca...

2015-05-05 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

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

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-coni...

...nuationwith-117

--In continuation with PR 117

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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-coninuationwith-300

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

https://github.com/apache/cloudstack/pull/230.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 #230


commit 7e88ebe428b2e51b54691b81b89854411fcfaa73
Author: pritisarap12 
Date:   2015-05-05T14:58:28Z


CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-coninuationwith-300
--In continuation with PR 117




---
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-8308-Adding-automation-test-ca...

2015-05-05 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

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

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-upda...

...ting-tags

--Adding tag required_hardware=true in testcases where it is missing

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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-updating-tags

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

https://github.com/apache/cloudstack/pull/229.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 #229


commit 9095c1fa27d37b870dcbca06fc249a0b18d9c9cd
Author: pritisarap12 
Date:   2015-05-05T11:47:21Z


CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-updating-tags
--Adding tag required_hardware=true in testcases where it is missing




---
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-8308-Adding-automation-test-ca...

2015-05-05 Thread pritisarap12
Github user pritisarap12 closed the pull request at:

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


---
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-8308-Adding-automation-test-ca...

2015-05-05 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

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

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-test...

...path-1

-- It is in continuation with review request 117

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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-testpath-1

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

https://github.com/apache/cloudstack/pull/228.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 #228


commit 5ce8920283baa0b3783ecfdf7fced3b66c8a5e71
Author: pritisarap12 
Date:   2015-05-05T11:13:06Z


CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-testpath-1
-- Is is in continuation with review request 117




---
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-8308-Adding-automation-test-ca...

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

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


---
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-8308-Adding-automation-test-ca...

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

https://github.com/apache/cloudstack/pull/170#issuecomment-99001537
  
Done with rebasing the branch with upstream master.


---
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-8308-Adding-automation-test-ca...

2015-05-04 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-8308-Adding-automation-test-ca...

2015-05-04 Thread gauravaradhye
Github user gauravaradhye commented on the pull request:

https://github.com/apache/cloudstack/pull/181#issuecomment-98685482
  
Looks Good. Merging.


---
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-8308-Adding-automation-test-ca...

2015-05-04 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/181#discussion_r29571592
  
--- Diff: 
test/integration/testpaths/testpath_volume_cuncurrent_snapshots.py ---
@@ -0,0 +1,849 @@
+# 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 VM/Volume snapshot Test Path
+Snapshot Test cases related to handling concurrent snapshots at host 
level.
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.utils import (cleanup_resources, is_snapshot_on_nfs,
+  validateList)
+from marvin.lib.base import (Account,
+ StoragePool,
+ Host,
+ ServiceOffering,
+ VirtualMachine,
+ Configurations,
+ Snapshot,
+ SnapshotPolicy,
+ )
+from marvin.lib.common import (get_domain,
+   list_snapshot_policy,
+   get_zone,
+   get_template,
+   list_volumes,
+   list_snapshots,
+   list_virtual_machines,
+   createChecksum,
+   )
+from marvin.sshClient import SshClient
+import time
+
+from threading import Thread
+from marvin.codes import PASS
+
+
+def MigrateRootVolume(self,
+  vm,
+  destinationHost,
+  expectexception=False):
+""" Migrate given volume to type of storage pool mentioned in 
migrateto:
+
+Inputs:
+1. vm:   VM to be migrated
+ is to be migrated
+2. expectexception:  If exception is expected while migration
+3. destinationHost:  Destination host where the VM\
+ should get migrated
+"""
+
+if expectexception:
+with self.assertRaises(Exception):
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+else:
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+
+migrated_vm_response = list_virtual_machines(
+self.apiclient,
+id=vm.id
+)
+
+self.assertEqual(
+isinstance(migrated_vm_response, list),
+True,
+"Check list virtual machines response for valid list"
+)
+
+self.assertNotEqual(
+migrated_vm_response,
+None,
+"Check if virtual machine exists in ListVirtualMachines"
+)
+
+migrated_vm = migrated_vm_response[0]
+
+vm_list = VirtualMachine.list(
+self.apiclient,
+id=migrated_vm.id
+)
+
+self.assertEqual(
+vm_list[0].hostid,
+destinationHost.id,
+"Check volume is on migrated pool"
+)
+return
+
+
+def CreateSnapshot(self, root_volume, is_recurring):
+"""Create Snapshot"""
+if is_recurring:
+   self.testdata["recurring_snapshot"]["intervaltype"] = 'HOURLY'
--- End diff --

Check indentation


---
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 ti

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-22 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/181#discussion_r28940257
  
--- Diff: 
test/integration/testpaths/testpath_volume_cuncurrent_snapshots.py ---
@@ -0,0 +1,827 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.utils import (cleanup_resources, is_snapshot_on_nfs,
+  validateList)
+from marvin.lib.base import (Account,
+ StoragePool,
+ Host,
+ ServiceOffering,
+ VirtualMachine,
+ Configurations,
+ Snapshot,
+ SnapshotPolicy,
+ )
+from marvin.lib.common import (get_domain,
+   list_snapshot_policy,
+   get_zone,
+   get_template,
+   list_volumes,
+   list_snapshots,
+   list_virtual_machines,
+   createChecksum,
+   )
+from marvin.sshClient import SshClient
+import time
+
+from threading import Thread
+from marvin.codes import PASS
+
+
+def MigrateRootVolume(self,
+  vm,
+  destinationHost,
+  expectexception=False):
+""" Migrate given volume to type of storage pool mentioned in 
migrateto:
+
+Inputs:
+1. vm:   VM to be migrated
+ is to be migrated
+2. expectexception:  If exception is expected while migration
+3. destinationHost:  Destination host where the VM should get 
migrated
+"""
+
+if expectexception:
+with self.assertRaises(Exception):
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+else:
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+
+migrated_vm_response = list_virtual_machines(
+self.apiclient,
+id=vm.id
+)
+
+self.assertEqual(
+isinstance(migrated_vm_response, list),
+True,
+"Check list virtual machines response for valid list"
+)
+
+self.assertNotEqual(
+migrated_vm_response,
+None,
+"Check if virtual machine exists in ListVirtualMachines"
+)
+
+migrated_vm = migrated_vm_response[0]
+
+vm_list = VirtualMachine.list(
+self.apiclient,
+id=migrated_vm.id
+)
+
+self.assertEqual(
+vm_list[0].hostid,
+destinationHost.id,
+"Check volume is on migrated pool"
+)
+return
+
+
+def CreateSnapshot(self, root_volume, is_recurring):
+"""Create Snapshot"""
+if is_recurring:
+recurring_snapshot = SnapshotPolicy.create(
+self.apiclient,
+root_volume.id,
+self.testdata["recurring_snapshot"]
+)
+self.rec_policy_pool.append(recurring_snapshot)
+else:
+root_vol_snap = Snapshot.create(
+self.apiclient,
+root_volume.id)
+
+self.snapshot_pool.append(root_vol_snap)
+
+
+class TestConcurrentSnapshots(cloudstackTestCase):
+
+@classmethod
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-22 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/181#discussion_r28940210
  
--- Diff: 
test/integration/testpaths/testpath_volume_cuncurrent_snapshots.py ---
@@ -0,0 +1,827 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.utils import (cleanup_resources, is_snapshot_on_nfs,
+  validateList)
+from marvin.lib.base import (Account,
+ StoragePool,
+ Host,
+ ServiceOffering,
+ VirtualMachine,
+ Configurations,
+ Snapshot,
+ SnapshotPolicy,
+ )
+from marvin.lib.common import (get_domain,
+   list_snapshot_policy,
+   get_zone,
+   get_template,
+   list_volumes,
+   list_snapshots,
+   list_virtual_machines,
+   createChecksum,
+   )
+from marvin.sshClient import SshClient
+import time
+
+from threading import Thread
+from marvin.codes import PASS
+
+
+def MigrateRootVolume(self,
+  vm,
+  destinationHost,
+  expectexception=False):
+""" Migrate given volume to type of storage pool mentioned in 
migrateto:
+
+Inputs:
+1. vm:   VM to be migrated
+ is to be migrated
+2. expectexception:  If exception is expected while migration
+3. destinationHost:  Destination host where the VM should get 
migrated
+"""
+
+if expectexception:
+with self.assertRaises(Exception):
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+else:
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+
+migrated_vm_response = list_virtual_machines(
+self.apiclient,
+id=vm.id
+)
+
+self.assertEqual(
+isinstance(migrated_vm_response, list),
+True,
+"Check list virtual machines response for valid list"
+)
+
+self.assertNotEqual(
+migrated_vm_response,
+None,
+"Check if virtual machine exists in ListVirtualMachines"
+)
+
+migrated_vm = migrated_vm_response[0]
+
+vm_list = VirtualMachine.list(
+self.apiclient,
+id=migrated_vm.id
+)
+
+self.assertEqual(
+vm_list[0].hostid,
+destinationHost.id,
+"Check volume is on migrated pool"
+)
+return
+
+
+def CreateSnapshot(self, root_volume, is_recurring):
+"""Create Snapshot"""
+if is_recurring:
+recurring_snapshot = SnapshotPolicy.create(
+self.apiclient,
+root_volume.id,
+self.testdata["recurring_snapshot"]
+)
+self.rec_policy_pool.append(recurring_snapshot)
+else:
+root_vol_snap = Snapshot.create(
+self.apiclient,
+root_volume.id)
+
+self.snapshot_pool.append(root_vol_snap)
+
+
+class TestConcurrentSnapshots(cloudstackTestCase):
+
+@classmethod
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-22 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/181#discussion_r28940101
  
--- Diff: 
test/integration/testpaths/testpath_volume_cuncurrent_snapshots.py ---
@@ -0,0 +1,827 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.utils import (cleanup_resources, is_snapshot_on_nfs,
+  validateList)
+from marvin.lib.base import (Account,
+ StoragePool,
+ Host,
+ ServiceOffering,
+ VirtualMachine,
+ Configurations,
+ Snapshot,
+ SnapshotPolicy,
+ )
+from marvin.lib.common import (get_domain,
+   list_snapshot_policy,
+   get_zone,
+   get_template,
+   list_volumes,
+   list_snapshots,
+   list_virtual_machines,
+   createChecksum,
+   )
+from marvin.sshClient import SshClient
+import time
+
+from threading import Thread
+from marvin.codes import PASS
+
+
+def MigrateRootVolume(self,
+  vm,
+  destinationHost,
+  expectexception=False):
+""" Migrate given volume to type of storage pool mentioned in 
migrateto:
+
+Inputs:
+1. vm:   VM to be migrated
+ is to be migrated
+2. expectexception:  If exception is expected while migration
+3. destinationHost:  Destination host where the VM should get 
migrated
+"""
+
+if expectexception:
+with self.assertRaises(Exception):
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+else:
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+
+migrated_vm_response = list_virtual_machines(
+self.apiclient,
+id=vm.id
+)
+
+self.assertEqual(
+isinstance(migrated_vm_response, list),
+True,
+"Check list virtual machines response for valid list"
+)
+
+self.assertNotEqual(
+migrated_vm_response,
+None,
+"Check if virtual machine exists in ListVirtualMachines"
+)
+
+migrated_vm = migrated_vm_response[0]
+
+vm_list = VirtualMachine.list(
+self.apiclient,
+id=migrated_vm.id
+)
+
+self.assertEqual(
+vm_list[0].hostid,
+destinationHost.id,
+"Check volume is on migrated pool"
+)
+return
+
+
+def CreateSnapshot(self, root_volume, is_recurring):
+"""Create Snapshot"""
+if is_recurring:
+recurring_snapshot = SnapshotPolicy.create(
+self.apiclient,
+root_volume.id,
+self.testdata["recurring_snapshot"]
+)
+self.rec_policy_pool.append(recurring_snapshot)
+else:
+root_vol_snap = Snapshot.create(
+self.apiclient,
+root_volume.id)
+
+self.snapshot_pool.append(root_vol_snap)
+
+
+class TestConcurrentSnapshots(cloudstackTestCase):
+
+@classmethod
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-22 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/181#discussion_r28939823
  
--- Diff: 
test/integration/testpaths/testpath_volume_cuncurrent_snapshots.py ---
@@ -0,0 +1,827 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.utils import (cleanup_resources, is_snapshot_on_nfs,
+  validateList)
+from marvin.lib.base import (Account,
+ StoragePool,
+ Host,
+ ServiceOffering,
+ VirtualMachine,
+ Configurations,
+ Snapshot,
+ SnapshotPolicy,
+ )
+from marvin.lib.common import (get_domain,
+   list_snapshot_policy,
+   get_zone,
+   get_template,
+   list_volumes,
+   list_snapshots,
+   list_virtual_machines,
+   createChecksum,
+   )
+from marvin.sshClient import SshClient
+import time
+
+from threading import Thread
+from marvin.codes import PASS
+
+
+def MigrateRootVolume(self,
+  vm,
+  destinationHost,
+  expectexception=False):
+""" Migrate given volume to type of storage pool mentioned in 
migrateto:
+
+Inputs:
+1. vm:   VM to be migrated
+ is to be migrated
+2. expectexception:  If exception is expected while migration
+3. destinationHost:  Destination host where the VM should get 
migrated
+"""
+
+if expectexception:
+with self.assertRaises(Exception):
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+else:
+VirtualMachine.migrate(
+vm,
+self.apiclient,
+hostid=destinationHost.id,
+)
+
+migrated_vm_response = list_virtual_machines(
+self.apiclient,
+id=vm.id
+)
+
+self.assertEqual(
+isinstance(migrated_vm_response, list),
+True,
+"Check list virtual machines response for valid list"
+)
+
+self.assertNotEqual(
+migrated_vm_response,
+None,
+"Check if virtual machine exists in ListVirtualMachines"
+)
+
+migrated_vm = migrated_vm_response[0]
+
+vm_list = VirtualMachine.list(
+self.apiclient,
+id=migrated_vm.id
+)
+
+self.assertEqual(
+vm_list[0].hostid,
+destinationHost.id,
+"Check volume is on migrated pool"
+)
+return
+
+
+def CreateSnapshot(self, root_volume, is_recurring):
+"""Create Snapshot"""
+if is_recurring:
+recurring_snapshot = SnapshotPolicy.create(
+self.apiclient,
+root_volume.id,
+self.testdata["recurring_snapshot"]
+)
+self.rec_policy_pool.append(recurring_snapshot)
+else:
+root_vol_snap = Snapshot.create(
+self.apiclient,
+root_volume.id)
+
+self.snapshot_pool.append(root_vol_snap)
+
+
+class TestConcurrentSnapshots(cloudstackTestCase):
+
+@classmethod
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-22 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/181#discussion_r28939755
  
--- Diff: 
test/integration/testpaths/testpath_volume_cuncurrent_snapshots.py ---
@@ -0,0 +1,827 @@
+# 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 VM/Volume snapshot Test Path
--- End diff --

Add detailed comment for what feature testpath is testing


---
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-8308-Adding-automation-test-ca...

2015-04-20 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

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

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-testpath

--Adding automation testcases for volume cuncurrent snapshots

Testpath Result:
Concurrent Snapshots ... === TestName: test_01_concurrent_snapshots | 
Status : SUCCESS ===
ok
Concurrent Snapshots ... SKIP: Skip test if 
restartManagementServerThroughTestCase is not provided

--
Ran 2 tests in 7895.425s

OK (SKIP=1)


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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshottestpath-cuncurrent-snapshots

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

https://github.com/apache/cloudstack/pull/181.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 #181


commit caecbff611ca3b0b112f63f246eef698c503434e
Author: pritisarap12 
Date:   2015-04-20T11:15:50Z

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-testpath
--Adding automation testcases for volume cuncurrent snapshots




---
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-8308-Adding-automation-test-ca...

2015-04-16 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28493238
  
--- Diff: tools/marvin/marvin/codes.py ---
@@ -132,3 +132,9 @@
 Switch Type
 '''
 VMWAREDVS = "vmwaredvs"
+
+
+'''
+Snapshot State
--- End diff --

Rebase patch with latest changes.


---
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-8308-Adding-automation-test-ca...

2015-04-16 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28493223
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,341 @@
+# 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 Storage and Snapshot Limits Test Path
+"""
+
+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,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+from marvin.codes import (BACKEDUP, PASS)
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exceptio

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-16 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28493150
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,341 @@
+# 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 Storage and Snapshot Limits Test Path
+"""
+
+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,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+from marvin.codes import (BACKEDUP, PASS)
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exceptio

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-16 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28493161
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,341 @@
+# 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 Storage and Snapshot Limits Test Path
+"""
+
+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,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+from marvin.codes import (BACKEDUP, PASS)
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exceptio

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread pritisarap12
Github user pritisarap12 commented on the pull request:

https://github.com/apache/cloudstack/pull/170#issuecomment-93653040
  
Adding Snapshot Test cases that are relating secondary
storage limits and snapshot limits

Test result after integrating review changes:

Storage and Snapshot Limit ... === TestName: 
test_01_storage_snapshots_limits | Status : SUCCESS ===
ok

--
Ran 1 test in 493.037s

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-8308-Adding-automation-test-ca...

2015-04-15 Thread pritisarap12
Github user pritisarap12 commented on the pull request:

https://github.com/apache/cloudstack/pull/170#issuecomment-93303686
  
Adding Snapshot Test cases that are relating secondary
storage limits and snapshot limits

Test Result:

Storage and Snapshot Limit ... === TestName: 
test_01_storage_snapshots_limits | Status : SUCCESS ===
ok

--
Ran 1 test in 228.596s

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-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407493
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407426
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
--- End diff --

Pass "mode" parameter only in case when you want to SSH to VM. If you are 
not SSHing, remove it. It will unnecessarily acquire public IP in the network 
and create network rules on it to make VM reachable through SSH.


---
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-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407289
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407300
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407255
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407187
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407152
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407125
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28407016
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
+"""
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ DiskOffering,
+ Volume,
+ Resources,
+ VirtualMachine,
+ Snapshot
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template
+   )
+
+
+class TestStorageSnapshotsLimits(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestStorageSnapshotsLimits, 
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 = []
+
+try:
+
+# Create an account
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata["account"],
+domainid=cls.domain.id
+)
+cls._cleanup.append(cls.account)
+
+# 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.append(cls.service_offering)
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.testdata["disk_offering"],
+)
+
+cls._cleanup.append(cls.disk_offering)
+
+cls.vm = VirtualMachine.create(
+cls.userapiclient,
+cls.testdata["small"],
+templateid=cls.template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+zoneid=cls.zone.id,
+mode=cls.zone.networktype
+)
+
+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.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+self.cleanup = []
+
+def tearDown(self):
+try:
+cleanup_resources(self.apiclient, self.cleanup)
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+return
+

[GitHub] cloudstack pull request: CLOUDSTACK-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/170#discussion_r28406940
  
--- Diff: test/integration/testpaths/testpath_snapshot_limits.py ---
@@ -0,0 +1,355 @@
+# 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 VM/Volume snapshot Test Path
--- End diff --

Modify comment to specify what we are targeting to test. In this case 
snapshot limits


---
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-8308-Adding-automation-test-ca...

2015-04-15 Thread gauravaradhye
Github user gauravaradhye commented on the pull request:

https://github.com/apache/cloudstack/pull/170#issuecomment-93288143
  
Please include 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-8308-Adding-automation-test-ca...

2015-04-15 Thread pritisarap12
GitHub user pritisarap12 opened a pull request:

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

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-testpath

--Adding Snapshot Test cases that are relating secondary
  storage limits and snapshot limits

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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-testpath-testpath-snapshot-limits

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

https://github.com/apache/cloudstack/pull/170.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 #170


commit 38b4f5585279cb1b2ae0227ec5fdaeeefbaf19c7
Author: pritisarap12 
Date:   2015-04-15T09:19:46Z

CLOUDSTACK-8308-Adding-automation-test-cases-for-VM/Volume-snapshot-testpath
--Adding Snapshot Test cases that are relating secondary
  storage limits and snapshot limits




---
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.
---