Skip to content

Commit

Permalink
Rename network module to not overrun network class
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Feb 13, 2018
1 parent 7c91f6e commit a01857a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
require 'net/ping'

module ManageIQ
module Network
module NetworkDiscovery
module IPMI
autoload :Discovery, 'manageiq/network/ipmi/discovery'
autoload :Discovery, 'manageiq/network_discovery/ipmi/discovery'
end

module Discovery
PROVIDERS_BY_TYPE = {
:ipmi => "ManageIQ::Network::IPMI::Discovery",
:ipmi => "ManageIQ::NetworkDiscovery::IPMI::Discovery",
:msvirtualserver => "ManageIQ::Providers::Microsoft::Discovery",
:mswin => "ManageIQ::Providers::Microsoft::Discovery",
:scvmm => "ManageIQ::Providers::Microsoft::Discovery",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'util/miq-ipmi'

module ManageIQ
module Network
module NetworkDiscovery
module IPMI
class Discovery
def self.probe(ost)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'socket'

module ManageIQ
module Network
module NetworkDiscovery
class Port
def self.all_open?(ost, ports)
ports.all? { |port| open?(ost, port) }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'manageiq/network/discovery'
require 'manageiq/network_discovery/discovery'
require 'ostruct'
require 'util/miq-ipmi'

RSpec.describe ManageIQ::Network::Discovery do
RSpec.describe ManageIQ::NetworkDiscovery::Discovery do
context '#scan_host' do
let(:ost) { OpenStruct.new(:discover_types => [:ipmi], :ipaddr => '127.0.0.1', :hypervisor => []) }
it 'hypervisor is ipmi when available' do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'manageiq/network/discovery'
require 'manageiq/network_discovery/discovery'
require 'ostruct'
require 'benchmark'

RSpec.describe ManageIQ::Network::Port do
RSpec.describe ManageIQ::NetworkDiscovery::Port do
before do
@ost = OpenStruct.new
@ost.ipaddr = '172.16.254.1'
Expand Down

0 comments on commit a01857a

Please sign in to comment.