docs: def csr_managed(name,
                  **kwargs):
      '''
      Manage a Certificate Signing Request
  
      name:
          Path to the CSR
  
      properties:
          The properties to be added to the certificate request, including items like subject, extensions
          and public key. See above for valid properties.
  
      kwargs:
          Any arguments supported by :py:func:`file.managed <salt.states.file.managed>` are supported.
  
      ext_mapping:
          Provide additional X509v3 extension mappings.  This argument should be
          in the form of a dictionary and should include both the OID and the
          friendly name for the extension.
  
          .. versionadded:: Neon
  
      Example:
  
      .. code-block:: yaml
  
          /etc/pki/mycert.csr:
            x509.csr_managed:
               - private_key: /etc/pki/mycert.key
               - CN: www.example.com
               - C: US
               - ST: Utah
               - L: Salt Lake City
               - keyUsage: 'critical dataEncipherment'
  
          /etc/pki/mycert.csr:
            x509.csr_managed:
               - private_key: /etc/pki/mycert.key
               - CN: www.example.com
               - C: US
               - ST: Utah
               - L: Salt Lake City
               - keyUsage: 'critical dataEncipherment'
               - DomainController: 'ASN1:UTF8String:SomeOneSomeWhere'
               - ext_mapping:
                   '1.3.6.1.4.1.311.20.2': 'DomainController'
  
      '''
      try:
          old = __salt__['x509.read_csr'](name)
      except salt.exceptions.SaltInvocationError:
          old = '{0} is not a valid csr.'.format(name)
  
      file_args, kwargs = _get_file_args(name, **kwargs)
      file_args['contents'] = __salt__['x509.create_csr'](text=True, **kwargs)
  
      ret = __states__['file.managed'](**file_args)
      if ret['changes']:
          new = __salt__['x509.read_csr'](file_args['contents'])
          if old != new:
              ret['changes'] = {"Old": old, "New": new}
  
      return ret