~ubuntu-branches/ubuntu/wily/python-heatclient/wily-proposed

« back to all changes in this revision

Viewing changes to heatclient/v1/resource_types.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2015-03-12 10:43:34 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20150312104334-8e2j6r81g24r0h3y
Tags: 0.3.0-0ubuntu1
* New upstream release
* debian/control: Adjust dependencies. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
from six.moves.urllib import parse
15
15
 
 
16
from oslo.utils import encodeutils
 
17
 
16
18
from heatclient.openstack.common.apiclient import base
17
 
from heatclient.openstack.common import strutils
18
19
 
19
20
 
20
21
class ResourceType(base.Resource):
43
44
        :param resource_type: name of the resource type to get the details for
44
45
        """
45
46
        url_str = '/resource_types/%s' % (
46
 
                  parse.quote(strutils.safe_encode(resource_type), ''))
 
47
                  parse.quote(encodeutils.safe_encode(resource_type), ''))
47
48
        resp, body = self.client.json_request('GET', url_str)
48
49
        return body
49
50
 
50
51
    def generate_template(self, resource_type):
51
52
        url_str = '/resource_types/%s/template' % (
52
 
                  parse.quote(strutils.safe_encode(resource_type), ''))
 
53
                  parse.quote(encodeutils.safe_encode(resource_type), ''))
53
54
        resp, body = self.client.json_request('GET', url_str)
54
55
        return body