title: VSphere and Fog
body: <p>Trying and trying to do something very simple in fog 1.9 with the vsphere provider. The examples in the little documentation there is not working for me.</p>
  
  <p>I want to list all VMs in a folder. Simple eh?</p>
  
  <p>Tried...</p>
  
  <pre><code>credentials = {
      :provider =&gt; "vsphere",
      :vsphere_username =&gt; user,
      :vsphere_password=&gt; pass,
      :vsphere_server =&gt; "vc_name",
      :vsphere_ssl    =&gt; true,
      :vsphere_expected_pubkey_hash =&gt; "1466f20c1b3f990a2a018dc2ca22a79fc2d0284ab4aac534c47blah"
  }
  
  compute = Fog::Compute.new(credentials)
  vms = compute.servers.all('folder' =&gt; '/Datacenters/Ewl/Self-Service')
  
  pp vms
  </code></pre>
  
  <p>This connects and churns away and RETURNS ALL VMs IN THE DATACENTER and not just the folder. Grr.</p>
  
  <p>I've tried lots of variations on the folder variable e.g.</p>
  
  <pre><code>vms = compute.servers.all('folder' =&gt; '/Hosts &amp; Clusters/Ewl1_vm/Self-Service')
  vms = compute.servers.all('folder' =&gt; 'Self-Service')
  vms = compute.servers.all('folder' =&gt; 'Self-Service','datacenter' =&gt; 'Ewl')
  </code></pre>
  
  <p>But all do the same thing. </p>
  
  <p>I've worked through the code and it's not helped me really.</p>
  
  <p>Help!</p>