knife-brightbox 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  This is the unofficial Opscode Knife plugin for Brightbox Cloud. This plugin gives knife the ability to create, bootstrap, and manage servers on the Brightbox Cloud.
6
6
 
7
+ You'll need a Brightbox Cloud (Beta) account to use this plugin:
8
+
9
+ http://beta.brightbox.com/beta
10
+
7
11
  = INSTALLATION:
8
12
 
9
13
  Be sure you are running the latest version Chef. Versions earlier than 0.10.0 don't support plugins:
@@ -32,13 +32,21 @@ class Chef
32
32
  Chef::Knife::Bootstrap.load_deps
33
33
  end
34
34
 
35
+ FLAVORS = {
36
+ 'nano' => 'typ-4nssg',
37
+ 'mini' => 'typ-iqisj',
38
+ 'small' => 'typ-urtky',
39
+ 'medium' => 'typ-qdiwq',
40
+ 'large' => 'typ-mlbt7',
41
+ }
42
+
35
43
  banner "knife brightbox server create (options)"
36
44
 
37
45
  option :flavor,
38
46
  :short => "-f FLAVOR",
39
47
  :long => "--flavor FLAVOR",
40
- :description => "The flavor of server; default is NANO (512 MB)",
41
- :proc => Proc.new { |f| Chef::Config[:knife][:flavor] = f },
48
+ :description => "The flavor of server; default is NANO (512 MB, typ-4nssg)",
49
+ :proc => Proc.new { |f| Chef::Config[:knife][:flavor] = (FLAVORS[f] || 'typ-4nssg') },
42
50
  :default => 'typ-4nssg'
43
51
 
44
52
  option :image,
@@ -134,8 +142,9 @@ class Chef
134
142
  server = connection.servers.create(
135
143
  :name => config[:server_name],
136
144
  :image_id => Chef::Config[:knife][:image],
137
- :flavor_id => 'typ-4nssg'
145
+ :flavor_id => Chef::Config[:knife][:flavor] || config[:flavor]
138
146
  )
147
+ puts "\n"
139
148
 
140
149
  puts "#{ui.color("Instance ID", :cyan)}: #{server.id}"
141
150
  puts "#{ui.color("Name", :cyan)}: #{server.name}"
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Brightbox
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-brightbox
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Rubio