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, ""))
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, ''))
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)))
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)))
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())
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)))
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())
def arn_url_path(self): ''' Return an ARN quoted correctly for use in a URL ''' return '/' + urlutils.quote(self.arn(), '')
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()))
def arn_url_path(self): """ Return an ARN quoted correctly for use in a URL """ return "/" + urlutils.quote(self.arn(), "")
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())
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()))