{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2622","repository_url":"https://api.github.com/repos/ansible/ansible-modules-extras","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2622/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2622/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2622/events","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2622","id":167663037,"number":2622,"title":"Add list command to lvg and lvol modules","user":{"login":"ninja-cat","id":946512,"avatar_url":"https://avatars.githubusercontent.com/u/946512?v=3","gravatar_id":"","url":"https://api.github.com/users/ninja-cat","html_url":"https://github.com/ninja-cat","followers_url":"https://api.github.com/users/ninja-cat/followers","following_url":"https://api.github.com/users/ninja-cat/following{/other_user}","gists_url":"https://api.github.com/users/ninja-cat/gists{/gist_id}","starred_url":"https://api.github.com/users/ninja-cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninja-cat/subscriptions","organizations_url":"https://api.github.com/users/ninja-cat/orgs","repos_url":"https://api.github.com/users/ninja-cat/repos","events_url":"https://api.github.com/users/ninja-cat/events{/privacy}","received_events_url":"https://api.github.com/users/ninja-cat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/feature_pull_request","name":"feature_pull_request","color":"009800"},{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels/needs_revision","name":"needs_revision","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-26T17:18:49Z","updated_at":"2016-07-28T16:25:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/2622","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2622","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/2622.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/2622.patch"},"body":"##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Feature Pull Request\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the plugin/module/task -->\r\nmodules: system/lvol.py and system/lvg.py\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\ndevel\r\n```\r\n\r\n##### SUMMARY\r\n<!--- Describe the change, including rationale and design decisions -->\r\n\r\n<!---\r\nIf you are fixing an existing issue, please include \"Fixes #nnnn\" in your commit\r\nmessage and your description; but you should still explain what the change does.\r\n-->\r\n\r\n<!--- Paste verbatim command output below, e.g. before and after your change -->\r\n```\r\nit's a new option, so there's no any output before. After the change it will produce the following:\r\n\r\nsudo ansible/hacking/test-module -m ./ansible/lib/ansible/modules/extras/system/lvg.py -a 'cmd=list units=t'\r\n* including generated source, if any, saving to: /home/player/.ansible_module_generated\r\n* ziploader module detected; extracted module source to: /home/player/debug_dir\r\n***********************************\r\nRAW OUTPUT\r\n\r\n{\"invocation\": {\"module_args\": {\"vg_options\": \"\", \"pvs\": null, \"force\": false, \"vg\": null, \"cmd\": \"list\", \"state\": \"present\", \"pesize\": 4, \"units\": \"t\"}}, \"changed\": false, \"vgs\": {\"vg_r007\": {\"size\": \"0.45\", \"num_lvs\": \"4\", \"free\": \"0.02\", \"num_pvs\": \"1\"}}}\r\n\r\n\r\n***********************************\r\nPARSED OUTPUT\r\n{\r\n    \"changed\": false, \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"cmd\": \"list\", \r\n            \"force\": false, \r\n            \"pesize\": 4, \r\n            \"pvs\": null, \r\n            \"state\": \"present\", \r\n            \"units\": \"t\", \r\n            \"vg\": null, \r\n            \"vg_options\": \"\"\r\n        }\r\n    }, \r\n    \"vgs\": {\r\n        \"vg_r007\": {\r\n            \"free\": \"0.02\", \r\n            \"num_lvs\": \"4\", \r\n            \"num_pvs\": \"1\", \r\n            \"size\": \"0.45\"\r\n        }\r\n    }\r\n}\r\n\r\nsudo ansible/hacking/test-module -m ./ansible/lib/ansible/modules/extras/system/lvol.py -a 'cmd=list units=t'\r\n* including generated source, if any, saving to: /home/player/.ansible_module_generated\r\n* ziploader module detected; extracted module source to: /home/player/debug_dir\r\n***********************************\r\nRAW OUTPUT\r\n\r\n{\"invocation\": {\"module_args\": {\"pvs\": null, \"force\": false, \"vg\": null, \"cmd\": \"list\", \"lv\": null, \"state\": \"present\", \"snapshot\": null, \"units\": \"t\", \"shrink\": true, \"opts\": null, \"size\": null}}, \"changed\": false, \"lvs\": {\"lvol0\": {\"size\": \"0.00\", \"vg\": \"vg_r007\"}, \"lvol1\": {\"size\": \"0.00\", \"vg\": \"vg_r007\"}, \"rooot\": {\"size\": \"0.10\", \"vg\": \"vg_r007\"}, \"homme\": {\"size\": \"0.33\", \"vg\": \"vg_r007\"}}}\r\n\r\n\r\n***********************************\r\nPARSED OUTPUT\r\n{\r\n    \"changed\": false, \r\n    \"invocation\": {\r\n        \"module_args\": {\r\n            \"cmd\": \"list\", \r\n            \"force\": false, \r\n            \"lv\": null, \r\n            \"opts\": null, \r\n            \"pvs\": null, \r\n            \"shrink\": true, \r\n            \"size\": null, \r\n            \"snapshot\": null, \r\n            \"state\": \"present\", \r\n            \"units\": \"t\", \r\n            \"vg\": null\r\n        }\r\n    }, \r\n    \"lvs\": {\r\n        \"homme\": {\r\n            \"size\": \"0.33\", \r\n            \"vg\": \"vg_r007\"\r\n        }, \r\n        \"lvol0\": {\r\n            \"size\": \"0.00\", \r\n            \"vg\": \"vg_r007\"\r\n        }, \r\n        \"lvol1\": {\r\n            \"size\": \"0.00\", \r\n            \"vg\": \"vg_r007\"\r\n        }, \r\n        \"rooot\": {\r\n            \"size\": \"0.10\", \r\n            \"vg\": \"vg_r007\"\r\n        }\r\n    }\r\n}\r\n\r\n\r\n```\r\n\r\nThis patch introduces an ability to list the corresponding LVM\r\nentities for lvg and lvol modules which are volume groups and\r\nlogical volumes respectively.\r\n\r\nNew option 'cmd' allow 'list' command to be performed. It returns\r\na dict where the keys are names of volume groups or logical volumes\r\ndepending on which module 'list' command was executed.\r\n\r\nThis change doesn't modify the behavior of already existing options.\r\n\r\nEg.:\r\nlvol: cmd=list\r\nlvg: cmd=list\r\n\r\nIn addition to that, it could supply sizes in different units which\r\nis toggled by 'units' option.\r\n\r\nEg.:\r\nlvol: cmd=list units=g\r\n\r\nreturns the dict of logical volumes where their sizes are in\r\ngigabytes."},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments/235948078","html_url":"https://github.com/ansible/ansible-modules-extras/pull/2622#issuecomment-235948078","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/2622","id":235948078,"user":{"login":"gregdek","id":252125,"avatar_url":"https://avatars.githubusercontent.com/u/252125?v=3","gravatar_id":"","url":"https://api.github.com/users/gregdek","html_url":"https://github.com/gregdek","followers_url":"https://api.github.com/users/gregdek/followers","following_url":"https://api.github.com/users/gregdek/following{/other_user}","gists_url":"https://api.github.com/users/gregdek/gists{/gist_id}","starred_url":"https://api.github.com/users/gregdek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregdek/subscriptions","organizations_url":"https://api.github.com/users/gregdek/orgs","repos_url":"https://api.github.com/users/gregdek/repos","events_url":"https://api.github.com/users/gregdek/events{/privacy}","received_events_url":"https://api.github.com/users/gregdek/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T16:25:17Z","updated_at":"2016-07-28T16:25:17Z","body":"Thanks @ninja-cat for this PR. Unfortunately, it is not mergeable in its current state due to merge conflicts. Please rebase your PR. When you are done, please comment with text 'ready_for_review' and we will put this PR back into review.\n\nFor help on how to do this cleanly please see http://docs.ansible.com/ansible/community.html#contributing-code-features-or-bugfixes\n\n[This message brought to you by your friendly Ansibull-bot.]"}}
{"actor":{"display_login":"gregdek"}}