'Check Extended Server Attributes presence
Find out whether the Extended Server Attributes extension is activated
in Nova or not. Cache the result to query Nova only once.'

def _nova_has_extended_server_attributes(self, context):

    if (not hasattr(self, '_nova_ext_srv_attr')):
        self._nova_ext_srv_attr = nova.API().has_extension(context, 'ExtendedServerAttributes', timeout=REQUESTS_TIMEOUT)
    return self._nova_ext_srv_attr
