Daniel Erez has uploaded a new change for review.

Change subject: webadmin: LocalStorageModel - remove commented out code
......................................................................

webadmin: LocalStorageModel - remove commented out code

Removed commented out code in ConfigureLocalStorageModel

Change-Id: I63c6b565b56c9cafcf6c50a1066e031825b24fee
Signed-off-by: Daniel Erez <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ConfigureLocalStorageModel.java
1 file changed, 0 insertions(+), 182 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/34/17134/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ConfigureLocalStorageModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ConfigureLocalStorageModel.java
index 5b0d503..b47800a 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ConfigureLocalStorageModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ConfigureLocalStorageModel.java
@@ -569,188 +569,6 @@
         setCommonName(host.getName().replace('.', '-') + "-Local"); 
//$NON-NLS-1$
 
         setDefaultNames1();
-
-        // String message = null;
-        //
-        // setCommonName(StringFormat.format("%1$s-Local", 
host.getvds_name().replace('.', '-')));
-        // storage_pool candidate = null;
-        //
-        // //Select all possible DCs
-        // VdcQueryReturnValue returnValue = 
Frontend.RunQuery(VdcQueryType.Search, new
-        // SearchParameters(StringFormat.format("DataCenter: name=%1$s", 
getCommonName() + "*"),
-        // SearchType.StoragePool));
-        //
-        // ArrayList<storage_pool> dataCenterList = new 
ArrayList<storage_pool>();
-        // ArrayList<VDSGroup> clusterList = null;
-        // if (returnValue != null && returnValue.getSucceeded() && 
returnValue.getReturnValue() != null)
-        // {
-        // dataCenterList = 
Linq.<storage_pool>Cast((ArrayList<IVdcQueryable>)returnValue.getReturnValue());
-        // }
-        // //Check if current settings suitable for local setup (in case just 
SD creation failed - re-using the same
-        // setup)
-        // boolean useCurrentSettings = false;
-        // if (host.getstorage_pool_id() != null)
-        // {
-        // storage_pool tempCandidate = 
DataProvider.GetDataCenterById(host.getstorage_pool_id());
-        // if (IsLocalDataCenterEmpty(tempCandidate))
-        // {
-        // candidate = tempCandidate;
-        // useCurrentSettings = true;
-        // }
-        // else
-        // {
-        // if (tempCandidate != null && tempCandidate.getstorage_pool_type() 
== StorageType.LOCALFS)
-        // {
-        // message = "Note: Local Storage is already configured for this Host. 
The Host belongs to " +
-        // host.getstorage_pool_name() +
-        // " with local Storage Domain. If OK is clicked - this Host will be 
moved to a new Data Center, and a new Local Storage Domain will be created. Hit 
Cancel to abort the operation.";
-        // }
-        // }
-        // }
-        //
-        // //Check if there is other DC suitable for re-use
-        // if (candidate == null)
-        // {
-        // for (storage_pool dataCenter : dataCenterList)
-        // {
-        // //Need to check if the new DC is without host.
-        // if (IsLocalDataCenterEmpty(dataCenter) && 
DataProvider.GetLocalStorageHost(dataCenter.getName()) == null)
-        // {
-        // candidate = dataCenter;
-        // break;
-        // }
-        // }
-        // }
-        // ArrayList<String> listNames = new ArrayList<String>();
-        // //In case we found a suitable candidate for re-use:
-        // if(candidate != null)
-        // {
-        // getDataCenter().setDataCenterId(candidate.getId());
-        // getDataCenter().getName().setEntity(candidate.getName());
-        // 
getDataCenter().getDescription().setEntity(candidate.getdescription());
-        // Version compVersion = candidate.getcompatibility_version();
-        // getDataCenter().getVersion().setSelectedItem(compVersion);
-        // getCluster().getVersion().setSelectedItem(compVersion);
-        // setDontCreateDataCenter(true);
-        // //If we use current settings there is no need to create cluster.
-        // if (useCurrentSettings)
-        // {
-        // getCluster().setClusterId(host.getvds_group_id().getValue());
-        // getCluster().getName().setEntity(host.getvds_group_name());
-        // VDSGroup cluster = 
DataProvider.GetClusterById(host.getvds_group_id().getValue());
-        // if(cluster != null)
-        // {
-        // getCluster().getDescription().setEntity(cluster.getdescription());
-        // ServerCpu tempVar = new ServerCpu();
-        // tempVar.setCpuName(cluster.getcpu_name());
-        // getCluster().getCPU().setSelectedItem(tempVar);
-        // }
-        // setDontCreateCluster(true);
-        // setDontChangeHostCluster(true);
-        // }
-        // //Use different cluster
-        // else
-        // {
-        // //Check the DC cluster list (for re-use)
-        // clusterList = DataProvider.GetClusterList(candidate.getId());
-        // //No clusters available - pick up new name.
-        // if(clusterList.isEmpty())
-        // {
-        // ArrayList<VDSGroup> listClusters = DataProvider.GetClusterList();
-        // listNames = new ArrayList<String>();
-        // for (VDSGroup cluster : listClusters)
-        // {
-        // listNames.add(cluster.getName());
-        // }
-        // getCluster().getName().setEntity(AvailableName(listNames));
-        // }
-        // else
-        // {
-        // //Use the DC cluster.
-        // getCluster().setClusterId(clusterList.get(0).getID());
-        // getCluster().getName().setEntity(clusterList.get(0).getname());
-        // 
getCluster().getDescription().setEntity(clusterList.get(0).getdescription());
-        // VDSGroup cluster = 
DataProvider.GetClusterById(getCluster().getClusterId().getValue());
-        // if (cluster != null)
-        // {
-        // ServerCpu tempVar2 = new ServerCpu();
-        // tempVar2.setCpuName(cluster.getcpu_name());
-        // getCluster().getCPU().setSelectedItem(tempVar2);
-        // }
-        // setDontCreateCluster(true);
-        // if 
(host.getvds_group_id().getValue().equals(getCluster().getClusterId()))
-        // {
-        // setDontChangeHostCluster(true);
-        // }
-        // }
-        // }
-        // }
-        // else
-        // {
-        // //Didn't found DC to re-use, so we select new names:
-        // listNames = new ArrayList<String>();
-        // for (storage_pool storagePool : dataCenterList)
-        // {
-        // listNames.add(storagePool.getName());
-        // }
-        // getDataCenter().getName().setEntity(AvailableName(listNames));
-        //
-        // //Choose a Data Center version corresponding to the host.
-        // if (!StringHelper.isNullOrEmpty(host.getsupported_cluster_levels()))
-        // {
-        // //The supported_cluster_levels are sorted.
-        // String[] array = host.getsupported_cluster_levels().split("[,]", 
-1);
-        // Version maxVersion = null;
-        //
-        // for (int i = 0; i < array.length; i++)
-        // {
-        // Version vdsVersion = new Version(array[i]);
-        // for (Version version : 
(List<Version>)getDataCenter().getVersion().getItems())
-        // {
-        // if (version.equals(vdsVersion) && version.compareTo(maxVersion) > 0)
-        // {
-        // maxVersion = version;
-        // }
-        // }
-        // }
-        // if (maxVersion != null)
-        // {
-        // getDataCenter().getVersion().setSelectedItem(maxVersion);
-        // getCluster().getVersion().setSelectedItem(maxVersion);
-        // }
-        // }
-        //
-        // listNames = new ArrayList<String>();
-        // if (clusterList == null)
-        // {
-        // clusterList = DataProvider.GetClusterList();
-        // }
-        //
-        // for (VDSGroup cluster : clusterList)
-        // {
-        // listNames.add(cluster.getname());
-        // }
-        // getCluster().getName().setEntity(AvailableName(listNames));
-        // }
-        //
-        // //Choose default CPU name to match host.
-        // if (host.getCpuName() != null && 
getCluster().getCPU().getSelectedItem() != null)
-        // {
-        // 
getCluster().getCPU().setSelectedItem(Linq.FirstOrDefault((List<ServerCpu>)getCluster().getCPU().getItems(),
-        // new Linq.ServerCpuPredicate(host.getCpuName().getCpuName())));
-        // }
-        //
-        // //Always choose a available storage name.
-        // ArrayList<storage_domains> listStorageDomains = 
DataProvider.GetStorageDomainList();
-        // listNames = new ArrayList<String>();
-        // for (storage_domains storageDomain : listStorageDomains)
-        // {
-        // listNames.add(storageDomain.getstorage_name());
-        // }
-        // getFormattedStorageName().setEntity(AvailableName(listNames));
-        //
-        //
-        // return message;
     }
 
     private boolean isLocalDataCenterEmpty(StoragePool dataCenter) {


-- 
To view, visit http://gerrit.ovirt.org/17134
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63c6b565b56c9cafcf6c50a1066e031825b24fee
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to