[GitHub] cloudstack pull request: test case automated for list template pag...

2015-08-13 Thread nitt10prashant
Github user nitt10prashant commented on the pull request:

https://github.com/apache/cloudstack/pull/646#issuecomment-130588174
  
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: test case automated for list template pag...

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

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


---
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: test case automated for list template pag...

2015-08-10 Thread shwetaag
Github user shwetaag commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/646#discussion_r36620849
  
--- Diff: test/integration/component/maint/test_escalation_templates.py ---
@@ -0,0 +1,394 @@
+# 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.
+
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.base import (Account,
+ Domain, Template, 
Configurations,VirtualMachine,Snapshot,ServiceOffering
+ )
+from marvin.lib.utils import (cleanup_resources, validateList)
+from marvin.lib.common import (get_zone, get_template, 
get_builtin_template_info,update_resource_limit,list_volumes )
+from nose.plugins.attrib import attr
+from marvin.codes import PASS
+from marvin.sshClient import SshClient
+from marvin.cloudstackException import CloudstackAPIException
+import time
+
+
+class TestlistTemplates(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+
+testClient = super(
+TestlistTemplates, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+cls.zone = get_zone(cls.apiclient, 
cls.testClient.getZoneForTests())
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata[ostype]
+)
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+builtin_info = get_builtin_template_info(cls.apiclient, 
cls.zone.id)
+cls.testdata[templates][url] = builtin_info[0]
+cls.testdata[templates][hypervisor] = builtin_info[1]
+cls.testdata[templates][format] = builtin_info[2]
+if cls.zone.localstorageenabled:
+cls.storagetype = 'local'
+cls.testdata[service_offerings][tiny][storagetype] = 
'local'
+cls.testdata[disk_offering][storagetype] = 'local'
+else:
+cls.storagetype = 'shared'
+cls.testdata[service_offerings][tiny][storagetype] = 
'shared'
+cls.testdata[disk_offering][storagetype] = 'shared'
+cls.testdata[virtual_machine][hypervisor] = cls.hypervisor
+cls.testdata[virtual_machine][zoneid] = cls.zone.id
+cls.testdata[virtual_machine][template] = cls.template.id
+cls.testdata[custom_volume][zoneid] = cls.zone.id
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata[service_offerings][tiny]
+)
+cls.mgtSvrDetails = cls.config.__dict__[mgtSvr][0].__dict__
+cls.cleanup = []
+
+# Create 1 domain admin account
+
+cls.domain = Domain.create(
+cls.apiclient,
+cls.testdata[domain])
+
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata[account],
+admin=True,
+domainid=cls.domain.id)
+
+cls.debug(Created account %s in domain %s %
+  (cls.account.name, cls.domain.id))
+
+cls.cleanup.append(cls.account)
+cls.cleanup.append(cls.domain)
+
+@classmethod
+def tearDownClass(cls):
+try:
+# Cleanup resources used
+cleanup_resources(cls.apiclient, cls.cleanup)
+
+except Exception as e:
+raise Exception(Warning: Exception during cleanup : %s % e)
+return
+def RestartServers(self):
+ Restart management server and usage server 
+
+sshClient = SshClient(
+self.mgtSvrDetails[mgtSvrIp],
+22,
+self.mgtSvrDetails[user],
+self.mgtSvrDetails[passwd]
+)
+command = service cloudstack-management restart
+sshClient.execute(command)
   

[GitHub] cloudstack pull request: test case automated for list template pag...

2015-08-10 Thread sanju1010
Github user sanju1010 commented on the pull request:

https://github.com/apache/cloudstack/pull/646#issuecomment-129424914
  
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: test case automated for list template pag...

2015-08-10 Thread shwetaag
Github user shwetaag commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/646#discussion_r36621050
  
