File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,25 @@ impl Resource {
193
193
Err ( e) => self . status = RemovalStatus :: Error ( RemovalError :: Docker ( e) ) ,
194
194
} ;
195
195
}
196
- ResourceType :: Volume => todo ! ( ) ,
196
+ ResourceType :: Volume => {
197
+ match docker. remove_volume ( & self . id , None ) . await {
198
+ Ok ( _) => {
199
+ self . status = RemovalStatus :: Success ;
200
+ }
201
+ Err ( DockerResponseServerError {
202
+ status_code : 404 , ..
203
+ } ) => {
204
+ // Mark as successful if already removed (404)
205
+ self . status = RemovalStatus :: Success ;
206
+ }
207
+ Err ( DockerResponseServerError {
208
+ status_code : 409 , ..
209
+ } ) => {
210
+ self . status = RemovalStatus :: InProgress ;
211
+ }
212
+ Err ( e) => self . status = RemovalStatus :: Error ( RemovalError :: Docker ( e) ) ,
213
+ }
214
+ }
197
215
}
198
216
}
199
217
}
You can’t perform that action at this time.
0 commit comments