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