[ https://issues.apache.org/jira/browse/ARIA-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15801412#comment-15801412 ]
ASF GitHub Bot commented on ARIA-34: ------------------------------------ Github user ran-z commented on a diff in the pull request: https://github.com/apache/incubator-ariatosca/pull/41#discussion_r94771221 --- Diff: aria/orchestrator/context/common.py --- @@ -97,19 +99,49 @@ def download_resource(self, destination, path=None): Download a blueprint resource from the resource storage """ try: - return self.resource.deployment.download(entry_id=self.deployment.id, - destination=destination, - path=path) + self.resource.deployment.download(entry_id=str(self.deployment.id), + destination=destination, + path=path) except exceptions.StorageError: - return self.resource.blueprint.download(entry_id=self.blueprint.id, - destination=destination, - path=path) + self.resource.blueprint.download(entry_id=str(self.blueprint.id), + destination=destination, + path=path) + + def download_resource_and_render(self, destination, path=None, variables=None): + """ + Download a blueprint resource from the resource storage render its content as a jinja + template using the provided variables. ctx is available to the template without providing it + explicitly. + """ + self.download_resource(destination=destination, path=path) + with open(destination, 'rb') as f: --- End diff -- got it thanks > API for rendering a downloaded resource > --------------------------------------- > > Key: ARIA-34 > URL: https://issues.apache.org/jira/browse/ARIA-34 > Project: AriaTosca > Issue Type: Story > Reporter: Ran Ziv > Assignee: Dan Kilman > > Add an API for downloading + rendering a resource from the storage, similar > to the workflow-context's "download_resource" method -- This message was sent by Atlassian JIRA (v6.3.4#6332)