Module: VagrantPlugins::Memset::Action

Includes:
Vagrant::Action::Builtin
Defined in:
lib/vagrant-memset/action.rb,
lib/vagrant-memset/action/is_created.rb,
lib/vagrant-memset/action/read_state.rb,
lib/vagrant-memset/action/sync_folders.rb,
lib/vagrant-memset/action/cancel_server.rb,
lib/vagrant-memset/action/create_server.rb,
lib/vagrant-memset/action/read_ssh_info.rb,
lib/vagrant-memset/action/connect_memset.rb,
lib/vagrant-memset/action/message_not_created.rb

Defined Under Namespace

Classes: CancelServer, ConnectMemset, CreateServer, IsCreated, MessageNotCreated, ReadSSHInfo, ReadState, SyncFolders

Class Method Summary collapse

Class Method Details

.action_destroyObject

It cancels a miniserver



25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/vagrant-memset/action.rb', line 25

def self.action_destroy
  Vagrant::Action::Builder.new.tap do |b|
    b.use ConfigValidate
    b.use Call, IsCreated do |env, b2|
      if !env[:result]
        b2.use MessageNotCreated
        next
      end
      b2.use ConnectMemset
      b2.use CancelServer
    end
  end
end

.action_provisionObject



85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/vagrant-memset/action.rb', line 85

def self.action_provision
  Vagrant::Action::Builder.new.tap do |b|
    b.use ConfigValidate
    b.use Call, IsCreated do |env, b2|
      if !env[:result]
        b2.use MessageNotCreated
        next
      end
      b2.use Provision
      b2.use SyncFolders
    end
  end
end

.action_read_ssh_infoObject



49
50
51
52
53
54
55
# File 'lib/vagrant-memset/action.rb', line 49

def self.action_read_ssh_info
  Vagrant::Action::Builder.new.tap do |b|
    b.use ConfigValidate
    b.use ConnectMemset
    b.use ReadSSHInfo
  end
end

.action_read_stateObject

It read miniserver state



40
41
42
43
44
45
46
# File 'lib/vagrant-memset/action.rb', line 40

def self.action_read_state
  Vagrant::Action::Builder.new.tap do |b|
    b.use ConfigValidate
    b.use ConnectMemset
    b.use ReadState
  end
end

.action_sshObject



58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/vagrant-memset/action.rb', line 58

def self.action_ssh
  Vagrant::Action::Builder.new.tap do |b|
    b.use ConfigValidate
    b.use Call, IsCreated do |env, b2|
      if !env[:result]
        b2.use MessageNotCreated
        next
      end
      b2.use SSHExec
    end
  end
end

.action_ssh_runObject



71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/vagrant-memset/action.rb', line 71

def self.action_ssh_run
  Vagrant::Action::Builder.new.tap do |b|
    b.use ConfigValidate
    b.use Call, IsCreated do |env, b2|
      if !env[:result]
        b2.use MessageNotCreated
        next
      end
      b2.use SSHRun
    end
  end
end

.action_upObject

This action creates a new miniserver



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/vagrant-memset/action.rb', line 10

def self.action_up
  Vagrant::Action::Builder.new.tap do |b|
    b.use ConfigValidate
    b.use Call,IsCreated do |env, b2|
      if !env[:result]
        b2.use MessageNotCreated
        next
      end
      b2.use ConnectMemset
      b2.use CreateServer
    end
  end
end