Skip to content

Commit

Permalink
Fix network equipment memory conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Feb 8, 2024
1 parent 7ac7414 commit 9f2b5a2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/php/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -936,13 +936,11 @@ private function convertTo01(array $data): array
}
}
if (isset($data['content']['network_device'])) {
foreach ($data['content']['network_device'] as &$netdev) {
if (isset($netdev['memory'])) {
$netdev['memory'] = $this->convertMemory($netdev['memory']);
}
if (isset($netdev['ram'])) {
$netdev['ram'] = $this->convertMemory($netdev['ram']);
}
if (isset($data['content']['network_device']['memory'])) {
$data['content']['network_device']['memory'] = $this->convertMemory($data['content']['network_device']['memory']);
}
if (isset($data['content']['network_device']['ram'])) {
$data['content']['network_device']['ram'] = $this->convertMemory($data['content']['network_device']['ram']);
}
}

Expand Down

0 comments on commit 9f2b5a2

Please sign in to comment.