mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-04-07 20:35:27 +02:00
port can be exist without name
This commit is contained in:
parent
c4721fdcce
commit
ff2b8c55e0
@ -136,8 +136,11 @@ sub api_request {
|
||||
eval {
|
||||
$webcontent = $json->decode($jsoncontent);
|
||||
};
|
||||
|
||||
$self->{port_infos}->{name} = $webcontent->{port}->{name};
|
||||
if ($self->{port_infos}->{name} eq '') {
|
||||
$self->{port_infos}->{name} = "unknown";
|
||||
else {
|
||||
$self->{port_infos}->{name} = $webcontent->{port}->{name};
|
||||
}
|
||||
$self->{port_infos}->{admin_state} = $webcontent->{port}->{admin_state_up};
|
||||
$self->{port_infos}->{status} = $webcontent->{port}->{status};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user