File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ All Notable changes to `php-lxd` will be documented in this file.
4
4
5
5
Updates should follow the [ Keep a CHANGELOG] ( http://keepachangelog.com/ ) principles.
6
6
7
+ # [ 0.20.0]
8
+ ## Added
9
+ - Create storage pool volume
10
+ - Delete storage pool volume
11
+
7
12
# [ 0.19.1]
8
13
9
14
## Added
Original file line number Diff line number Diff line change @@ -27,4 +27,25 @@ public function info(string $pool, string $path)
27
27
28
28
return $ this ->get ($ this ->getEndpoint ().$ pool .'/volumes/ ' . $ path , $ config );
29
29
}
30
+
31
+ public function create (string $ pool , string $ name , array $ config )
32
+ {
33
+ $ opts ['name ' ] = $ name ;
34
+ $ opts ["config " ] = $ config ;
35
+
36
+ $ httpConfig = [
37
+ "project " =>$ this ->client ->getProject ()
38
+ ];
39
+
40
+ return $ this ->post ($ this ->getEndpoint ().$ pool .'/volumes/custom ' , $ opts , $ httpConfig );
41
+ }
42
+
43
+ public function remove (string $ pool , string $ name )
44
+ {
45
+ $ httpConfig = [
46
+ "project " =>$ this ->client ->getProject ()
47
+ ];
48
+
49
+ return $ this ->delete ($ this ->getEndpoint ().$ pool . '/volumes/ ' . $ name , [], $ httpConfig );
50
+ }
30
51
}
You can’t perform that action at this time.
0 commit comments