--- Diff: test/integration/component/maint/test_escalation_templates.py ---
@@ -0,0 +1,394 @@
+# 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.
+
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.base import (Account,
+ Domain, Template, 
Configurations,VirtualMachine,Snapshot,ServiceOffering
+ )
+from marvin.lib.utils import (cleanup_resources, validateList)
+from marvin.lib.common import (get_zone, get_template, 
get_builtin_template_info,update_resource_limit,list_volumes )
+from nose.plugins.attrib import attr
+from marvin.codes import PASS
+from marvin.sshClient import SshClient
+from marvin.cloudstackException import CloudstackAPIException
+import time
+
+
+class TestlistTemplates(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+
+testClient = super(
+TestlistTemplates, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+cls.zone = get_zone(cls.apiclient, 
cls.testClient.getZoneForTests())
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata[ostype]
+)
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+builtin_info = get_builtin_template_info(cls.apiclient, 
cls.zone.id)
+cls.testdata[templates][url] = builtin_info[0]
+cls.testdata[templates][hypervisor] = builtin_info[1]
+cls.testdata[templates][format] = builtin_info[2]
+if cls.zone.localstorageenabled:
+cls.storagetype = 'local'
+cls.testdata[service_offerings][tiny][storagetype] = 
'local'
+cls.testdata[disk_offering][storagetype] = 'local'
+else:
+cls.storagetype = 'shared'
+cls.testdata[service_offerings][tiny][storagetype] = 
'shared'
+cls.testdata[disk_offering][storagetype] = 'shared'
+cls.testdata[virtual_machine][hypervisor] = cls.hypervisor
+cls.testdata[virtual_machine][zoneid] = cls.zone.id
+cls.testdata[virtual_machine][template] = cls.template.id
+cls.testdata[custom_volume][zoneid] = cls.zone.id
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata[service_offerings][tiny]
+)
+cls.mgtSvrDetails = cls.config.__dict__[mgtSvr][0].__dict__
+cls.cleanup = []
+
+# Create 1 domain admin account
+
+cls.domain = Domain.create(
+cls.apiclient,
+cls.testdata[domain])
+
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata[account],
+admin=True,
+domainid=cls.domain.id)
+
+cls.debug(Created account %s in domain %s %
+  (cls.account.name, cls.domain.id))
+
+cls.cleanup.append(cls.account)
+cls.cleanup.append(cls.domain)
+
+@classmethod
+def tearDownClass(cls):
+try:
+# Cleanup resources used
+cleanup_resources(cls.apiclient, cls.cleanup)
+
+except Exception as e:
+raise Exception(Warning: Exception during cleanup : %s % e)
+return
+def RestartServers(self):
+ Restart management server and usage server 
+
+sshClient = SshClient(
+self.mgtSvrDetails[mgtSvrIp],
+22,
+self.mgtSvrDetails[user],
+self.mgtSvrDetails[passwd]
+)
+command = service cloudstack-management restart
+sshClient.execute(command)
   

[GitHub] cloudstack pull request: test case automated for list template pag...

2015-08-03 Thread sanju1010
Github user sanju1010 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/646#discussion_r36072298
  
--- Diff: test/integration/component/maint/test_escalation_templates.py ---
@@ -0,0 +1,394 @@
+# 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.
+
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.base import (Account,
+ Domain, Template, 
Configurations,VirtualMachine,Snapshot,ServiceOffering
+ )
+from marvin.lib.utils import (cleanup_resources, validateList)
+from marvin.lib.common import (get_zone, get_template, 
get_builtin_template_info,update_resource_limit,list_volumes )
+from nose.plugins.attrib import attr
+from marvin.codes import PASS
+from marvin.sshClient import SshClient
+from marvin.cloudstackException import CloudstackAPIException
+import time
+
+
+class TestlistTemplates(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+
+testClient = super(
+TestlistTemplates, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+cls.zone = get_zone(cls.apiclient, 
cls.testClient.getZoneForTests())
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata[ostype]
+)
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+builtin_info = get_builtin_template_info(cls.apiclient, 
cls.zone.id)
+cls.testdata[templates][url] = builtin_info[0]
+cls.testdata[templates][hypervisor] = builtin_info[1]
+cls.testdata[templates][format] = builtin_info[2]
+if cls.zone.localstorageenabled:
+cls.storagetype = 'local'
+cls.testdata[service_offerings][tiny][storagetype] = 
'local'
+cls.testdata[disk_offering][storagetype] = 'local'
+else:
+cls.storagetype = 'shared'
+cls.testdata[service_offerings][tiny][storagetype] = 
'shared'
+cls.testdata[disk_offering][storagetype] = 'shared'
+cls.testdata[virtual_machine][hypervisor] = cls.hypervisor
+cls.testdata[virtual_machine][zoneid] = cls.zone.id
+cls.testdata[virtual_machine][template] = cls.template.id
+cls.testdata[custom_volume][zoneid] = cls.zone.id
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata[service_offerings][tiny]
+)
+cls.mgtSvrDetails = cls.config.__dict__[mgtSvr][0].__dict__
+cls.cleanup = []
+
+# Create 1 domain admin account
+
+cls.domain = Domain.create(
+cls.apiclient,
+cls.testdata[domain])
+
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata[account],
+admin=True,
+domainid=cls.domain.id)
+
+cls.debug(Created account %s in domain %s %
+  (cls.account.name, cls.domain.id))
+
+cls.cleanup.append(cls.account)
+cls.cleanup.append(cls.domain)
+
+@classmethod
+def tearDownClass(cls):
+try:
+# Cleanup resources used
+cleanup_resources(cls.apiclient, cls.cleanup)
+
+except Exception as e:
+raise Exception(Warning: Exception during cleanup : %s % e)
+return
+def RestartServers(self):
+ Restart management server and usage server 
+
+sshClient = SshClient(
+self.mgtSvrDetails[mgtSvrIp],
+22,
+self.mgtSvrDetails[user],
+self.mgtSvrDetails[passwd]
+)
+command = service cloudstack-management restart
+sshClient.execute(command)
  

