title: Where are virtual switches kept in vSphere? (through pyVmomi)
body: <p>I have a number of virtual portgroups on a virtual switch. When I execute</p>
  
  <pre><code>datacenters = si.RetrieveContent().rootFolder.childEntity
  for datacenter in datacenters:
      hosts = datacenter.hostFolder.childEntity
      for host in hosts:
          networks = host.network
          for network in networks:
               print network.name
  </code></pre>
  
  <p>(si is a service instance)
  I get all the vlans (portgroups) on the network, but none of the switches (which the docs claim should be in the network directory). Given that folders also have the name attribute, any folders that I looked over should have been printed. So where does vsphere/vcenter keep these switches?</p>