File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ All Notable changes to `php-lxd` will be documented in this file.
5
5
Updates should follow the [ Keep a CHANGELOG] ( http://keepachangelog.com/ ) principles.
6
6
7
7
8
+ # [ 0.18.2]
9
+
10
+ ## Change
11
+ - Support recursion param on get all pools
12
+
8
13
# [ 0.18.1]
9
14
10
15
## Added
Original file line number Diff line number Diff line change @@ -9,10 +9,16 @@ protected function getEndpoint()
9
9
return '/storage-pools/ ' ;
10
10
}
11
11
12
- public function all ()
12
+ public function all (int $ recursion = 0 )
13
13
{
14
+ $ config = [];
15
+
16
+ if ($ recursion > 0 ) {
17
+ $ config ["recursion " ] = $ recursion ;
18
+ }
19
+
14
20
$ storagePools = [];
15
- foreach ($ this ->get ($ this ->getEndpoint ()) as $ pool ) {
21
+ foreach ($ this ->get ($ this ->getEndpoint (), $ config ) as $ pool ) {
16
22
$ storagePools [] = str_replace ('/ ' .$ this ->client ->getApiVersion ().$ this ->getEndpoint (), '' , $ pool );
17
23
}
18
24
return $ storagePools ;
You can’t perform that action at this time.
0 commit comments