Commit 5c32ea98 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

wip(backend): allow set ip to null

parent 17ec3237
......@@ -676,11 +676,13 @@ sub display_ip($self, $value=undef) {
}
sub _set_display_ip($self, $value) {
my %ip_address = $self->_list_ip_address();
if (defined $value && length $value ) {
my %ip_address = $self->_list_ip_address();
confess "Error: $value is not in any interface in node ".$self->name
.". Found ".Dumper(\%ip_address)
if !exists $ip_address{$value};
confess "Error: $value is not in any interface in node ".$self->name
.". Found ".Dumper(\%ip_address)
if !exists $ip_address{$value};
}
$self->_data( display_ip => $value );
}
......
......@@ -1216,6 +1216,7 @@ sub test_display_ip($vm, $node, $set_localhost_dp=0) {
$node->_data(display_ip => '');
rvd_back->display_ip('') if $set_localhost_dp;
$vm->display_ip('') if $set_localhost_dp;
}
sub test_nat($vm, $node, $set_localhost_natip=0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment