File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ public function getNetworks(): array
3333 return [
3434 'method ' => 'GET ' ,
3535 'path ' => $ this ->pathPrefix . '/networks ' ,
36- 'params ' => [],
36+ 'params ' => [
37+ 'name ' => $ this ->params ->queryName (),
38+ 'tenantId ' => $ this ->params ->queryTenantId (),
39+ 'status ' => $ this ->params ->queryStatus (),
40+ ],
3741 ];
3842 }
3943
Original file line number Diff line number Diff line change @@ -340,4 +340,30 @@ public function deviceId(): array
340340 'description ' => 'The UUID of the device that uses this port. For example, a virtual server. ' ,
341341 ];
342342 }
343+
344+ public function queryName (): array
345+ {
346+ return $ this ->queryFilter ('name ' );
347+ }
348+
349+ public function queryTenantId (): array
350+ {
351+ return $ this ->queryFilter ('tenant_id ' );
352+ }
353+
354+ public function queryStatus (): array
355+ {
356+ return $ this ->queryFilter ('status ' );
357+ }
358+
359+ private function queryFilter ($ field ): array
360+ {
361+ return [
362+ 'type ' => self ::STRING_TYPE ,
363+ 'location ' => self ::QUERY ,
364+ 'sentAs ' => $ field ,
365+ 'description ' => 'The Neutron API supports filtering based on all top level attributes of a resource.
366+ Filters are applicable to all list requests. ' ,
367+ ];
368+ }
343369}
You can’t perform that action at this time.
0 commit comments