Example #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})
Example #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} )
Example #3
0
    def __init__(self, controlState, xml):
        controlState.displayHeaderBar = True 
        controlState.windowTitle = "ESX Storage Device"
        controlState.windowText = "Select a location to install ESX"
        controlState.windowIcon = "drive.png"

        self.xml = xml

        self.controlState = controlState

        self.view = xml.get_widget("EsxlocationView")
        self.scrolled = xml.get_widget("EsxlocationScrolled")

        storage_widgets.setupStorageView(self.view)

        # only repopulate the esxlocation if we need to
        if userchoices.getResetEsxLocation():
            model = \
                storage_widgets.populateStorageModel(self.view, self.scrolled,
                                                     devices.DiskSet(),
                                                     vmfsSupport=False)
            storage_widgets.findFirstSelectableRow(model,
                                                   self.view,
                                                   SUPPORTED_DISK_ENTRY)

        connectSignalHandlerByDict(self, EsxLocationWindow, self.xml,
          { ('EsxlocationDetailsButton', 'clicked'): 'showDetails',
          })
Example #4
0
    def __init__(self, controlState, xml):
        controlState.displayHeaderBar = True
        controlState.windowTitle = "ESX Storage Device"
        controlState.windowText = "Select a location to install ESX"
        controlState.windowIcon = "drive.png"

        self.xml = xml

        self.controlState = controlState

        self.view = xml.get_widget("EsxlocationView")
        self.scrolled = xml.get_widget("EsxlocationScrolled")

        storage_widgets.setupStorageView(self.view)

        # only repopulate the esxlocation if we need to
        if userchoices.getResetEsxLocation():
            model = \
                storage_widgets.populateStorageModel(self.view, self.scrolled,
                                                     devices.DiskSet(),
                                                     vmfsSupport=False)
            storage_widgets.findFirstSelectableRow(model, self.view,
                                                   SUPPORTED_DISK_ENTRY)

        connectSignalHandlerByDict(
            self, EsxLocationWindow, self.xml, {
                ('EsxlocationDetailsButton', 'clicked'): 'showDetails',
            })
Example #5
0
    def __init__(self, controlState, xml):
        controlState.displayHeaderBar = True
        controlState.windowIcon = 'datastore.png'
        controlState.windowTitle = "Datastore"
        controlState.windowText = "Specify a datastore for ESX"

        self.xml = xml

        self.diskSet = devices.DiskSet()
        self.datastoreSet = datastore.DatastoreSet()

        self.datastoreExistTable = xml.get_widget("DatastoreexistingTable")
        self.datastoreCreateTable = xml.get_widget("DatastorecreateTable")

        connectSignalHandlerByDict(
            self, DataStoreWindow, self.xml, {
                ('DatastoredeviceButton', 'clicked'): 'createNewDatastore',
                ('DatastorepartitionButton', 'clicked'): 'selectDatastore',
                ('DatastorecreateRadioButton', 'toggled'):
                'toggleDatastoreChoice',
                ('DatastoreCheckButton', 'toggled'): 'toggleSameDevice',
            })

        self.defaultDeviceName = userchoices.getEsxPhysicalDevice()

        # set up the aux. helper windows
        self.createDataStoreWindow = \
            CreateDataStoreWindow(self.xml, self.diskSet, self)
        self.selectDataStoreWindow = \
            SelectDataStoreWindow(self.xml, self.datastoreSet, self)

        # find the existing vmdk size that we're going to remove
        vmdkPath = userchoices.getExistingVmdkLocation().get('vmdkLocation')
        self.vmdkSize = devices.runtimeActionFindExistingVmdkSize(vmdkPath)

        self.preserveVmfs = bool(userchoices.getPartitionMountRequests())

        if userchoices.getResetEsxLocation():
            self.setup()
            userchoices.setResetEsxLocation(False)
Example #6
0
    def __init__(self, controlState, xml):
        controlState.displayHeaderBar = True
        controlState.windowIcon = 'datastore.png'
        controlState.windowTitle = "Datastore"
        controlState.windowText = "Specify a datastore for ESX"

        self.xml = xml

        self.diskSet = devices.DiskSet()
        self.datastoreSet = datastore.DatastoreSet()

        self.datastoreExistTable = xml.get_widget("DatastoreexistingTable")
        self.datastoreCreateTable = xml.get_widget("DatastorecreateTable")

        connectSignalHandlerByDict(self, DataStoreWindow, self.xml,
          { ('DatastoredeviceButton', 'clicked'): 'createNewDatastore',
            ('DatastorepartitionButton', 'clicked'): 'selectDatastore',
            ('DatastorecreateRadioButton', 'toggled'): 'toggleDatastoreChoice',
            ('DatastoreCheckButton', 'toggled'): 'toggleSameDevice',
          })

        self.defaultDeviceName = userchoices.getEsxPhysicalDevice()

        # set up the aux. helper windows
        self.createDataStoreWindow = \
            CreateDataStoreWindow(self.xml, self.diskSet, self)
        self.selectDataStoreWindow = \
            SelectDataStoreWindow(self.xml, self.datastoreSet, self)

        # find the existing vmdk size that we're going to remove
        vmdkPath = userchoices.getExistingVmdkLocation().get('vmdkLocation')
        self.vmdkSize = devices.runtimeActionFindExistingVmdkSize(vmdkPath)

        self.preserveVmfs = bool(userchoices.getPartitionMountRequests())

        if userchoices.getResetEsxLocation():
            self.setup()
            userchoices.setResetEsxLocation(False)