første xml update
[virt-orchestrator.git] / vFLOWER / content / Actions / com.vmware.library.vc.vm.spec.nic / getCustomizationAdapterMapping.action.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <dunes-script-module name="getCustomizationAdapterMapping" result-type="Any" api-version="3.1.0" id="6ff3c370-0be5-4220-b0fa-a30589c25da7" version="0.2.0" allowed-operations="fv">
3     <description>Define Data object type to associate a virtual network adapter with its IP settings.</description>
4
5     <param n="adapter" t="Any">VimCustomizationIPSettings: The IP settings for the associated virtual network adapter.</param>
6
7     <param n="macAddress" t="string">[Optional] The MAC address of a network adapter being customized. If it is not included, the customization process maps the settings from the virtual machine's network adapters, in PCI slot order.</param>
8
9     <script encoded="false">
10 try {
11         checkParams();
12         var mapping = new VcCustomizationAdapterMapping();
13         mapping.adapter = adapter;
14         if (macAddress != null &amp;&amp; macAddress != "")
15                 mapping.macAddress = macAddress;
16         return mapping;
17 }
18 catch (ex) {
19         throw "Unable to create VcCustomizationAdapterMapping: " + ex;
20 }
21
22 function checkParams() {
23         if (adapter == null) throw "adapter cannot be null";
24         if ((adapter instanceof VcCustomizationIPSettings) == false) throw "adapter must be of type VcCustomizationIPSettings";
25 }
26     </script>
27 </dunes-script-module>