Ejemplo n.º 1
0
    def bldStorDisplayList(self):
        " build displayable storage list"
        # only repopulate esxlocation if we need to
        if userchoices.getResetEsxLocation():
            self.storList = \
                storage_utils.getStorageList(devices.DiskSet(),
                                             vmfsSupport=(self.partMode=="basic"),
                                             esxAndCos=(self.partMode=="basic"))

        # build storage list
        storListText = []

        storEnumStr = "%2d) %-51s %3s %4s %11s"
        storEnumPath = "        %s"
        storListText.append(diskHeaderText)
        for num, storLine in enumerate(self.storList):
            deviceModel, lunid, disksize, entry, pathString, targetid = storLine
            storListText.append(
                storEnumStr %
                (num + 1, deviceModel, lunid, targetid, disksize))
            for path in pathString:
                tempEnumPath = storEnumPath % path
                while tempEnumPath:
                    storListText.append(tempEnumPath[:80])
                    tempEnumPath = tempEnumPath[80:]

        self.setScrollEnv(storListText, SCROLL_LIMIT)
        self.setSubstepEnv({'next': self.scrollDisplay})
Ejemplo n.º 2
0
    def bldStorDisplayList(self):
        " build displayable storage list"
        # only repopulate esxlocation if we need to
        if userchoices.getResetEsxLocation():
            self.storList = \
                storage_utils.getStorageList(devices.DiskSet(),
                                             vmfsSupport=(self.partMode=="basic"),
                                             esxAndCos=(self.partMode=="basic"))

        # build storage list
        storListText = []

        storEnumStr = "%2d) %-51s %3s %4s %11s"
        storEnumPath = "        %s"
        storListText.append(diskHeaderText)
        for num, storLine in enumerate(self.storList):
            deviceModel, lunid, disksize, entry, pathString, targetid = storLine
            storListText.append(storEnumStr %
                (num+1, deviceModel, lunid, targetid, disksize) )
            for path in pathString:
                tempEnumPath = storEnumPath % path
                while tempEnumPath:
                    storListText.append(tempEnumPath[:80])
                    tempEnumPath = tempEnumPath[80:]

        self.setScrollEnv(storListText, SCROLL_LIMIT)
        self.setSubstepEnv( {'next': self.scrollDisplay} )
Ejemplo n.º 3
0
    def __init__(self, partMode="basic"):
        super(EsxLocationWindow, self).__init__()
        self.storList = \
            storage_utils.getStorageList(devices.DiskSet(),
                                         vmfsSupport=(partMode=="basic"),
                                         esxAndCos=(partMode=="basic"))
        self.partMode = partMode  # basic or advanced
        self.driveName = None

        self.start = self.bldStorDisplayList
        self.substep = self.start
        self.scrollable = None
Ejemplo n.º 4
0
    def __init__(self, partMode="basic"):
        super(EsxLocationWindow, self).__init__()
        self.storList = \
            storage_utils.getStorageList(devices.DiskSet(),
                                         vmfsSupport=(partMode=="basic"),
                                         esxAndCos=(partMode=="basic"))
        self.partMode = partMode    # basic or advanced
        self.driveName = None

        self.start = self.bldStorDisplayList
        self.substep = self.start
        self.scrollable = None
Ejemplo n.º 5
0
    def __init__(self, parent, skipEsxDevice=True):
        """Initialize using parent's environment.
        Generates self.storDevList - list of allowable storage devices.
        """
        super(ChooseDataStoreDevice, self).__init__()
        self.substep = self.start = self.showDevices
        self.scrollable = None

        self.parent = parent
        self.selectedDevice = None

        if skipEsxDevice:
            allowedDiskSet = pruneDiskSet(devices.DiskSet(),
                                          [self.parent.esxDeviceName])
        else:
            allowedDiskSet = devices.DiskSet()
        self.storDevList = storage_utils.getStorageList(
            allowedDiskSet, esxAndCos=not skipEsxDevice)
Ejemplo n.º 6
0
    def __init__(self, parent, skipEsxDevice=True):
        """Initialize using parent's environment.
        Generates self.storDevList - list of allowable storage devices.
        """
        super(ChooseDataStoreDevice, self).__init__()
        self.substep = self.start = self.showDevices
        self.scrollable = None

        self.parent = parent
        self.selectedDevice = None

        if skipEsxDevice:
            allowedDiskSet = pruneDiskSet(devices.DiskSet(),
                [self.parent.esxDeviceName])
        else:
            allowedDiskSet = devices.DiskSet()
        self.storDevList = storage_utils.getStorageList(allowedDiskSet,
                                                        esxAndCos=not skipEsxDevice)