def check_connection(self, force=False):
        if not self.connection_done or force:
            try:
                # force a connection to the server
                self.connection_done = self.nova_client.list_ports()
            except Exception as e:
                utils.critical("Cannot connect to neutron: %s\n" % e)
dataset/ETHPy150Open openstack/monitoring-for-openstack/oschecks/neutron.py/Novautils.check_connection/original