vagrant_filoo 0.0.2 → 0.0.3

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: c9b0385a665c31b877a060d18231e12bc264b1a9
4
- data.tar.gz: 5d9de96e77ef02d20f5736c816099d10ee669bd0
3
+ metadata.gz: 01d209f3223347ab6a53ec2e8a780933b5de19cf
4
+ data.tar.gz: 8d5ef55d30fec3f352fa31131c773c42ddcf28a6
5
5
  SHA512:
6
- metadata.gz: 61964f5d18997c8ecd44ea7d4c7e53c325e8cdec0506dcdeeef55d028d5a6d7fd7c4d87771a8a71806dde8ac8356cc49c2f7fefb5f91f45f7967d6c71dbb35bd
7
- data.tar.gz: f5e5a0125cddf965b1ba302e1fed58cc74027a009ca09c1000cdf2ef56634d6e0d494ceaa4a9ddc34be21d3221416e2ef3f2058af5f787fafccccc21d452ac0c
6
+ metadata.gz: c12e7747b81417ef62cc76a348763a806a43b76a73c18a24603df6c06f9779ca82d8d43b11aa233bafa9ec781faaa51e699bf7dfc70a15f19cb8463415046b85
7
+ data.tar.gz: fd549e5372956e5b3654015e8c8ea167aa32bd4214aea47968c9c9f66262f2ce9c56dde4c46c64bf1358cd4c2addee09569c1b23c67d7f46def9f163fd320863
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # vagrant_filoo 0.0.2
1
+ # vagrant_filoo 0.0.3
2
2
  Vagrant filoo provisioner
3
3
 
4
4
  This is a Vagrant 1.7x plugin that adds an provider for filoo hosting to Vagrant, allowing Vagrant to control and provision machines within the filoo public and private cloud.
@@ -32,7 +32,7 @@ Of course prior to doing this, you'll need to obtain an Filoo-compatible box fil
32
32
  After installing the plugin (instructions above), the quickest way to get started is to actually use a dummy Filoo box and specify all the details manually within a `config.vm.provider` block. So first, add the dummy box using any name you want:
33
33
 
34
34
  ```
35
- $ vagrant box add filoo <url to filoo box>
35
+ $ vagrant box add filoo https://github.com/hufsm/vagrant-filoo/raw/master/filoo.box
36
36
  ...
37
37
  ```
38
38
 
data/filoo.box CHANGED
Binary file
@@ -1,6 +1,7 @@
1
1
  require_relative "../cloud_compute"
2
2
  require_relative '../errors'
3
3
  require 'vagrant_filoo/util/timer'
4
+ require('JSON')
4
5
 
5
6
  module VagrantPlugins
6
7
  module Filoo
@@ -30,7 +31,8 @@ module VagrantPlugins
30
31
  :cpu => config.cpu,
31
32
  :ram => config.ram,
32
33
  :hdd => config.hdd,
33
- :cd_imageid => imageId
34
+ :cd_imageid => imageId,
35
+ :additional_nic => config.additional_nic
34
36
  }
35
37
 
36
38
  env[:ui].info("vagrant_filoo creating_instance")
@@ -41,8 +43,19 @@ module VagrantPlugins
41
43
  env[:ui].info(" -- Image Name: #{config.cd_image_name}")
42
44
  env[:result] = VagrantPlugins::Filoo::CloudCompute::createServer(params, @baseUrl, @apiKey)
43
45
  env[:machine].id = env[:result]["vmid"]
46
+ env[:ui].info(" -- Server created with config")
44
47
  #env[:machine].name = env[:result]["custom_vmname"]
