Skip to content

Volume API support#764

Merged
shin- merged 7 commits into
masterfrom
744-volume-api-support
Sep 16, 2015
Merged

Volume API support#764
shin- merged 7 commits into
masterfrom
744-volume-api-support

Conversation

@shin-
Copy link
Copy Markdown
Contributor

@shin- shin- commented Sep 11, 2015

Fixes #744

@shin- shin- added this to the 1.5.0 milestone Sep 11, 2015
@shin- shin- self-assigned this Sep 11, 2015
@shin- shin- force-pushed the 744-volume-api-support branch from fea28b4 to 5eb7acc Compare September 14, 2015 17:48
Comment thread tests/test.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is rather verbose (and needs to be repeated in a few places). You can actually do something like this to re-use the mark (https://pytest.org/latest/skipping.html#skipif):

def requires_api_version(version):
    return pytest.mark.skipif(
        docker.utils.compare_version(
            version,
            docker.constants.DEFAULT_DOCKER_API_VERSION
        ) < 0,
        reason="API version too low"
    )


@requires_api_version('1.21')
def test...

@shin- shin- force-pushed the 744-volume-api-support branch from 429af7b to 1952e12 Compare September 14, 2015 22:04
shin- and others added 2 commits September 15, 2015 10:30
Remove not exists file in MANIFEST.in
Signed-off-by: Joffrey F <joffrey@docker.com>
@shin- shin- force-pushed the 744-volume-api-support branch from bb3f332 to 0d39634 Compare September 15, 2015 18:04
@shin-
Copy link
Copy Markdown
Contributor Author

shin- commented Sep 15, 2015

Included a fix for #769 as well.

Comment thread docker/api/container.py
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new decorator is great!

@dnephin
Copy link
Copy Markdown
Contributor

dnephin commented Sep 16, 2015

LGTM (once janky is done and happy)

I think the docs for filter format could be improved (currently undefined format), but we can do that as a followup

…aware

Added mock API routes for volumes API
Add unit tests and integration tests for volume API

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Add simpler version comparison functions
Add decorator to enforce minimum version in API methods
Fix utils imports
Add minimum_version decorators on API methods that needed it
GroupAdd test requires API version >= 1.20

Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Signed-off-by: Joffrey F <joffrey@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants