Skip to content

Commit

Permalink
Shows only mac address in tancredi configuration (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stell0 committed Jul 15, 2020
1 parent 7f30f5e commit faf6cb4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/api-v1.php
Expand Up @@ -220,6 +220,7 @@
**********************************/
$app->get('/models', function(Request $request, Response $response) use ($app) {
global $config;
global $macvendors;
$query_params = $request->getQueryParams();
$scopes = $this->storage->listScopes('model');
$results = array();
Expand All @@ -241,6 +242,9 @@
if ($filter_used && array_search($scopeId,$inherited_scopes) === FALSE) {
continue;
}
if (isset($macvendors) && array_search(preg_replace('/^([^\-]*)-.*/','$1',$scopeId),$macvendors) === FALSE) {
continue;
}
$scope = new \Tancredi\Entity\Scope($scopeId, $this->storage, $this->logger);
$scope_data = $scope->getVariables();
$results[] = array(
Expand Down

0 comments on commit faf6cb4

Please sign in to comment.