예제 #1
0
파일: vmkctl.py 프로젝트: vmware/weasel
 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
파일: vmkctl.py 프로젝트: vmware/weasel
 def GetUplinks(self):
     fauxroot.longRunningFunction(1, "getuplinks")
     log.debug("VirtualSwitch.GetUplinks() called")
     return self.uplinks
예제 #4
0
파일: vmkctl.py 프로젝트: vmware/weasel
 def AddUplink(self, link):
     fauxroot.longRunningFunction(1, "adduplink")
     log.debug("VirtualSwitch.AddUplink() called")
     self.uplinks.append(link)
예제 #5
0
파일: vmkctl.py 프로젝트: vmware/weasel
 def GetAllPortGroupNames(self):
     fauxroot.longRunningFunction(1, "getallportgroupnames")
     return PortGroupImpl.allNames
예제 #6
0
파일: vmkctl.py 프로젝트: vmware/weasel
 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
파일: vmkctl.py 프로젝트: vmware/weasel
 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
파일: vmkctl.py 프로젝트: vmware/weasel
 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
파일: vmkctl.py 프로젝트: vmware/weasel
 def GetVirtualSwitches(self):
     fauxroot.longRunningFunction(1, "getvirtualswitches")
     return self.rep.values()
예제 #17
0
파일: vmkctl.py 프로젝트: vmware/weasel
 def CreateVnic(vnicName, portgroupName, macAddress):
     fauxroot.longRunningFunction(1, "createvnic")
     vnic = Vnic(vnicName, portgroupName, None)
     vnic.macAddress = macAddress  # not yet used
     return vnic
예제 #18
0
파일: vmkctl.py 프로젝트: vmware/weasel
 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
파일: vmkctl.py 프로젝트: vmware/weasel
 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']