Skip to content

The signature for 'up' is inconsistent with other VM methods #65

@rpkilby

Description

@rpkilby

Most of the VM-related methods have vm_name as their first positional argument, whereas .up() does not. This can lead to confusing results. e.g.,

>>> v = vagrant.Vagrant()
>>> v.up('web')
>>> v.status('web')
[Status(name='web', state='not_created', provider='virtualbox')]

In this case, web is configured with autostart: false, and the positional argument is applied to no_provider instead of vm_name. As a result, the web vm isn't started, and the "default" VMs are.

I would change the signature from:

def up(self, no_provision=False, provider=None, vm_name=None,
       provision=None, provision_with=None, stream_output=False):

to:

def up(self, vm_name=None, provision=None, provision_with=None, 
       provider=None, stream_output=False):
  • Changes vm_name to be the first positional argument.
  • Drops the no_provision argument, as it's redundant to provision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions