docs: def set_salt_view():
      '''
      Helper function that sets the salt design
      document. Uses get_valid_salt_views and some hardcoded values.
      '''
  
      options = _get_options(ret=None)
  
      # Create the new object that we will shove in as the design doc.
      new_doc = {}
      new_doc['views'] = get_valid_salt_views()
      new_doc['language'] = "javascript"
  
      # Make the request to update the design doc.
      _response = _request("PUT",
                           options['url'] + options['db'] + "/_design/salt",
                           "application/json", salt.utils.json.dumps(new_doc))
      if 'error' in _response:
          log.warning('Unable to set the salt design document: %s', _response['error'])
          return False
      return True