1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-08-27 01:49:29 +03:00

B #6367: Fix onevnet update for empty attributes (#2787)

This commit is contained in:
Pavel Czerný
2023-10-26 10:45:30 +02:00
committed by GitHub
parent 67d634ef77
commit c6d50954ef
2 changed files with 3 additions and 2 deletions

View File

@ -514,7 +514,8 @@ void VirtualNetwork::set_updated_attributes(Template* new_tmpl, bool removed)
string new_value;
if ( UPDATE_ATTRIBUTES.count(sa->name()) == 1
&& !new_tmpl->get(sa->name(), new_value) )
&& !new_tmpl->get(sa->name(), new_value)
&& !sa->value().empty())
{
update_attr->replace(sa->name(), sa->value());
}

View File

@ -114,7 +114,7 @@ module VNMMAD
begin
changes = @vm.changes.select {|k, _| SUPPORTED_UPDATE.include?(k) }
return 0 if changes[:phydev].nil?
return 0 if changes[:phydev].nil? || changes[:phydev].empty?
@bridges = list_bridges