def rename_lineage(config):
 disp = zope.component.getUtility(interfaces.IDisplay)
 certname = _get_certname(config, 'rename')
 new_certname = config.new_certname
 if (not new_certname):
  (code, new_certname) = disp.input('Enter the new name for certificate {0}'.format(certname), flag='--updated-cert-name', force_interactive=True)
  if ((code != display_util.OK) or (not new_certname)):
   raise errors.Error('User ended interaction.')
 lineage = lineage_for_certname(config, certname)
 if (not lineage):
  raise errors.ConfigurationError('No existing certificate with name {0} found.'.format(certname))
 storage.rename_renewal_config(certname, new_certname, config)
 disp.notification('Successfully renamed {0} to {1}.'.format(certname, new_certname), pause=False)

def rename_lineage ( config ) : disp = zope . component . getUtility ( interfaces . IDisplay ) certname = _get_certname ( config , 'rename' ) new_certname = config . new_certname if ( not new_certname ) : ( code , new_certname ) = disp . input ( 'Enter the new name for certificate {0}' . format ( certname ) , flag = '--updated-cert-name' , force_interactive = True ) if ( ( code != display_util . OK ) or ( not new_certname ) ) : raise errors . Error ( 'User ended interaction.' ) lineage = lineage_for_certname ( config , certname ) if ( not lineage ) : raise errors . ConfigurationError ( 'No existing certificate with name {0} found.' . format ( certname ) ) storage . rename_renewal_config ( certname , new_certname , config ) disp . notification ( 'Successfully renamed {0} to {1}.' . format ( certname , new_certname ) , pause = False )
rename the specified lineage to the new name .