code: def get_network_folder(dc_ref):
      '''
      Retrieves the network folder of a datacenter
      '''
      dc_name = get_managed_object_name(dc_ref)
      log.trace('Retrieving network folder in datacenter \'%s\'', dc_name)
      service_instance = get_service_instance_from_managed_object(dc_ref)
      traversal_spec = vmodl.query.PropertyCollector.TraversalSpec(
          path='networkFolder',
          skip=False,
          type=vim.Datacenter)
      entries = get_mors_with_properties(service_instance,
                                         vim.Folder,
                                         container_ref=dc_ref,
                                         property_list=['name'],
                                         traversal_spec=traversal_spec)
      if not entries:
          raise salt.exceptions.VMwareObjectRetrievalError(
              'Network folder in datacenter \'{0}\' wasn\'t retrieved'
              ''.format(dc_name))
      return entries[0]['object'f get_network_folder(dc_ref):
      '''
      Retrieves the network folder of a datacenter
      '''
      dc_name = get_managed_object_name(dc_ref)
      log.trace('Retrieving network folder in datacenter \'%s\'', dc_name)
      service_instance = get_service_instance_from_managed_object(dc_ref)
      traversal_spec = vmodl.query.PropertyCollector.TraversalSpec(
          path='networkFolder',
          skip=False,
          type=vim.Datacenter)
      entries = get_mors_with_properties(service_instance,
                                         vim.Folder,
                                         container_ref=dc_ref,
                                         property_list=['name'],
                                         traversal_spec=traversal_spec)
      if not entries:
          raise salt.exceptions.VMwareObjectRetrievalError(
              'Network folder in datacenter \'{0}\' wasn\'t retrieved'
              ''.format(dc_name))
      return entries[0]['object']
docs: Retrieves the network folder of a datacenter