Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
5c32ea98
Commit
5c32ea98
authored
Dec 09, 2020
by
Francesc Guasch
Browse files
wip(backend): allow set ip to null
parent
17ec3237
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/VM.pm
View file @
5c32ea98
...
...
@@ -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
);
}
...
...
t/nodes/10_basic.t
View file @
5c32ea98
...
...
@@ -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) {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment