{"action":"created","issue":{"url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/339","repository_url":"https://api.github.com/repos/chef-partners/knife-vsphere","labels_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/339/labels{/name}","comments_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/339/comments","events_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/339/events","html_url":"https://github.com/chef-partners/knife-vsphere/issues/339","id":201366995,"number":339,"title":"Ability to choose datastore by space available and regex during clone","user":{"login":"warroyo","id":616621,"avatar_url":"https://avatars.githubusercontent.com/u/616621?v=3","gravatar_id":"","url":"https://api.github.com/users/warroyo","html_url":"https://github.com/warroyo","followers_url":"https://api.github.com/users/warroyo/followers","following_url":"https://api.github.com/users/warroyo/following{/other_user}","gists_url":"https://api.github.com/users/warroyo/gists{/gist_id}","starred_url":"https://api.github.com/users/warroyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warroyo/subscriptions","organizations_url":"https://api.github.com/users/warroyo/orgs","repos_url":"https://api.github.com/users/warroyo/repos","events_url":"https://api.github.com/users/warroyo/events{/privacy}","received_events_url":"https://api.github.com/users/warroyo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-17T18:24:25Z","updated_at":"2017-01-23T19:21:45Z","closed_at":null,"body":"It would be great to be able to choose a datastore with the  most space available during a clone. Also being able to select a datastore or group of datastores by regex would be nice. \r\n\r\nFor example my use case is that I have many datastores in a cluster, however even though I have access to some datastores and they have available space I may not want them to be selected because they are specific purposes.\r\n\r\nIt looks like the base functions for this to work are already implemented and it would just be a matter of changing out some methods in the `clone` command. \r\n\r\nregex:\r\nhttps://github.com/chef-partners/knife-vsphere/blob/6135e5a05b93f3463c642bfd3300399e552fa465/lib/chef/knife/base_vsphere_command.rb#L263\r\n\r\nchoose by size:\r\n\r\nhttps://github.com/chef-partners/knife-vsphere/blob/6135e5a05b93f3463c642bfd3300399e552fa465/lib/chef/knife/base_vsphere_command.rb#L236\r\n\r\nwould it make sense to just allow the `--datastore` option to accept regex as well? this would still allow for current functionality, since specifying a full datastore name `/my-datastore1/`  in regex would match that datastore only. The results could then be sent into the `choose_datastore` function to pick the right LUN based on size.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/comments/274589367","html_url":"https://github.com/chef-partners/knife-vsphere/issues/339#issuecomment-274589367","issue_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/339","id":274589367,"user":{"login":"warroyo","id":616621,"avatar_url":"https://avatars.githubusercontent.com/u/616621?v=3","gravatar_id":"","url":"https://api.github.com/users/warroyo","html_url":"https://github.com/warroyo","followers_url":"https://api.github.com/users/warroyo/followers","following_url":"https://api.github.com/users/warroyo/following{/other_user}","gists_url":"https://api.github.com/users/warroyo/gists{/gist_id}","starred_url":"https://api.github.com/users/warroyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warroyo/subscriptions","organizations_url":"https://api.github.com/users/warroyo/orgs","repos_url":"https://api.github.com/users/warroyo/repos","events_url":"https://api.github.com/users/warroyo/events{/privacy}","received_events_url":"https://api.github.com/users/warroyo/received_events","type":"User","site_admin":false},"created_at":"2017-01-23T19:21:45Z","updated_at":"2017-01-23T19:21:45Z","body":"Looks like `maxfree` will work just fine. I have created a PR https://github.com/chef-partners/knife-vsphere/pull/341 to add the formatting option to the output as well as the ability to filter on cluster/pool."}}
{"actor":{"display_login":"warroyo"}}