Skip to content

Commit

Permalink
rubocop style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
borod108 committed Oct 5, 2016
1 parent 2d6b789 commit f8c8ecc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def cache_key
def supported_api_verions_from_sdk
username = authentication_userid(:basic)
password = authentication_password(:basic)
probe_args = { hostname: hostname, port: port, username: username, password: password }
probe_args = { :hostname => hostname, :port => port, :username => username, :password => password }
probe_results = OvirtSDK4::Probe.probe(probe_args)
probe_results.map(&:version) if probe_results
end
Expand Down
46 changes: 23 additions & 23 deletions app/models/mixins/supports_feature_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,29 +58,29 @@ module SupportsFeatureMixin
extend ActiveSupport::Concern

QUERYABLE_FEATURES = {
:associate_floating_ip => 'Associate a Floating IP',
:control => 'Basic control operations', # FIXME: this is just a internal helper and should be refactored
:cloud_tenant_mapping => 'CloudTenant mapping',
:backup_create => 'CloudVolume backup creation',
:backup_restore => 'CloudVolume backup restore',
:cinder_service => 'Cinder storage service',
:swift_service => 'Swift storage service',
:delete => 'Deletion',
:disassociate_floating_ip => 'Disassociate a Floating IP',
:discovery => 'Discovery of Managers for a Provider',
:evacuate => 'Evacuation',
:events => 'Query for events',
:launch_cockpit => 'Launch Cockpit UI',
:live_migrate => 'Live Migration',
:migrate => 'Migration',
:provisioning => 'Provisioning',
:reboot_guest => 'Reboot Guest Operation',
:reconfigure => 'Reconfiguration',
:refresh_new_target => 'Refresh non-existing record',
:regions => 'Regions of a Provider',
:resize => 'Resizing',
:retire => 'Retirement',
:smartstate_analysis => 'Smartstate Analaysis',
:associate_floating_ip => 'Associate a Floating IP',
:control => 'Basic control operations', # FIXME: this is just a internal helper and should be refactored
:cloud_tenant_mapping => 'CloudTenant mapping',
:backup_create => 'CloudVolume backup creation',
:backup_restore => 'CloudVolume backup restore',
:cinder_service => 'Cinder storage service',
:swift_service => 'Swift storage service',
:delete => 'Deletion',
:disassociate_floating_ip => 'Disassociate a Floating IP',
:discovery => 'Discovery of Managers for a Provider',
:evacuate => 'Evacuation',
:events => 'Query for events',
:launch_cockpit => 'Launch Cockpit UI',
:live_migrate => 'Live Migration',
:migrate => 'Migration',
:provisioning => 'Provisioning',
:reboot_guest => 'Reboot Guest Operation',
:reconfigure => 'Reconfiguration',
:refresh_new_target => 'Refresh non-existing record',
:regions => 'Regions of a Provider',
:resize => 'Resizing',
:retire => 'Retirement',
:smartstate_analysis => 'Smartstate Analaysis',
:reconfigure => 'Reconfiguration',
:reconfigure_vms => 'Reconfigure Virtual Machines',
:snapshots => 'Snapshots'
Expand Down
10 changes: 5 additions & 5 deletions spec/models/manageiq/providers/redhat/infra_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

it "rhevm_metrics_connect_options fetches configuration and allows overrides" do
expect(ems.rhevm_metrics_connect_options[:host]).to eq("some.thing.tld")
expect(ems.rhevm_metrics_connect_options({:hostname => "different.tld"})[:host])
expect(ems.rhevm_metrics_connect_options(:hostname => "different.tld")[:host])
.to eq("different.tld")
end
end
Expand Down Expand Up @@ -99,9 +99,9 @@

it 'properly parses ProbeResults' do
allow(OvirtSDK4::Probe).to receive(:probe)
.and_return([OvirtSDK4::ProbeResult.new(version: '3'),
OvirtSDK4::ProbeResult.new(version: '4')])
expect(supported_api_versions).to match_array(['3', '4'])
.and_return([OvirtSDK4::ProbeResult.new(:version => '3'),
OvirtSDK4::ProbeResult.new(:version => '4')])
expect(supported_api_versions).to match_array(%w(3 4))
end
end

Expand Down Expand Up @@ -155,7 +155,7 @@

context "supported features" do
let(:ems) { FactoryGirl.create(:ems_redhat) }
let(:supported_api_versions) { [3, 4] }
let(:supported_api_versions) { [3, 4] }
context "#process_api_features_support" do
before(:each) do
allow(SupportsFeatureMixin).to receive(:guard_queryable_feature).and_return(true)
Expand Down

0 comments on commit f8c8ecc

Please sign in to comment.