BeyondTheClouds / enos

Experimental eNvironment for OpenStack :monkey:
https://beyondtheclouds.github.io/enos/
GNU General Public License v3.0
30 stars 22 forks source link

enos new failed #339

Closed rcherrueau closed 3 years ago

rcherrueau commented 3 years ago

enos new failed with

Traceback (most recent call last):
  File "/home/rfish/prog/enos/venv/bin/enos", line 33, in <module>
    sys.exit(load_entry_point('enos', 'console_scripts', 'enos')())
  File "/home/rfish/prog/enos/enos/cli.py", line 403, in main
    task(**docopt(task.__doc__, argv=argv))
  File "/home/rfish/prog/enos/enos/cli.py", line 200, in new
    t.new(**kwargs)
  File "/home/rfish/prog/enos/venv/lib/python3.8/site-packages/enoslib/task.py", line 231, in decorated
    env = get_or_create_env(new, env_name, symlink=symlink)
  File "/home/rfish/prog/enos/venv/lib/python3.8/site-packages/enoslib/task.py", line 190, in get_or_create_env
    return Environment.load_from_file(SYMLINK_NAME.joinpath(ENV_FILENAME))
  File "/home/rfish/prog/enos/venv/lib/python3.8/site-packages/enoslib/task.py", line 113, in load_from_file
    raise EnosFilePathError(
enoslib.errors.EnosFilePathError: current/env doesn't exist, not reloading

We can fix it be removing the @enostask on top of def new in task.py. Enos new does not need to be a task.

I will push the fix latter that week (or the week after).