knife-softlayer 0.0.5 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,22 @@
1
+ language: ruby
2
+
3
+ script: bundle exec rspec spec
4
+
5
+ matrix:
6
+ fast_finish: true
7
+ include:
8
+ - rvm: 1.9.3
9
+ gemfile: Gemfile
10
+ - rvm: 2.0.0
11
+ gemfile: Gemfile
12
+ - rvm: 2.1.0
13
+ gemfile: Gemfile
14
+ - rvm: 2.1.1
15
+ gemfile: Gemfile
16
+ env: COVERAGE=true
17
+
18
+ notifications:
19
+ email: matt.eldridge@us.ibm.com
20
+
21
+ before_install:
22
+ - gem update --system # todo: workaround for https://github.com/rubygems/rubygems/pull/763
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
1
  # Knife::Softlayer
2
+ [![Gem Version](https://badge.fury.io/rb/knife-softlayer.png)](http://badge.fury.io/rb/knife-softlayer)
3
+ [![Build Status](https://api.travis-ci.org/softlayer/knife-softlayer.svg?branch=SAN-storage)](https://travis-ci.org/softlayer/knife-softlayer)
4
+ [![Dependency Status](https://gemnasium.com/softlayer/knife-softlayer.svg)](https://gemnasium.com/softlayer/knife-softlayer)
2
5
 
3
6
  A knife plugin for launching and bootstrapping instances in the IBM SoftLayer cloud.
4
7
 
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.version = Knife::Softlayer::VERSION
16
16
  spec.authors = ["Matt Eldridge"]
17
17
  spec.email = ["matt.eldridge@us.ibm.com"]
18
- spec.summary = %q{SoftLayer CCI support for Chef's knife utility.}
18
+ spec.summary = %q{SoftLayer VM support for Chef's knife utility.}
19
19
  spec.description = spec.summary
20
20
  spec.homepage = "https://github.com/SoftLayer/knife-softlayer"
21
21
  spec.license = "Apache 2.0"
@@ -73,19 +73,19 @@ class Chef
73
73
 
74
74
  option :single_tenant,
75
75
  :long => '--single-tenant',
76
- :description => 'Create a CCI VM with a dedicated physical host.',
76
+ :description => 'Create a VM with a dedicated physical host.',
77
77
  :boolean => true,
78
78
  :default => false
79
79
 
80
- option :san_storage,
81
- :long => '--san-storage',
82
- :description => 'Create a CCI VM with SAN based block storage [disk].',
80
+ option :local_storage,
81
+ :long => '--local-storage',
82
+ :description => 'Force local block storage instead of SAN storage.',
83
83
  :boolean => true,
84
84
  :default => false
85
85
 
86
86
  option :datacenter,
87
87
  :long => '--datacenter VALUE',
88
- :description => 'Create a CCI VI in a particular datacenter.'
88
+ :description => 'Create a VM in a particular datacenter.'
89
89
 
90
90
  option :tags,
91
91
  :short => "-T T=V[,T=V,...]",
@@ -230,7 +230,7 @@ class Chef
230
230
  @template = {}
231
231
  @template['startCpus'] = config[:cores]
232
232
  @template['maxMemory'] = config[:ram]
233
- @template['localDiskFlag'] = !config[:san_storage]
233
+ @template['localDiskFlag'] = config[:local_storage]
234
234
  @template['blockDevices'] = config[:block_storage].split(',').map do |i|
235
235
  dev, cap = i.split(':')
236
236
  {'device' => dev, 'diskImage' => {'capacity' => cap } }
@@ -249,7 +249,7 @@ class Chef
249
249
 
250
250
  @response = connection.createObject(@template)
251
251
 
252
- puts ui.color("Launching SoftLayer CCI, this may take a few minutes.", :green)
252
+ puts ui.color("Launching SoftLayer VM, this may take a few minutes.", :green)
253
253
 
254
254
  begin
255
255
  @cci = connection.object_mask('mask.operatingSystem.passwords.password').object_with_id(@response['id']).getObject
@@ -28,7 +28,7 @@ class Chef
28
28
  option :ip_address,
29
29
  :long => "--ip-address ADDRESS",
30
30
  :short => "-I",
31
- :description => "Find the CCI and node to destroy by its public IP address."
31
+ :description => "Find the VM and node to destroy by its public IP address."
32
32
 
33
33
  ##
34
34
  # Run the procedure to destroy a SoftLayer VM and clean up its Chef node and client.
@@ -37,7 +37,7 @@ class Chef
37
37
 
38
38
  $stdout.sync = true
39
39
 
40
- puts ui.color("Decommissioning SoftLayer CCI, this may take a few minutes.", :green)
40
+ puts ui.color("Decommissioning SoftLayer VM, this may take a few minutes.", :green)
41
41
 
42
42
  @chef = Chef::Search::Query.new
43
43
 
@@ -58,7 +58,7 @@ class Chef
58
58
 
59
59
 
60
60
  @node.nil? and raise "#{ui.color('Chef node not found!', :red)}"
61
- @cci.nil? and raise "#{ui.color('CCI instance with IP: ' + config[:ip_address] +' not found!', :red)}"
61
+ @cci.nil? and raise "#{ui.color('VM instance with IP: ' + config[:ip_address] +' not found!', :red)}"
62
62
 
63
63
 
64
64
  begin
@@ -82,9 +82,9 @@ class Chef
82
82
 
83
83
  begin
84
84
  connection.object_with_id(@cci['id']).deleteObject
85
- puts ui.color("SoftLayer CCI successfully deleted. You are no longer being billed for this instance.", :green)
85
+ puts ui.color("SoftLayer VM successfully deleted. You are no longer being billed for this instance.", :green)
86
86
  rescue Exception => e
87
- err_msg ui.color("ERROR DELETING SOFTLAYER CCI. IT'S POSSIBLE YOU ARE STILL BEING BILLED FOR THIS INSTANCE. PLEASE CONTACT SUPPORT FOR FURTHER ASSISTANCE", :red)
87
+ err_msg ui.color("ERROR DELETING SOFTLAYER VM. IT'S POSSIBLE YOU ARE STILL BEING BILLED FOR THIS INSTANCE. PLEASE CONTACT SUPPORT FOR FURTHER ASSISTANCE", :red)
88
88
  err_msg ui.color(e.message, :yellow)
89
89
  err_msg ui.color(e.backtrace, :yellow)
90
90
  end
@@ -7,6 +7,6 @@
7
7
 
8
8
  module Knife
9
9
  module Softlayer
10
- VERSION = "0.0.5"
10
+ VERSION = "0.1.1"
11
11
  end
12
12
  end
@@ -90,7 +90,7 @@ describe Chef::Knife::SoftlayerServerCreate do
90
90
  @bootstrap.config[:distro].should == 'chef-full'
91
91
  end
92
92
 
93
- it "creates an CCI instance and bootstraps it" do
93
+ it "creates an VM instance and bootstraps it" do
94
94
  @knife_softlayer_create.run
95
95
  @knife_softlayer_create.cci.should_not == nil
96
96
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-softlayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-15 00:00:00.000000000 Z
12
+ date: 2014-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: softlayer_api
@@ -171,7 +171,7 @@ dependencies:
171
171
  - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
- description: SoftLayer CCI support for Chef's knife utility.
174
+ description: SoftLayer VM support for Chef's knife utility.
175
175
  email:
176
176
  - matt.eldridge@us.ibm.com
177
177
  executables: []
@@ -179,6 +179,7 @@ extensions: []
179
179
  extra_rdoc_files: []
180
180
  files:
181
181
  - .gitignore
182
+ - .travis.yml
182
183
  - CHANGELOG.md
183
184
  - CONTRIBUTING.md
184
185
  - Gemfile
@@ -225,7 +226,7 @@ rubyforge_project:
225
226
  rubygems_version: 1.8.23
226
227
  signing_key:
227
228
  specification_version: 3
228
- summary: SoftLayer CCI support for Chef's knife utility.
229
+ summary: SoftLayer VM support for Chef's knife utility.
229
230
  test_files:
230
231
  - spec/spec_helper.rb
231
232
  - spec/unit/softlayer_base_spec.rb