|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.adt.ovf.model.utility.ImportVMwareAction
public class ImportVMwareAction
Field Summary | |
---|---|
protected static CommonFactory |
cf
Instance of CommonFactory |
protected java.lang.String |
filename
VMX file we are importing |
protected static RasdFactory |
rf
Instance of RasdFactory |
Constructor Summary | |
---|---|
ImportVMwareAction(java.lang.String filename)
|
Method Summary | |
---|---|
protected EObject |
createAnnotationFeature(EnvelopeType envelope,
java.lang.String key,
java.lang.String value)
Creates the OVF entries specific to annotation remarks, and add to the envelope |
protected EObject |
createDisplayNameFeature(EnvelopeType envelope,
java.lang.String key,
java.lang.String value)
Creates the OVF entries specific to display Name requirements, and add to the envelope |
protected DocumentRoot |
createEnvelopeFromVMX(java.util.Map<java.lang.String,com.ibm.adt.ovf.model.utility.VmxValues> prefixNameMap)
Create the OVF Envelope model instance. |
protected EObject |
createEthernetFeature(EnvelopeType envelope,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Creates the OVF entries specific to ethernet requirements, and add to the envelope |
protected EObject |
createFloppyFeature(EnvelopeType envelope,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Creates the OVF entries specific to Floppy requirements, and add to the envelope |
protected EObject |
createIDEFeature(EnvelopeType envelope,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Creates the OVF entries specific to IDE requirements, and add to the envelope |
protected EObject |
createMemoryFeature(EnvelopeType envelope,
java.lang.String key,
java.lang.String value)
Creates the OVF entries specific to memory requirements, and add to the envelope |
protected EObject |
createParallelFeature(EnvelopeType envelope,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Creates the OVF entries specific to Parallel port requirements, and add to the envelope |
protected EObject |
createProcessorFeature(EnvelopeType envelope,
java.lang.String key,
java.lang.String value)
Creates the OVF entries specific to processor requirements, and add to the envelope |
protected EObject |
createSCSIFeature(EnvelopeType envelope,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Creates the OVF entries specific to SCSI requirements, and add to the envelope |
protected EObject |
createSerialFeature(EnvelopeType envelope,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Creates the OVF entries specific to Serial port requirements, and add to the envelope |
protected EObject |
createUSBFeature(EnvelopeType envelope,
java.lang.String key,
java.util.Map<java.lang.String,java.lang.String> values)
Creates the OVF entries specific to USB requirements, and add to the envelope |
protected AnnotationSectionType |
extractAnnotationSection(EnvelopeType envelope)
Locate or create the AnnotationSection. |
protected VirtualDiskDescType |
extractDisk(EnvelopeType envelope,
java.lang.String diskId,
java.lang.String fileRef)
Locate or create the Disk |
protected DiskSectionType |
extractDiskSection(EnvelopeType envelope)
Locate or create the DiskSection |
protected FileType |
extractFile(EnvelopeType envelope,
java.lang.String fileId,
java.lang.String fileRef)
Locate or create the File |
protected NetworkType |
extractNetwork(EnvelopeType envelope,
java.lang.String name)
Locate or create the Network |
protected NetworkSectionType |
extractNetworkSection(EnvelopeType envelope)
Locate or create the NetworkSection |
protected ReferencesType |
extractReferences(EnvelopeType envelope)
Locate or create the References |
protected VirtualHardwareSectionType |
extractVirtualHardwareSection(EnvelopeType envelope)
Locate or create the VirtualHardwareSection. |
protected VirtualSystemType |
extractVirtualSystem(EnvelopeType envelope)
Locate or create the VirtualSystem Assumes a single virtual machine appliance |
java.util.List<java.io.File> |
findVmdkFiles(java.io.File searchPath)
Find the list of VMDK files for a specified directory |
DocumentRoot |
parseVmxFile()
|
protected DocumentRoot |
parseVmxFile(java.io.InputStream inputStream)
|
protected void |
updateVMDKDisk(java.io.File vmdk,
FileType file)
Updates a |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String filename
protected static final CommonFactory cf
protected static final RasdFactory rf
Constructor Detail |
---|
public ImportVMwareAction(java.lang.String filename)
Method Detail |
---|
public DocumentRoot parseVmxFile() throws java.io.IOException, java.lang.RuntimeException, java.net.URISyntaxException
java.io.IOException
java.lang.RuntimeException
java.net.URISyntaxException
protected DocumentRoot parseVmxFile(java.io.InputStream inputStream) throws java.io.IOException, java.lang.RuntimeException, java.net.URISyntaxException
java.io.IOException
java.lang.RuntimeException
java.net.URISyntaxException
protected DocumentRoot createEnvelopeFromVMX(java.util.Map<java.lang.String,com.ibm.adt.ovf.model.utility.VmxValues> prefixNameMap) throws java.net.URISyntaxException
prefixNameMap
- a map of VMX attributes to their serialized values.
java.net.URISyntaxException
protected EObject createMemoryFeature(EnvelopeType envelope, java.lang.String key, java.lang.String value)
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. memsize)value
- the attribute value associated with the key.
protected EObject createIDEFeature(EnvelopeType envelope, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values) throws java.net.URISyntaxException
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. ide1:0)values
- the attribute value entries associated with the key.
java.net.URISyntaxException
protected EObject createFloppyFeature(EnvelopeType envelope, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values) throws java.net.URISyntaxException
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. ide1:0)values
- the attribute value entries associated with the key.
java.net.URISyntaxException
protected EObject createEthernetFeature(EnvelopeType envelope, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values)
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. ethernet0)values
- the attribute value entries associated with the key.
protected EObject createSCSIFeature(EnvelopeType envelope, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values) throws java.net.URISyntaxException
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. ide1:0)values
- the attribute value entries associated with the key.
java.net.URISyntaxException
protected EObject createParallelFeature(EnvelopeType envelope, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values) throws java.net.URISyntaxException
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. parallel0)values
- the attribute value entries associated with the key.
java.net.URISyntaxException
protected EObject createSerialFeature(EnvelopeType envelope, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values) throws java.net.URISyntaxException
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. serial0)values
- the attribute value entries associated with the key.
java.net.URISyntaxException
protected EObject createUSBFeature(EnvelopeType envelope, java.lang.String key, java.util.Map<java.lang.String,java.lang.String> values)
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. ide1:0)values
- the attribute value entries associated with the key.
protected EObject createDisplayNameFeature(EnvelopeType envelope, java.lang.String key, java.lang.String value)
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. displayname)value
- the attribute value entries associated with the key.
protected EObject createProcessorFeature(EnvelopeType envelope, java.lang.String key, java.lang.String value)
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. ide1:0)value
- the attribute value entries associated with the key.
protected EObject createAnnotationFeature(EnvelopeType envelope, java.lang.String key, java.lang.String value)
envelope
- the envelope element to add the features to.key
- the configuration key (e.g. annotation)value
- the attribute value associated with the key.
protected VirtualSystemType extractVirtualSystem(EnvelopeType envelope)
envelope
-
protected VirtualHardwareSectionType extractVirtualHardwareSection(EnvelopeType envelope)
envelope
-
protected ReferencesType extractReferences(EnvelopeType envelope)
envelope
-
protected NetworkSectionType extractNetworkSection(EnvelopeType envelope)
envelope
-
protected NetworkType extractNetwork(EnvelopeType envelope, java.lang.String name)
envelope
- name
- - the network name
protected DiskSectionType extractDiskSection(EnvelopeType envelope)
envelope
-
protected VirtualDiskDescType extractDisk(EnvelopeType envelope, java.lang.String diskId, java.lang.String fileRef) throws java.net.URISyntaxException
envelope
-
java.net.URISyntaxException
protected FileType extractFile(EnvelopeType envelope, java.lang.String fileId, java.lang.String fileRef) throws java.net.URISyntaxException
envelope
-
java.net.URISyntaxException
protected AnnotationSectionType extractAnnotationSection(EnvelopeType envelope)
envelope
-
public java.util.List<java.io.File> findVmdkFiles(java.io.File searchPath)
searchPath
- the path to search for VMDK files
protected void updateVMDKDisk(java.io.File vmdk, FileType file)
vmdk
- Actual file reference to the vmdk filefile
- OVF reference to the vmdk file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |