mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
1. correcting the global property 2. handling the case if unittest2 is present
(cherry picked from commit d1b71859c0d6bb054d64f38b7bc6f11d37bd1725)
This commit is contained in:
parent
6d101d554e
commit
dc7ac31dce
@ -44,10 +44,10 @@ def getGlobalSettings():
|
||||
'use.user.concentrated.pod.allocation':'false',
|
||||
'vm.allocation.algorithm':'firstfit',
|
||||
'capacity.check.period':'0',
|
||||
'host.stats.interval':'-1',
|
||||
'vm.stats.interval':'-1',
|
||||
'storage.stats.interval':'-1',
|
||||
'router.stats.interval':'-1',
|
||||
# 'host.stats.interval':'-1',
|
||||
# 'vm.stats.interval':'-1',
|
||||
# 'storage.stats.interval':'-1',
|
||||
# 'router.stats.interval':'-1',
|
||||
'vm.op.wait.interval':'5',
|
||||
'xen.public.network.device':'10.10.10.10', #only a dummy for the simulator
|
||||
'guest.domain.suffix':'zcloud.simulator',
|
||||
@ -55,7 +55,7 @@ def getGlobalSettings():
|
||||
'direct.agent.load.size':'1000',
|
||||
'default.page.size':'10000',
|
||||
'linkLocalIp.nums':'4',
|
||||
'systemvm.use.local.storage':'true',
|
||||
'system.vm.use.local.storage':'true',
|
||||
'use.local.storage':'true',
|
||||
'check.pod.cidrs':'false',
|
||||
}
|
||||
|
||||
34
agent-simulator/scripts/zucchini/tests/testListVm.py
Normal file
34
agent-simulator/scripts/zucchini/tests/testListVm.py
Normal file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python
|
||||
'''
|
||||
List Virtual Machine tests
|
||||
'''
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
|
||||
import timeit
|
||||
import random
|
||||
from cloudstackAPI import *
|
||||
from cloudstackTestCase import *
|
||||
|
||||
class ListVmTests(cloudstackTestCase):
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def test_listAllVm(self):
|
||||
numVms = 0
|
||||
def time_listAllVm():
|
||||
api = self.testClient.getApiClient()
|
||||
listVmCmd = listVirtualMachines.listVirtualMachinesCmd()
|
||||
listVmCmd.account = 'admin'
|
||||
listVmCmd.zoneid = 1
|
||||
listVmCmd.domainid = 1
|
||||
numVms = len(api.listVirtualMachines(listVmCmd))
|
||||
|
||||
t = timeit.Timer(time_listAllVm)
|
||||
l = t.repeat(5, 5)
|
||||
self.debug("Number of VMs: " + str(len(numVms)) + ", time for last 5 listVM calls : " + str(l))
|
||||
@ -1,5 +1,8 @@
|
||||
from cloudstackAPI import *
|
||||
import unittest
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
import unittest
|
||||
import cloudstackTestClient
|
||||
class cloudstackTestCase(unittest.case.TestCase):
|
||||
def __init__(self, args):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user