{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/25453","labels_url":"https://api.github.com/repos/saltstack/salt/issues/25453/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/25453/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/25453/events","html_url":"https://github.com/saltstack/salt/pull/25453","id":95222616,"number":25453,"title":"Improving libvirt","user":{"login":"isbm","id":1073714,"avatar_url":"https://avatars.githubusercontent.com/u/1073714?v=3","gravatar_id":"","url":"https://api.github.com/users/isbm","html_url":"https://github.com/isbm","followers_url":"https://api.github.com/users/isbm/followers","following_url":"https://api.github.com/users/isbm/following{/other_user}","gists_url":"https://api.github.com/users/isbm/gists{/gist_id}","starred_url":"https://api.github.com/users/isbm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isbm/subscriptions","organizations_url":"https://api.github.com/users/isbm/orgs","repos_url":"https://api.github.com/users/isbm/repos","events_url":"https://api.github.com/users/isbm/events{/privacy}","received_events_url":"https://api.github.com/users/isbm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Execution%20Module","name":"Execution Module","color":"006b75"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Expert%20Change","name":"Expert Change","color":"5319e7"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Platform","name":"Platform","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/State%20Module","name":"State Module","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-15T15:25:09Z","updated_at":"2015-07-15T16:46:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/25453","html_url":"https://github.com/saltstack/salt/pull/25453","diff_url":"https://github.com/saltstack/salt/pull/25453.diff","patch_url":"https://github.com/saltstack/salt/pull/25453.patch"},"body":"This PR is for `libvirt` and virtual machines infrastructure.\r\nIt does the following:\r\n\r\n- Implements missing functionality for the snapshots on `libvirt` enabled systems. Working with snapshots is now like with `virsh`, except it makes better automatic names unless you gave your own.\r\n\r\n- Implements a cool `virt` states, where included all basic functionality to `start`, `stop`, `reboot`, take a `snapshot` of a certain domains, `revert` to a certain snapshot or previous, addressed by a wildcards or directly.\r\n\r\n- Fixes the terminology so it stays consistent with the `libvirt`.\r\n\r\n- Drops confusing function names (create and destroy) that are specific only to the libvirt, were aliased for the same reasons and are anyway different for other systems, like jails on BSD or zones on SmartOS. From now on `virt.start` for start the VM and `virt.stop` for stop the VM everywhere.\r\n\r\n- Bonus: cleans up sibling module for SmartOS (more improvements on this module yet to come!) synchronizing with the main `virt` module. I haven't done much here (yet), but I'd like to have full zones support on Solaris/SmartOS.\r\n\r\n### Examples\r\nPerform snapshot reversion on all domains that matches `te*` pattern:\r\n```\r\nte*:\r\n  virt.reversed\r\n```\r\nResult:\r\n```\r\n          ID: te*\r\n    Function: virt.reverted\r\n      Result: True\r\n     Comment: Domains has been reverted\r\n     Started: 08:56:06.079434\r\n    Duration: 1155.665 ms\r\n     Changes:   \r\n              ----------\r\n              ignored:\r\n                  |_\r\n                    ----------\r\n                    domain:\r\n                        test01\r\n                    issue:\r\n                        No more previous snapshots available\r\n              reverted:\r\n                  |_\r\n                    ----------\r\n                    current:\r\n                        test02-20150715-072208\r\n                    deleted:\r\n                        N/A\r\n                    domain:\r\n                        test02\r\n\r\n```\r\nDelete snapshots:\r\n```\r\nsalt 'virtux.suse.com' virt.delete_snapshots testsuite testsuite-20150714-103959\r\nvirtux.suse.com:\r\n    ----------\r\n    available:\r\n        ----------\r\n        testsuite:\r\n            |_\r\n              ----------\r\n              created:\r\n                  2015-07-14 10:37:11\r\n              name:\r\n                  testsuite-20150714-103711\r\n              running:\r\n                  True\r\n            |_\r\n              ----------\r\n              created:\r\n                  2015-07-14 09:36:36\r\n              name:\r\n                  testsuite-20150714-093636\r\n              running:\r\n                  True\r\n    deleted:\r\n        ----------\r\n        testsuite-20150714-103959:\r\n            ----------\r\n            created:\r\n                2015-07-14 10:39:59\r\n            name:\r\n                testsuite-20150714-103959\r\n            running:\r\n                True\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/121675812","html_url":"https://github.com/saltstack/salt/pull/25453#issuecomment-121675812","issue_url":"https://api.github.com/repos/saltstack/salt/issues/25453","id":121675812,"user":{"login":"jfindlay","id":702905,"avatar_url":"https://avatars.githubusercontent.com/u/702905?v=3","gravatar_id":"","url":"https://api.github.com/users/jfindlay","html_url":"https://github.com/jfindlay","followers_url":"https://api.github.com/users/jfindlay/followers","following_url":"https://api.github.com/users/jfindlay/following{/other_user}","gists_url":"https://api.github.com/users/jfindlay/gists{/gist_id}","starred_url":"https://api.github.com/users/jfindlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfindlay/subscriptions","organizations_url":"https://api.github.com/users/jfindlay/orgs","repos_url":"https://api.github.com/users/jfindlay/repos","events_url":"https://api.github.com/users/jfindlay/events{/privacy}","received_events_url":"https://api.github.com/users/jfindlay/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T16:46:39Z","updated_at":"2015-07-15T16:46:39Z","body":"@isbm, there is a [test failure](https://jenkins.saltstack.com/job/salt-pr-rs-cent7-n/6230/testReport/junit/unit.modules.xapi_test/XapiTestCase/test_vm_cputime/)."}}