Skip to content

Commit

Permalink
Fixed rubocop errors
Browse files Browse the repository at this point in the history
  • Loading branch information
soodpr committed Mar 28, 2018
1 parent e18ee2a commit 3f5deda
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
8 changes: 5 additions & 3 deletions examples/api500/storage_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
raise 'ERROR: Must set @storage_system_password in _client.rb' unless @storage_system_password

if @client.api_version < 500
raise "If you want execute sample for API < #{@client.api_version}, you should execute the ruby file '/examples/shared_samples/storage_system.rb'"
raise "If you want execute sample for API < #{@client.api_version}," \
"you should execute the ruby file '/examples/shared_samples/storage_system.rb'"
elsif @client.api_version == 600
raise "If you want execute sample for API < #{@client.api_version}, you should execute the ruby file '/examples/api600/storage_system.rb'"
raise "If you want execute sample for API #{@client.api_version}," \
"you should execute the ruby file '/examples/api600/storage_system.rb'"
end

# Resources classes that you can use for Storage System in this example:
Expand Down Expand Up @@ -80,7 +82,7 @@
storage_system.retrieve!
port = storage_system['ports'].find { |item| item['protocolType'].downcase.include?('fc') } # find first correct protocolType for using our fc network
if port
fc_network = OneviewSDK::API500::C7000::FCNetwork.get_all(@client).first
fc_network = OneviewSDK::API500::C7000::FCNetwork.get_all(@client).first
puts "\n Adding a fc network named '#{fc_network['name']}' with uri='#{fc_network['uri']}' to the storage system."
port['expectedNetworkUri'] = fc_network['uri']
port['expectedNetworkName'] = fc_network['name']
Expand Down
6 changes: 4 additions & 2 deletions examples/api600/storage_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
raise 'ERROR: Must set @storage_system_password in _client.rb' unless @storage_system_password

if @client.api_version < 500
raise "If you want execute sample for API < #{@client.api_version}, you should execute the ruby file '/examples/shared_samples/storage_system.rb'"
raise "If you want execute sample for API < #{@client.api_version}," \
"you should execute the ruby file '/examples/shared_samples/storage_system.rb'"
elsif @client.api_version == 500
raise "If you want execute sample for API < #{@client.api_version}, you should execute the ruby file '/examples/api500/storage_system.rb'"
raise "If you want execute sample for API #{@client.api_version}," \
"you should execute the ruby file '/examples/api500/storage_system.rb'"
end

# Resources classes that you can use for Storage System in this example:
Expand Down
11 changes: 6 additions & 5 deletions examples/shared_samples/storage_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
raise 'ERROR: Must set @storage_system_username in _client.rb' unless @storage_system_username
raise 'ERROR: Must set @storage_system_password in _client.rb' unless @storage_system_password

if @client.api_version == 500
raise "If you want execute sample for API #{@client.api_version}, you should execute the ruby file '/examples/api500/storage_system.rb'"
elsif @client.api_version == 600
raise "If you want execute sample for API #{@client.api_version}, you should execute the ruby file '/examples/api600/storage_system.rb'"
if @client.api_version == 600
raise "If you want execute sample for API #{@client.api_version}," \
"you should execute the ruby file '/examples/api600/storage_system.rb'"
elsif @client.api_version == 500
raise "If you want execute sample for API #{@client.api_version}," \
"you should execute the ruby file '/examples/api500/storage_system.rb'"
end

# Resources classes that you can use for Storage System in this example:
# storage_system_class = OneviewSDK::API200::StorageSystem
# storage_system_class = OneviewSDK::API300::C7000::StorageSystem
Expand Down

0 comments on commit 3f5deda

Please sign in to comment.