knife-softlayer 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +19 -19
- data/.travis.yml +20 -20
- data/CHANGELOG.md +19 -19
- data/CONTRIBUTING.md +31 -31
- data/CONTRIBUTORS.md +2 -2
- data/Gemfile +4 -4
- data/LICENSE.txt +72 -72
- data/README.md +83 -83
- data/Rakefile +37 -37
- data/docs/cla-corporate.md +133 -133
- data/docs/cla-individual.md +84 -84
- data/examples/datacenter.md +94 -94
- data/examples/flavor.md +58 -58
- data/examples/global_ip.md +22 -22
- data/examples/image.md +34 -34
- data/examples/key_pair.md +56 -56
- data/examples/server.md +82 -82
- data/examples/vlan.md +85 -85
- data/knife-softlayer.gemspec +39 -39
- data/lib/chef/knife/flavor/base.rb +52 -52
- data/lib/chef/knife/softlayer.rb +14 -14
- data/lib/chef/knife/softlayer_base.rb +112 -112
- data/lib/chef/knife/softlayer_datacenter_list.rb +28 -28
- data/lib/chef/knife/softlayer_datacenter_show.rb +45 -45
- data/lib/chef/knife/softlayer_delete.rb +6 -6
- data/lib/chef/knife/softlayer_flavor_list.rb +53 -53
- data/lib/chef/knife/softlayer_global_ip_list.rb +34 -34
- data/lib/chef/knife/softlayer_image_list.rb +26 -26
- data/lib/chef/knife/softlayer_key_pair_create.rb +37 -37
- data/lib/chef/knife/softlayer_key_pair_list.rb +28 -28
- data/lib/chef/knife/softlayer_list.rb +6 -6
- data/lib/chef/knife/softlayer_server_create.rb +462 -458
- data/lib/chef/knife/softlayer_server_destroy.rb +146 -146
- data/lib/chef/knife/softlayer_server_list.rb +27 -27
- data/lib/chef/knife/softlayer_server_relaunch.rb +208 -208
- data/lib/chef/knife/softlayer_vlan_create.rb +37 -37
- data/lib/chef/knife/softlayer_vlan_list.rb +28 -28
- data/lib/chef/knife/softlayer_vlan_show.rb +40 -40
- data/lib/knife-softlayer/version.rb +12 -12
- data/spec/spec_helper.rb +21 -21
- data/spec/unit/softlayer_base_spec.rb +26 -26
- data/spec/unit/softlayer_server_create_spec.rb +105 -105
- data/spec/unit/softlayer_server_destroy_spec.rb +47 -47
- metadata +27 -27
@@ -1,47 +1,47 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>)
|
3
|
-
# © Copyright IBM Corporation 2014.
|
4
|
-
#
|
5
|
-
# LICENSE: Apache 2.0 (http://www.apache.org/licenses/)
|
6
|
-
#
|
7
|
-
|
8
|
-
require File.expand_path('../../spec_helper', __FILE__)
|
9
|
-
require 'chef/knife/bootstrap'
|
10
|
-
require 'fog/softlayer'
|
11
|
-
Fog.mock!
|
12
|
-
|
13
|
-
|
14
|
-
describe Chef::Knife::SoftlayerServerDestroy do
|
15
|
-
before(:each) do
|
16
|
-
Chef::Config[:knife][:softlayer_username] = 'username'
|
17
|
-
Chef::Config[:knife][:softlayer_api_key] = 'key'
|
18
|
-
|
19
|
-
|
20
|
-
@attributes = {
|
21
|
-
:id => '1000001',
|
22
|
-
:name => '1000001',
|
23
|
-
:flavor_id => 'medium',
|
24
|
-
:fqdn => 'test.example.com',
|
25
|
-
:public_ip_address => '33.33.33.33',
|
26
|
-
:private_ip_address => '10.10.10.10',
|
27
|
-
:tags => ['slid=1000001']
|
28
|
-
}
|
29
|
-
|
30
|
-
@knife_softlayer_destroy = Chef::Knife::SoftlayerServerDestroy.new
|
31
|
-
@knife_softlayer_destroy.connection.virtual_guests = @vm_attributes
|
32
|
-
@knife_softlayer_destroy.node = double("node", @attributes)
|
33
|
-
@knife_softlayer_destroy.stub(:destroy_item)
|
34
|
-
instance = double(@attributes)
|
35
|
-
@knife_softlayer_destroy.stub_chain(:connection, :servers, :get).and_return(instance)
|
36
|
-
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should be talking to the softlayer api and the chef server" do
|
41
|
-
# Chef::Search::Query.stub(:new).and_return(double("query", :search => {}))
|
42
|
-
# @knife_softlayer_destroy.config[:ip_address] = '33.33.33.33'
|
43
|
-
# @knife_softlayer_destroy.connection.servers.get.should_receive(:destroy)
|
44
|
-
# @knife_softlayer_destroy.run
|
45
|
-
end
|
46
|
-
|
47
|
-
end
|
1
|
+
#
|
2
|
+
# Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>)
|
3
|
+
# © Copyright IBM Corporation 2014.
|
4
|
+
#
|
5
|
+
# LICENSE: Apache 2.0 (http://www.apache.org/licenses/)
|
6
|
+
#
|
7
|
+
|
8
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
9
|
+
require 'chef/knife/bootstrap'
|
10
|
+
require 'fog/softlayer'
|
11
|
+
Fog.mock!
|
12
|
+
|
13
|
+
|
14
|
+
describe Chef::Knife::SoftlayerServerDestroy do
|
15
|
+
before(:each) do
|
16
|
+
Chef::Config[:knife][:softlayer_username] = 'username'
|
17
|
+
Chef::Config[:knife][:softlayer_api_key] = 'key'
|
18
|
+
|
19
|
+
|
20
|
+
@attributes = {
|
21
|
+
:id => '1000001',
|
22
|
+
:name => '1000001',
|
23
|
+
:flavor_id => 'medium',
|
24
|
+
:fqdn => 'test.example.com',
|
25
|
+
:public_ip_address => '33.33.33.33',
|
26
|
+
:private_ip_address => '10.10.10.10',
|
27
|
+
:tags => ['slid=1000001']
|
28
|
+
}
|
29
|
+
|
30
|
+
@knife_softlayer_destroy = Chef::Knife::SoftlayerServerDestroy.new
|
31
|
+
@knife_softlayer_destroy.connection.virtual_guests = @vm_attributes
|
32
|
+
@knife_softlayer_destroy.node = double("node", @attributes)
|
33
|
+
@knife_softlayer_destroy.stub(:destroy_item)
|
34
|
+
instance = double(@attributes)
|
35
|
+
@knife_softlayer_destroy.stub_chain(:connection, :servers, :get).and_return(instance)
|
36
|
+
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should be talking to the softlayer api and the chef server" do
|
41
|
+
# Chef::Search::Query.stub(:new).and_return(double("query", :search => {}))
|
42
|
+
# @knife_softlayer_destroy.config[:ip_address] = '33.33.33.33'
|
43
|
+
# @knife_softlayer_destroy.connection.servers.get.should_receive(:destroy)
|
44
|
+
# @knife_softlayer_destroy.run
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
metadata
CHANGED
@@ -1,153 +1,153 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-softlayer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Eldridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-softlayer
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.1.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: knife-windows
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>'
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 0.5.12
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>'
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.5.12
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: net-ssh
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>'
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 2.8.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>'
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.8.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mixlib-config
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '2.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: chef
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.10.10
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.10.10
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '2.14'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '2.14'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '10.1'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '10.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: sdoc
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0.3'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0.3'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: bundler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '1.5'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '1.5'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: osrcry
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - '>='
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
description: A knife plugin for launching and bootstrapping instances in the IBM SoftLayer
|
@@ -158,8 +158,8 @@ executables: []
|
|
158
158
|
extensions: []
|
159
159
|
extra_rdoc_files: []
|
160
160
|
files:
|
161
|
-
-
|
162
|
-
-
|
161
|
+
- .gitignore
|
162
|
+
- .travis.yml
|
163
163
|
- CHANGELOG.md
|
164
164
|
- CONTRIBUTING.md
|
165
165
|
- CONTRIBUTORS.md
|
@@ -211,17 +211,17 @@ require_paths:
|
|
211
211
|
- lib
|
212
212
|
required_ruby_version: !ruby/object:Gem::Requirement
|
213
213
|
requirements:
|
214
|
-
- -
|
214
|
+
- - '>='
|
215
215
|
- !ruby/object:Gem::Version
|
216
216
|
version: '0'
|
217
217
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
218
|
requirements:
|
219
|
-
- -
|
219
|
+
- - '>='
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0'
|
222
222
|
requirements: []
|
223
223
|
rubyforge_project:
|
224
|
-
rubygems_version: 2.
|
224
|
+
rubygems_version: 2.0.14.1
|
225
225
|
signing_key:
|
226
226
|
specification_version: 4
|
227
227
|
summary: SoftLayer VM support for Chef's knife utility.
|