'Call an Ironic client method and retry on stale token.
:param method: Name of the client method to call as a string.
:param args: Client method arguments.
:param kwargs: Client method keyword arguments.
:param retry_on_conflict: Boolean value. Whether the request should be
retried in case of a conflict error
(HTTP 409) or not. If retry_on_conflict is
False the cached instance of the client
won\'t be used. Defaults to True.'

def call(self, method, *args, **kwargs):

    retry_on_conflict = kwargs.pop('retry_on_conflict', True)
    for attempt in range(2):
        client = self._get_client(retry_on_conflict=retry_on_conflict)
        try:
            return self._multi_getattr(client, method)(*args, **kwargs)
        except ironic.exc.Unauthorized:
            if (not attempt):
                self._invalidate_cached_client()
                LOG.debug('The    Ironic    client    became    unauthorized.    Will    attempt    to    reauthorize    and    try    again.')
            else:
                raise
