Ask Your Question
0

error using tempest update_stack

asked 2015-06-15 12:57:56 -0500

Amulya gravatar image

Hi All,

I am new to tempest and I'm getting a error using update_stack method. Not sure how to resolve this issue. Any help is greatly appreciated.

Here is the code snippet where i get the error.

    update_template = self.read_template('BasicServer-TC-update')
    stack_identifier = self.update_stack(stack_identifier, stack_name, update_template)
    self.client.wait_for_stack_status(stack_identifier, 'UPDATE_COMPLETE')

Here is the error I get:

Traceback (most recent call last):
  File "tempest/api/orchestration/stacks/test_TC.py", line 126, in test_TC
    stack_identifier = self.update_stack(stack_identifier, stack_name, update_template)
  File "tempest/api/orchestration/stacks/test_TC.py", line 72, in update_stack
    body = cls.client.update_stack(stack_identifier, stack_name, template=template_data)
  File "tempest/services/orchestration/json/orchestration_client.py", line 78, in update_stack
    return service_client.ResponseBody(resp, body)
  File "tempest/common/service_client.py", line 59, in __init__
    self.update(body_data)
ValueError: dictionary update sequence element #0 has length 1; 2 is required

I added LOG statement in "orchestration_client.py" file

here is the code which i added:

    uri = "stacks/%s" % stack_identifier
    resp, body = self.put(uri, headers=headers, body=body)
    LOG.info("resp is %s" % resp)
    LOG.info("body is %s" % body)
    self.expected_success(202, resp.status)
    return service_client.ResponseBody(resp, body)

Output I get is:

 2015-06-15 10:44:14,114 3947 INFO     [tempest.services.orchestration.json.orchestration_client] resp is {'status': '202', 'content-length': '58', 'connection': 'close', 'date': 'Mon, 15 Jun 2015 17:44:14 GMT', 'content-type': 'text/plain; charset=UTF-8', 'x-openstack-request-id': 'req-c00ea61d-1140-42f2-8f26-53a6ba82094f'}
2015-06-15 10:44:14,115 3947 INFO     [tempest.services.orchestration.json.orchestration_client] body is 202 Accepted

The request is accepted for processing.

From what I understand, service_client is expecting the body to be present in a certain format and is not getting in that format. Am I missing something?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-05 18:23:42 -0500

Steve Baker gravatar image

Heat tests are in the process of moving out of tempest. Feel free to contribute to heat_integrationtests

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-06-15 12:57:56 -0500

Seen: 373 times

Last updated: Jul 05 '15