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.
44
55Updates should follow the [ Keep a CHANGELOG] ( http://keepachangelog.com/ ) principles.
66
7+ # [ 0.20.0]
8+ ## Added
9+ - Create storage pool volume
10+ - Delete storage pool volume
11+
712# [ 0.19.1]
813
914## Added
Original file line number Diff line number Diff line change @@ -27,4 +27,25 @@ public function info(string $pool, string $path)
2727
2828 return $ this ->get ($ this ->getEndpoint ().$ pool .'/volumes/ ' . $ path , $ config );
2929 }
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+ }
3051}
You can’t perform that action at this time.
0 commit comments