Remove virtual interfaces from list which agent sends to nailgun

Remove interfaces like eth0.101-hapr,
eth1-hapr which are created in ha mode.

Change-Id: I0085f06dab2f90af7d876a2c335e180f8d983eef
Closes-bug: #1322208
This commit is contained in:
Evgeniy L 2014-05-22 18:55:53 +04:00
parent 0baa1a717c
commit c93a2deca7
1 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,9 @@ class NodeAgent
next if intinfo[:type] !~ /^eth.*/
# Exception: eth0.0(example) have "type" => "eth" but it is not physical interface
next if int =~ /\d+\.\d+$/ or int =~ /vlan\d+$/
# Remove interfaces like eth0.101-hapr, eth1-hapr
next if int =~ /\d+-.+/
int_meta = {:name => int}
int_meta[:state] = intinfo[:state]
(intinfo[:addresses] or {} rescue {}).each do |addr, addrinfo|