~ubuntu-branches/ubuntu/vivid/python-heatclient/vivid

« back to all changes in this revision

Viewing changes to heatclient/v1/actions.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2014-03-06 17:41:15 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: package-import@ubuntu.com-20140306174115-ecpzxbyb30tl5i7a
Tags: upstream-0.2.8
ImportĀ upstreamĀ versionĀ 0.2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
 
 
3
1
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
4
2
#    not use this file except in compliance with the License. You may obtain
5
3
#    a copy of the License at
12
10
#    License for the specific language governing permissions and limitations
13
11
#    under the License.
14
12
 
15
 
from heatclient.common import base
 
13
from heatclient.openstack.common.apiclient import base
16
14
from heatclient.v1 import stacks
17
15
 
18
16
DEFAULT_PAGE_SIZE = 20
38
36
    def suspend(self, stack_id):
39
37
        """Suspend a stack."""
40
38
        body = {'suspend': None}
41
 
        resp, body = self.api.json_request('POST',
42
 
                                           '/stacks/%s/actions' % stack_id,
43
 
                                           body=body)
 
39
        resp, body = self.client.json_request('POST',
 
40
                                              '/stacks/%s/actions' % stack_id,
 
41
                                              data=body)
44
42
 
45
43
    def resume(self, stack_id):
46
44
        """Resume a stack."""
47
45
        body = {'resume': None}
48
 
        resp, body = self.api.json_request('POST',
49
 
                                           '/stacks/%s/actions' % stack_id,
50
 
                                           body=body)
 
46
        resp, body = self.client.json_request('POST',
 
47
                                              '/stacks/%s/actions' % stack_id,
 
48
                                              data=body)