Arthur Clement
2010-Sep-14 09:00 UTC
[Ovirt-devel] [PATCH] Fix bad declaration in host-register
Signed-off-by: Arthur Clement <aclement at linagora.com> --- src/host-browser/host-register.rb | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/host-browser/host-register.rb b/src/host-browser/host-register.rb index 5ff6a90..7bf957d 100755 --- a/src/host-browser/host-register.rb +++ b/src/host-browser/host-register.rb @@ -393,14 +393,13 @@ class HostRegister < Qmf::ConsoleHandler # if we have a match, then update the database and remove # the received data to avoid creating a dupe later @logger.info "Searching for existing record for: #{detail.macaddr.upcase} in host #{host_qmf.hostname}" - # if detail.interface ~ /eth.*\..*/ || detail.interface ~ /vnet.*/ - if detail.interface =~ /eth\d+\.\d+/ || detail.interface =~ /vnet\d+/ - @logger.info "Don't manage #{detail.interface.inspect}" + if detail.interface_name =~ /eth\d+\.\d+/ || detail.interface_name =~ /vnet\d+/ + @logger.info "Don't manage #{detail.interface_name.inspect}" else if detail.macaddr.upcase == nic.mac - @logger.info "Updating details for: #{detail.interface} [#{nic.mac}]}" + @logger.info "Updating details for: #{detail.interface_name} [#{nic.mac}]}" nic.bandwidth = detail.bandwidth - nic.interface_name = detail.interface + nic.interface_name = detail.interface_name nic.save! found = true nic_info.delete(detail) @@ -430,8 +429,8 @@ class HostRegister < Qmf::ConsoleHandler 'interface_name' => nic.interface, 'usage_type' => 1) - if detail.interface =~ /eth\d+\.\d+/ || detail.interface =~ /vnet\d+/ - @logger.info "Don't Add #{detail.interface.inspect}" + if detail.interface_name =~ /eth\d+\.\d+/ || detail.interface_name =~ /vnet\d+/ + @logger.info "Don't Add #{detail.interface_name.inspect}" else host_db.nics << detail @logger.info "Added NIC #{nic.interface} with MAC #{nic.macaddr} to host #{host_qmf.hostname}" -- 1.7.2.2
Arthur Clément
2010-Sep-14 09:07 UTC
[Ovirt-devel] [PATCH] Fix bad declaration in host-register
pushed On mardi 14 septembre 2010 11:00:00 you wrote:> Signed-off-by: Arthur Clement <aclement at linagora.com> > --- > src/host-browser/host-register.rb | 13 ++++++------- > 1 files changed, 6 insertions(+), 7 deletions(-) > > diff --git a/src/host-browser/host-register.rb > b/src/host-browser/host-register.rb index 5ff6a90..7bf957d 100755 > --- a/src/host-browser/host-register.rb > +++ b/src/host-browser/host-register.rb > @@ -393,14 +393,13 @@ class HostRegister < Qmf::ConsoleHandler > # if we have a match, then update the database and remove > # the received data to avoid creating a dupe later > @logger.info "Searching for existing record for: > #{detail.macaddr.upcase} in host #{host_qmf.hostname}" - # if > detail.interface ~ /eth.*\..*/ || detail.interface ~ /vnet.*/ - if > detail.interface =~ /eth\d+\.\d+/ || detail.interface =~ /vnet\d+/ -> @logger.info "Don't manage #{detail.interface.inspect}" > + if detail.interface_name =~ /eth\d+\.\d+/ || detail.interface_name=~> /vnet\d+/ + @logger.info "Don't manage > #{detail.interface_name.inspect}" > else > if detail.macaddr.upcase == nic.mac > - @logger.info "Updating details for: > #{detail.interface} [#{nic.mac}]}" + @logger.info > "Updating details for: #{detail.interface_name} [#{nic.mac}]}" > nic.bandwidth = detail.bandwidth > - nic.interface_name = detail.interface > + nic.interface_name = detail.interface_name > nic.save! > found = true > nic_info.delete(detail) > @@ -430,8 +429,8 @@ class HostRegister < Qmf::ConsoleHandler > 'interface_name' => nic.interface, > 'usage_type' => 1) > > - if detail.interface =~ /eth\d+\.\d+/ || detail.interface =~ > /vnet\d+/ - @logger.info "Don't Add > #{detail.interface.inspect}" + if detail.interface_name =~ > /eth\d+\.\d+/ || detail.interface_name =~ /vnet\d+/ + > @logger.info "Don't Add #{detail.interface_name.inspect}" else > host_db.nics << detail > @logger.info "Added NIC #{nic.interface} with MAC > #{nic.macaddr} to host #{host_qmf.hostname}"-- Arthur CLEMENT Linagora Paris
Possibly Parallel Threads
- [PATCH] Don't show vlan interfaces in NIC host management
- [PATCH server] Update daemons to use new QMF.
- Updating oVirt Server to the latest Matahari 0.4.0 schema
- [PATCH: server 0/3] Add host-register.rb (replaces host-browser.rb in part)
- [PATCH server] Removed workaround for qmf bug that yielded 0 cpus and 0 nics for nodes from time to time.