Add an acceptance test and docs for the down subcommand
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
c8ed156806
commit
c64af0a459
13 changed files with 102 additions and 13 deletions
|
|
@ -1,9 +1,14 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
|
||||
from docker.errors import NotFound
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Volume(object):
|
||||
def __init__(self, client, project, name, driver=None, driver_opts=None,
|
||||
external_name=None):
|
||||
|
|
@ -20,6 +25,10 @@ class Volume(object):
|
|||
)
|
||||
|
||||
def remove(self):
|
||||
if self.external:
|
||||
log.info("Volume %s is external, skipping", self.full_name)
|
||||
return
|
||||
log.info("Removing volume %s", self.full_name)
|
||||
return self.client.remove_volume(self.full_name)
|
||||
|
||||
def inspect(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue