[GitHub] cloudstack pull request: CLOUDSTACK-8659: Verify presentation of v...

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

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


---
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-8659: Verify presentation of v...

2015-07-27 Thread wido
Github user wido commented on the pull request:

https://github.com/apache/cloudstack/pull/613#issuecomment-125133196
  
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-8659: Verify presentation of v...

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

https://github.com/apache/cloudstack/pull/613#issuecomment-123986839
  
Updated the testcase as per review comments.


---
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-8659: Verify presentation of v...

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

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

CLOUDSTACK-8659: Verify presentation of volume ID in events table

Verify if events table records UUID of the volume instead of volume ID in 
description from which snapshot is created for 'SNAPSHOT.CREATE' type .

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

$ git pull https://github.com/pritisarap12/cloudstack 
CLOUDSTACK-8659-Verify-presentation-of-volume-id-in-description-of-events-table-for-SNAPSHOT.CREATE-type

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

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


commit a634ad2e3dcbc1ec668fdc135db9891717bf8a7d
Author: Priti Sarap priti.sa...@clogeny.com
Date:   2015-07-22T07:24:46Z

CLOUDSTACK-8659: Verify presentation of volume id in description of events 
table for 'SNAPSHOT.CREATE' type




---
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-8659: Verify presentation of v...

2015-07-22 Thread nitt10prashant
Github user nitt10prashant commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/613#discussion_r35197771
  
--- Diff: test/integration/testpaths/testpath_uuid_event.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 to verify presentation of volume id in events table 
+for 'SNAPSHOT.CREATE' type.
+
+
+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,
+ Snapshot,
+ VirtualMachine,
+Configurations
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   list_volumes,
+  )
+
+from marvin.codes import PASS
+
+
+
+
+class TestVerifyEventsTable(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestVerifyEventsTable, 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:
+
+cls.unsupportedHypervisor = False
+if cls.hypervisor.lower() in ['hyperv', 'lxc', 'kvm']:
+   if cls.hypervisor.lower() == 'kvm':
+   configs = Configurations.list(
+   cls.apiclient,
+   name='kvm.snapshot.enabled'
+   )
--- End diff --

use of validateList  required


---
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-8659: Verify presentation of v...

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

https://github.com/apache/cloudstack/pull/613#discussion_r35288977
  
--- Diff: test/integration/testpaths/testpath_uuid_event.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 to verify presentation of volume id in events table 
+for 'SNAPSHOT.CREATE' type.
+
+
+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,
+ Snapshot,
+ VirtualMachine,
+Configurations
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   list_volumes,
+  )
+
+from marvin.codes import PASS
+
+
+
+
+class TestVerifyEventsTable(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestVerifyEventsTable, 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:
+
+cls.unsupportedHypervisor = False
+if cls.hypervisor.lower() in ['hyperv', 'lxc', 'kvm']:
+   if cls.hypervisor.lower() == 'kvm':
+   configs = Configurations.list(
+   cls.apiclient,
+   name='kvm.snapshot.enabled'
+   )
+   if configs[0].value == false:
+   cls.unsupportedHypervisor = True
+   else:
+   cls.unsupportedHypervisor = 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.unsupportedHypervisor:
+self.skipTest(snapshots are not supported on %s % 
self.hypervisor.lower())
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+
+
+def tearDown(self):
+try:
+

[GitHub] cloudstack pull request: CLOUDSTACK-8659: Verify presentation of v...

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

https://github.com/apache/cloudstack/pull/613#discussion_r35288952
  
--- Diff: test/integration/testpaths/testpath_uuid_event.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 to verify presentation of volume id in events table 
+for 'SNAPSHOT.CREATE' type.
+
+
+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,
+ Snapshot,
+ VirtualMachine,
+Configurations
+ )
+from marvin.lib.common import (get_domain,
+   get_zone,
+   get_template,
+   list_volumes,
+  )
+
+from marvin.codes import PASS
+
+
+
+
+class TestVerifyEventsTable(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestVerifyEventsTable, 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:
+
+cls.unsupportedHypervisor = False
+if cls.hypervisor.lower() in ['hyperv', 'lxc', 'kvm']:
+   if cls.hypervisor.lower() == 'kvm':
+   configs = Configurations.list(
+   cls.apiclient,
+   name='kvm.snapshot.enabled'
+   )
+   if configs[0].value == false:
+   cls.unsupportedHypervisor = True
+   else:
+   cls.unsupportedHypervisor = 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.unsupportedHypervisor:
+self.skipTest(snapshots are not supported on %s % 
self.hypervisor.lower())
+self.apiclient = self.testClient.getApiClient()
+self.dbclient = self.testClient.getDbConnection()
+
+
+
+def tearDown(self):
+try:
+