Example #1
0
 def stack_path(self):
     """
     Return a URL-encoded path segment of a URL,
     in the form:
         <stack_name>/<stack_id>
     """
     return "%s/%s" % (urlutils.quote(self.stack_name, ""), urlutils.quote(self.stack_id, ""))
Example #2
0
 def stack_path(self):
     '''
     Return a URL-encoded path segment of a URL,
     in the form:
         <stack_name>/<stack_id>
     '''
     return '%s/%s' % (urlutils.quote(
         self.stack_name, ''), urlutils.quote(self.stack_id, ''))
Example #3
0
 def _tenant_path(self):
     '''
     Return a URL-encoded path segment of a URL within a particular tenant,
     in the form:
         stacks/<stack_name>/<stack_id><path>
     '''
     return 'stacks/%s/%s%s' % (urlutils.quote(self.stack_name, ''),
                                urlutils.quote(self.stack_id, ''),
                                urlutils.quote(strutils.safe_encode(
                                    self.path)))
Example #4
0
 def _tenant_path(self):
     '''
     Return a URL-encoded path segment of a URL within a particular tenant,
     in the form:
         stacks/<stack_name>/<stack_id><path>
     '''
     return 'stacks/%s/%s%s' % (urlutils.quote(
         self.stack_name, ''), urlutils.quote(self.stack_id, ''),
                                urlutils.quote(
                                    strutils.safe_encode(self.path)))
Example #5
0
 def arn(self):
     '''
     Return an ARN of the form:
         arn:openstack:heat::<tenant>:stacks/<stack_name>/<stack_id><path>
     '''
     return 'arn:openstack:heat::%s:%s' % (urlutils.quote(self.tenant, ''),
                                           self._tenant_path())
Example #6
0
 def _tenant_path(self):
     """
     Return a URL-encoded path segment of a URL within a particular tenant,
     in the form:
         stacks/<stack_name>/<stack_id><path>
     """
     return "stacks/%s%s" % (self.stack_path(), urlutils.quote(strutils.safe_encode(self.path)))
Example #7
0
 def arn(self):
     '''
     Return an ARN of the form:
         arn:openstack:heat::<tenant>:stacks/<stack_name>/<stack_id><path>
     '''
     return 'arn:openstack:heat::%s:%s' % (urlutils.quote(
         self.tenant, ''), self._tenant_path())
Example #8
0
 def arn_url_path(self):
     '''
     Return an ARN quoted correctly for use in a URL
     '''
     return '/' + urlutils.quote(self.arn(), '')
Example #9
0
 def url_path(self):
     '''
     Return a URL-encoded path segment of a URL in the form:
         <tenant>/stacks/<stack_name>/<stack_id><path>
     '''
     return '/'.join((urlutils.quote(self.tenant, ''), self._tenant_path()))
Example #10
0
 def arn_url_path(self):
     """
     Return an ARN quoted correctly for use in a URL
     """
     return "/" + urlutils.quote(self.arn(), "")
Example #11
0
 def arn(self):
     """
     Return an ARN of the form:
         arn:openstack:heat::<tenant>:stacks/<stack_name>/<stack_id><path>
     """
     return "arn:openstack:heat::%s:%s" % (urlutils.quote(self.tenant, ""), self._tenant_path())
Example #12
0
 def url_path(self):
     """
     Return a URL-encoded path segment of a URL in the form:
         <tenant>/stacks/<stack_name>/<stack_id><path>
     """
     return "/".join((urlutils.quote(self.tenant, ""), self._tenant_path()))
Example #13
0
 def arn_url_path(self):
     '''
     Return an ARN quoted correctly for use in a URL
     '''
     return '/' + urlutils.quote(self.arn(), '')
Example #14
0
 def url_path(self):
     '''
     Return a URL-encoded path segment of a URL in the form:
         <tenant>/stacks/<stack_name>/<stack_id><path>
     '''
     return '/'.join((urlutils.quote(self.tenant, ''), self._tenant_path()))