{"action":"opened","number":2031,"pull_request":{"url":"https://api.github.com/repos/lxc/lxd/pulls/2031","id":70407509,"html_url":"https://github.com/lxc/lxd/pull/2031","diff_url":"https://github.com/lxc/lxd/pull/2031.diff","patch_url":"https://github.com/lxc/lxd/pull/2031.patch","issue_url":"https://api.github.com/repos/lxc/lxd/issues/2031","number":2031,"state":"open","locked":false,"title":"Add --format and json output for image list command","user":{"login":"ctrlrsf","id":6004738,"avatar_url":"https://avatars.githubusercontent.com/u/6004738?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrlrsf","html_url":"https://github.com/ctrlrsf","followers_url":"https://api.github.com/users/ctrlrsf/followers","following_url":"https://api.github.com/users/ctrlrsf/following{/other_user}","gists_url":"https://api.github.com/users/ctrlrsf/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrlrsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrlrsf/subscriptions","organizations_url":"https://api.github.com/users/ctrlrsf/orgs","repos_url":"https://api.github.com/users/ctrlrsf/repos","events_url":"https://api.github.com/users/ctrlrsf/events{/privacy}","received_events_url":"https://api.github.com/users/ctrlrsf/received_events","type":"User","site_admin":false},"body":"Adds the --format option to the `lxc image list` command. Possible options are table and json.\r\n\r\nImage list filters still work regardless of output format.\r\n\r\n--format table example:\r\n```\r\n$ lxc image list images: 'description=.*yakkety.*s390x.*' --format table\r\n+-------------------------------+--------------+--------+-----------------------------------------+-------+---------+------------------------------+\r\n|             ALIAS             | FINGERPRINT  | PUBLIC | DESCRIPTION               | ARCH  |  SIZE   |         UPLOAD DATE |\r\n+-------------------------------+--------------+--------+-----------------------------------------+-------+---------+------------------------------+\r\n| ubuntu/yakkety/s390x (1 more) | 03a93a03d6bb | yes    | Ubuntu yakkety (s390x) (20160517_03:49) | s390x | 73.19MB | May 17, 2016 at 4:26am (UTC) |\r\n+-------------------------------+--------------+--------+-----------------------------------------+-------+---------+------------------------------+\r\n|                               | 42f6c2bb9348 | yes    | Ubuntu yakkety (s390x) (20160515_03:49) | s390x | 73.09MB | May 15, 2016 at 5:20am (UTC) |\r\n+-------------------------------+--------------+--------+-----------------------------------------+-------+---------+------------------------------+\r\n|                               | a6539f9ece07 | yes    | Ubuntu yakkety (s390x) (20160515_09:20) | s390x | 73.19MB | May 16, 2016 at 6:22pm (UTC) |\r\n+-------------------------------+--------------+--------+-----------------------------------------+-------+---------+------------------------------+\r\n```\r\n\r\n--format json example:\r\n```\r\n$ lxc image list images: 'description=.*yakkety.*s390x.*' --format json\r\n[{\"aliases\":[],\"architecture\":\"s390x\",\"cached\":false,\"filename\":\"ubuntu-yakkety-s390x-default-20160515_03:49.tar.xz\",\"fingerprint\":\"42f6c2bb9348e27a8a048ce9657574cc524473bfa801902f4461da1ca1a456ba\",\"properties\":{\"architecture\":\"s390x\",\"build\":\"20160515_03:49\",\"description\":\"Ubuntu\r\nyakkety (s390x)\r\n(20160515_03:49)\",\"distribution\":\"ubuntu\",\"release\":\"yakkety\"},\"public\":true,\"size\":76642122,\"auto_update\":false,\"created_at\":\"2016-05-15T05:20:21Z\",\"expires_at\":\"1970-01-01T00:00:00Z\",\"last_used_at\":\"0001-01-01T00:00:00Z\",\"uploaded_at\":\"2016-05-15T05:20:21Z\"},{},{}]\r\n[{\"aliases\":[],\"architecture\":\"s390x\",\"cached\":false,\"filename\":\"ubuntu-yakkety-s390x-default-20160515_03:49.tar.xz\",\"fingerprint\":\"42f6c2bb9348e27a8a048ce9657574cc524473bfa801902f4461da1ca1a456ba\",\"properties\":{\"architecture\":\"s390x\",\"build\":\"20160515_03:49\",\"description\":\"Ubuntu\r\nyakkety (s390x)\r\n(20160515_03:49)\",\"distribution\":\"ubuntu\",\"release\":\"yakkety\"},\"public\":true,\"size\":76642122,\"auto_update\":false,\"created_at\":\"2016-05-15T05:20:21Z\",\"expires_at\":\"1970-01-01T00:00:00Z\",\"last_used_at\":\"0001-01-01T00:00:00Z\",\"uploaded_at\":\"2016-05-15T05:20:21Z\"},{\"aliases\":[],\"architecture\":\"s390x\",\"cached\":false,\"filename\":\"ubuntu-yakkety-s390x-default-20160515_09:20.tar.xz\",\"fingerprint\":\"a6539f9ece0734574e6ffdaf81e421975fbeb32ac2637b16fe2cbc5648c909fd\",\"properties\":{\"architecture\":\"s390x\",\"build\":\"20160515_09:20\",\"description\":\"Ubuntu\r\nyakkety (s390x)\r\n(20160515_09:20)\",\"distribution\":\"ubuntu\",\"release\":\"yakkety\"},\"public\":true,\"size\":76743878,\"auto_update\":false,\"created_at\":\"2016-05-16T18:22:41Z\",\"expires_at\":\"1970-01-01T00:00:00Z\",\"last_used_at\":\"0001-01-01T00:00:00Z\",\"uploaded_at\":\"2016-05-16T18:22:41Z\"},{}]\r\n[{\"aliases\":[],\"architecture\":\"s390x\",\"cached\":false,\"filename\":\"ubuntu-yakkety-s390x-default-20160515_03:49.tar.xz\",\"fingerprint\":\"42f6c2bb9348e27a8a048ce9657574cc524473bfa801902f4461da1ca1a456ba\",\"properties\":{\"architecture\":\"s390x\",\"build\":\"20160515_03:49\",\"description\":\"Ubuntu\r\nyakkety (s390x)\r\n(20160515_03:49)\",\"distribution\":\"ubuntu\",\"release\":\"yakkety\"},\"public\":true,\"size\":76642122,\"auto_update\":false,\"created_at\":\"2016-05-15T05:20:21Z\",\"expires_at\":\"1970-01-01T00:00:00Z\",\"last_used_at\":\"0001-01-01T00:00:00Z\",\"uploaded_at\":\"2016-05-15T05:20:21Z\"},{\"aliases\":[],\"architecture\":\"s390x\",\"cached\":false,\"filename\":\"ubuntu-yakkety-s390x-default-20160515_09:20.tar.xz\",\"fingerprint\":\"a6539f9ece0734574e6ffdaf81e421975fbeb32ac2637b16fe2cbc5648c909fd\",\"properties\":{\"architecture\":\"s390x\",\"build\":\"20160515_09:20\",\"description\":\"Ubuntu\r\nyakkety (s390x)\r\n(20160515_09:20)\",\"distribution\":\"ubuntu\",\"release\":\"yakkety\"},\"public\":true,\"size\":76743878,\"auto_update\":false,\"created_at\":\"2016-05-16T18:22:41Z\",\"expires_at\":\"1970-01-01T00:00:00Z\",\"last_used_at\":\"0001-01-01T00:00:00Z\",\"uploaded_at\":\"2016-05-16T18:22:41Z\"},{\"aliases\":[{\"name\":\"ubuntu/yakkety/s390x/default\",\"description\":\"Ubuntu\r\nyakkety (s390x)\r\n(default)\"},{\"name\":\"ubuntu/yakkety/s390x\",\"description\":\"Ubuntu yakkety\r\n(s390x)\"}],\"architecture\":\"s390x\",\"cached\":false,\"filename\":\"ubuntu-yakkety-s390x-default-20160517_03:49.tar.xz\",\"fingerprint\":\"03a93a03d6bb370a129518c0fd53aa6b199342d8ef40c643c43710972334c4df\",\"properties\":{\"architecture\":\"s390x\",\"build\":\"20160517_03:49\",\"description\":\"Ubuntu\r\nyakkety (s390x)\r\n(20160517_03:49)\",\"distribution\":\"ubuntu\",\"release\":\"yakkety\"},\"public\":true,\"size\":76740678,\"auto_update\":false,\"created_at\":\"2016-05-17T04:26:27Z\",\"expires_at\":\"1970-01-01T00:00:00Z\",\"last_used_at\":\"0001-01-01T00:00:00Z\",\"uploaded_at\":\"2016-05-17T04:26:27Z\"}]\r\n```\r\n\r\nCloses https://github.com/lxc/lxd/issues/1951\r\n\r\nSigned-off-by: Rene Fragoso <ctrlrsf@gmail.com>","created_at":"2016-05-17T18:35:46Z","updated_at":"2016-05-17T18:35:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e7f4eba308d422eb3735c0de5e6adc0c0044405","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lxc/lxd/pulls/2031/commits","review_comments_url":"https://api.github.com/repos/lxc/lxd/pulls/2031/comments","review_comment_url":"https://api.github.com/repos/lxc/lxd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/2031/comments","statuses_url":"https://api.github.com/repos/lxc/lxd/statuses/39751b85e083f3fa629e9be23f02d3e8b8097f1e","head":{"label":"ctrlrsf:image-list-json-format","ref":"image-list-json-format","sha":"39751b85e083f3fa629e9be23f02d3e8b8097f1e","user":{"login":"ctrlrsf","id":6004738,"avatar_url":"https://avatars.githubusercontent.com/u/6004738?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrlrsf","html_url":"https://github.com/ctrlrsf","followers_url":"https://api.github.com/users/ctrlrsf/followers","following_url":"https://api.github.com/users/ctrlrsf/following{/other_user}","gists_url":"https://api.github.com/users/ctrlrsf/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrlrsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrlrsf/subscriptions","organizations_url":"https://api.github.com/users/ctrlrsf/orgs","repos_url":"https://api.github.com/users/ctrlrsf/repos","events_url":"https://api.github.com/users/ctrlrsf/events{/privacy}","received_events_url":"https://api.github.com/users/ctrlrsf/received_events","type":"User","site_admin":false},"repo":{"id":59041395,"name":"lxd","full_name":"ctrlrsf/lxd","owner":{"login":"ctrlrsf","id":6004738,"avatar_url":"https://avatars.githubusercontent.com/u/6004738?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrlrsf","html_url":"https://github.com/ctrlrsf","followers_url":"https://api.github.com/users/ctrlrsf/followers","following_url":"https://api.github.com/users/ctrlrsf/following{/other_user}","gists_url":"https://api.github.com/users/ctrlrsf/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrlrsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrlrsf/subscriptions","organizations_url":"https://api.github.com/users/ctrlrsf/orgs","repos_url":"https://api.github.com/users/ctrlrsf/repos","events_url":"https://api.github.com/users/ctrlrsf/events{/privacy}","received_events_url":"https://api.github.com/users/ctrlrsf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ctrlrsf/lxd","description":"Daemon based on liblxc offering a REST API to manage containers","fork":true,"url":"https://api.github.com/repos/ctrlrsf/lxd","forks_url":"https://api.github.com/repos/ctrlrsf/lxd/forks","keys_url":"https://api.github.com/repos/ctrlrsf/lxd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ctrlrsf/lxd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ctrlrsf/lxd/teams","hooks_url":"https://api.github.com/repos/ctrlrsf/lxd/hooks","issue_events_url":"https://api.github.com/repos/ctrlrsf/lxd/issues/events{/number}","events_url":"https://api.github.com/repos/ctrlrsf/lxd/events","assignees_url":"https://api.github.com/repos/ctrlrsf/lxd/assignees{/user}","branches_url":"https://api.github.com/repos/ctrlrsf/lxd/branches{/branch}","tags_url":"https://api.github.com/repos/ctrlrsf/lxd/tags","blobs_url":"https://api.github.com/repos/ctrlrsf/lxd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ctrlrsf/lxd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ctrlrsf/lxd/git/refs{/sha}","trees_url":"https://api.github.com/repos/ctrlrsf/lxd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ctrlrsf/lxd/statuses/{sha}","languages_url":"https://api.github.com/repos/ctrlrsf/lxd/languages","stargazers_url":"https://api.github.com/repos/ctrlrsf/lxd/stargazers","contributors_url":"https://api.github.com/repos/ctrlrsf/lxd/contributors","subscribers_url":"https://api.github.com/repos/ctrlrsf/lxd/subscribers","subscription_url":"https://api.github.com/repos/ctrlrsf/lxd/subscription","commits_url":"https://api.github.com/repos/ctrlrsf/lxd/commits{/sha}","git_commits_url":"https://api.github.com/repos/ctrlrsf/lxd/git/commits{/sha}","comments_url":"https://api.github.com/repos/ctrlrsf/lxd/comments{/number}","issue_comment_url":"https://api.github.com/repos/ctrlrsf/lxd/issues/comments{/number}","contents_url":"https://api.github.com/repos/ctrlrsf/lxd/contents/{+path}","compare_url":"https://api.github.com/repos/ctrlrsf/lxd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ctrlrsf/lxd/merges","archive_url":"https://api.github.com/repos/ctrlrsf/lxd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ctrlrsf/lxd/downloads","issues_url":"https://api.github.com/repos/ctrlrsf/lxd/issues{/number}","pulls_url":"https://api.github.com/repos/ctrlrsf/lxd/pulls{/number}","milestones_url":"https://api.github.com/repos/ctrlrsf/lxd/milestones{/number}","notifications_url":"https://api.github.com/repos/ctrlrsf/lxd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ctrlrsf/lxd/labels{/name}","releases_url":"https://api.github.com/repos/ctrlrsf/lxd/releases{/id}","deployments_url":"https://api.github.com/repos/ctrlrsf/lxd/deployments","created_at":"2016-05-17T16:49:58Z","updated_at":"2016-05-17T16:50:00Z","pushed_at":"2016-05-17T18:32:00Z","git_url":"git://github.com/ctrlrsf/lxd.git","ssh_url":"git@github.com:ctrlrsf/lxd.git","clone_url":"https://github.com/ctrlrsf/lxd.git","svn_url":"https://github.com/ctrlrsf/lxd","homepage":"https://linuxcontainers.org/lxd","size":5983,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lxc:master","ref":"master","sha":"21c627b12894cba1069c31254e44d0f51535fcb9","user":{"login":"lxc","id":2301756,"avatar_url":"https://avatars.githubusercontent.com/u/2301756?v=3","gravatar_id":"","url":"https://api.github.com/users/lxc","html_url":"https://github.com/lxc","followers_url":"https://api.github.com/users/lxc/followers","following_url":"https://api.github.com/users/lxc/following{/other_user}","gists_url":"https://api.github.com/users/lxc/gists{/gist_id}","starred_url":"https://api.github.com/users/lxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxc/subscriptions","organizations_url":"https://api.github.com/users/lxc/orgs","repos_url":"https://api.github.com/users/lxc/repos","events_url":"https://api.github.com/users/lxc/events{/privacy}","received_events_url":"https://api.github.com/users/lxc/received_events","type":"Organization","site_admin":false},"repo":{"id":26192117,"name":"lxd","full_name":"lxc/lxd","owner":{"login":"lxc","id":2301756,"avatar_url":"https://avatars.githubusercontent.com/u/2301756?v=3","gravatar_id":"","url":"https://api.github.com/users/lxc","html_url":"https://github.com/lxc","followers_url":"https://api.github.com/users/lxc/followers","following_url":"https://api.github.com/users/lxc/following{/other_user}","gists_url":"https://api.github.com/users/lxc/gists{/gist_id}","starred_url":"https://api.github.com/users/lxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxc/subscriptions","organizations_url":"https://api.github.com/users/lxc/orgs","repos_url":"https://api.github.com/users/lxc/repos","events_url":"https://api.github.com/users/lxc/events{/privacy}","received_events_url":"https://api.github.com/users/lxc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lxc/lxd","description":"Daemon based on liblxc offering a REST API to manage containers","fork":false,"url":"https://api.github.com/repos/lxc/lxd","forks_url":"https://api.github.com/repos/lxc/lxd/forks","keys_url":"https://api.github.com/repos/lxc/lxd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lxc/lxd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lxc/lxd/teams","hooks_url":"https://api.github.com/repos/lxc/lxd/hooks","issue_events_url":"https://api.github.com/repos/lxc/lxd/issues/events{/number}","events_url":"https://api.github.com/repos/lxc/lxd/events","assignees_url":"https://api.github.com/repos/lxc/lxd/assignees{/user}","branches_url":"https://api.github.com/repos/lxc/lxd/branches{/branch}","tags_url":"https://api.github.com/repos/lxc/lxd/tags","blobs_url":"https://api.github.com/repos/lxc/lxd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lxc/lxd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lxc/lxd/git/refs{/sha}","trees_url":"https://api.github.com/repos/lxc/lxd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lxc/lxd/statuses/{sha}","languages_url":"https://api.github.com/repos/lxc/lxd/languages","stargazers_url":"https://api.github.com/repos/lxc/lxd/stargazers","contributors_url":"https://api.github.com/repos/lxc/lxd/contributors","subscribers_url":"https://api.github.com/repos/lxc/lxd/subscribers","subscription_url":"https://api.github.com/repos/lxc/lxd/subscription","commits_url":"https://api.github.com/repos/lxc/lxd/commits{/sha}","git_commits_url":"https://api.github.com/repos/lxc/lxd/git/commits{/sha}","comments_url":"https://api.github.com/repos/lxc/lxd/comments{/number}","issue_comment_url":"https://api.github.com/repos/lxc/lxd/issues/comments{/number}","contents_url":"https://api.github.com/repos/lxc/lxd/contents/{+path}","compare_url":"https://api.github.com/repos/lxc/lxd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lxc/lxd/merges","archive_url":"https://api.github.com/repos/lxc/lxd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lxc/lxd/downloads","issues_url":"https://api.github.com/repos/lxc/lxd/issues{/number}","pulls_url":"https://api.github.com/repos/lxc/lxd/pulls{/number}","milestones_url":"https://api.github.com/repos/lxc/lxd/milestones{/number}","notifications_url":"https://api.github.com/repos/lxc/lxd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lxc/lxd/labels{/name}","releases_url":"https://api.github.com/repos/lxc/lxd/releases{/id}","deployments_url":"https://api.github.com/repos/lxc/lxd/deployments","created_at":"2014-11-04T22:40:52Z","updated_at":"2016-05-17T16:12:13Z","pushed_at":"2016-05-17T18:35:47Z","git_url":"git://github.com/lxc/lxd.git","ssh_url":"git@github.com:lxc/lxd.git","clone_url":"https://github.com/lxc/lxd.git","svn_url":"https://github.com/lxc/lxd","homepage":"https://linuxcontainers.org/lxd","size":7468,"stargazers_count":961,"watchers_count":961,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":182,"mirror_url":null,"open_issues_count":70,"forks":182,"open_issues":70,"watchers":961,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lxc/lxd/pulls/2031"},"html":{"href":"https://github.com/lxc/lxd/pull/2031"},"issue":{"href":"https://api.github.com/repos/lxc/lxd/issues/2031"},"comments":{"href":"https://api.github.com/repos/lxc/lxd/issues/2031/comments"},"review_comments":{"href":"https://api.github.com/repos/lxc/lxd/pulls/2031/comments"},"review_comment":{"href":"https://api.github.com/repos/lxc/lxd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lxc/lxd/pulls/2031/commits"},"statuses":{"href":"https://api.github.com/repos/lxc/lxd/statuses/39751b85e083f3fa629e9be23f02d3e8b8097f1e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":64,"deletions":36,"changed_files":1}}