summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Schwär2020-10-29 06:06:50 +0100
committerStephan Schwär2020-10-29 06:06:50 +0100
commit1eac1c9cdb5d684e21694138ca26157bda6d2494 (patch)
tree9d2fbc39c35362916719e5d2ea9ebe6da74fa7f0
parentFix lowercase issue in vmx files being flagged as invalid (diff)
downloadmaster-sync-shared-1eac1c9cdb5d684e21694138ca26157bda6d2494.tar.gz
master-sync-shared-1eac1c9cdb5d684e21694138ca26157bda6d2494.tar.xz
master-sync-shared-1eac1c9cdb5d684e21694138ca26157bda6d2494.zip
Cleanup debug code
-rw-r--r--src/main/java/org/openslx/util/vm/OvfConfig.java16
-rw-r--r--src/main/java/org/openslx/util/vm/OvfMetaData.java12
-rw-r--r--src/main/java/org/openslx/util/vm/VmMetaData.java2
3 files changed, 6 insertions, 24 deletions
diff --git a/src/main/java/org/openslx/util/vm/OvfConfig.java b/src/main/java/org/openslx/util/vm/OvfConfig.java
index a7a5c75..e48caa8 100644
--- a/src/main/java/org/openslx/util/vm/OvfConfig.java
+++ b/src/main/java/org/openslx/util/vm/OvfConfig.java
@@ -21,9 +21,9 @@ import org.w3c.dom.Document;
import org.xml.sax.SAXException;
/**
- * Class handling the parsing of a .ovf machine description file
- * For now only a dummy for conversion and will be replaced in
- * the image upload flow after converting the ovf to vmx.
+ * Class handling the parsing of a .ovf machine description file For now only a
+ * dummy for conversion and will be replaced in the image upload flow after
+ * converting the ovf to vmx.
*/
public class OvfConfig {
private static final Logger LOGGER = Logger.getLogger(OvfConfig.class);
@@ -36,13 +36,11 @@ public class OvfConfig {
private Document doc = null;
public OvfConfig(File file) throws IOException, UnsupportedVirtualizerFormatException {
- LOGGER.debug("Entering OvfConfig class creation");
doc = XmlHelper.parseDocumentFromStream(new FileInputStream(file));
doc = XmlHelper.removeFormattingNodes(doc);
if (doc == null)
throw new UnsupportedVirtualizerFormatException(
"Could not create DOM from given ovf machine configuration file!");
- LOGGER.debug("DOM creation worked");
init();
}
@@ -53,17 +51,9 @@ public class OvfConfig {
* @throws UnsupportedVirtualizerFormatException
*/
private void init() throws UnsupportedVirtualizerFormatException {
- LOGGER.debug("Entering OvfConfig init");
if (Util.isEmptyString(getDisplayName())) {
throw new UnsupportedVirtualizerFormatException("Machine doesn't have a name");
}
- LOGGER.debug(getDisplayName());
- // try {
- // setHdds();
- // } catch ( XPathExpressionException e ) {
- // LOGGER.debug( "Could not initialize VBoxConfig", e );
- // return;
- // }
}
/**
diff --git a/src/main/java/org/openslx/util/vm/OvfMetaData.java b/src/main/java/org/openslx/util/vm/OvfMetaData.java
index e331184..4647cab 100644
--- a/src/main/java/org/openslx/util/vm/OvfMetaData.java
+++ b/src/main/java/org/openslx/util/vm/OvfMetaData.java
@@ -21,8 +21,8 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
/**
- * Class handling the metadata of ovf images. Only needed
- * until the ovf has been converted into a vmx.
+ * Class handling the metadata of ovf images. Only needed until the ovf has been
+ * converted into a vmx.
*/
public class OvfMetaData extends VmMetaData {
@@ -33,21 +33,13 @@ public class OvfMetaData extends VmMetaData {
public OvfMetaData(List<OperatingSystem> osList, File file)
throws IOException, UnsupportedVirtualizerFormatException {
super(osList);
- LOGGER.debug("Constructor worked");
this.config = new OvfConfig(file);
- LOGGER.debug("Creating config worked");
init();
- LOGGER.debug("Init worked");
}
private void init() {
registerVirtualHW();
displayName = config.getDisplayName();
- // setOs( config.getOsName() );
- // this.isMachineSnapshot = config.isMachineSnapshot();
- // for ( HardDisk hardDisk : config.getHdds() ) {
- // hdds.add( hardDisk );
- // }
}
@Override
diff --git a/src/main/java/org/openslx/util/vm/VmMetaData.java b/src/main/java/org/openslx/util/vm/VmMetaData.java
index e3b78c8..1b9aff9 100644
--- a/src/main/java/org/openslx/util/vm/VmMetaData.java
+++ b/src/main/java/org/openslx/util/vm/VmMetaData.java
@@ -315,7 +315,7 @@ public abstract class VmMetaData<T, U, V, W, X>
try {
return new OvfMetaData( osList, file );
} catch ( Exception e ) {
- LOGGER.info( "Not an ovf file", e );
+ LOGGER.info( "Not an OVF file", e );
}
try {
// TODO This will work for each file because simple read as byte array