ilo-sdk 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48561d660167040166f3a0b2c0334ff8f3e8441d
4
- data.tar.gz: b04c812919a0302e047202e792a4dddc205c78f6
3
+ metadata.gz: bfaec612bda5890adbb0515499c7c65088897886
4
+ data.tar.gz: 2af3b506928f3ca07af45a93aee3cdbbd11d1c34
5
5
  SHA512:
6
- metadata.gz: b3fcf018e1e6702c827329605bd560487d2b139fcbaf827a8aaf15cf8ba8cb4562ba3099b36045f775c7dc026fe5a22e0dcbc4adfac391ecb9623b807287b3c1
7
- data.tar.gz: 0f6c11f5495382b6690ddb3432cdadb22a883c15cec08ea91582c1aca3c29020c8e5917e7fea77a43443e566f193f1ca21ba147dc54f8b26e424e4f04576d112
6
+ metadata.gz: 915516df57b69d9779dd302616a7ea3be007c08069503ba9ae132e17816357804503e72191aef865eb462426e49c6c328df038c2a97152ce5ad89d96096990b4
7
+ data.tar.gz: 65625f3d3233fae2a393ff7db1f305e10860cc50252e82c6273cb49f3f9b4f5ec8e0d04e3cb7ff3b123c34924a4c4a214115a1ade65c46d219a81b84ff1c6097
data/CHANGELOG.md CHANGED
@@ -1 +1,5 @@
1
+ ## v1.0.0
2
+ Initial release
1
3
 
4
+ ### v1.0.1
5
+ - Make `pry` a development dependency, not a runtime dependency.
data/README.md CHANGED
@@ -31,7 +31,7 @@ client = ILO_SDK::Client.new(
31
31
  password: 'secret123',
32
32
  ssl_enabled: true, # This is the default and strongly encouraged
33
33
  logger: Logger.new(STDOUT), # This is the default
34
- log_level: :info, # This is the default
34
+ log_level: :info # This is the default
35
35
  )
36
36
  ```
37
37
 
@@ -209,6 +209,30 @@ fw_version = client.get_fw_version
209
209
  client.set_fw_upgrade('www.firmwareupgrade.com')
210
210
  ```
211
211
 
212
+ #### HTTPS Certificate
213
+ ```ruby
214
+ # Generate a Certificate Signing Request:
215
+ # Params: country_code, state, city, organization, organizational_unit, common_name
216
+ client.generate_csr('US', 'Texas', 'Houston', 'myCompany', 'myUnit', 'example.com')
217
+
218
+ # Wait for the CSR to be generated (will take about 10 minutes):
219
+ csr = nil
220
+ while(csr.nil?) do
221
+ sleep(60) # 60 seconds
222
+ csr = client.get_csr
223
+ end
224
+
225
+ # Here you'll need to have a step that submits the csr to a certificate authority
226
+ # (or self-signs it) and gets back the signed certificate. It will look something like:
227
+ # -----BEGIN CERTIFICATE-----
228
+ # lines_of_secret_text
229
+ # -----END CERTIFICATE-----
230
+ # For this example, we're assuming we've read in the content of the certificate to the
231
+ # "cert" variable (as a string).
232
+
233
+ client.import_certificate(cert)
234
+ ```
235
+
212
236
  #### Log Entry
