Exemple #1
0
    def updateDataBridge(self, interface):
        with MutexStore.getObjectLock(self.getLockIdentifier()):
            if self.networkInterfaces.filter(id=interface.id).count() != 1:
                raise Exception(
                    "Can not update bridge interface because it does not exist or id is duplicated"
                )

            NetworkInterface.updateServerDataBridge(interface.id,
                                                    interface.getName(),
                                                    interface.getMacStr(),
                                                    interface.getSwitchID(),
                                                    interface.getPort())