code: def list_nodes(conn=None, call=None):
      '''
      Return a list of VMs that are on the provider
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The list_nodes function must be called with -f or --function.'
          )
  
      if not conn:
          conn = get_conn()
  
      ret = {}
      datacenter_id = get_datacenter_id()
  
      try:
          nodes = conn.list_servers(datacenter_id=datacenter_id)
      except PBNotFoundError:
          log.error('Failed to get nodes list '
                    'from datacenter: %s', datacenter_id)
          raise
  
      for item in nodes['items']:
          node = {'id': item['id']}
          node.update(item['properties'])
          node['state'] = node.pop('vmState')
          ret[node['name']] = node
  
      return ref list_nodes(conn=None, call=None):
      '''
      Return a list of VMs that are on the provider
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The list_nodes function must be called with -f or --function.'
          )
  
      if not conn:
          conn = get_conn()
  
      ret = {}
      datacenter_id = get_datacenter_id()
  
      try:
          nodes = conn.list_servers(datacenter_id=datacenter_id)
      except PBNotFoundError:
          log.error('Failed to get nodes list '
                    'from datacenter: %s', datacenter_id)
          raise
  
      for item in nodes['items']:
          node = {'id': item['id']}
          node.update(item['properties'])
          node['state'] = node.pop('vmState')
          ret[node['name']] = node
  
      return ret
docs: Return a list of VMs that are on the provider