diff options
author | Victor Mocanu | 2017-12-19 13:02:18 +0100 |
---|---|---|
committer | Victor Mocanu | 2017-12-19 13:02:18 +0100 |
commit | 00dc84be837bba2dd7bbc28f1d8f7c6e5fc05cc8 (patch) | |
tree | e490ef6a52b64872e3d36baf3a5a5e2751c05bcc /src/main/java/org/openslx/util/vm/VboxConfig.java | |
parent | [VBox] implemented the addfloppy method (diff) | |
download | master-sync-shared-00dc84be837bba2dd7bbc28f1d8f7c6e5fc05cc8.tar.gz master-sync-shared-00dc84be837bba2dd7bbc28f1d8f7c6e5fc05cc8.tar.xz master-sync-shared-00dc84be837bba2dd7bbc28f1d8f7c6e5fc05cc8.zip |
[VBox] added new placeholder, improved the addUsb function
Diffstat (limited to 'src/main/java/org/openslx/util/vm/VboxConfig.java')
-rw-r--r-- | src/main/java/org/openslx/util/vm/VboxConfig.java | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main/java/org/openslx/util/vm/VboxConfig.java b/src/main/java/org/openslx/util/vm/VboxConfig.java index dbe9f61..70af022 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 = { "USB", "ExtraData", "Adapter", "GuestProperties", "LPT", "StorageController", "FloppyImages", "DVDImages", "AttachedDevice" }; + private static String[] blackList = { "HID", "USB", "ExtraData", "Adapter", "GuestProperties", "LPT", "StorageController", "FloppyImages", "DVDImages", "AttachedDevice" }; /** * constructor with input xml file @@ -227,10 +227,13 @@ public class VboxConfig } public void addPlaceHolders() - { + { + // placeholder for the MACAddress + changeAttribute( "Adapter", "MACAddress", "#OpenSLX_Networkcard_MACAddress_place_holder" ); + // placeholder for the machine uuid changeAttribute( "Machine", "uuid", "#OpenSLX_MUUID_place_holder" ); - + // placeholder for the location of the virtual hdd changeAttribute( "HardDisk", "location", "#OpenSLX_HDD_place_holder" ); @@ -284,8 +287,8 @@ public class VboxConfig } /** - * Function uses the findANode function to narrow down the wanted node using 2 attributes and - * their values + * Function uses the findANode function to narrow down the wanted node using 1 attribute and + * its value * * @param targetTag * @param targetAttr0 @@ -404,16 +407,21 @@ public class VboxConfig } /** - * usb 2.0 will be enabled + * USB will be enabled */ public void enableUsb() { + addNewNode( "Hardware", "USB", false ); + addNewNode( "USB", "Controllers", false ); + // for USB 1. the next 3 lines are needed, for USB 2. all six are needed Node controller1 = addNewNode( "Controllers", "Controller", true ); addAttributeToNode( controller1, "name", "OHCI" ); addAttributeToNode( controller1, "type", "OHCI" ); + /* // remove comment for USB 2. Node controller2 = addNewNode( "Controllers", "Controller", true ); addAttributeToNode( controller2, "name", "EHCI" ); addAttributeToNode( controller2, "type", "EHCI" ); + */ } /** @@ -474,7 +482,6 @@ public class VboxConfig removeNode( child.getChildNodes().item( 1 ) ); } } - child.removeAttribute( "MACAddress" ); LOGGER.warn( "possible problem while removing formating node" ); continue; } |