45
- env[:ui].info(" -- Server created, server state #{env[:result]}")
48
+ #env[:result].each do |key, |
49
+ # if value.kind_of?(String)
50
+ # env[:ui].info(" #{key}: #{value}")
51
+ # elsif value.kind_of?(Array)
52
+ # elsif value.kind_of?(Hash)
53
+ # end
54
+ #end
55
+ #env[:ui].info(" -- Server created, server state #{env[:result]}")
56
+ env[:ui].info(" -- Server created with config")
57
+ env[:ui].info(
58
+ "#{JSON.pretty_generate(env[:result]).gsub!('{','').gsub!('}','').gsub!('"','').gsub!(',','').gsub!('[','').gsub!(']','')}")
46
59
  @app.call(env)
47
60
  end
48
61
  end
@@ -20,7 +20,11 @@ module VagrantPlugins
20
20
  env[:metrics] ||= {}
21
21
  vmid = env[:machine].id
22
22
  env[:result] = VagrantPlugins::Filoo::CloudCompute::startInstance(vmid, @baseUrl, @apiKey, @filooConfig)
23
- env[:ui].info("Machine #{vmid} successfully started, state #{env[:result].to_json}")
23
+ env[:ui].info("Machine #{vmid} successfully started with config")
24
+
25
+ env[:ui].info(
26
+ "#{JSON.pretty_generate(env[:result]).gsub!('{','').gsub!('}','').gsub!('"','').gsub!(',','').gsub!('[','').gsub!(']','')}")
27
+
24
28
  @logger.info("Time to instance ready: #{env[:metrics]["instance_ready_time"]}")
25
29
 
26
30
  if !env[:interrupted]
@@ -20,7 +20,9 @@ module VagrantPlugins
20
20
  vmid = env[:machine].id
21
21
  env[:ui].info("Halt machine #{vmid}")
22
22
  env[:result] = VagrantPlugins::Filoo::CloudCompute::stopInstance vmid, @baseUrl, @apiKey
23
- env[:ui].info("Machine #{vmid} successfully halted, state #{env[:result].to_json}")
23
+ env[:ui].info("Machine #{vmid} successfully halted, new state:")
24
+ env[:ui].info(
25
+ "#{JSON.pretty_generate(env[:result]).gsub!('{','').gsub!('}','').gsub!('"','').gsub!(',','').gsub!('[','').gsub!(']','')}")
24
26
  end
25
27
  @app.call(env)
26
28
  end
@@ -15,6 +15,7 @@ module VagrantPlugins
15
15
  def call(env)
16
16
  vmid = env[:machine].id
17
17
  env[:result] = VagrantPlugins::Filoo::CloudCompute::deleteServer(vmid, @baseUrl, @apiKey)
18
+ env[:ui].info("Machine #{env[:machine].id} successfully terminated")
18
19
  env[:machine].id = nil
19
20
  @app.call(env)
20
21
  end
@@ -11,7 +11,7 @@ module VagrantPlugins
11
11
  module Filoo
12
12
  module Action
13
13
 
14
- # This action is called to read the SSH info of the machine. The
14
+ # This action is called to read the SSH info of the machine.
15
15
  # resulting state is expected to be put into the `:machine_ssh_info`
16
16
  # key.
17
17
  def self.action_read_ssh_info
@@ -90,7 +90,10 @@ module VagrantPlugins
90
90
 
91
91
  raise e
92
92
  end
93
-
93
+
94
+ if params[:additional_nic]
95
+ self.addNic(vmid, baseUrl, apiKey)
96
+ end
94
97
  serverStatus
95
98
  end
96
99
 
@@ -184,7 +187,7 @@ module VagrantPlugins
184
187
 
185
188
  if filooConfig.additional_nic && nicList.count < 1
186
189
  self.addNic(vmid, baseUrl, apiKey)
187
- elsif !filooConfig.additional_nic && nicList.count > 0
190
+ elsif !filooConfig.additional_nic && nicList.count > 0
188
191
  self.deleteNic(vmid, baseUrl, apiKey)
189
192
  end
190
193
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Filoo
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
@@ -5,10 +5,11 @@ Gem::Specification.new do |s|
5
5
  s.name = "vagrant_filoo"
6
6
  s.version = VagrantPlugins::Filoo::VERSION
7
7
  s.platform = Gem::Platform::RUBY
8
- s.authors = "Stefan heuer"
8
+ s.authors = "Huf Secure Mobile GmbH"
9
9
  s.email = "stefan.heuer@huf-group.com"
10
10
  s.summary = "Enables Vagrant to manage machines in Filoo infrastructure."
11
- s.description = "Enables Vagrant to manage machines in Filoo infrastructure."
11
+ s.description = "Enables Vagrant to manage machines in Filoo infrastructure." +
12
+ "\n hosted on Github: https://github.com/hufsm/vagrant-filoo"
12
13
 
13
14
  s.required_rubygems_version = ">= 1.3.6"
14
15
  s.rubyforge_project = "vagrant_filoo"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant_filoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
- - Stefan heuer
7
+ - Huf Secure Mobile GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-05 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -108,7 +108,9 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.5.5
111
- description: Enables Vagrant to manage machines in Filoo infrastructure.
111
+ description: |-
112
+ Enables Vagrant to manage machines in Filoo infrastructure.
113
+ hosted on Github: https://github.com/hufsm/vagrant-filoo
112
114
  email: stefan.heuer@huf-group.com
113
115
  executables: []
114
116
  extensions: []