mccloud 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -85,11 +85,13 @@ The syntax to use for an ec2
85
85
  Mccloud::Config.run do |config|
86
86
 
87
87
  # Define a :aws provider 'aws-us-east'
88
- config.provider.define "host-provider" do |provider_config|
88
+ config.provider.define "aws-us-east" do |provider_config|
89
89
 
90
90
  #Note: this are option provided to fog for creation
91
91
  provider_config.provider.options = { }
92
92
 
93
+ provider_config.provider.flavor = :aws
94
+
93
95
  # Region in which to create the VM
94
96
  provider_config.provider.region = "us-east-1"
95
97
 
@@ -171,7 +173,7 @@ this works together with veewee that support creating kvm template machines.
171
173
  Like on vagrant, mccloud clones a veewee created vm
172
174
 
173
175
  config.provider.define "kvm-libvirt" do |config|
174
- config.provider.type=:libvirt
176
+ config.provider.flavor=:libvirt
175
177
  config.provider.options={ :libvirt_uri => "qemu+ssh://ubuntu@kvmbox/system" }
176
178
  config.provider.namespace="test"
177
179
  end
@@ -6,16 +6,25 @@ module Mccloud::Provider
6
6
  scp(src,dest,options)
7
7
  end
8
8
 
9
- def scp(local_path, remote_path, scp_options = {})
10
- unless File.exists?(local_path)
9
+ def scp(local_path, remote_path, scp_options = {})
10
+ unless File.exists?(local_path)
11
11
  raise Mccloud::Error,"scp failed: #{local_path} does not exist"
12
- end
13
- #@raw.scp(src,dest)
14
- scp_options[:key_data] = [@raw.private_key] if @raw.private_key
12
+ end
15
13
 
16
- ::Fog::SCP.new(self.ip_address, @raw.username, scp_options).upload(local_path, remote_path, {})
14
+ #@raw.scp(src,dest)
15
+ scp_options[:key_data] = [@raw.private_key] if @raw.private_key
16
+
17
+ ::Fog::SCP.new(self.ip_address, @raw.username, sanitize(scp_options)).upload(local_path, remote_path, {})
18
+ end
19
+
20
+ #
21
+ # sanitize the options by converting to a hash with
22
+ # all keys converted to symbols as required by net/ssh
23
+ #
24
+ def sanitize(options)
25
+ Hash[options.map{|(k,v)| [k.to_sym,v]}]
17
26
  end
18
27
 
19
- end #module
20
- end #module
21
28
  end #module
29
+ end #module
30
+ end #module
@@ -2,5 +2,5 @@ module Mccloud
2
2
  end
3
3
 
4
4
  unless defined?(Mccloud::VERSION)
5
- ::Mccloud::VERSION = "0.0.16"
5
+ ::Mccloud::VERSION = "0.0.17"
6
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mccloud
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 16
10
- version: 0.0.16
9
+ - 17
10
+ version: 0.0.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Debois