(plugin) network::cisco::meraki::cloudcontroller::restapi - mode devices use new endpoint for switch port status (#3661)
This commit is contained in:
parent
b631265870
commit
309fd33e28
|
@ -467,7 +467,7 @@ sub get_device_switch_port_statuses {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
return $self->request_api(
|
||||
endpoint => '/devices/' . $options{serial} . '/switchPortStatuses',
|
||||
endpoint => '/devices/' . $options{serial} . '/switch/ports/statuses',
|
||||
get_param => [ 'timespan=' . $self->{timespan} ],
|
||||
hostname => $self->get_shard_hostname(serial => $options{serial})
|
||||
);
|
||||
|
|
|
@ -428,7 +428,7 @@ sub add_switch_port_statuses {
|
|||
port_enabled => $_->{enabled} =~ /True|1/i ? 1 : 0
|
||||
};
|
||||
next if (defined($self->{option_results}->{skip_traffic_disconnect_port}) && $_->{status} =~ /disconnected/i);
|
||||
|
||||
|
||||
$self->{devices}->{ $options{serial} }->{device_ports}->{ $_->{portId} }->{traffic_in} = $_->{usageInKb}->{recv} * 1000 * 8,
|
||||
$self->{devices}->{ $options{serial} }->{device_ports}->{ $_->{portId} }->{traffic_out} = $_->{usageInKb}->{sent} * 1000 * 8;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue