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

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

No files matched your search

+1 -9
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
}
@@ -213,6 +213,7 @@ module OpenNebula
EXTERNAL_IP_ATTRS = [
'GUEST_IP',
'AWS_IP_ADDRESS',
'AWS_PRIVATE_IP_ADDRESS',
'AZ_IPADDRESS',
'SL_PRIMARYIPADDRESS'
]