213
237
  ```ruby
214
238
  # Clear a specific type of logs:
@@ -320,9 +344,11 @@ This project is licensed under the Apache 2.0 license. Please see [LICENSE](LICE
320
344
 
321
345
  ## Contributing and feature requests
322
346
  **Contributing:** You know the drill. Fork it, branch it, change it, commit it, and pull-request it.
323
- We are passionate about improving this project, and glad to accept help to make it better.
347
+ We are passionate about improving this project, and glad to accept help to make it better. However, keep the following in mind:
324
348
 
325
- NOTE: We reserve the right to reject changes that we feel do not fit the scope of this project, so for feature additions, please open an issue to discuss your ideas before doing the work.
349
+ - You must sign a Contributor License Agreement first. Contact one of the authors (from Hewlett Packard Enterprise) for details and the CLA.
350
+ - All pull requests must contain complete test code also. See the testing section below.
351
+ - We reserve the right to reject changes that we feel do not fit the scope of this project, so for feature additions, please open an issue to discuss your ideas before doing the work.
326
352
 
327
353
  **Feature Requests:** If you have a need that is not met by the current implementation, please let us know (via a new issue).
328
354
  This feedback is crucial for us to deliver a useful product. Do not assume we have already thought of everything, because we assure you that is not the case.
@@ -340,7 +366,7 @@ First run `$ bundle` (requires the bundler gem), then...
340
366
  Note: run `$ rake -T` to get a list of all the available rake tasks.
341
367
 
342
368
  ## Authors
343
- - Anirudh Gupta
369
+ - Anirudh Gupta - [@Anirudh-Gupta](https://github.com/Anirudh-Gupta)
344
370
  - Bik Bajwa - [@bikbajwa](https://github.com/bikbajwa)
345
371
  - Jared Smartt - [@jsmartt](https://github.com/jsmartt)
346
- - Vivek Bhatia
372
+ - Vivek Bhatia - [@vivekbhatia14] (https://github.com/vivekbhatia14)
data/Rakefile CHANGED
@@ -1,23 +1,31 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # You may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
11
+
1
12
  require 'bundler'
2
13
  require 'bundler/gem_tasks'
3
14
  require 'bundler/setup'
4
15
  require 'rspec/core/rake_task'
5
16
  require 'rubocop/rake_task'
6
17
 
7
- task default: :spec
8
- spec_pattern = 'spec/**/*_spec.rb'
9
- def_spec_options = '--color '
18
+ task default: :test
10
19
 
11
20
  desc 'Run unit tests only'
12
21
  RSpec::Core::RakeTask.new(:spec) do |spec|
13
- spec.pattern = spec_pattern
14
- spec.rspec_opts = def_spec_options
22
+ spec.pattern = 'spec/**/*_spec.rb'
23
+ spec.rspec_opts = '--color '
15
24
  end
16
25
 
17
- RuboCop::RakeTask.new
26
+ RuboCop::RakeTask.new do |task|
27
+ task.options << '--display-cop-names'
28
+ end
18
29
 
19
30
  desc 'Runs rubocop and unit tests'
20
- task :test do
21
- Rake::Task[:rubocop].invoke
22
- Rake::Task[:spec].invoke
23
- end
31
+ task test: [:rubocop, :spec]
data/ilo-sdk.gemspec CHANGED
@@ -1,6 +1,17 @@
1
1
  # coding: utf-8
2
2
  # http://guides.rubygems.org/specification-reference
3
3
 
4
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # You may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software distributed
11
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
+ # specific language governing permissions and limitations under the License.
14
+
4
15
  require_relative './lib/ilo-sdk/version'
5
16
 
6
17
  Gem::Specification.new do |spec|
@@ -18,8 +29,7 @@ Gem::Specification.new do |spec|
18
29
  spec.executables = all_files.grep(%r{^bin/}) { |f| File.basename(f) }
19
30
  spec.require_paths = ['lib']
20
31
 
21
- spec.add_runtime_dependency 'pry'
22
-
32
+ spec.add_development_dependency 'pry'
23
33
  spec.add_development_dependency 'bundler'
24
34
  spec.add_development_dependency 'rspec'
25
35
  spec.add_development_dependency 'rake'
data/lib/ilo-sdk.rb CHANGED
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  require_relative 'ilo-sdk/version'
11
13
  require_relative 'ilo-sdk/client'
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  require 'logger'
11
13
  require_relative 'rest'
@@ -61,5 +63,6 @@ module ILO_SDK
61
63
  include ComputerSystemHelper
62
64
  include ChassisHelper
63
65
  include ServiceRootHelper
66
+ include HttpsCertHelper
64
67
  end
65
68
  end
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Account Service actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Bios actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Boot Settings actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Chassis actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for computer details actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Computer System actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Date and Time actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Firmware Update actions
@@ -0,0 +1,72 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # You may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
11
+
12
+ module ILO_SDK
13
+ # Contains helper methods for HTTPS Certificates
14
+ module HttpsCertHelper
15
+ # Get the SSL Certificate
16
+ # @raise [RuntimeError] if the request failed
17
+ # @return [String] x509_certificate
18
+ def get_certificate
19
+ uri = URI.parse(URI.escape(@host))
20
+ options = { use_ssl: true, verify_mode: OpenSSL::SSL::VERIFY_NONE }
21
+ Net::HTTP.start(uri.host, uri.port, options) do |http|
22
+ http.peer_cert.to_pem
23
+ end
24
+ end
25
+
26
+ # Import the x509 certificate
27
+ # @param [String] certificate
28
+ # @raise [RuntimeError] if the request failed
29
+ # @return true
30
+ def import_certificate(certificate)
31
+ new_action = {
32
+ 'Action' => 'ImportCertificate',
33
+ 'Certificate' => certificate
34
+ }
35
+ response = rest_post('/redfish/v1/Managers/1/SecurityService/HttpsCert/', body: new_action)
36
+ response_handler(response)
37
+ true
38
+ end
39
+
40
+ # Generate a Certificate Signing Request
41
+ # @param [String] country
42
+ # @param [String] state
43
+ # @param [String] city
44
+ # @param [String] orgName
45
+ # @param [String] orgUnit
46
+ # @param [String] commonName
47
+ # @raise [RuntimeError] if the request failed
48
+ # @return true
49
+ def generate_csr(country, state, city, org_name, org_unit, common_name)
50
+ new_action = {
51
+ 'Action' => 'GenerateCSR',
52
+ 'Country' => country,
53
+ 'State' => state,
54
+ 'City' => city,
55
+ 'OrgName' => org_name,
56
+ 'OrgUnit' => org_unit,
57
+ 'CommonName' => common_name
58
+ }
59
+ response = rest_post('/redfish/v1/Managers/1/SecurityService/HttpsCert/', body: new_action)
60
+ response_handler(response)
61
+ true
62
+ end
63
+
64
+ # Get the Certificate Signing Request
65
+ # @raise [RuntimeError] if the request failed
66
+ # @return [String] certificate_signing_request
67
+ def get_csr
68
+ response = rest_get('/redfish/v1/Managers/1/SecurityService/HttpsCert/')
69
+ response_handler(response)['CertificateSigningRequest']
70
+ end
71
+ end
72
+ end
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Log Entry actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Manager Network Protocol actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Power actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Secure Boot actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Service Root Actions
@@ -13,7 +15,7 @@ module ILO_SDK
13
15
  # Get the schema information with given prefix
14
16
  # @param [String, Symbol] schema_prefix
15
17
  # @raise [RuntimeError] if the request failed
16
- # @return [String] schema
18
+ # @return [Array] schema
17
19
  def get_schema(schema_prefix)
18
20
  response = rest_get('/redfish/v1/Schemas/')
19
21
  schemas = response_handler(response)['Items']
@@ -31,7 +33,7 @@ module ILO_SDK
31
33
  # Get the Registry with given registry_prefix
32
34
  # @param [String, Symbol] registry_prefix
33
35
  # @raise [RuntimeError] if the request failed
34
- # @return [String] registry
36
+ # @return [Array] registry
35
37
  def get_registry(registry_prefix)
36
38
  response = rest_get('/redfish/v1/Registries/')
37
39
  registries = response_handler(response)['Items']
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for SNMP Service actions
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  module ILO_SDK
11
13
  # Contains helper methods for Virtual Media actions
data/lib/ilo-sdk/rest.rb CHANGED
@@ -1,11 +1,13 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  require 'uri'
11
13
  require 'net/http'
@@ -1,13 +1,15 @@
1
+ # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
2
+ #
1
3
  # Licensed under the Apache License, Version 2.0 (the "License");
2
- # you may not use this file except in compliance with the License.
4
+ # You may not use this file except in compliance with the License.
3
5
  # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
4
6
  #
5
- # Unless required by applicable law or agreed to in writing,
6
- # software distributed under the License is distributed on an "AS IS" BASIS,
7
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8
- # See the License for the specific language governing permissions and limitations under the License.
7
+ # Unless required by applicable law or agreed to in writing, software distributed
8
+ # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9
+ # CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
+ # specific language governing permissions and limitations under the License.
9
11
 
10
12
  # Gem version defined here
11
13
  module ILO_SDK
12
- VERSION = '1.0.0'.freeze
14
+ VERSION = '1.0.1'.freeze
13
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ilo-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anirudh Gupta
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-06-08 00:00:00.000000000 Z
14
+ date: 2016-07-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: pry
@@ -20,7 +20,7 @@ dependencies:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: '0'
23
- type: :runtime
23
+ type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
@@ -126,6 +126,7 @@ files:
126
126
  - lib/ilo-sdk/helpers/computer_system_helper.rb
127
127
  - lib/ilo-sdk/helpers/date_time_helper.rb
128
128
  - lib/ilo-sdk/helpers/firmware_update.rb
129
+ - lib/ilo-sdk/helpers/https_cert_helper.rb
129
130
  - lib/ilo-sdk/helpers/log_entry_helper.rb
130
131
  - lib/ilo-sdk/helpers/manager_network_protocol_helper.rb
131
132
  - lib/ilo-sdk/helpers/power_helper.rb