Amy, The error message denotes that API signature generated by the client seems to be wrong or not what cloudstack is expecting.
Follow the below link, so, basically check out the latest code from the branch you are running this with, seems you are using 4.5.2. Once you are done getting simulator up and marvin installed, modify your config(cfg file) according to your needs and run step3 mentioned at the link with your modified test suite and then verify for the outcome. Basically, we are trying to see that you have latest code with no setup\config issues, then we can isolate if there are any test suite issues. Right now, it seems the invalid signature generation. https://cwiki.apache.org/confluence/display/CLOUDSTACK/Validating+check-ins+for+your+local+changes,+using+Simulator Regards, Santhosh On Wed, Jul 15, 2015 at 10:56 PM, Amy Niklasson <a...@niklasson.se> wrote: > Hi, > I'm trying to run a test based on this guide: > > http://www.chipchilders.com/blog/2013/7/22/visualizing-the-cloudstack-planners-in-action.html > the test code: > > https://gist.github.com/chipchilders/6056220#file-test_deploy_lots_of_vms_with_firstfitplanner-py > I've done some minor changes to make it run. > like changing the imports to: > > from marvin.cloudstackTestCase import cloudstackTestCase > from marvin.lib.base import Account, VirtualMachine, ServiceOffering, Host, > Cluster > from marvin.lib.common import get_zone, get_domain, get_template > from marvin.lib.utils import cleanup_resources > > however now I get this error which I have no idea how to fix. > > 2015-07-15 11:46:23,455 - CRITICAL - EXCEPTION: None: ['Traceback (most > recent call last):\n', ' File > "/usr/local/lib/python2.7/dist-packages/nose/suite.py", > line 209, in run\n self.setUp()\n', ' File > "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 292, in > setUp\n self.setupContext(ancestor)\n', ' > File "/usr/local/lib/python2.7/dist-packages/nose/suite.py", line 315, in > setupContext\n try_run(context, names)\n', ' > File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 471, in > try_run\n return func()\n', ' > File > > "/home/ubuntu/cloudstack/test/integration/smoke/test_deploy_lots_of_vms_with_firstplanner.py", > line 61, in setUpClass\n > cls.domain = get_domain(cls.apiclient, cls.services)\n', ' File > > "/usr/local/lib/python2.7/dist-packages/Marvin-4.5.2_SNAPSHOT-py2.7.egg/marvin/lib/common.py", > line 201, in get_domain\n cmd_out = apiclient.listDomains(cmd)\n', ' > File > > "/usr/local/lib/python2.7/dist-packages/Marvin-4.5.2_SNAPSHOT-py2.7.egg/marvin/cloudstackAPI/cloudstackAPIClient.py", > line 655, in listDomains\n > response = self.connection.marvinRequest(command, response_type=response, > method=method)\n', ' > File > > "/usr/local/lib/python2.7/dist-packages/Marvin-4.5.2_SNAPSHOT-py2.7.egg/marvin/cloudstackConnection.py", > line 379, in marvinRequest\n raise e\n', > 'CloudstackAPIException: Execute cmd: listdomains failed, due to: > errorCode: 401, errorText:unable to verify user credentials and/or request > signature\n'] > > I've googled around and seen cases of errorCode 401 but none of them > related to listdomains. > Could anyone please advice me on how to solve this? > > Regards, > Amy >