vagrant-mos 0.8.84 → 0.8.85

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 641d12917317f2c12b3505ed1b77838bc1761ab6
4
- data.tar.gz: b349513e0bef223892c7fb449c0c39f90c50d764
3
+ metadata.gz: 59665ee3cc739ae69fa67347b8f8bde52071a8d0
4
+ data.tar.gz: 1f4f0d74ce986909f757b7ee4134a328111eb279
5
5
  SHA512:
6
- metadata.gz: 735e13bb2668743cda4c79c020bb386de221a076b1fba6bc395511efdd26d663b62139d3e95499fa1bcf05eb2f43fd7ebcd7d1da9ba95a9561411b44eec9efdd
7
- data.tar.gz: 5eb29360dd5134d8517f3384963ae268330d33ccb22f28b1c14826d659506283c586939caa629474ea3fb800b29868860bd17736a8809eb009ccd132272d4a30
6
+ metadata.gz: e289e3af4f734a8d6a64bfc9fbf102b30ab585fa2a1fcbb88d5e8f98ae19a599350b247ae70abb17958d18bdc3db5f340b13ee5c9e3a59a2c148d9f7378199e3
7
+ data.tar.gz: 19e78f6ba311cd95d883035e474b51f37d7eac68c9b544046b5331b8452e47d5cce934c8d37794eda266c318958a46c55bfc9fddc45e0fe5c1368f4544bed3e1
@@ -115,7 +115,6 @@ module VagrantPlugins
115
115
 
116
116
  def self.action_prepare_boot
117
117
  Vagrant::Action::Builder.new.tap do |b|
118
- b.use SetName
119
118
  b.use Provision
120
119
  b.use SyncedFolders
121
120
  b.use WarnNetworks
@@ -177,7 +176,6 @@ module VagrantPlugins
177
176
  autoload :ConnectMOS, action_root.join("connect_mos")
178
177
  autoload :IsCreated, action_root.join("is_created")
179
178
  autoload :IsStopped, action_root.join("is_stopped")
180
- autoload :SetName, action_root.join("set_name")
181
179
  autoload :MessageAlreadyCreated, action_root.join("message_already_created")
182
180
  autoload :MessageNotCreated, action_root.join("message_not_created")
183
181
  autoload :MessageWillNotDestroy, action_root.join("message_will_not_destroy")
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module MOS
3
- VERSION = '0.8.84'
3
+ VERSION = '0.8.85'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-mos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.84
4
+ version: 0.8.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - yangcs2009
@@ -121,7 +121,6 @@ files:
121
121
  - lib/vagrant-mos/action/read_ssh_info.rb
122
122
  - lib/vagrant-mos/action/read_state.rb
123
123
  - lib/vagrant-mos/action/run_instance.rb
124
- - lib/vagrant-mos/action/set_name.rb
125
124
  - lib/vagrant-mos/action/start_instance.rb
126
125
  - lib/vagrant-mos/action/stop_instance.rb
127
126
  - lib/vagrant-mos/action/terminate_instance.rb
@@ -1,55 +0,0 @@
1
- require "log4r"
2
-
3
- module VagrantPlugins
4
- module MOS
5
- module Action
6
- class SetName
7
- def initialize(app, env)
8
- @logger = Log4r::Logger.new("vagrant::action::vm::setname")
9
- @app = app
10
- end
11
-
12
- def call(env)
13
- name = env[:machine].provider_config.name
14
-
15
- # If we already set the name before, then don't do anything
16
- sentinel = env[:machine].data_dir.join("action_set_name")
17
- if !name && sentinel.file?
18
- @logger.info("Default name was already set before, not doing it again.")
19
- return @app.call(env)
20
- end
21
-
22
- # If no name was manually set, then use a default
23
- if !name
24
- prefix = "#{env[:root_path].basename.to_s}_#{env[:machine].name}"
25
- prefix.gsub!(/[^-a-z0-9_]/i, "")
26
-
27
- # milliseconds + random number suffix to allow for simultaneous
28
- # `vagrant up` of the same box in different dirs
29
- name = prefix + "_#{(Time.now.to_f * 1000.0).to_i}_#{rand(100000)}"
30
- end
31
-
32
- ## Verify the name is not taken
33
- #vms = env[:machine].provider.driver.read_vms
34
- #raise Vagrant::Errors::VMNameExists, name: name if \
35
- # vms.key?(name) && vms[name] != env[:machine].id
36
- #
37
- #if vms.key?(name)
38
- # @logger.info("Not setting the name because our name is already set.")
39
- #else
40
- # env[:ui].info(I18n.t(
41
- # "vagrant.actions.vm.set_name.setting_name", name: name))
42
- # env[:machine].provider.driver.set_name(name)
43
- #end
44
-
45
- # Create the sentinel
46
- sentinel.open("w") do |f|
47
- f.write(Time.now.to_i.to_s)
48
- end
49
-
50
- @app.call(env)
51
- end
52
- end
53
- end
54
- end
55
- end