)]}'
{"openstack/orchestration/v1/stack.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"1e400db5772b5f86861ebbc682a66a8e4320a397","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    # Heat API has \"files\" parameter:"},{"line_number":79,"context_line":"    # https://github.com/openstack/heat/blob/master/\\"},{"line_number":80,"context_line":"    #       api-ref/source/v1/stacks.inc#request-parameters"},{"line_number":81,"context_line":"    # How to provide files while creating stack?"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def create(self, session):"},{"line_number":84,"context_line":"        # This overrides the default behavior of resource creation because"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_94d5791e","line":81,"updated":"2018-04-25 12:29:01.000000000","message":"This is an EXCELLENT question. This is an example where we need to do something more advanced.\n\nWe have this implemented in the shade layer already. If you look in openstack/cloud/openstackcloud.py in create_stack, you\u0027ll see:\n\n        envfiles, env \u003d template_utils.process_multiple_environments_and_files(\n            env_paths\u003denvironment_files)\n        tpl_files, template \u003d template_utils.get_template_contents(\n            template_file\u003dtemplate_file,\n            template_url\u003dtemplate_url,\n            template_object\u003dtemplate_object,\n            files\u003dfiles)\n        params \u003d dict(\n            stack_name\u003dname,\n            tags\u003dtags,\n            disable_rollback\u003dnot rollback,\n            parameters\u003dparameters,\n            template\u003dtemplate,\n            files\u003ddict(list(tpl_files.items()) + list(envfiles.items())),\n            environment\u003denv,\n            timeout_mins\u003dtimeout // 60,\n        )\n        self._orchestration_client.post(\u0027/stacks\u0027, json\u003dparams)\n\nI think what we want/need to do here is add:\n\n  files \u003d resource.Body(\u0027files\u0027)\n\nin this file, then in openstack/orchestration/v1/_proxy.py make create_stack more like the one in openstack/cloud/openstackcloud.py (we eventually want it to be actually the same method - but that\u0027s a larger project) - essentially, copy/paste the logic from shade\u0027s create stack up to but not including the self._orchestration_client.post(\u0027/stacks\u0027, json\u003dparams) - and use return self._create(res_type, **attrs) instead there.","commit_id":"497eaafee67784544c360b51a9b7c76eec1de1b7"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"3deffcc9f0c5fc495be724a1c950a91a03c2f551","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    # Heat API has \"files\" parameter:"},{"line_number":79,"context_line":"    # https://github.com/openstack/heat/blob/master/\\"},{"line_number":80,"context_line":"    #       api-ref/source/v1/stacks.inc#request-parameters"},{"line_number":81,"context_line":"    # How to provide files while creating stack?"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def create(self, session):"},{"line_number":84,"context_line":"        # This overrides the default behavior of resource creation because"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f6a8fd7_14588985","line":81,"in_reply_to":"9f6a8fd7_94d5791e","updated":"2018-04-25 12:47:18.000000000","message":"I just missed the whole \"Using Cloud Abstration Layer\" section in docs. Seems using create_stack method from openstack/cloud/openstackcloud.py is enough.\n\nThanks a lot.","commit_id":"497eaafee67784544c360b51a9b7c76eec1de1b7"}]}
