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

B #5662: fix back compatibility (#1664)

(cherry picked from commit 46bc7fb46d5981dfa9d71087dadb52d7eba9c193)
This commit is contained in:
Carlos J. Herrera 2021-12-13 08:10:28 -05:00 committed by Tino Vazquez
parent 59615eefb5
commit 2cc8055cf8
No known key found for this signature in database
GPG Key ID: 14201E424D02047E

View File

@ -2067,7 +2067,7 @@ end
end
card_spec = {
:key => Time.now.utc.strftime('%Y%m%d%M%S%L').to_i,
:key => 0,
:deviceInfo => {
:label => 'net' + card_num.to_s,
:summary => pg_name
@ -2077,6 +2077,9 @@ end
:macAddress => mac,
:unitNumber => unumber
}
if @vi_client.vim.serviceContent.about.apiVersion.to_f >= 7.0
card_spec[:key] = Time.now.utc.strftime('%m%d%M%S%L').to_i
end
if (limit || rsrv) && (limit > 0)
ra_spec = {}
@ -2213,7 +2216,7 @@ end
end
card_spec = {
:key => Time.now.utc.strftime('%Y%m%d%M%S%L').to_i,
:key => 0,
:deviceInfo => {
:label => 'net' + card_num.to_s,
:summary => pg_name
@ -2221,6 +2224,9 @@ end
:backing => backing,
:addressType => 'generated'
}
if @vi_client.vim.serviceContent.about.apiVersion.to_f >= 7.0
card_spec[:key] = Time.now.utc.strftime('%m%d%M%S%L').to_i
end
if (limit || rsrv) && (limit > 0)
ra_spec = {}