We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c34c630 commit 5740e3eCopy full SHA for 5740e3e
src/lib.rs
@@ -193,7 +193,25 @@ impl Resource {
193
Err(e) => self.status = RemovalStatus::Error(RemovalError::Docker(e)),
194
};
195
}
196
- ResourceType::Volume => todo!(),
+ 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
206
207
208
+ status_code: 409, ..
209
210
+ self.status = RemovalStatus::InProgress;
211
212
+ Err(e) => self.status = RemovalStatus::Error(RemovalError::Docker(e)),
213
214
215
216
217
0 commit comments