Package lcmc.vm.domain

Examples of lcmc.vm.domain.DiskData


        }
        final MyButton removeBtn = widgetFactory.createButton("Remove",
                                                ClusterBrowser.REMOVE_ICON_SMALL,
                                                "Remove " + targetDev);
        application.makeMiniButton(removeBtn);
        final DiskData diskData = disks.get(targetDev);
        if (diskData == null) {
            return new Object[]{targetDev, "unknown", removeBtn};
        }
        final StringBuilder target = new StringBuilder(10);
        target.append(diskData.getTargetBusType());
        target.append(" : /dev/");
        target.append(targetDev);
        if (dkti != null) {
            mDiskToInfoLock.lock();
            final DiskInfo vdi;
            try {
                vdi = diskToInfo.get(targetDev);
            } finally {
                mDiskToInfoLock.unlock();
            }
            dkti.put(target.toString(), vdi);
        }
        final MyButton targetDevLabel = widgetFactory.createButton(target.toString(), BlockDevInfo.HARDDISK_ICON_LARGE);
        targetDevLabel.setOpaque(opaque);
        final StringBuilder source = new StringBuilder(20);
        String s = diskData.getSourceDev();
        if (s == null) {
            s = diskData.getSourceFile();
        }
        if (s != null) {
            source.append(diskData.getType());
            source.append(" : ");
            source.append(s);
        }
        return new Object[]{targetDevLabel, source.toString(), removeBtn};
    }
View Full Code Here


    @Override
    void updateParameters() {
        final Map<String, DiskData> disks =
                                        getVMSVirtualDomainInfo().getDisks();
        if (disks != null) {
            final DiskData diskData = disks.get(getName());
            if (diskData != null) {
                for (final String param : getParametersFromXML()) {
                    final Value oldValue = getParamSaved(param);
                    Value value = getParamSaved(param);
                    final Widget wi = getWidget(param, null);
                    for (final Host h
                            : getVMSVirtualDomainInfo().getDefinedOnHosts()) {
                        final VmsXml vmsXml = getBrowser().getVmsXml(h);
                        if (vmsXml != null) {
                            final Value savedValue =
                                               diskData.getValue(param);
                            if (savedValue != null) {
                                value = savedValue;
                            }
                        }
                    }
View Full Code Here

TOP

Related Classes of lcmc.vm.domain.DiskData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.