Пример #1
0
 def AddServiceConsoleNic(self, nextName, portgroupName, ipConf, macAddr, enableInterface):
     fauxroot.longRunningFunction(1, "addserviceconsolenic")
     vnic = Vnic(nextName, portgroupName, ipConf)
     vnic.macAddress = macAddr  # not yet used
     if enableInterface:
         vnic.Enable()
     self.nics.append(vnic)
     return self.nics[-1]
Пример #2
0
 def AddServiceConsoleNic(self, nextName, portgroupName, ipConf, macAddr,
                          enableInterface):
     fauxroot.longRunningFunction(1, 'addserviceconsolenic')
     vnic = Vnic(nextName, portgroupName, ipConf)
     vnic.macAddress = macAddr  #not yet used
     if enableInterface:
         vnic.Enable()
     self.nics.append(vnic)
     return self.nics[-1]
Пример #3
0
 def GetUplinks(self):
     fauxroot.longRunningFunction(1, "getuplinks")
     log.debug("VirtualSwitch.GetUplinks() called")
     return self.uplinks
Пример #4
0
 def AddUplink(self, link):
     fauxroot.longRunningFunction(1, "adduplink")
     log.debug("VirtualSwitch.AddUplink() called")
     self.uplinks.append(link)
Пример #5
0
 def GetAllPortGroupNames(self):
     fauxroot.longRunningFunction(1, "getallportgroupnames")
     return PortGroupImpl.allNames
Пример #6
0
 def AddPortGroup(self, pgrpName):
     fauxroot.longRunningFunction(1, "addportgroup")
     retval = PortGroupImpl(pgrpName)
     self.portGroup[pgrpName] = retval
     return retval
Пример #7
0
 def GetUplinks(self):
     fauxroot.longRunningFunction(1, 'getuplinks')
     log.debug("VirtualSwitch.GetUplinks() called")
     return self.uplinks
Пример #8
0
 def GetPnics(self):
     fauxroot.longRunningFunction(1, "getpnics")
     return VMKCTL_NET_CONFIG["pnics"]
Пример #9
0
 def CreateVnic(vnicName, portgroupName, macAddress):
     fauxroot.longRunningFunction(1, 'createvnic')
     vnic = Vnic(vnicName, portgroupName, None)
     vnic.macAddress = macAddress  #not yet used
     return vnic
Пример #10
0
 def SetIpConfig(self, ipConf):
     fauxroot.longRunningFunction(1, "setipconfig")
     self.ipConf = ipConf
Пример #11
0
 def SetIpConfig(self, ipConf):
     fauxroot.longRunningFunction(1, 'setipconfig')
     self.ipConf = ipConf
Пример #12
0
 def Enable(self):
     if self.enabled:
         raise Exception('This will cause a DHCP bug in vmkctl!')
     fauxroot.longRunningFunction(3, 'enable')
     self.enabled = True
Пример #13
0
 def AddVirtualSwitch(self, name, portgroupSize=32):
     fauxroot.longRunningFunction(1, 'addvirtualswitch')
     self.rep[name] = VirtualSwitch(name, portgroupSize)
     return self.rep[name]
Пример #14
0
 def GetVirtualSwitches(self):
     fauxroot.longRunningFunction(1, 'getvirtualswitches')
     return self.rep.values()
Пример #15
0
 def AddUplink(self, link):
     fauxroot.longRunningFunction(1, 'adduplink')
     log.debug("VirtualSwitch.AddUplink() called")
     self.uplinks.append(link)
Пример #16
0
 def GetVirtualSwitches(self):
     fauxroot.longRunningFunction(1, "getvirtualswitches")
     return self.rep.values()
Пример #17
0
 def CreateVnic(vnicName, portgroupName, macAddress):
     fauxroot.longRunningFunction(1, "createvnic")
     vnic = Vnic(vnicName, portgroupName, None)
     vnic.macAddress = macAddress  # not yet used
     return vnic
Пример #18
0
 def AddVirtualSwitch(self, name, portgroupSize=32):
     fauxroot.longRunningFunction(1, "addvirtualswitch")
     self.rep[name] = VirtualSwitch(name, portgroupSize)
     return self.rep[name]
Пример #19
0
 def GetAllPortGroupNames(self):
     fauxroot.longRunningFunction(1, 'getallportgroupnames')
     return PortGroupImpl.allNames
Пример #20
0
 def Enable(self):
     if self.enabled:
         raise Exception("This will cause a DHCP bug in vmkctl!")
     fauxroot.longRunningFunction(3, "enable")
     self.enabled = True
Пример #21
0
 def AddPortGroup(self, pgrpName):
     fauxroot.longRunningFunction(1, 'addportgroup')
     retval = PortGroupImpl(pgrpName)
     self.portGroup[pgrpName] = retval
     return retval
Пример #22
0
def extractISOChecksums(filename):
    img = StringIO('this is some fake file contents')
    checksumSize = 16
    fauxroot.longRunningFunction(1, 'brandiso.calc_md5', 10)
    digest = brandiso.calc_md5(img, 0, checksumSize)
    return (BRANDISO_WRITTEN_DIGEST, digest, 'SOME_ID')
Пример #23
0
 def GetPnics(self):
     fauxroot.longRunningFunction(1, 'getpnics')
     return VMKCTL_NET_CONFIG['pnics']