Exemplo n.º 1
0
 def isHidden(self):
     """Returns True iff vdsm config hides the device."""
     if self.isVLAN():
         return anyFnmatch(self.name, self._hiddenVlans)
     elif self.isNICLike():
         return (anyFnmatch(self.name, self._hiddenNics)
                 or (self.master and _bondExists(self.master)
                     and anyFnmatch(self.master, self._hiddenBonds))
                 or (self.isVF() and self._isVFhidden()))
     elif self.isBOND():
         return anyFnmatch(self.name, self._hiddenBonds)
     elif self.isBRIDGE():
         return self.name == DUMMY_BRIDGE
     return False
Exemplo n.º 2
0
 def isHidden(self):
     """Returns True iff vdsm config hides the device."""
     if self.isVLAN():
         return anyFnmatch(self.name, self._hiddenVlans)
     elif self.isNICLike():
         return (anyFnmatch(self.name, self._hiddenNics) or
                 (self.master and _bondExists(self.master) and
                  anyFnmatch(self.master, self._hiddenBonds)) or
                 (self.isVF() and self._isVFhidden()))
     elif self.isBOND():
         return anyFnmatch(self.name, self._hiddenBonds)
     elif self.isBRIDGE():
         return self.name == DUMMY_BRIDGE
     return False
Exemplo n.º 3
0
 def isFakeNIC(self):
     """
     Returns True iff vdsm config marks the DUMMY or VETH dev to be reported
     as NIC.
     """
     if self.isDUMMY() or self.isVETH() or self.isMACVLAN():
         return anyFnmatch(self.name, self._fakeNics)
     return False
Exemplo n.º 4
0
 def isFakeNIC(self):
     """
     Returns True iff vdsm config marks the DUMMY or VETH dev to be reported
     as NIC.
     """
     if self.isDUMMY() or self.isVETH() or self.isMACVLAN():
         return anyFnmatch(self.name, self._fakeNics)
     return False
Exemplo n.º 5
0
 def testAnyFnmatch(self):
     self.assertTrue(utils.anyFnmatch('test1', ['test0', 'test1']))
Exemplo n.º 6
0
 def testAnyFnmatch(self):
     self.assertTrue(utils.anyFnmatch('test1', ['test0', 'test1']))