summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Mocanu2017-11-21 16:51:21 +0100
committerVictor Mocanu2017-11-21 16:51:21 +0100
commit5844021bd5ab4377b59cacd26ac4c277888d2a70 (patch)
tree269958cb0332c79404e1e82294f8854b5d96f13d
parent[VBox] small change for test (diff)
downloadmaster-sync-shared-5844021bd5ab4377b59cacd26ac4c277888d2a70.tar.gz
master-sync-shared-5844021bd5ab4377b59cacd26ac4c277888d2a70.tar.xz
master-sync-shared-5844021bd5ab4377b59cacd26ac4c277888d2a70.zip
[VBox] added USB to the blacklist
-rw-r--r--src/main/java/org/openslx/util/vm/VboxConfig.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/org/openslx/util/vm/VboxConfig.java b/src/main/java/org/openslx/util/vm/VboxConfig.java
index e775cd0..94211d0 100644
--- a/src/main/java/org/openslx/util/vm/VboxConfig.java
+++ b/src/main/java/org/openslx/util/vm/VboxConfig.java
@@ -50,7 +50,7 @@ public class VboxConfig
private ArrayList<HardDisk> hddsArray = new ArrayList<HardDisk>();
// a black list of sorts of tags that need to be removed from the .vbox file
- private static String[] blackList = { "ExtraData", "Adapter", "GuestProperties", "LPT", "StorageController", "FloppyImages", "DVDImages", "AttachedDevice" };
+ private static String[] blackList = { "USB", "ExtraData", "Adapter", "GuestProperties", "LPT", "StorageController", "FloppyImages", "DVDImages", "AttachedDevice" };
/**
* constructor with input xml file
@@ -399,11 +399,12 @@ public class VboxConfig
return newNode;
}
-
+
/**
- * usb 2.0 will be enabled
+ * usb 2.0 will be enabled
*/
- public void enableUsb(){
+ public void enableUsb()
+ {
Node newUsbNode = addNewNode( "Hardware", "USB", false );
Node newUsbControllers = addNewNode( "USB", "Controllers", false );
Node controller1 = addNewNode( "Controllers", "Controller", true );
@@ -413,14 +414,16 @@ public class VboxConfig
addAttributeToNode( controller2, "name", "EHCI" );
addAttributeToNode( controller2, "type", "EHCI" );
}
-
+
/**
* disable usb by removing the USB tag
*/
- public void disableUsb() {
+ public void disableUsb()
+ {
Node usb = findANode( "USB" ).item( 0 );
removeNode( usb );
}
+
// function removes a given child and the format childNode
private void removeNode( Node node )
{