docs: def renew_secret(client, creds, opt):
      """Renews a secret. This will occur unless the user has
      specified on the command line that it is not neccesary"""
      if opt.reuse_token:
          return
  
      seconds = grok_seconds(opt.lease)
      if not seconds:
          raise aomi.exceptions.AomiCommand("invalid lease %s" % opt.lease)
  
      renew = None
      if client.version:
          v_bits = client.version.split('.')
          if int(v_bits[0]) == 0 and \
             int(v_bits[1]) <= 8 and \
             int(v_bits[2]) <= 0:
              r_obj = {
                  'increment': seconds
              }
              r_path = "v1/sys/renew/{0}".format(creds['lease_id'])
              # Pending discussion on https://github.com/ianunruh/hvac/issues/148
              # pylint: disable=protected-access
              renew = client._post(r_path, json=r_obj).json()
  
      if not renew:
          renew = client.renew_secret(creds['lease_id'], seconds)
  
      # sometimes it takes a bit for vault to respond
      # if we are within 5s then we are fine
      if not renew or (seconds - renew['lease_duration'] >= 5):
          client.revoke_self_token()
          e_msg = 'Unable to renew with desired lease'
          raise aomi.exceptions.VaultConstraint(e_msg)