1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

feature #4613: define external ip attrs only in one place

This commit is contained in:
Javi Fontan 2016-06-30 16:04:35 +02:00
parent 632b393d14
commit e8f0c4e9fc
2 changed files with 2 additions and 9 deletions

View File

@ -45,14 +45,6 @@ private
end
end
EXTERNAL_IP_ATTRS = [
'GUEST_IP',
'AWS_IP_ADDRESS',
'AWS_PRIVATE_IP_ADDRESS',
'AZ_IPADDRESS',
'SL_PRIMARYIPADDRESS'
];
class OneVMHelper < OpenNebulaHelper::OneHelper
MULTIPLE={
@ -528,7 +520,7 @@ in the frontend machine.
# Find out if it is a hybrid VM to avoid showing local IPs
isHybrid=false
vm_monitoring.each{|key, value|
if EXTERNAL_IP_ATTRS.include? key
if VirtualMachine::EXTERNAL_IP_ATTRS.include? key
isHybrid=true
end
}

View File

@ -213,6 +213,7 @@ module OpenNebula
EXTERNAL_IP_ATTRS = [
'GUEST_IP',
'AWS_IP_ADDRESS',
'AWS_PRIVATE_IP_ADDRESS',
'AZ_IPADDRESS',
'SL_PRIMARYIPADDRESS'
]