0

我正在尝试使用 openstacksdk 使用工作连接(我已经创建了一个图像)创建堆栈,但即有一些问题environment_files

File "my_openstack.py", line 44, in <module>
    conn.create_stack(name='test', template_file='test_heat.yaml', environment_files='test_heat.env')
  File "/home/ds/venv/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py", line 1227, in create_stack
    env_paths=environment_files)
  File "/home/ds/venv/lib/python2.7/site-packages/openstack/cloud/_heat/template_utils.py", line 209, in process_multiple_environments_and_files
    include_env_in_files=include_env_in_files)
  File "/home/ds/venv/lib/python2.7/site-packages/openstack/cloud/_heat/template_utils.py", line 263, in process_environment_and_files
    raw_env = request.urlopen(env_url).read()
  File "/opt/ds/python/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/ds/python/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/opt/ds/python/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/opt/ds/python/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/opt/ds/python/lib/python2.7/urllib2.py", line 1336, in file_open
    return self.open_local_file(req)
  File "/opt/ds/python/lib/python2.7/urllib2.py", line 1376, in open_local_file
    raise URLError(msg)
urllib2.URLError: <urlopen error [Errno 2] No such file or directory: '/home/ds/t'>

每个文件: test_heat.yaml, test_heat.env并且 my_openstack.py/home/ds

我的代码:

conn.create_stack(name='test', template_file='test_heat.yaml', environment_files='test_heat.env')

你能帮忙吗?

4

1 回答 1

0

尽可能简单

conn.create_stack(name='test', template_file='test_heat.yaml', environment_files=['test_heat.env]')

template_utils.py需要列表

于 2019-06-27T06:28:55.903 回答