Exemple #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]
Exemple #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]
Exemple #3
0
 def GetUplinks(self):
     fauxroot.longRunningFunction(1, "getuplinks")
     log.debug("VirtualSwitch.GetUplinks() called")
     return self.uplinks
Exemple #4
0
 def AddUplink(self, link):
     fauxroot.longRunningFunction(1, "adduplink")
     log.debug("VirtualSwitch.AddUplink() called")
     self.uplinks.append(link)
Exemple #5
0
 def GetAllPortGroupNames(self):
     fauxroot.longRunningFunction(1, "getallportgroupnames")
     return PortGroupImpl.allNames
Exemple #6
0
 def AddPortGroup(self, pgrpName):
     fauxroot.longRunningFunction(1, "addportgroup")
     retval = PortGroupImpl(pgrpName)
     self.portGroup[pgrpName] = retval
     return retval
Exemple #7
0
 def GetUplinks(self):
     fauxroot.longRunningFunction(1, 'getuplinks')
     log.debug("VirtualSwitch.GetUplinks() called")
     return self.uplinks
Exemple #8
0
 def GetPnics(self):
     fauxroot.longRunningFunction(1, "getpnics")
     return VMKCTL_NET_CONFIG["pnics"]
Exemple #9
0
 def CreateVnic(vnicName, portgroupName, macAddress):
     fauxroot.longRunningFunction(1, 'createvnic')
     vnic = Vnic(vnicName, portgroupName, None)
     vnic.macAddress = macAddress  #not yet used
     return vnic
Exemple #10
0
 def SetIpConfig(self, ipConf):
     fauxroot.longRunningFunction(1, "setipconfig")
     self.ipConf = ipConf
Exemple #11
0
 def SetIpConfig(self, ipConf):
     fauxroot.longRunningFunction(1, 'setipconfig')
     self.ipConf = ipConf
Exemple #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
Exemple #13
0
 def AddVirtualSwitch(self, name, portgroupSize=32):
     fauxroot.longRunningFunction(1, 'addvirtualswitch')
     self.rep[name] = VirtualSwitch(name, portgroupSize)
     return self.rep[name]
Exemple #14
0
 def GetVirtualSwitches(self):
     fauxroot.longRunningFunction(1, 'getvirtualswitches')
     return self.rep.values()
Exemple #15
0
 def AddUplink(self, link):
     fauxroot.longRunningFunction(1, 'adduplink')
     log.debug("VirtualSwitch.AddUplink() called")
     self.uplinks.append(link)
Exemple #16
0
 def GetVirtualSwitches(self):
     fauxroot.longRunningFunction(1, "getvirtualswitches")
     return self.rep.values()
Exemple #17
0
 def CreateVnic(vnicName, portgroupName, macAddress):
     fauxroot.longRunningFunction(1, "createvnic")
     vnic = Vnic(vnicName, portgroupName, None)
     vnic.macAddress = macAddress  # not yet used
     return vnic
Exemple #18
0
 def AddVirtualSwitch(self, name, portgroupSize=32):
     fauxroot.longRunningFunction(1, "addvirtualswitch")
     self.rep[name] = VirtualSwitch(name, portgroupSize)
     return self.rep[name]
Exemple #19
0
 def GetAllPortGroupNames(self):
     fauxroot.longRunningFunction(1, 'getallportgroupnames')
     return PortGroupImpl.allNames
Exemple #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
Exemple #21
0
 def AddPortGroup(self, pgrpName):
     fauxroot.longRunningFunction(1, 'addportgroup')
     retval = PortGroupImpl(pgrpName)
     self.portGroup[pgrpName] = retval
     return retval
Exemple #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')
Exemple #23
0
 def GetPnics(self):
     fauxroot.longRunningFunction(1, 'getpnics')
     return VMKCTL_NET_CONFIG['pnics']