File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -37,4 +37,34 @@ public function info($name)
3737 {
3838 return $ this ->get ($ this ->getEndpoint ().$ name );
3939 }
40+
41+ /**
42+ * Create a network
43+ *
44+ * @param string $name name of network
45+ * @param array $config configuration of the network (Optional)
46+ * @return object
47+ */
48+ public function create (string $ name , string $ description = "" , array $ config = [])
49+ {
50+ $ data = [];
51+
52+ $ data ["name " ] = $ name ;
53+ $ data ["description " ] = $ description ;
54+ if (!empty ($ config )) {
55+ $ data ["config " ] = $ config ;
56+ }
57+
58+ return $ this ->post ($ this ->getEndpoint (), $ data );
59+ }
60+
61+ /**
62+ * Delete network
63+ * @param string $name name of network
64+ * @return object
65+ */
66+ public function remove ($ name )
67+ {
68+ return $ this ->delete ($ this ->getEndpoint ().$ name );
69+ }
4070}
You can’t perform that action at this time.
0 commit comments