[GitHub] cloudstack pull request: test case automated for list template pag...

2015-08-03 Thread sanju1010
Github user sanju1010 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/646#discussion_r36072278
  
--- Diff: test/integration/component/maint/test_escalation_templates.py ---
@@ -0,0 +1,394 @@
+# 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.
+
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.lib.base import (Account,
+ Domain, Template, 
Configurations,VirtualMachine,Snapshot,ServiceOffering
+ )
+from marvin.lib.utils import (cleanup_resources, validateList)
+from marvin.lib.common import (get_zone, get_template, 
get_builtin_template_info,update_resource_limit,list_volumes )
+from nose.plugins.attrib import attr
+from marvin.codes import PASS
+from marvin.sshClient import SshClient
+from marvin.cloudstackException import CloudstackAPIException
+import time
+
+
+class TestlistTemplates(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+
+testClient = super(
+TestlistTemplates, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.testdata = testClient.getParsedTestDataConfig()
+cls.zone = get_zone(cls.apiclient, 
cls.testClient.getZoneForTests())
+cls.template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.testdata[ostype]
+)
+cls.hypervisor = cls.testClient.getHypervisorInfo()
+builtin_info = get_builtin_template_info(cls.apiclient, 
cls.zone.id)
+cls.testdata[templates][url] = builtin_info[0]
+cls.testdata[templates][hypervisor] = builtin_info[1]
+cls.testdata[templates][format] = builtin_info[2]
+if cls.zone.localstorageenabled:
+cls.storagetype = 'local'
+cls.testdata[service_offerings][tiny][storagetype] = 
'local'
+cls.testdata[disk_offering][storagetype] = 'local'
+else:
+cls.storagetype = 'shared'
+cls.testdata[service_offerings][tiny][storagetype] = 
'shared'
+cls.testdata[disk_offering][storagetype] = 'shared'
+cls.testdata[virtual_machine][hypervisor] = cls.hypervisor
+cls.testdata[virtual_machine][zoneid] = cls.zone.id
+cls.testdata[virtual_machine][template] = cls.template.id
+cls.testdata[custom_volume][zoneid] = cls.zone.id
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+cls.testdata[service_offerings][tiny]
+)
+cls.mgtSvrDetails = cls.config.__dict__[mgtSvr][0].__dict__
+cls.cleanup = []
+
+# Create 1 domain admin account
+
+cls.domain = Domain.create(
+cls.apiclient,
+cls.testdata[domain])
+
+cls.account = Account.create(
+cls.apiclient,
+cls.testdata[account],
+admin=True,
+domainid=cls.domain.id)
+
+cls.debug(Created account %s in domain %s %
+  (cls.account.name, cls.domain.id))
+
+cls.cleanup.append(cls.account)
+cls.cleanup.append(cls.domain)
+
+@classmethod
+def tearDownClass(cls):
+try:
+# Cleanup resources used
+cleanup_resources(cls.apiclient, cls.cleanup)
+
+except Exception as e:
+raise Exception(Warning: Exception during cleanup : %s % e)
+return
+def RestartServers(self):
+ Restart management server and usage server 
+
+sshClient = SshClient(
+self.mgtSvrDetails[mgtSvrIp],
+22,
+self.mgtSvrDetails[user],
+self.mgtSvrDetails[passwd]
+)
+command = service cloudstack-management restart
+sshClient.execute(command)
  

[GitHub] cloudstack pull request: test case automated for list template pag...

2015-07-31 Thread shwetaag
GitHub user shwetaag opened a pull request:

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

test case automated for list template pagination

verify list template gives same result with page size=500page=(1,2) and 
page size=1000 when there are around 1000 templates .
Moved one test case from component folder to maint folder as it requires MS 
restart

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

$ git pull https://github.com/shwetaag/cloudstack customer_escalations

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

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


commit d1311b90ac0764bd137f7140572a71a7b33da10c
Author: shweta agarwal shweta.agar...@citrix.com
Date:   2015-07-30T11:57:22Z

test case automated for list template pagination




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