port can be exist without name
This commit is contained in:
parent
63bf35ed1c
commit
55869b7fc8
|
@ -136,8 +136,11 @@ sub api_request {
|
||||||
eval {
|
eval {
|
||||||
$webcontent = $json->decode($jsoncontent);
|
$webcontent = $json->decode($jsoncontent);
|
||||||
};
|
};
|
||||||
|
if ($self->{port_infos}->{name} eq '') {
|
||||||
|
$self->{port_infos}->{name} = "unknown";
|
||||||
|
else {
|
||||||
$self->{port_infos}->{name} = $webcontent->{port}->{name};
|
$self->{port_infos}->{name} = $webcontent->{port}->{name};
|
||||||
|
}
|
||||||
$self->{port_infos}->{admin_state} = $webcontent->{port}->{admin_state_up};
|
$self->{port_infos}->{admin_state} = $webcontent->{port}->{admin_state_up};
|
||||||
$self->{port_infos}->{status} = $webcontent->{port}->{status};
|
$self->{port_infos}->{status} = $webcontent->{port}->{status};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue