{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/27317","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/27317/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/27317/comments","events_url":"https://api.github.com/repos/docker/docker/issues/27317/events","html_url":"https://github.com/docker/docker/pull/27317","id":182519836,"number":27317,"title":"#26346: docker volume inspect doesn't do partial ID matching","user":{"login":"bbayani","id":10231863,"avatar_url":"https://avatars.githubusercontent.com/u/10231863?v=3","gravatar_id":"","url":"https://api.github.com/users/bbayani","html_url":"https://github.com/bbayani","followers_url":"https://api.github.com/users/bbayani/followers","following_url":"https://api.github.com/users/bbayani/following{/other_user}","gists_url":"https://api.github.com/users/bbayani/gists{/gist_id}","starred_url":"https://api.github.com/users/bbayani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbayani/subscriptions","organizations_url":"https://api.github.com/users/bbayani/orgs","repos_url":"https://api.github.com/users/bbayani/repos","events_url":"https://api.github.com/users/bbayani/events{/privacy}","received_events_url":"https://api.github.com/users/bbayani/received_events","type":"User","site_admin":false},"labels":[{"id":175375318,"url":"https://api.github.com/repos/docker/docker/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-10-12T13:03:00Z","updated_at":"2017-01-03T19:04:18Z","closed_at":"2016-12-15T19:12:18Z","pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/27317","html_url":"https://github.com/docker/docker/pull/27317","diff_url":"https://github.com/docker/docker/pull/27317.diff","patch_url":"https://github.com/docker/docker/pull/27317.patch"},"body":"fixes #26346\n\n**\\- What I did**\nImplemented code for performing partial ID matching for docker volumes (ID is name for volumes)\n\n**\\- How I did it**\nAdded method GetVolumesByName. It iterates over all volumes in daemon volume store and returns the list of volumes whose names match with passed prefix\n\n**\\- How to verify it**\n1. Build a developer container with latest docker/master and this PR\n2. Create binaries in container with hack/make.sh binary\n3. Copy binaries in /usr/bin\n4. Start docker daemon\n5. Create docker volume with \"docker volume create test1\"\n6. Try docker volume inspect with complete name\ndocker volume inspect test1\ndocker inspect test1\n7. Try docker volume inspect with first part of volume name\ndocker volume inspect te\ndocker inspect te\n8. Try volume inspect with non existing volume name and ensure you get error\ndocker volume inspect abc -> no such volume: abc\ndocker inspect abc -> no such container/network/volume/service \n9. If more and one volumes with same first initial characters exists, inspect will be performed for first one.\n\n**\\- Description for the changelog**\n1. Removed a VolumeInspect method from daemon/inspect.go\n2. Added this method in daemon/volumes.go\n3. Added new method getVolumesByName in daemon/volumes.go which does partial name matching and returns list of matching volumes\n4. Replaced method call in VolumeInspect that looks-up volume with complete name, with new method getVolumesByName.  \n\n**\\- A picture of a cute animal (not mandatory but encouraged)**\n![adorable-giraffe-family](https://cloud.githubusercontent.com/assets/10231863/19310259/dfb593d0-90a6-11e6-9c01-d7a49064461f.jpg)\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/270195080","html_url":"https://github.com/docker/docker/pull/27317#issuecomment-270195080","issue_url":"https://api.github.com/repos/docker/docker/issues/27317","id":270195080,"user":{"login":"jhowardmsft","id":10522484,"avatar_url":"https://avatars.githubusercontent.com/u/10522484?v=3","gravatar_id":"","url":"https://api.github.com/users/jhowardmsft","html_url":"https://github.com/jhowardmsft","followers_url":"https://api.github.com/users/jhowardmsft/followers","following_url":"https://api.github.com/users/jhowardmsft/following{/other_user}","gists_url":"https://api.github.com/users/jhowardmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/jhowardmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhowardmsft/subscriptions","organizations_url":"https://api.github.com/users/jhowardmsft/orgs","repos_url":"https://api.github.com/users/jhowardmsft/repos","events_url":"https://api.github.com/users/jhowardmsft/events{/privacy}","received_events_url":"https://api.github.com/users/jhowardmsft/received_events","type":"User","site_admin":false},"created_at":"2017-01-03T19:04:18Z","updated_at":"2017-01-03T19:04:18Z","body":"@thaJeztah Can this be re-visited to match by partial-`ID`?"}}
{"actor":{"display_login":"jhowardmsft"}}