diff --git a/lib/vagrant/plugin/v1/provider.rb b/lib/vagrant/plugin/v1/provider.rb index df974cfd8..09fe39962 100644 --- a/lib/vagrant/plugin/v1/provider.rb +++ b/lib/vagrant/plugin/v1/provider.rb @@ -5,6 +5,13 @@ module Vagrant # is responsible for creating compute resources to match the needs # of a Vagrant-configured system. class Provider + # Initialize the provider to represent the given machine. + # + # @param [Vagrant::Machine] machine The machine that this provider + # is responsible for. + def initialize(machine) + end + # This should return an action callable for the given name. # # @param [Symbol] name Name of the action. @@ -13,6 +20,14 @@ module Vagrant def action(name) nil end + + # This should return the state of the machine within this provider. + # The state can be any symbol. + # + # @return [Symbol] + def state + nil + end end end end diff --git a/test/unit/vagrant/plugin/v1/provider_test.rb b/test/unit/vagrant/plugin/v1/provider_test.rb index 578715e49..b92bd3385 100644 --- a/test/unit/vagrant/plugin/v1/provider_test.rb +++ b/test/unit/vagrant/plugin/v1/provider_test.rb @@ -1,7 +1,8 @@ require File.expand_path("../../../../base", __FILE__) describe Vagrant::Plugin::V1::Provider do - let(:instance) { described_class.new } + let(:machine) { Object.new } + let(:instance) { described_class.new(machine) } it "should return nil by default for actions" do instance.action(:whatever).should be_nil