første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.vm.spec.config.device / createVirtualScsiControllerConfigSpec.action.xml
CommitLineData
d8fdd35b
SA
1<?xml version="1.0" encoding="UTF-8"?>
2<dunes-script-module name="createVirtualScsiControllerConfigSpec" result-type="Any" api-version="3.1.0" id="35a5af26-2afb-484e-a107-b2cbcd8b3984" version="0.2.0" allowed-operations="fv">
3 <description>
4Create a new VimVirtualDeviceConfigSpec for a VimVirtualSCSIController
5The VirtualSCSIController data object type represents a SCSI controller in a virtual machine.
6 </description>
7
8 <param n="type" t="string">Controller type ("LSI" ,"PARA","SAS"or "BUS")</param>
9
10 <script encoded="false">
11// Create SCSI controller
12var controller = null;
13if ( type != null &amp;&amp; "LSI".equalsIgnoreCase( type.toUpperCase() ) == true ) {
14 controller = new VcVirtualLsiLogicController();
15}else if(type != null &amp;&amp; "PARA".equalsIgnoreCase( type.toUpperCase() ) == true){
16 controller = new VcParaVirtualSCSIController();
17}else if(type != null &amp;&amp; "SAS".equalsIgnoreCase( type.toUpperCase() ) == true){
18 controller = new VcVirtualLsiLogicSASController();
19}
20else {
21 controller = new VcVirtualBusLogicController();
22}
23controller.key = 0;
24controller.device = new Array(0);
25controller.busNumber = 0;
26controller.sharedBus = VcVirtualSCSISharing.noSharing;
27// Create SCSI controller ConfigSpec
28var deviceConfigSpec = new VcVirtualDeviceConfigSpec();
29deviceConfigSpec.device = controller;
30deviceConfigSpec.operation = VcVirtualDeviceConfigSpecOperation.add;
31
32return deviceConfigSpec;
33 </script>
34</dunes-script-module>