def shutdown(self): """ Control network shutdown. :return: nothing """ if self.serverintf is not None: try: utils.check_cmd([ constants.BRCTL_BIN, "delif", self.brname, self.serverintf ]) except CoreCommandError: logging.exception( "error deleting server interface %s from bridge %s", self.serverintf, self.brname) if self.updown_script is not None: try: logging.info("interface %s updown script (%s shutdown) called", self.brname, self.updown_script) utils.check_cmd([self.updown_script, self.brname, "shutdown"]) except CoreCommandError: logging.exception("error issuing shutdown script shutdown") LxBrNet.shutdown(self)
def shutdown(self): """ Control network shutdown. :return: nothing """ if self.serverintf is not None: try: subprocess.check_call([constants.BRCTL_BIN, "delif", self.brname, self.serverintf]) except subprocess.CalledProcessError: logger.exception("Error deleting server interface %s to controlnet bridge %s", self.serverintf, self.brname) if self.updown_script is not None: logger.info("interface %s updown script (%s shutdown) called" % (self.brname, self.updown_script)) subprocess.check_call([self.updown_script, self.brname, "shutdown"]) LxBrNet.shutdown(self)
def shutdown(self): """ Control network shutdown. :return: nothing """ if self.serverintf is not None: try: utils.check_cmd([constants.BRCTL_BIN, "delif", self.brname, self.serverintf]) except CoreCommandError: logger.exception("error deleting server interface %s from bridge %s", self.serverintf, self.brname) if self.updown_script is not None: try: logger.info("interface %s updown script (%s shutdown) called", self.brname, self.updown_script) utils.check_cmd([self.updown_script, self.brname, "shutdown"]) except CoreCommandError: logger.exception("error issuing shutdown script shutdown") LxBrNet.shutdown(self)