@@ -59,7 +59,7 @@ func (client *Client) DeleteVolume(name string) (*Response, *ResponseStatus, err
59
59
return client .FormattedRequest ("/delete/volumes/\" %s\" " , name )
60
60
}
61
61
62
- // DeleteHost : deletes a hotst by its ID or nickname
62
+ // DeleteHost : deletes a host by its ID or nickname
63
63
func (client * Client ) DeleteHost (name string ) (* Response , * ResponseStatus , error ) {
64
64
return client .FormattedRequest ("/delete/host/\" %s\" " , name )
65
65
}
@@ -93,20 +93,25 @@ func (client *Client) ShowHostMaps(host string) ([]Volume, *ResponseStatus, erro
93
93
return mappings , status , err
94
94
}
95
95
96
- // ShowSnapshots : List snapshots
96
+ // ShowSnapshots : list snapshots
97
97
func (client * Client ) ShowSnapshots (names ... string ) (* Response , * ResponseStatus , error ) {
98
98
if len (names ) == 0 {
99
99
return client .FormattedRequest ("/show/snapshots" )
100
100
}
101
101
return client .FormattedRequest ("/show/snapshots/%q" , strings .Join (names , "," ))
102
102
}
103
103
104
- // CreateSnapshot : Create a snapshot in a snap pool and the snap pool if it doesn't exsits
104
+ // CreateSnapshot : create a snapshot in a snap pool and the snap pool if it doesn't exsits
105
105
func (client * Client ) CreateSnapshot (name string , snapshotName string ) (* Response , * ResponseStatus , error ) {
106
- return client .FormattedRequest ("/create/snapshots/volumes/%q/%q/ " , name , snapshotName )
106
+ return client .FormattedRequest ("/create/snapshots/volumes/%q/%q" , name , snapshotName )
107
107
}
108
108
109
- // DeleteSnapshot : Delete a snapshot from a snap pool
109
+ // DeleteSnapshot : delete a snapshot
110
110
func (client * Client ) DeleteSnapshot (names ... string ) (* Response , * ResponseStatus , error ) {
111
111
return client .FormattedRequest ("/delete/snapshot/%q" , strings .Join (names , "," ))
112
112
}
113
+
114
+ // CopyVolume : create an new volume by copying another one or a snapshot
115
+ func (client * Client ) CopyVolume (sourceName string , destinationName string , pool string ) (* Response , * ResponseStatus , error ) {
116
+ return client .FormattedRequest ("/copy/volume/destination-pool/%q/name/%q/%q" , pool , destinationName , sourceName )
117
+ }
0 commit comments