'Tell the virtualization driver to refresh security rules for
an instance.
Passes straight through to the virtualization driver.
Synchronize the call because we may still be in the middle of
creating the instance.'

@object_compat
@wrap_exception()
def refresh_instance_security_rules(self, context, instance):

    @utils.synchronized(instance.uuid)
    def _sync_refresh():
        try:
            return self.driver.refresh_instance_security_rules(instance)
        except NotImplementedError:
            LOG.debug('Hypervisor    driver    does    not    support    security    groups.', instance=instance)
    return _sync_refresh()
