chef-provisioning-oneview 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +43 -3
- data/lib/chef/provisioning/create_machine.rb +52 -0
- data/lib/chef/provisioning/customize_machine.rb +78 -0
- data/lib/chef/provisioning/icsp/api_v104.rb +27 -0
- data/lib/chef/provisioning/icsp/icsp_api.rb +282 -0
- data/lib/chef/provisioning/oneview/oneview_api.rb +56 -357
- data/lib/chef/provisioning/oneview/san_storage.rb +91 -0
- data/lib/chef/provisioning/oneview/v1.2/api.rb +3 -0
- data/lib/chef/provisioning/oneview_driver.rb +42 -5
- data/lib/chef/provisioning/rest.rb +51 -0
- data/lib/chef/provisioning/{oneview/version.rb → version.rb} +1 -1
- data/spec/shared_context.rb +77 -0
- data/spec/spec_helper.rb +8 -6
- data/spec/{unit/support → support}/fake_action_handler.rb +0 -0
- data/spec/support/fake_icsp.rb +73 -21
- data/spec/support/fake_machine_spec.rb +18 -0
- data/spec/support/fake_oneview.rb +148 -21
- data/spec/support/fixtures/icsp/v102/error_404.json +13 -13
- data/spec/support/fixtures/icsp/v102/login.json +4 -4
- data/spec/support/fixtures/icsp/v102/os-deployment-build-plans.json +99 -99
- data/spec/support/fixtures/icsp/v102/{os-deployment-servers_managed.json → os-deployment-servers.json} +178 -178
- data/spec/support/fixtures/icsp/v102/os-deployment-servers_1670001.json +83 -0
- data/spec/support/fixtures/icsp/v102/os-deployment-servers_fakesn.json +9 -0
- data/spec/support/fixtures/icsp/v102/{server_by_sn.json → server_by_sn_VCGE9KB041.json} +44 -44
- data/spec/support/fixtures/icsp/v102/server_by_sn_empty.json +16 -0
- data/spec/support/fixtures/icsp/v102/version.json +3 -3
- data/spec/support/fixtures/oneview/v120/error_404.json +13 -13
- data/spec/support/fixtures/oneview/v120/login.json +4 -4
- data/spec/support/fixtures/oneview/v120/server-hardware.json +1475 -1475
- data/spec/support/fixtures/oneview/v120/server-hardware_Template-WebServer.json +468 -0
- data/spec/support/fixtures/oneview/v120/server-hardware_specific.json +151 -0
- data/spec/support/fixtures/oneview/v120/server-profiles.json +368 -746
- data/spec/support/fixtures/oneview/v120/server-profiles_invalid_filter.json +14 -0
- data/spec/support/fixtures/oneview/v120/{server-profiles_specific.json → server-profiles_name_Template-WebServer.json} +132 -132
- data/spec/support/fixtures/oneview/v120/server-profiles_name_Template-WebServerWithSAN.json +200 -0
- data/spec/support/fixtures/oneview/v120/server-profiles_name_chef-web01.json +133 -0
- data/spec/support/fixtures/oneview/v120/server-profiles_name_chef-web03.json +133 -0
- data/spec/support/fixtures/oneview/v120/server-profiles_name_empty.json +15 -0
- data/spec/support/fixtures/oneview/v120/server-profiles_sn_VCGE9KB041.json +133 -0
- data/spec/support/fixtures/oneview/v120/server-profiles_sn_VCGE9KB042.json +206 -0
- data/spec/support/fixtures/oneview/v120/server-profiles_sn_empty.json +15 -0
- data/spec/support/fixtures/oneview/v120/storage-volumes_1B5D3CA2-6C5B-41C2-8B97-1821F1883F22.json +26 -0
- data/spec/support/fixtures/oneview/v120/tasks_fake_active.json +5 -0
- data/spec/support/fixtures/oneview/v120/tasks_fake_complete.json +5 -0
- data/spec/support/fixtures/oneview/v120/version.json +3 -3
- data/spec/support/fixtures/oneview/v200/server-profile-templates_WebServerTemplate.json +109 -0
- data/spec/support/fixtures/oneview/v200/server-profile-templates_WebServerTemplateWithSAN.json +144 -0
- data/spec/support/fixtures/oneview/v200/server-profile-templates_invalid.json +16 -0
- data/spec/support/fixtures/oneview/v200/server-profile-templates_new-profile_WebServerTemplate.json +125 -0
- data/spec/support/fixtures/oneview/v200/server-profile-templates_new-profile_WebServerTemplateWithSAN.json +178 -0
- data/spec/support/fixtures/oneview/v200/version.json +4 -0
- data/spec/unit/create_machine_spec.rb +78 -0
- data/spec/unit/destroy_spec.rb +26 -0
- data/spec/unit/icsp_nic_teams_spec.rb +38 -0
- data/spec/unit/icsp_search_spec.rb +25 -0
- data/spec/unit/oneview_driver_spec.rb +37 -64
- data/spec/unit/oneview_login_spec.rb +23 -0
- data/spec/unit/oneview_power_spec.rb +51 -0
- data/spec/unit/oneview_san_spec.rb +86 -0
- data/spec/unit/oneview_search_spec.rb +63 -0
- data/spec/unit/rest_api_spec.rb +115 -0
- metadata +90 -9
- data/lib/chef/provisioning/oneview/v1.20/api.rb +0 -3
@@ -0,0 +1,23 @@
|
|
1
|
+
require_relative './../spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Chef::Provisioning::OneViewDriver do
|
4
|
+
include_context 'shared context'
|
5
|
+
|
6
|
+
describe 'login functions' do
|
7
|
+
|
8
|
+
it 'can parse the oneview sessionID' do
|
9
|
+
expect(@instance.instance_eval { login_to_oneview }).to match(@oneview_key)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'can parse the icsp sessionID' do
|
13
|
+
expect(@instance.instance_eval { login_to_icsp }).to match(@icsp_key)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'gets both auth tokens via the auth_tokens method' do
|
17
|
+
@instance.instance_eval { auth_tokens }
|
18
|
+
expect(@instance.instance_variable_get('@oneview_key')).to match(@oneview_key)
|
19
|
+
expect(@instance.instance_variable_get('@icsp_key')).to match(@icsp_key)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative './../spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Chef::Provisioning::OneViewDriver do
|
4
|
+
include_context 'shared context'
|
5
|
+
|
6
|
+
describe '#power_on' do
|
7
|
+
it 'calls set_power_state with correct params' do
|
8
|
+
a = action_handler
|
9
|
+
m = machine_spec
|
10
|
+
ret_val = @instance.instance_eval { power_on(a, m) }
|
11
|
+
expect(a_request(:get, %r{/rest/server-hardware/.*})).to have_been_made
|
12
|
+
expect(a_request(:put, %r{/rest/server-hardware/.*/powerState}).with(body: '{"powerState":"On","powerControl":"MomentaryPress"}')).to have_been_made
|
13
|
+
expect(ret_val).to match(%r{\/rest\/server-hardware\/.+})
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'allows hardware_uri to be passed in' do
|
17
|
+
a = action_handler
|
18
|
+
m = machine_spec
|
19
|
+
@instance.instance_eval { power_on(a, m, '/rest/server-hardware/31363636-3136-584D-5132-333230314D38') }
|
20
|
+
expect(a_request(:get, %r{/rest/server-profiles})).to_not have_been_made
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
describe '#power_off' do
|
25
|
+
it 'calls set_power_state with correct params' do
|
26
|
+
a = action_handler
|
27
|
+
m = machine_spec
|
28
|
+
ret_val = @instance.instance_eval { power_off(a, m) }
|
29
|
+
expect(ret_val).to match(%r{\/rest\/server-hardware\/.+})
|
30
|
+
expect(a_request(:put, %r{/rest/server-hardware/.*/powerState}).with(body: '{"powerState":"Off","powerControl":"MomentaryPress"}')).to have_been_made
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'allows hardware_uri to be passed in' do
|
34
|
+
a = action_handler
|
35
|
+
m = machine_spec
|
36
|
+
@instance.instance_eval { power_off(a, m, '/rest/server-hardware/31363636-3136-584D-5132-333230314D38') }
|
37
|
+
expect(a_request(:get, %r{/rest/server-profiles})).to_not have_been_made
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe '#set_power_state' do
|
42
|
+
|
43
|
+
it 'fails when an invalid state is requested' do
|
44
|
+
a = action_handler
|
45
|
+
m = machine_spec
|
46
|
+
expect { @instance.instance_eval { set_power_state(a, m, :invalid) } }.to raise_error('Invalid power state invalid')
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require_relative './../spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Chef::Provisioning::OneViewDriver do
|
4
|
+
include_context 'shared context'
|
5
|
+
|
6
|
+
describe '#fill_volume_details' do
|
7
|
+
it 'fills the correct volume details' do
|
8
|
+
profile = @instance.instance_eval { get_oneview_template('Template - Web Server with SAN') }
|
9
|
+
v = profile['sanStorage']['volumeAttachments'].first
|
10
|
+
expect(v['volumeName']).to be_nil
|
11
|
+
expect(v['volumeShareable']).to be_nil
|
12
|
+
@instance.instance_eval { fill_volume_details(v) }
|
13
|
+
expect(a_request(:get, /#{v['volumeUri']}/)).to have_been_made
|
14
|
+
expect(v['volumeName']).to eq('bootVol')
|
15
|
+
expect(v['volumeShareable']).to be false
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe '#update_san_info' do
|
20
|
+
context 'profile coppies (OV 1.2)' do
|
21
|
+
it 'prepares copies of profiles for SAN storage' do
|
22
|
+
m = machine_spec
|
23
|
+
profile = @instance.instance_eval { get_oneview_template('Template - Web Server with SAN') }
|
24
|
+
profile['name'] = 'web01'
|
25
|
+
ret_val = @instance.instance_eval { update_san_info(m, profile) }
|
26
|
+
v = ret_val['sanStorage']['volumeAttachments'].first
|
27
|
+
expect(v['uri']).to be_nil
|
28
|
+
expect(v['volumeName']).to eq('bootVol web01')
|
29
|
+
expect(v['lun']).to eq('0')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context 'Server Profile Templates (OV 2.0)' do
|
34
|
+
before :each do
|
35
|
+
@instance.instance_variable_set('@current_oneview_api_version', 200)
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'leaves profiles from Templates largely the same' do
|
39
|
+
m = machine_spec
|
40
|
+
profile = @instance.instance_eval { get_oneview_template('Web Server Template with SAN') }
|
41
|
+
ret_val = @instance.instance_eval { update_san_info(m, profile) }
|
42
|
+
expect(ret_val['sanStorage']['volumeAttachments'].first['storagePaths'].first.key?('state')).to be false
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'appends the profile name to the volume name' do
|
46
|
+
m = machine_spec
|
47
|
+
profile = @instance.instance_eval { get_oneview_template('Web Server Template with SAN') }
|
48
|
+
profile['name'] = 'web01'
|
49
|
+
ret_val = @instance.instance_eval { update_san_info(m, profile) }
|
50
|
+
expect(ret_val['sanStorage']['volumeAttachments'].first['volumeName']).to eq('bootVol web01')
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'requires profiles to specify the volumeShareable attribute' do
|
54
|
+
m = machine_spec
|
55
|
+
profile = @instance.instance_eval { get_oneview_template('Web Server Template with SAN') }
|
56
|
+
profile['sanStorage']['volumeAttachments'].first.delete('volumeShareable')
|
57
|
+
expect { @instance.instance_eval { update_san_info(m, profile) } }.to raise_error(/Should know if volume is sharable/)
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'only allows 1 SAN boot volume' do
|
61
|
+
m = machine_spec
|
62
|
+
profile = @instance.instance_eval { get_oneview_template('Web Server Template with SAN') }
|
63
|
+
profile['sanStorage']['volumeAttachments'].push('id' => 2, 'volumeName' => 'bootVol2', 'volumeShareable' => true)
|
64
|
+
expect { @instance.instance_eval { update_san_info(m, profile) } }.to raise_error(/should only be 1 SAN boot volume/)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe '#enable_boot_from_san' do
|
70
|
+
context 'Server Profile Templates (OV 2.0)' do
|
71
|
+
before :each do
|
72
|
+
@instance.instance_variable_set('@current_oneview_api_version', 200)
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'configures connections to boot from a SAN volume' do
|
76
|
+
a = action_handler
|
77
|
+
m = machine_spec
|
78
|
+
profile = @instance.instance_eval { get_oneview_profile_by_sn('VCGE9KB042') }
|
79
|
+
ret_val = @instance.instance_eval { enable_boot_from_san(a, m, profile) }
|
80
|
+
expect(a_request(:get, /#{profile['sanStorage']['volumeAttachments'].first['volumeUri']}/)).to have_been_made
|
81
|
+
expect(ret_val['connections'].last['boot']['targets'].first['arrayWwpn']).to eq('21210002AC00159E')
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require_relative './../spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Chef::Provisioning::OneViewDriver do
|
4
|
+
include_context 'shared context'
|
5
|
+
|
6
|
+
describe '#get_oneview_profile_by_sn' do
|
7
|
+
|
8
|
+
it 'gets profile for a valid SN' do
|
9
|
+
ret_val = @instance.instance_eval { get_oneview_profile_by_sn('VCGE9KB041') }
|
10
|
+
expect(ret_val).to_not be_nil
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'returns nil for fake SN' do
|
14
|
+
ret_val = @instance.instance_eval { get_oneview_profile_by_sn('11111BBBBB') }
|
15
|
+
expect(ret_val).to be_nil
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'fails when an empty SN is given' do
|
19
|
+
expect { @instance.instance_eval { get_oneview_profile_by_sn('') } }.to raise_error('Must specify a serialNumber!')
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'fails when an invalid filter is specified' do
|
23
|
+
expect { @instance.instance_eval { get_oneview_profile_by_sn('INVALIDFILTER') } }.to raise_error(/Failed to get oneview profile by serialNumber/)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#get_oneview_template' do
|
28
|
+
|
29
|
+
context 'OneView 120' do
|
30
|
+
it 'gets profile template by name' do
|
31
|
+
ret_val = @instance.instance_eval { get_oneview_template('Template - Web Server') }
|
32
|
+
expect(ret_val['name']).to eq('Template - Web Server')
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'clears necessary attributes from profile' do
|
36
|
+
ret_val = @instance.instance_eval { get_oneview_template('Template - Web Server') }
|
37
|
+
expect(ret_val['name']).to_not be_nil
|
38
|
+
%w(uri serialNumber uuid taskUri).each { |key| expect(ret_val[key]).to be_nil }
|
39
|
+
ret_val['connections'].each do |c|
|
40
|
+
%w(wwnn wwpn mac deploymentStatus interconnectUri wwpnType macType).each { |key| expect(c[key]).to be_nil }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context 'OneView 200' do
|
46
|
+
before :each do
|
47
|
+
@instance.instance_variable_set('@current_oneview_api_version', 200)
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'gets template by name' do
|
51
|
+
ret_val = @instance.instance_eval { get_oneview_template('Web Server Template') }
|
52
|
+
expect(ret_val['uri']).to be_nil
|
53
|
+
expect(ret_val['serverProfileTemplateUri']).to_not be_nil
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'gets profile template by name' do
|
57
|
+
ret_val = @instance.instance_eval { get_oneview_template('Template - Web Server') }
|
58
|
+
expect(ret_val['name']).to eq('Template - Web Server')
|
59
|
+
expect(ret_val['uri']).to be_nil
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,115 @@
|
|
1
|
+
require_relative './../spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe Chef::Provisioning::OneViewDriver do
|
4
|
+
include_context 'shared context'
|
5
|
+
|
6
|
+
describe '#rest_api' do
|
7
|
+
|
8
|
+
context 'fake_oneview' do
|
9
|
+
it 'completes get request with correct parameters' do
|
10
|
+
resp = @instance.instance_eval { rest_api(:oneview, :get, '/', {}) }
|
11
|
+
expect(resp['method']).to eq('GET')
|
12
|
+
expect(resp['message']).to eq('Fake OneView works!')
|
13
|
+
expect(resp['content_type']).to eq('application/json')
|
14
|
+
expect(resp['api_version']).to eq(@instance.instance_variable_get('@oneview_api_version'))
|
15
|
+
expect(resp['auth']).to eq(@oneview_key)
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'completes post request with correct parameters' do
|
19
|
+
resp = @instance.instance_eval { rest_api(:oneview, :post, '/', {}) }
|
20
|
+
expect(resp['method']).to eq('POST')
|
21
|
+
expect(resp['message']).to eq('Fake OneView works!')
|
22
|
+
expect(resp['content_type']).to eq('application/json')
|
23
|
+
expect(resp['api_version']).to eq(@instance.instance_variable_get('@oneview_api_version'))
|
24
|
+
expect(resp['auth']).to eq(@oneview_key)
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'completes put request with correct parameters' do
|
28
|
+
resp = @instance.instance_eval { rest_api(:oneview, :put, '/', {}) }
|
29
|
+
expect(resp['method']).to eq('PUT')
|
30
|
+
expect(resp['message']).to eq('Fake OneView works!')
|
31
|
+
expect(resp['content_type']).to eq('application/json')
|
32
|
+
expect(resp['api_version']).to eq(@instance.instance_variable_get('@oneview_api_version'))
|
33
|
+
expect(resp['auth']).to eq(@oneview_key)
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'completes delete request with correct parameters' do
|
37
|
+
resp = @instance.instance_eval { rest_api(:oneview, :delete, '/', {}) }
|
38
|
+
expect(resp['method']).to eq('DELETE')
|
39
|
+
expect(resp['message']).to eq('Fake OneView works!')
|
40
|
+
expect(resp['content_type']).to eq('application/json')
|
41
|
+
expect(resp['api_version']).to eq(@instance.instance_variable_get('@oneview_api_version'))
|
42
|
+
expect(resp['auth']).to eq(@oneview_key)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'returns 404 error for invalid get request' do
|
46
|
+
resp = @instance.instance_eval { rest_api(:oneview, :get, '/invalid_path', {}) }
|
47
|
+
expect(resp['errorCode']).to eq('GENERIC_HTTP_404')
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
context 'fake_icsp' do
|
52
|
+
it 'completes get request with correct parameters' do
|
53
|
+
resp = @instance.instance_eval { rest_api(:icsp, :get, '/', {}) }
|
54
|
+
expect(resp['method']).to eq('GET')
|
55
|
+
expect(resp['message']).to eq('Fake ICsp works!')
|
56
|
+
expect(resp['content_type']).to eq('application/json')
|
57
|
+
expect(resp['api_version']).to eq(@instance.instance_variable_get('@icsp_api_version'))
|
58
|
+
expect(resp['auth']).to eq(@icsp_key)
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'completes post request with correct parameters' do
|
62
|
+
resp = @instance.instance_eval { rest_api(:icsp, :post, '/', {}) }
|
63
|
+
expect(resp['method']).to eq('POST')
|
64
|
+
expect(resp['message']).to eq('Fake ICsp works!')
|
65
|
+
expect(resp['content_type']).to eq('application/json')
|
66
|
+
expect(resp['api_version']).to eq(@instance.instance_variable_get('@icsp_api_version'))
|
67
|
+
expect(resp['auth']).to eq(@icsp_key)
|
68
|
+
end
|
69
|
+
|
70
|
+
it 'completes put request with correct parameters' do
|
71
|
+
resp = @instance.instance_eval { rest_api(:icsp, :put, '/', {}) }
|
72
|
+
expect(resp['method']).to eq('PUT')
|
73
|
+
expect(resp['message']).to eq('Fake ICsp works!')
|
74
|
+
expect(resp['content_type']).to eq('application/json')
|
75
|
+
expect(resp['api_version']).to eq(nil)
|
76
|
+
expect(resp['auth']).to eq(@icsp_key)
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'completes delete request with correct parameters' do
|
80
|
+
resp = @instance.instance_eval { rest_api(:icsp, :delete, '/', {}) }
|
81
|
+
expect(resp['method']).to eq('DELETE')
|
82
|
+
expect(resp['message']).to eq('Fake ICsp works!')
|
83
|
+
expect(resp['content_type']).to eq('application/json')
|
84
|
+
expect(resp['api_version']).to eq(@instance.instance_variable_get('@icsp_api_version'))
|
85
|
+
expect(resp['auth']).to eq(@icsp_key)
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'returns 404 error for invalid get request' do
|
89
|
+
resp = @instance.instance_eval { rest_api(:icsp, :get, '/invalid_path', {}) }
|
90
|
+
expect(resp['errorCode']).to eq('GENERIC_HTTP_404')
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'only accepts oneview or icsp hosts parameter' do
|
95
|
+
expect { @instance.instance_eval { rest_api(:invalid, :get, '/', {}) } }.to raise_error(/Invalid rest host/)
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'only accepts rest action parameters' do
|
99
|
+
expect { @instance.instance_eval { rest_api(:oneview, :invalid, '/', {}) } }.to raise_error(/Invalid rest call/)
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
|
104
|
+
describe 'get api versions' do
|
105
|
+
|
106
|
+
it 'can parse the oneview api version' do
|
107
|
+
expect(@instance.instance_eval { get_oneview_api_version }).to match(120)
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'can parse the icsp api version' do
|
111
|
+
expect(@instance.instance_eval { get_icsp_api_version }).to match(102)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-provisioning-oneview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hewlett Packard Enterprise
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -94,6 +94,48 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
97
139
|
description: Chef Provisioning driver for creating and managing OneView infrastructure.
|
98
140
|
email:
|
99
141
|
- jared.smartt@hp.com
|
@@ -108,29 +150,68 @@ files:
|
|
108
150
|
- LICENSE
|
109
151
|
- README.md
|
110
152
|
- Rakefile
|
153
|
+
- lib/chef/provisioning/create_machine.rb
|
154
|
+
- lib/chef/provisioning/customize_machine.rb
|
111
155
|
- lib/chef/provisioning/driver_init/oneview.rb
|
156
|
+
- lib/chef/provisioning/icsp/api_v104.rb
|
157
|
+
- lib/chef/provisioning/icsp/icsp_api.rb
|
112
158
|
- lib/chef/provisioning/oneview/oneview_api.rb
|
113
|
-
- lib/chef/provisioning/oneview/
|
159
|
+
- lib/chef/provisioning/oneview/san_storage.rb
|
160
|
+
- lib/chef/provisioning/oneview/v1.2/api.rb
|
114
161
|
- lib/chef/provisioning/oneview/v2.0/api.rb
|
115
|
-
- lib/chef/provisioning/oneview/version.rb
|
116
162
|
- lib/chef/provisioning/oneview_driver.rb
|
163
|
+
- lib/chef/provisioning/rest.rb
|
164
|
+
- lib/chef/provisioning/version.rb
|
165
|
+
- spec/shared_context.rb
|
117
166
|
- spec/spec_helper.rb
|
167
|
+
- spec/support/fake_action_handler.rb
|
118
168
|
- spec/support/fake_icsp.rb
|
169
|
+
- spec/support/fake_machine_spec.rb
|
119
170
|
- spec/support/fake_oneview.rb
|
120
171
|
- spec/support/fixtures/icsp/v102/error_404.json
|
121
172
|
- spec/support/fixtures/icsp/v102/login.json
|
122
173
|
- spec/support/fixtures/icsp/v102/os-deployment-build-plans.json
|
123
|
-
- spec/support/fixtures/icsp/v102/os-deployment-
|
124
|
-
- spec/support/fixtures/icsp/v102/
|
174
|
+
- spec/support/fixtures/icsp/v102/os-deployment-servers.json
|
175
|
+
- spec/support/fixtures/icsp/v102/os-deployment-servers_1670001.json
|
176
|
+
- spec/support/fixtures/icsp/v102/os-deployment-servers_fakesn.json
|
177
|
+
- spec/support/fixtures/icsp/v102/server_by_sn_VCGE9KB041.json
|
178
|
+
- spec/support/fixtures/icsp/v102/server_by_sn_empty.json
|
125
179
|
- spec/support/fixtures/icsp/v102/version.json
|
126
180
|
- spec/support/fixtures/oneview/v120/error_404.json
|
127
181
|
- spec/support/fixtures/oneview/v120/login.json
|
128
182
|
- spec/support/fixtures/oneview/v120/server-hardware.json
|
183
|
+
- spec/support/fixtures/oneview/v120/server-hardware_Template-WebServer.json
|
184
|
+
- spec/support/fixtures/oneview/v120/server-hardware_specific.json
|
129
185
|
- spec/support/fixtures/oneview/v120/server-profiles.json
|
130
|
-
- spec/support/fixtures/oneview/v120/server-
|
186
|
+
- spec/support/fixtures/oneview/v120/server-profiles_invalid_filter.json
|
187
|
+
- spec/support/fixtures/oneview/v120/server-profiles_name_Template-WebServer.json
|
188
|
+
- spec/support/fixtures/oneview/v120/server-profiles_name_Template-WebServerWithSAN.json
|
189
|
+
- spec/support/fixtures/oneview/v120/server-profiles_name_chef-web01.json
|
190
|
+
- spec/support/fixtures/oneview/v120/server-profiles_name_chef-web03.json
|
191
|
+
- spec/support/fixtures/oneview/v120/server-profiles_name_empty.json
|
192
|
+
- spec/support/fixtures/oneview/v120/server-profiles_sn_VCGE9KB041.json
|
193
|
+
- spec/support/fixtures/oneview/v120/server-profiles_sn_VCGE9KB042.json
|
194
|
+
- spec/support/fixtures/oneview/v120/server-profiles_sn_empty.json
|
195
|
+
- spec/support/fixtures/oneview/v120/storage-volumes_1B5D3CA2-6C5B-41C2-8B97-1821F1883F22.json
|
196
|
+
- spec/support/fixtures/oneview/v120/tasks_fake_active.json
|
197
|
+
- spec/support/fixtures/oneview/v120/tasks_fake_complete.json
|
131
198
|
- spec/support/fixtures/oneview/v120/version.json
|
199
|
+
- spec/support/fixtures/oneview/v200/server-profile-templates_WebServerTemplate.json
|
200
|
+
- spec/support/fixtures/oneview/v200/server-profile-templates_WebServerTemplateWithSAN.json
|
201
|
+
- spec/support/fixtures/oneview/v200/server-profile-templates_invalid.json
|
202
|
+
- spec/support/fixtures/oneview/v200/server-profile-templates_new-profile_WebServerTemplate.json
|
203
|
+
- spec/support/fixtures/oneview/v200/server-profile-templates_new-profile_WebServerTemplateWithSAN.json
|
204
|
+
- spec/support/fixtures/oneview/v200/version.json
|
205
|
+
- spec/unit/create_machine_spec.rb
|
206
|
+
- spec/unit/destroy_spec.rb
|
207
|
+
- spec/unit/icsp_nic_teams_spec.rb
|
208
|
+
- spec/unit/icsp_search_spec.rb
|
132
209
|
- spec/unit/oneview_driver_spec.rb
|
133
|
-
- spec/unit/
|
210
|
+
- spec/unit/oneview_login_spec.rb
|
211
|
+
- spec/unit/oneview_power_spec.rb
|
212
|
+
- spec/unit/oneview_san_spec.rb
|
213
|
+
- spec/unit/oneview_search_spec.rb
|
214
|
+
- spec/unit/rest_api_spec.rb
|
134
215
|
homepage: https://github.com/HewlettPackard/chef-provisioning-oneview
|
135
216
|
licenses:
|
136
217
|
- Apache-2.0
|
@@ -151,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
232
|
version: '0'
|
152
233
|
requirements: []
|
153
234
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.4.
|
235
|
+
rubygems_version: 2.4.4
|
155
236
|
signing_key:
|
156
237
|
specification_version: 4
|
157
238
|
summary: Chef Provisioning driver for OneView
|