Skip to content

Commit

Permalink
Fixes #93: Logical Switch refresh conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogpsf committed Jan 23, 2017
1 parent ae5984f commit 0ffa9ec
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/oneview-sdk/resource/api200/logical_switch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def create
# Updates this object using the data that exists on OneView
# @note Will overwrite any data that differs from OneView
# @return [Resource] self
def refresh
def refresh_data_state!
response = @client.rest_put(@data['uri'] + '/refresh')
@client.response_handler(response)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
@item.retrieve!
end

describe '#refresh' do
describe '#refresh_data_state!' do
it 'refresh logical switch' do
@item.refresh
@item.refresh_data_state!
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
@item.retrieve!
end

describe '#refresh' do
describe '#refresh_data_state!' do
it 'refresh logical switch' do
@item.refresh
@item.refresh_data_state!
end
end
end
6 changes: 3 additions & 3 deletions spec/unit/resource/api200/logical_switch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
end
end

describe '#refresh' do
it 'Refresh' do
describe '#refresh_data_state!' do
it 'Refresh logical switch' do
item = OneviewSDK::LogicalSwitch.new(@client, uri: '/rest/fake')
expect(@client).to receive(:rest_put).with("#{item['uri']}/refresh").and_return(FakeResponse.new({}))
item.refresh
item.refresh_data_state!
end
end

Expand Down
6 changes: 3 additions & 3 deletions spec/unit/resource/api300/c7000/logical_switch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
end
end

describe '#refresh' do
it 'Refresh' do
describe '#refresh_data_state!' do
it 'Refresh logical switch' do
item = OneviewSDK::API300::C7000::LogicalSwitch.new(@client_300, uri: '/rest/fake')
expect(@client_300).to receive(:rest_put).with("#{item['uri']}/refresh").and_return(FakeResponse.new({}))
item.refresh
item.refresh_data_state!
end
end

Expand Down

0 comments on commit 0ffa9ec

Please sign in to comment.