code: def list_subnets(conn=None, call=None, kwargs=None):
      '''
      List subnets in a virtual network
  
      network
          network to list subnets of
  
      .. code-block:: bash
  
          salt-cloud -f list_subnets myopenstack network=salt-net
  
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The list_subnets function must be called with '
              '-f or --function.'
          )
      if conn is None:
          conn = get_conn()
      if kwargs is None or (isinstance(kwargs, dict) and 'network' not in kwargs):
          raise SaltCloudSystemExit(
              'A `network` must be specified'
          )
      return conn.list_subnets(filters={'network': kwargs['network']}f list_subnets(conn=None, call=None, kwargs=None):
      '''
      List subnets in a virtual network
  
      network
          network to list subnets of
  
      .. code-block:: bash
  
          salt-cloud -f list_subnets myopenstack network=salt-net
  
      '''
      if call == 'action':
          raise SaltCloudSystemExit(
              'The list_subnets function must be called with '
              '-f or --function.'
          )
      if conn is None:
          conn = get_conn()
      if kwargs is None or (isinstance(kwargs, dict) and 'network' not in kwargs):
          raise SaltCloudSystemExit(
              'A `network` must be specified'
          )
      return conn.list_subnets(filters={'network': kwargs['network']})
docs: List subnets in a virtual network
  
      network
          network to list subnets of
  
      .. code-block:: bash
  
          salt-cloud -f list_subnets myopenstack network=salt-net