summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/util/vm/VmMetaData.java
diff options
context:
space:
mode:
authorVictor Mocanu2017-08-08 12:49:01 +0200
committerVictor Mocanu2017-08-08 12:49:01 +0200
commit9318d3be9bc34a1550f9c370d51e1e3b68e953a5 (patch)
tree31e0b8f86aae1a53dada71d5eeb16c8c56cd9a1c /src/main/java/org/openslx/util/vm/VmMetaData.java
parent[VBox] added handling for vdi files (diff)
downloadmaster-sync-shared-9318d3be9bc34a1550f9c370d51e1e3b68e953a5.tar.gz
master-sync-shared-9318d3be9bc34a1550f9c370d51e1e3b68e953a5.tar.xz
master-sync-shared-9318d3be9bc34a1550f9c370d51e1e3b68e953a5.zip
[VBox] changed and implemented the functionality of VboxConfig s.t. the process of reading a .vbox
file works and an config object is created
Diffstat (limited to 'src/main/java/org/openslx/util/vm/VmMetaData.java')
-rw-r--r--src/main/java/org/openslx/util/vm/VmMetaData.java39
1 files changed, 9 insertions, 30 deletions
diff --git a/src/main/java/org/openslx/util/vm/VmMetaData.java b/src/main/java/org/openslx/util/vm/VmMetaData.java
index b9c21da..f1315d3 100644
--- a/src/main/java/org/openslx/util/vm/VmMetaData.java
+++ b/src/main/java/org/openslx/util/vm/VmMetaData.java
@@ -10,6 +10,7 @@ import java.util.Map.Entry;
import javax.swing.JOptionPane;
+import org.apache.log4j.Logger;
import org.openslx.bwlp.thrift.iface.OperatingSystem;
import org.openslx.bwlp.thrift.iface.Virtualizer;
@@ -19,6 +20,7 @@ import org.openslx.bwlp.thrift.iface.Virtualizer;
*/
public abstract class VmMetaData
{
+ private static final Logger LOGGER = Logger.getLogger( VmMetaData.class );
/*
* Helper types
*/
@@ -55,7 +57,6 @@ public abstract class VmMetaData
private OperatingSystem os = null;
protected String displayName = null;
-
/*
* Guettas
*/
@@ -134,9 +135,9 @@ public abstract class VmMetaData
}
}
- if(!x) {
- System.out.println( "os with " + virtId + " " + virtOsId + " is not in list");
- }
+ /*if(!x) {
+ //LOGGER.debug( "os with " + virtId + " " + virtOsId + " is not in list");
+ }*/
this.os = lazyMatch;
}
@@ -152,45 +153,23 @@ public abstract class VmMetaData
public static VmMetaData getInstance(List<OperatingSystem> osList, File file) throws IOException {
-
- // throw new IOException();
-
- // TODO file object check nach "Pattern"
- // TODO make it genericsher
-
- // unknown file > try to init vmware, vbox, ... until one works
-
-
-
-
-
- // String fileName = file.getName();
-
+
VmMetaData meta = null;
try {
meta = new VmwareMetaData(osList, file);
} catch ( UnsupportedVirtualizerFormatException e ) {
- // TODO Auto-generated catch block
- // e.printStackTrace();
+ LOGGER.debug( "datei war nicht .vmx; versuche mit VBox");
try {
meta = new VboxMetaData(osList, file);
}
catch (UnsupportedVirtualizerFormatException ex) {
- // TODO: handle exception
- ex.printStackTrace();
+ LOGGER.debug( "datei war nicht .vbox; unterbrochen!" , ex);
+ // TODO ok so or throw new IOException?
}
}
-
if (meta != null) {
return meta;
}
-
-
-
- /*if (meta != null) {
- return meta;
- }*/
-
return null;
}
}