コード例 #1
0
ファイル: models.py プロジェクト: eprasad/vdsm
    def configure(self, **opts):
        # in a limited condition, we should not touch the nic config
        if (self.vlan and netinfo.operstate(self.name) == netinfo.OPERSTATE_UP
                and netinfo.ifaceUsed(self.name)
                and self.mtu <= netinfo.getMtu(self.name)):
            return

        self.configurator.configureNic(self, **opts)
コード例 #2
0
ファイル: models.py プロジェクト: kripper/vdsm
    def configure(self, **opts):
        # in a limited condition, we should not touch the nic config
        if (self.vlan and
                netinfo.operstate(self.name) == netinfo.OPERSTATE_UP and
                netinfo.ifaceUsed(self.name) and
                self.mtu <= netinfo.getMtu(self.name)):
            return

        self.configurator.configureNic(self, **opts)
コード例 #3
0
ファイル: models.py プロジェクト: eprasad/vdsm
    def configure(self, **opts):
        # When the bond is up and we are not changing the configuration that
        # is already applied in any way, we can skip the configuring.
        if (self.vlan and self.name in netinfo.bondings()
                and netinfo.operstate(self.name) == netinfo.OPERSTATE_UP
                and netinfo.ifaceUsed(self.name)
                and self.mtu <= netinfo.getMtu(self.name)
                and self.areOptionsApplied()
                and frozenset(slave.name
                              for slave in self.slaves) == frozenset(
                                  netinfo.slaves(self.name))):
            return

        self.configurator.configureBond(self, **opts)
コード例 #4
0
ファイル: netmodels.py プロジェクト: doronunu/vdsm
    def configure(self, **opts):
        # When the bond is up and we are not changing the configuration that
        # is already applied in any way, we can skip the configuring.
        if (self.vlan and
            self.name in netinfo.bondings() and
            netinfo.operstate(self.name) == netinfo.OPERSTATE_UP and
            netinfo.NetInfo().ifaceUsers(self.name) and
            self.mtu <= netinfo.getMtu(self.name) and
            self.areOptionsApplied() and
            frozenset(slave.name for slave in self.slaves) ==
                frozenset(netinfo.slaves(self.name))):
                return

        self.configurator.configureBond(self, **opts)