cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [06/12] git commit: updated refs/heads/master to c27c694
Date Thu, 12 Mar 2015 06:04:58 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/CommonTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/CommonTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/CommonTest.java
new file mode 100644
index 0000000..23df823
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/CommonTest.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+
+import org.junit.Test;
+
+public class CommonTest {
+    ConnectionTest con = new ConnectionTest();
+    Common cOm = new Common(con);
+    XmlTestResultTest results = new XmlTestResultTest();
+    String echo = "put";
+    String remoteUrl = "http://oracle:password@ovm-2:8899";
+
+    @Test
+    public void testGetApiVersion() throws Ovm3ResourceException {
+        con.setResult(results
+                .simpleResponseWrap("<array><data>\n<value><int>3</int></value>\n</data></array>"));
+        results.basicIntTest(cOm.getApiVersion(), 3);
+    }
+
+    @Test
+    public void testSleep() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(cOm.sleep(1));
+    }
+
+    @Test
+    public void testDispatch() throws Ovm3ResourceException {
+        con.setResult(results.getString(echo));
+        results.basicStringTest(cOm.dispatch(remoteUrl, "echo", echo), echo);
+    }
+
+    @Test
+    public void testEcho() throws Ovm3ResourceException {
+        con.setResult(results.getString(echo));
+        results.basicStringTest(cOm.echo(echo), echo);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/ConnectionTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/ConnectionTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/ConnectionTest.java
new file mode 100644
index 0000000..5faaea8
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/ConnectionTest.java
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl;
+import org.apache.xmlrpc.common.XmlRpcStreamConfig;
+import org.apache.xmlrpc.common.XmlRpcStreamRequestConfig;
+import org.apache.xmlrpc.parser.XmlRpcResponseParser;
+import org.apache.xmlrpc.util.SAXParsers;
+import org.junit.Test;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+
+/*
+ * This is a stub for XML parsing into result sets, it also contains test for
+ * Connection
+ */
+public class ConnectionTest extends Connection {
+    private final Logger LOGGER = Logger.getLogger(ConnectionTest.class);
+    XmlTestResultTest results = new XmlTestResultTest();
+    String result;
+    List<String> multiRes = new ArrayList<String>();
+    String hostIp;
+    private Map<String, String> methodResponse = new HashMap<String, String>();
+
+    public ConnectionTest() {
+    }
+
+    @Override
+    public Object callTimeoutInSec(String method, List<?> params, int timeout,
+            boolean debug) throws XmlRpcException {
+        XmlRpcStreamConfig config = new XmlRpcHttpRequestConfigImpl();
+        XmlRpcClient client = new XmlRpcClient();
+        client.setTypeFactory(new RpcTypeFactory(client));
+        XmlRpcResponseParser parser = new XmlRpcResponseParser(
+                (XmlRpcStreamRequestConfig) config, client.getTypeFactory());
+        XMLReader xr = SAXParsers.newXMLReader();
+        xr.setContentHandler(parser);
+        try {
+            String result = null;
+            if (getMethodResponse(method) != null) {
+                result = getMethodResponse(method);
+                LOGGER.debug("methodresponse call: " + method + " - " + params);
+                LOGGER.trace("methodresponse reply: " + result);
+            }
+            if (result == null && multiRes.size() >= 0) {
+                result = getResult();
+                LOGGER.debug("getresult call: " + method + " - " + params);
+                LOGGER.trace("getresult reply: " + result);
+            }
+            xr.parse(new InputSource(new StringReader(result)));
+        } catch (Exception e) {
+            throw new XmlRpcException("Exception: " + e.getMessage(), e);
+        }
+        if (parser.getErrorCode() != 0) {
+            throw new XmlRpcException("Fault received[" + parser.getErrorCode()
+                    + "]: " + parser.getErrorMessage());
+        }
+        return parser.getResult();
+    }
+
+    public void setMethodResponse(String method, String response) {
+        methodResponse.put(method, response);
+    }
+
+    public String getMethodResponse(String method) {
+        if (methodResponse.containsKey(method)) {
+            return methodResponse.get(method);
+        }
+        return null;
+    }
+
+    public void removeMethodResponse(String method) {
+        if (methodResponse.containsKey(method)) {
+            methodResponse.remove(method);
+        }
+    }
+
+    public void setResult(String res) {
+        multiRes = new ArrayList<String>();
+        multiRes.add(0, res);
+    }
+
+    public void setResult(List<String> l) {
+        multiRes = new ArrayList<String>();
+        multiRes.addAll(l);
+    }
+
+    public void setNull() {
+        multiRes = new ArrayList<String>();
+        multiRes.add(0, null);
+    }
+
+    /* result chainsing */
+    public void addResult(String e) {
+        multiRes.add(e);
+    }
+
+    public void addNull() {
+        multiRes.add(null);
+    }
+
+    public String getResult() {
+        return popResult();
+    }
+
+    public String popResult() {
+        String res = multiRes.get(0);
+        if (multiRes.size() > 1)
+            multiRes.remove(0);
+        return res;
+    }
+
+    public List<String> resultList() {
+        return multiRes;
+    }
+
+    @Test
+    public void testConnection() {
+        String host = "ovm-1";
+        String user = "admin";
+        String pass = "password";
+        Integer port = 8899;
+        List<?> emptyParams = new ArrayList<Object>();
+        Connection con = new Connection(host, port, user, pass);
+        results.basicStringTest(con.getIp(), host);
+        results.basicStringTest(con.getUserName(), user);
+        results.basicStringTest(con.getPassword(), pass);
+        results.basicIntTest(con.getPort(), port);
+        try {
+            con.callTimeoutInSec("ping", emptyParams, 1);
+            // con.call("ping", emptyParams, 1, false);
+        } catch (XmlRpcException e) {
+            // TODO Auto-generated catch block
+            System.out.println("Exception: " + e);
+        }
+        new Connection(host, user, pass);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/LinuxTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/LinuxTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/LinuxTest.java
new file mode 100644
index 0000000..4c41960
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/LinuxTest.java
@@ -0,0 +1,643 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+
+import org.junit.Test;
+
+public class LinuxTest {
+    public LinuxTest() {
+    }
+    ConnectionTest con = new ConnectionTest();
+    Linux lin = new Linux(con);
+    XmlTestResultTest results = new XmlTestResultTest();
+
+    private final String DISCOVERSERVER = "&lt;?xml version=\"1.0\" ?&gt;"
+            + "&lt;Discover_Server_Result&gt;"
+            + "&lt;Server&gt;"
+            + "&lt;Unique_Id&gt;1d:d5:e8:91:d9:d0:ed:bd:81:c2:a6:9a:b3:d1:b7:ea&lt;/Unique_Id&gt;"
+            + "&lt;Boot_Time&gt;1413834408&lt;/Boot_Time&gt;"
+            + "&lt;Date_Time&gt;"
+            + "&lt;Time_Zone&gt;Europe/Amsterdam&lt;/Time_Zone&gt;"
+            + "&lt;UTC&gt;True&lt;/UTC&gt;"
+            + "&lt;/Date_Time&gt;"
+            + "&lt;NTP&gt;"
+            + "&lt;Local_Time_Source&gt;True&lt;/Local_Time_Source&gt;"
+            + "&lt;Is_NTP_Running&gt;True&lt;/Is_NTP_Running&gt;"
+            + "&lt;/NTP&gt;"
+            + "&lt;Agent_Version&gt;3.2.1-183&lt;/Agent_Version&gt;"
+            + "&lt;RPM_Version&gt;3.2.1-183&lt;/RPM_Version&gt;"
+            + "&lt;OVM_Version&gt;3.2.1-517&lt;/OVM_Version&gt;"
+            + "&lt;CPU_Type&gt;x86_64&lt;/CPU_Type&gt;"
+            + "&lt;OS_Type&gt;Linux&lt;/OS_Type&gt;"
+            + "&lt;OS_Name&gt;Oracle VM Server&lt;/OS_Name&gt;"
+            + "&lt;OS_Major_Version&gt;5&lt;/OS_Major_Version&gt;"
+            + "&lt;OS_Minor_Version&gt;7&lt;/OS_Minor_Version&gt;"
+            + "&lt;Hypervisor_Type&gt;xen&lt;/Hypervisor_Type&gt;"
+            + "&lt;Hypervisor_Name&gt;Xen&lt;/Hypervisor_Name&gt;"
+            + "&lt;Host_Kernel_Release&gt;2.6.39-300.22.2.el5uek&lt;/Host_Kernel_Release&gt;"
+            + "&lt;Host_Kernel_Version&gt;#1 SMP Fri Jan 4 12:40:29 PST 2013&lt;/Host_Kernel_Version&gt;"
+            + "&lt;VMM&gt;"
+            + "&lt;Version&gt;"
+            + "&lt;Major&gt;4&lt;/Major&gt;"
+            + "&lt;Minor&gt;1&lt;/Minor&gt;"
+            + "&lt;Extra&gt;.3OVM&lt;/Extra&gt;"
+            + "&lt;/Version&gt;"
+            + "&lt;Compile_Information&gt;"
+            + "&lt;Compiler&gt;gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)&lt;/Compiler&gt;"
+            + "&lt;By&gt;mockbuild&lt;/By&gt;"
+            + "&lt;Domain&gt;us.oracle.com&lt;/Domain&gt;"
+            + "&lt;Date&gt;Wed Dec  5 09:11:29 PST 2012&lt;/Date&gt;"
+            + "&lt;/Compile_Information&gt;"
+            + "&lt;Capabilities&gt;xen-3.0-x86_64 xen-3.0-x86_32p&lt;/Capabilities&gt;"
+            + "&lt;/VMM&gt;"
+            + "&lt;Pool_Unique_Id&gt;f12842eb-f5ed-3fe7-8da1-eb0e17f5ede8&lt;/Pool_Unique_Id&gt;"
+            + "&lt;Manager_Unique_Id&gt;d1a749d4295041fb99854f52ea4dea97&lt;/Manager_Unique_Id&gt;"
+            + "&lt;Hostname&gt;ovm-1&lt;/Hostname&gt;"
+            + "&lt;Registered_IP&gt;192.168.1.64&lt;/Registered_IP&gt;"
+            + "&lt;Node_Number&gt;1&lt;/Node_Number&gt;"
+            + "&lt;Server_Roles&gt;xen,utility&lt;/Server_Roles&gt;"
+            + "&lt;Is_Current_Master&gt;true&lt;/Is_Current_Master&gt;"
+            + "&lt;Master_Virtual_Ip&gt;192.168.1.230&lt;/Master_Virtual_Ip&gt;"
+            + "&lt;Manager_Core_API_Version&gt;3.2.1.516&lt;/Manager_Core_API_Version&gt;"
+            + "&lt;Membership_State&gt;Pooled&lt;/Membership_State&gt;"
+            + "&lt;Cluster_State&gt;Offline&lt;/Cluster_State&gt;"
+            + "&lt;Statistic&gt;"
+            + "&lt;Interval&gt;20&lt;/Interval&gt;"
+            + "&lt;/Statistic&gt;"
+            + "&lt;Exports/&gt;"
+            + "&lt;Capabilities&gt;"
+            + "&lt;ISCSI&gt;True&lt;/ISCSI&gt;"
+            + "&lt;BOND_MODE_LINK_AGGREGATION&gt;True&lt;/BOND_MODE_LINK_AGGREGATION&gt;"
+            + "&lt;POWER_ON_WOL&gt;True&lt;/POWER_ON_WOL&gt;"
+            + "&lt;ALL_VM_CPU_OVERSUBSCRIBE&gt;True&lt;/ALL_VM_CPU_OVERSUBSCRIBE&gt;"
+            + "&lt;HVM_MAX_VNICS&gt;8&lt;/HVM_MAX_VNICS&gt;"
+            + "&lt;FIBRE_CHANNEL&gt;True&lt;/FIBRE_CHANNEL&gt;"
+            + "&lt;MAX_CONCURRENT_MIGRATION_OUT&gt;1&lt;/MAX_CONCURRENT_MIGRATION_OUT&gt;"
+            + "&lt;LOCAL_STORAGE_ELEMENT&gt;True&lt;/LOCAL_STORAGE_ELEMENT&gt;"
+            + "&lt;CLUSTERS&gt;True&lt;/CLUSTERS&gt;"
+            + "&lt;CONCURRENT_MIGRATION&gt;False&lt;/CONCURRENT_MIGRATION&gt;"
+            + "&lt;VM_MEMORY_ALIGNMENT&gt;1048576&lt;/VM_MEMORY_ALIGNMENT&gt;"
+            + "&lt;MIGRATION_SETUP&gt;False&lt;/MIGRATION_SETUP&gt;"
+            + "&lt;PER_VM_CPU_OVERSUBSCRIBE&gt;True&lt;/PER_VM_CPU_OVERSUBSCRIBE&gt;"
+            + "&lt;BOND_MODE_ACTIVE_BACKUP&gt;True&lt;/BOND_MODE_ACTIVE_BACKUP&gt;"
+            + "&lt;NFS&gt;True&lt;/NFS&gt;"
+            + "&lt;VM_VNC_CONSOLE&gt;True&lt;/VM_VNC_CONSOLE&gt;"
+            + "&lt;MTU_CONFIGURATION&gt;True&lt;/MTU_CONFIGURATION&gt;"
+            + "&lt;HIGH_AVAILABILITY&gt;True&lt;/HIGH_AVAILABILITY&gt;"
+            + "&lt;MAX_CONCURRENT_MIGRATION_IN&gt;1&lt;/MAX_CONCURRENT_MIGRATION_IN&gt;"
+            + "&lt;VM_SERIAL_CONSOLE&gt;True&lt;/VM_SERIAL_CONSOLE&gt;"
+            + "&lt;BOND_MODE_ADAPTIVE_LOAD_BALANCING&gt;True&lt;/BOND_MODE_ADAPTIVE_LOAD_BALANCING&gt;"
+            + "&lt;VM_SUSPEND&gt;True&lt;/VM_SUSPEND&gt;"
+            + "&lt;YUM_PACKAGE_MANAGEMENT&gt;True&lt;/YUM_PACKAGE_MANAGEMENT&gt;"
+            + "&lt;/Capabilities&gt;" + "&lt;/Server&gt;"
+            + "&lt;/Discover_Server_Result&gt;";
+
+    public String getDiscoverserver() {
+        return DISCOVERSERVER;
+    }
+
+    public String getDiscoverHw() {
+        return DISCOVERHW;
+    }
+
+    public String getDiscoverFs() {
+        return DISCOVERFS;
+    }
+
+    private final String DISCOVERHW = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;"
+            + "&lt;Discover_Hardware_Result&gt;"
+            + "&lt;NodeInformation&gt;"
+            + "&lt;VMM&gt;"
+            + "&lt;PhysicalInfo&gt;"
+            + "&lt;ThreadsPerCore&gt;1&lt;/ThreadsPerCore&gt;"
+            + "&lt;CoresPerSocket&gt;1&lt;/CoresPerSocket&gt;"
+            + "&lt;SocketsPerNode&gt;2&lt;/SocketsPerNode&gt;"
+            + "&lt;Nodes&gt;1&lt;/Nodes&gt;"
+            + "&lt;CPUKHz&gt;3392400&lt;/CPUKHz&gt;"
+            + "&lt;TotalPages&gt;1048476&lt;/TotalPages&gt;"
+            + "&lt;FreePages&gt;863459&lt;/FreePages&gt;"
+            + "&lt;HW_Caps&gt;"
+            + "&lt;Item_0&gt;0x0f8bf3ff&lt;/Item_0&gt;"
+            + "&lt;Item_1&gt;0x28100800&lt;/Item_1&gt;"
+            + "&lt;Item_2&gt;0x00000000&lt;/Item_2&gt;"
+            + "&lt;Item_3&gt;0x00000040&lt;/Item_3&gt;"
+            + "&lt;Item_4&gt;0xb19a2223&lt;/Item_4&gt;"
+            + "&lt;Item_5&gt;0x00000000&lt;/Item_5&gt;"
+            + "&lt;Item_6&gt;0x00000001&lt;/Item_6&gt;"
+            + "&lt;Item_7&gt;0x00000281&lt;/Item_7&gt;"
+            + "&lt;/HW_Caps&gt;"
+            + "&lt;/PhysicalInfo&gt;"
+            + "&lt;/VMM&gt;"
+            + "&lt;CPUInfo&gt;"
+            + "&lt;Proc_Info&gt;"
+            + "&lt;CPU ID=\"0\"&gt;"
+            + "&lt;vendor_id&gt;GenuineIntel&lt;/vendor_id&gt;"
+            + "&lt;cpu_family&gt;6&lt;/cpu_family&gt;"
+            + "&lt;model&gt;2&lt;/model&gt;"
+            + "&lt;model_name&gt;Intel Core i7 9xx (Nehalem Class Core i7)&lt;/model_name&gt;"
+            + "&lt;stepping&gt;3&lt;/stepping&gt;"
+            + "&lt;cache_size&gt;4096 KB&lt;/cache_size&gt;"
+            + "&lt;flags&gt;fpu de tsc msr pae mce cx8 apic mca cmov clflush mmx fxsr sse sse2 ss syscall nx lm rep_good nopl pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt f16c hypervisor lahf_lm fsgsbase erms&lt;/flags&gt;"
+            + "&lt;/CPU&gt;"
+            + "&lt;CPU ID=\"1\"&gt;"
+            + "&lt;vendor_id&gt;GenuineIntel&lt;/vendor_id&gt;"
+            + "&lt;cpu_family&gt;6&lt;/cpu_family&gt;"
+            + "&lt;model&gt;2&lt;/model&gt;"
+            + "&lt;model_name&gt;Intel Core i7 9xx (Nehalem Class Core i7)&lt;/model_name&gt;"
+            + "&lt;stepping&gt;3&lt;/stepping&gt;"
+            + "&lt;cache_size&gt;4096 KB&lt;/cache_size&gt;"
+            + "&lt;flags&gt;fpu de tsc msr pae mce cx8 apic mca cmov clflush mmx fxsr sse sse2 ss syscall nx lm rep_good nopl pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt f16c hypervisor lahf_lm fsgsbase erms&lt;/flags&gt;"
+            + "&lt;/CPU&gt;"
+            + "&lt;/Proc_Info&gt;"
+            + "&lt;/CPUInfo&gt;"
+            + "&lt;IO&gt;"
+            + "&lt;SCSI&gt;"
+            + "&lt;SCSI_Host Num=\"0\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Ahci_Host_Cap2&gt;0&lt;/Ahci_Host_Cap2&gt;"
+            + "&lt;Ahci_Host_Caps&gt;40141f05&lt;/Ahci_Host_Caps&gt;"
+            + "&lt;Ahci_Host_Version&gt;10000&lt;/Ahci_Host_Version&gt;"
+            + "&lt;Ahci_Port_Cmd&gt;1000c017&lt;/Ahci_Port_Cmd&gt;"
+            + "&lt;Can_Queue&gt;31&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Em_Message_Supported&gt;&lt;/Em_Message_Supported&gt;"
+            + "&lt;Em_Message_Type&gt;0&lt;/Em_Message_Type&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Link_Power_Management_Policy&gt;max_performance&lt;/Link_Power_Management_Policy&gt;"
+            + "&lt;Proc_Name&gt;ahci&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;168&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;1&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010601&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x2922&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;58&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;58&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ahci PCI_CLASS=10601 PCI_ID=8086:2922 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:05.0 MODALIAS=pci:v00008086d00002922sv00001AF4sd00001100bc01sc06i01&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;SCSI_Host Num=\"1\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Ahci_Host_Cap2&gt;0&lt;/Ahci_Host_Cap2&gt;"
+            + "&lt;Ahci_Host_Caps&gt;40141f05&lt;/Ahci_Host_Caps&gt;"
+            + "&lt;Ahci_Host_Version&gt;10000&lt;/Ahci_Host_Version&gt;"
+            + "&lt;Ahci_Port_Cmd&gt;10004016&lt;/Ahci_Port_Cmd&gt;"
+            + "&lt;Can_Queue&gt;31&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Em_Message_Supported&gt;&lt;/Em_Message_Supported&gt;"
+            + "&lt;Em_Message_Type&gt;0&lt;/Em_Message_Type&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Link_Power_Management_Policy&gt;max_performance&lt;/Link_Power_Management_Policy&gt;"
+            + "&lt;Proc_Name&gt;ahci&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;168&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;2&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010601&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x2922&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;58&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;58&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ahci PCI_CLASS=10601 PCI_ID=8086:2922 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:05.0 MODALIAS=pci:v00008086d00002922sv00001AF4sd00001100bc01sc06i01&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;SCSI_Host Num=\"2\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Ahci_Host_Cap2&gt;0&lt;/Ahci_Host_Cap2&gt;"
+            + "&lt;Ahci_Host_Caps&gt;40141f05&lt;/Ahci_Host_Caps&gt;"
+            + "&lt;Ahci_Host_Version&gt;10000&lt;/Ahci_Host_Version&gt;"
+            + "&lt;Ahci_Port_Cmd&gt;10004016&lt;/Ahci_Port_Cmd&gt;"
+            + "&lt;Can_Queue&gt;31&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Em_Message_Supported&gt;&lt;/Em_Message_Supported&gt;"
+            + "&lt;Em_Message_Type&gt;0&lt;/Em_Message_Type&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Link_Power_Management_Policy&gt;max_performance&lt;/Link_Power_Management_Policy&gt;"
+            + "&lt;Proc_Name&gt;ahci&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;168&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;3&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010601&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x2922&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;58&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;58&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ahci PCI_CLASS=10601 PCI_ID=8086:2922 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:05.0 MODALIAS=pci:v00008086d00002922sv00001AF4sd00001100bc01sc06i01&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;SCSI_Host Num=\"3\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Ahci_Host_Cap2&gt;0&lt;/Ahci_Host_Cap2&gt;"
+            + "&lt;Ahci_Host_Caps&gt;40141f05&lt;/Ahci_Host_Caps&gt;"
+            + "&lt;Ahci_Host_Version&gt;10000&lt;/Ahci_Host_Version&gt;"
+            + "&lt;Ahci_Port_Cmd&gt;10004016&lt;/Ahci_Port_Cmd&gt;"
+            + "&lt;Can_Queue&gt;31&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Em_Message_Supported&gt;&lt;/Em_Message_Supported&gt;"
+            + "&lt;Em_Message_Type&gt;0&lt;/Em_Message_Type&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Link_Power_Management_Policy&gt;max_performance&lt;/Link_Power_Management_Policy&gt;"
+            + "&lt;Proc_Name&gt;ahci&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;168&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;4&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010601&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x2922&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;58&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;58&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ahci PCI_CLASS=10601 PCI_ID=8086:2922 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:05.0 MODALIAS=pci:v00008086d00002922sv00001AF4sd00001100bc01sc06i01&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;SCSI_Host Num=\"4\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Ahci_Host_Cap2&gt;0&lt;/Ahci_Host_Cap2&gt;"
+            + "&lt;Ahci_Host_Caps&gt;40141f05&lt;/Ahci_Host_Caps&gt;"
+            + "&lt;Ahci_Host_Version&gt;10000&lt;/Ahci_Host_Version&gt;"
+            + "&lt;Ahci_Port_Cmd&gt;10004016&lt;/Ahci_Port_Cmd&gt;"
+            + "&lt;Can_Queue&gt;31&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Em_Message_Supported&gt;&lt;/Em_Message_Supported&gt;"
+            + "&lt;Em_Message_Type&gt;0&lt;/Em_Message_Type&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Link_Power_Management_Policy&gt;max_performance&lt;/Link_Power_Management_Policy&gt;"
+            + "&lt;Proc_Name&gt;ahci&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;168&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;5&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010601&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x2922&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;58&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;58&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ahci PCI_CLASS=10601 PCI_ID=8086:2922 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:05.0 MODALIAS=pci:v00008086d00002922sv00001AF4sd00001100bc01sc06i01&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;SCSI_Host Num=\"5\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Ahci_Host_Cap2&gt;0&lt;/Ahci_Host_Cap2&gt;"
+            + "&lt;Ahci_Host_Caps&gt;40141f05&lt;/Ahci_Host_Caps&gt;"
+            + "&lt;Ahci_Host_Version&gt;10000&lt;/Ahci_Host_Version&gt;"
+            + "&lt;Ahci_Port_Cmd&gt;10004016&lt;/Ahci_Port_Cmd&gt;"
+            + "&lt;Can_Queue&gt;31&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Em_Message_Supported&gt;&lt;/Em_Message_Supported&gt;"
+            + "&lt;Em_Message_Type&gt;0&lt;/Em_Message_Type&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Link_Power_Management_Policy&gt;max_performance&lt;/Link_Power_Management_Policy&gt;"
+            + "&lt;Proc_Name&gt;ahci&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;168&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;6&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010601&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x2922&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;58&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;58&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ahci PCI_CLASS=10601 PCI_ID=8086:2922 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:05.0 MODALIAS=pci:v00008086d00002922sv00001AF4sd00001100bc01sc06i01&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;SCSI_Host Num=\"6\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Can_Queue&gt;1&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Proc_Name&gt;ata_piix&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;128&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;7&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010180&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x7010&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;0&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ata_piix PCI_CLASS=10180 PCI_ID=8086:7010 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:01.1 MODALIAS=pci:v00008086d00007010sv00001AF4sd00001100bc01sc01i80&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;SCSI_Host Num=\"7\"&gt;"
+            + "&lt;Active_Mode&gt;Initiator&lt;/Active_Mode&gt;"
+            + "&lt;Can_Queue&gt;1&lt;/Can_Queue&gt;"
+            + "&lt;Cmd_Per_Lun&gt;1&lt;/Cmd_Per_Lun&gt;"
+            + "&lt;Host_Busy&gt;0&lt;/Host_Busy&gt;"
+            + "&lt;Proc_Name&gt;ata_piix&lt;/Proc_Name&gt;"
+            + "&lt;Prot_Capabilities&gt;0&lt;/Prot_Capabilities&gt;"
+            + "&lt;Prot_Guard_Type&gt;0&lt;/Prot_Guard_Type&gt;"
+            + "&lt;Sg_Prot_Tablesize&gt;0&lt;/Sg_Prot_Tablesize&gt;"
+            + "&lt;Sg_Tablesize&gt;128&lt;/Sg_Tablesize&gt;"
+            + "&lt;State&gt;running&lt;/State&gt;"
+            + "&lt;Supported_Mode&gt;Initiator&lt;/Supported_Mode&gt;"
+            + "&lt;Uevent&gt;&lt;/Uevent&gt;"
+            + "&lt;Unique_Id&gt;8&lt;/Unique_Id&gt;"
+            + "&lt;SysFSDev&gt;"
+            + "&lt;Broken_Parity_Status&gt;0&lt;/Broken_Parity_Status&gt;"
+            + "&lt;Class&gt;0x010180&lt;/Class&gt;"
+            + "&lt;Consistent_Dma_Mask_Bits&gt;32&lt;/Consistent_Dma_Mask_Bits&gt;"
+            + "&lt;Device&gt;0x7010&lt;/Device&gt;"
+            + "&lt;Dma_Mask_Bits&gt;32&lt;/Dma_Mask_Bits&gt;"
+            + "&lt;Enable&gt;1&lt;/Enable&gt;"
+            + "&lt;Irq&gt;0&lt;/Irq&gt;"
+            + "&lt;Local_Cpulist&gt;0-1&lt;/Local_Cpulist&gt;"
+            + "&lt;Msi_Bus&gt;&lt;/Msi_Bus&gt;"
+            + "&lt;Msi_Irqs&gt;&lt;/Msi_Irqs&gt;"
+            + "&lt;Numa_Node&gt;-1&lt;/Numa_Node&gt;"
+            + "&lt;Subsystem_Device&gt;0x1100&lt;/Subsystem_Device&gt;"
+            + "&lt;Subsystem_Vendor&gt;0x1af4&lt;/Subsystem_Vendor&gt;"
+            + "&lt;Uevent&gt;DRIVER=ata_piix PCI_CLASS=10180 PCI_ID=8086:7010 PCI_SUBSYS_ID=1AF4:1100 PCI_SLOT_NAME=0000:00:01.1 MODALIAS=pci:v00008086d00007010sv00001AF4sd00001100bc01sc01i80&lt;/Uevent&gt;"
+            + "&lt;Vendor&gt;0x8086&lt;/Vendor&gt;"
+            + "&lt;/SysFSDev&gt;"
+            + "&lt;/SCSI_Host&gt;"
+            + "&lt;ISCSI_Node&gt;"
+            + "&lt;Initiatorname&gt;iqn.1988-12.com.oracle:3b3f5e2f59cb&lt;/Initiatorname&gt;"
+            + "&lt;/ISCSI_Node&gt;"
+            + "&lt;/SCSI&gt;"
+            + "&lt;IDE&gt;"
+            + "&lt;/IDE&gt;"
+            + "&lt;/IO&gt;"
+            + "&lt;DMTF&gt;"
+            + "&lt;SMBIOS Version=\"2.4.0\"&gt;"
+            + "&lt;MaxSize&gt;48&lt;/MaxSize&gt;"
+            + "&lt;/SMBIOS&gt;"
+            + "&lt;DMI Version=\"2.4\"&gt;"
+            + "&lt;TableLength&gt;346&lt;/TableLength&gt;"
+            + "&lt;Items&gt;13&lt;/Items&gt;"
+            + "&lt;Buffer&gt;"
+            + "ABgAAAECAOgDAAgAAAAAAAAAAAQBAP//Qm9jaHMAQm9jaHMAMDEvMDEvMjAxMQAAARsAAQEC"
+            + "AAAd1eiR2dDtvYHCppqz0bfqBgAAQm9jaHMAQm9jaHMAAAMUAAMBAQAAAAMDAwIAAAAAAAAA"
+            + "Qm9jaHMAAAQgAQQBAwECIwYAAP/7iw8AAAAA0AfQB0EB////////Q1BVIDEAQm9jaHMAAAQg"
+            + "AgQBAwECIwYAAP/7iw8AAAAA0AfQB0EB////////Q1BVIDIAQm9jaHMAABAPABABAwYAAEAA"
+            + "/v8BAAAAERUAEQAQAwBAAEAAABAJAAEABwAARElNTSAwAAATDwATAAAAAP//NwAAEAEAABMP"
+            + "ARMAAEAA//9HAAAQAQAAFBMAFAAAAAD//zcAABEAEwEAAAAAFBMBFAAAQAD//0cAABEBEwEA"
+            + "AAAAIAsAIAAAAAAAAAAAAH8EAH8AAA=="
+            + "&lt;/Buffer&gt;"
+            + "&lt;/DMI&gt;"
+            + "&lt;BIOS Type=\"0\" Item=\"0\" Handle=\"0x0\"&gt;"
+            + "&lt;Vendor&gt;Bochs&lt;/Vendor&gt;"
+            + "&lt;Version&gt;Bochs&lt;/Version&gt;"
+            + "&lt;ReleaseDate&gt;01/01/2011&lt;/ReleaseDate&gt;"
+            + "&lt;/BIOS&gt;"
+            + "&lt;System Type=\"1\" Item=\"1\" Handle=\"0x100\"&gt;"
+            + "&lt;UUID&gt;1d:d5:e8:91:d9:d0:ed:bd:81:c2:a6:9a:b3:d1:b7:ea&lt;/UUID&gt;"
+            + "&lt;Manufacturer&gt;Bochs&lt;/Manufacturer&gt;"
+            + "&lt;ProductName&gt;Bochs&lt;/ProductName&gt;"
+            + "&lt;/System&gt;"
+            + "&lt;Chassis Type=\"3\" Item=\"2\" Handle=\"0x300\"&gt;"
+            + "&lt;Height&gt;0U&lt;/Height&gt;"
+            + "&lt;Manufacturer&gt;Bochs&lt;/Manufacturer&gt;"
+            + "&lt;/Chassis&gt;"
+            + "&lt;/DMTF&gt;"
+            + "&lt;/NodeInformation&gt;"
+            + "&lt;/Discover_Hardware_Result&gt;";
+    private final String FSTYPE = "nfs";
+    private final String REMOTEHOST = "cs-mgmt";
+    private final String REMOTEDIR = "/volumes/cs-data/primary/ovm";
+    public String getFsType() {
+        return FSTYPE;
+    }
+
+    public String getRemoteHost() {
+        return REMOTEHOST;
+    }
+
+    public String getRemoteDir() {
+        return REMOTEDIR;
+    }
+
+    public String getRemote() {
+        return REMOTE;
+    }
+
+    public String getRepoId() {
+        return REPOID;
+    }
+
+    public String getRepoMnt() {
+        return REPOMNT;
+    }
+    public String getVirtualDisksDir() {
+        return REPOMNT + "/VirtualDisks";
+    }
+    public String getTemplatesDir() {
+        return REPOMNT + "/Templates";
+    }
+    public String getIsoDir() {
+        return REPOMNT + "/ISOs";
+    }
+    private final String REMOTE = REMOTEHOST + ":" + REMOTEDIR;
+    private final String REPOID = "f12842eb-f5ed-3fe7-8da1-eb0e17f5ede8";
+    private final String DDREPOID = lin.deDash(REPOID);
+    private final String REPOMNT = "/OVS/Repositories/" + DDREPOID;
+    private final String VMMNT = "/nfsmnt/" + REPOID;
+    private final String DISCOVERFS = "&lt;?xml version=\"1.0\" ?&gt;"
+            + "&lt;Discover_Mounted_File_Systems_Result&gt;"
+            + "&lt;Filesystem Type=\""
+            + FSTYPE
+            + "\"&gt;"
+            + "&lt;Mount Dir=\""
+            + REPOMNT
+            + "\"&gt;"
+            + "&lt;Device&gt;"
+            + REMOTE
+            + "&lt;/Device&gt;"
+            + "&lt;Mount_Options&gt;rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=65535,timeo=600,retrans=2,sec=sys,local_lock=none,addr=192.168.1.61&lt;/Mount_Options&gt;"
+            + "&lt;/Mount&gt;"
+            + "&lt;Mount Dir=\""
+            + VMMNT
+            + "\"&gt;"
+            + "&lt;Device&gt;"
+            + REMOTE
+            + "/VirtualMachines&lt;/Device&gt;"
+            + "&lt;Mount_Options&gt;rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,port=65535,timeo=600,retrans=2,sec=sys,local_lock=none,addr=192.168.1.61&lt;/Mount_Options&gt;"
+            + "&lt;/Mount&gt;" + "&lt;/Filesystem&gt;"
+            + "&lt;/Discover_Mounted_File_Systems_Result&gt;";
+    private final String LASTBOOT = "<struct>" + "<member>"
+            + "<name>last_boot_time</name>"
+            + "<value><i8>1413834408</i8></value>" + "</member>" + "<member>"
+            + "<name>local_time</name>" + "<value><i8>1414082517</i8></value>"
+            + "</member>" + "</struct>";
+    private final String TIMEZONE = "<array><data>"
+            + "<value><string>Europe/Amsterdam</string></value>"
+            + "<value><boolean>1</boolean></value>" + "</data></array>";
+
+    @Test
+    public void testDiscoverServer() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERSERVER));
+        results.basicStringTest(lin.getMembershipState(), "Pooled");
+        lin.discoverServer();
+        results.basicStringTest(lin.getCapabilities(),
+                "xen-3.0-x86_64 xen-3.0-x86_32p");
+        results.basicStringTest(lin.getOvmVersion(), "3.2.1-517");
+        results.basicStringTest(lin.getHypervisorVersion(), "4.1.3OVM");
+        results.basicStringTest(lin.get("MAX_CONCURRENT_MIGRATION_IN"), "1");
+    }
+
+    @Test
+    public void testGetTimeZone() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(TIMEZONE));
+        results.basicBooleanTest(lin.getTimeZone());
+    }
+
+    @Test
+    public void testLastBootTime() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(LASTBOOT));
+        results.basicIntTest(lin.getLastBootTime(), 1413834408);
+    }
+
+    @Test
+    public void testDiscoverHardware() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERHW));
+        lin.discoverHardware();
+        results.basicDoubleTest(lin.getMemory(),
+                Double.valueOf("1048476") * 4096);
+        results.basicDoubleTest(lin.getFreeMemory(),
+                Double.valueOf("863459") * 4096);
+        results.basicStringTest(lin.get("UUID"),
+                "1d:d5:e8:91:d9:d0:ed:bd:81:c2:a6:9a:b3:d1:b7:ea");
+    }
+
+    @Test
+    public void testDiscoverMountedFileSystems() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERFS));
+        lin.discoverMountedFs(FSTYPE);
+        results.basicBooleanTest(
+                results.basicListHasString(lin.getFileSystemList(), REPOMNT),
+                true);
+        results.basicBooleanTest(
+                results.basicListHasString(lin.getFileSystemList(), VMMNT),
+                true);
+        results.basicBooleanTest(
+                results.basicListHasString(lin.getFileSystemList(), REMOTE),
+                false);
+        results.basicStringTest(lin.getFileSystem(VMMNT, FSTYPE)
+                .getMountPoint(), VMMNT);
+        results.basicStringTest(lin.getFileSystem(VMMNT, FSTYPE).getHost(),
+                REMOTEHOST);
+        results.basicStringTest(lin.getFileSystem(VMMNT, FSTYPE).getUuid(),
+                REPOID);
+        results.basicStringTest(lin.getFileSystem(REPOMNT, FSTYPE).getUuid(),
+                DDREPOID);
+        results.basicStringTest(lin.getFileSystem(REPOMNT, FSTYPE)
+                .getRemoteDir(), REMOTEDIR);
+        results.basicBooleanTest(lin.getFileSystem(VMMNT, FSTYPE).getDetails()
+                .containsKey("Uuid"), true);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NetworkTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NetworkTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NetworkTest.java
new file mode 100644
index 0000000..c45fd40
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NetworkTest.java
@@ -0,0 +1,346 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+
+import org.junit.Test;
+
+public class NetworkTest {
+    ConnectionTest con = new ConnectionTest();
+    Network net = new Network(con);
+    XmlTestResultTest results = new XmlTestResultTest();
+
+    private String IP = "192.168.1.64";
+    private String BR = "192.168.1.255";
+    private String MAC = "52:54:00:24:47:70";
+    private String INT = "xenbr0";
+    private String PHY = "bond0";
+    private String VLANBR = "bond0";
+    public String getBroadcast() {
+        return BR;
+    }
+
+    public String getMac() {
+        return MAC;
+    }
+
+    public String getInterface() {
+        return INT;
+    }
+
+    public String getPhysical() {
+        return PHY;
+    }
+
+    public String getVlanBridge() {
+        return VLANBR;
+    }
+
+    public String getVlanInterface() {
+        return VLANINT;
+    }
+
+    public Integer getVlan() {
+        return VLAN;
+    }
+
+    public String getControl() {
+        return CONTROL;
+    }
+
+    private String VLANINT = "xenbr0";
+    private Integer VLAN = 200;
+    private String CONTROL = "control0";
+    private String CONTROLMAC = "B2:D1:75:69:8C:58";
+    private String EMPTY = results.escapeOrNot("<?xml version=\"1.0\" ?>"
+            + "<Discover_Network_Result>" + "</Discover_Network_Result>");
+    private String DISCOVERNETWORK = results
+            .escapeOrNot("<?xml version=\"1.0\" ?>"
+                    + "<Discover_Network_Result>" + "  <Network>"
+                    + "    <Active>" + "      <Network>"
+                    + "        <Device Name=\""
+                    + PHY
+                    + "\">"
+                    + "          <MAC>52:54:00:24:47:70</MAC>"
+                    + "          <Flags>(0x1043) IFF_UP IFF_BROADCAST IFF_RUNNING IFF_MULTICAST</Flags>"
+                    + "          <MII>"
+                    + "            <Autonegotiate>"
+                    + "              <State>Incomplete</State>"
+                    + "              <Speed>100baseT-FD</Speed>"
+                    + "            </Autonegotiate>"
+                    + "            <Link>ok</Link>"
+                    + "            <Product>"
+                    + "              <Vendor>00:00:00</Vendor>"
+                    + "              <Model>0</Model>"
+                    + "              <Revision>0</Revision>"
+                    + "            </Product>"
+                    + "            <Status>autonegotiation complete </Status>"
+                    + "            <Capabilities>100baseT-FD 100baseT-HD 10baseT-FD 10baseT-HD</Capabilities>"
+                    + "            <Advertising>100baseT-FD 100baseT-HD 10baseT-FD 10baseT-HD</Advertising>"
+                    + "            <LinkPartner>100baseT-FD 100baseT-HD 10baseT-FD 10baseT-HD</LinkPartner>"
+                    + "          </MII>"
+                    + "          <WOL>"
+                    + "            <WakeOnLan>disabled</WakeOnLan>"
+                    + "          </WOL>"
+                    + "          <SysFS>"
+                    + "            <uevent>INTERFACE="
+                    + PHY
+                    + "IFINDEX=2</uevent>"
+                    + "            <addr_assign_type>0</addr_assign_type>"
+                    + "            <addr_len>6</addr_len>"
+                    + "            <dev_id>0x0</dev_id>"
+                    + "            <ifalias/>"
+                    + "            <iflink>2</iflink>"
+                    + "            <ifindex>2</ifindex>"
+                    + "            <features>0x200041a0</features>"
+                    + "            <type>1</type>"
+                    + "            <link_mode>0</link_mode>"
+                    + "            <carrier>1</carrier>"
+                    + "            <speed>100</speed>"
+                    + "            <duplex>full</duplex>"
+                    + "            <dormant>0</dormant>"
+                    + "            <operstate>up</operstate>"
+                    + "            <mtu>1500</mtu>"
+                    + "            <flags>0x1103</flags>"
+                    + "            <tx_queue_len>1000</tx_queue_len>"
+                    + "            <netdev_group>0</netdev_group>"
+                    + "            <SysFSDev>"
+                    + "              <vendor>0x10ec</vendor>"
+                    + "              <device>0x8139</device>"
+                    + "              <subsystem_vendor>0x1af4</subsystem_vendor>"
+                    + "              <subsystem_device>0x1100</subsystem_device>"
+                    + "              <class>0x020000</class>"
+                    + "            </SysFSDev>"
+                    + "          </SysFS>"
+                    + "          <BootProto>none</BootProto>"
+                    + "          <MetaData>ethernet:c0a80100{192.168.1.0}:MANAGEMENT,CLUSTER_HEARTBEAT,LIVE_MIGRATE,VIRTUAL_MACHINE,STORAGE</MetaData>"
+                    + "        </Device>"
+                    + "        <Device Name=\"eth1\">"
+                    + "          <MAC>52:54:00:26:7F:A0</MAC>"
+                    + "          <Flags>(0x1843) IFF_UP IFF_BROADCAST IFF_RUNNING IFF_SLAVE IFF_MULTICAST</Flags>"
+                    + "          <MII>"
+                    + "            <Autonegotiate>"
+                    + "              <State>Incomplete</State>"
+                    + "              <Speed>100baseT-FD</Speed>"
+                    + "            </Autonegotiate>"
+                    + "            <Link>ok</Link>"
+                    + "            <Product>"
+                    + "              <Vendor>00:00:00</Vendor>"
+                    + "              <Model>0</Model>"
+                    + "              <Revision>0</Revision>"
+                    + "            </Product>"
+                    + "            <Status>autonegotiation complete </Status>"
+                    + "            <Capabilities>100baseT-FD 100baseT-HD 10baseT-FD 10baseT-HD</Capabilities>"
+                    + "            <Advertising>100baseT-FD 100baseT-HD 10baseT-FD 10baseT-HD</Advertising>"
+                    + "            <LinkPartner>100baseT-FD 100baseT-HD 10baseT-FD 10baseT-HD</LinkPartner>"
+                    + "          </MII>"
+                    + "          <WOL>"
+                    + "            <WakeOnLan>disabled</WakeOnLan>"
+                    + "          </WOL>"
+                    + "          <SysFS>"
+                    + "            <uevent>INTERFACE=eth1"
+                    + "IFINDEX=3</uevent>"
+                    + "            <addr_assign_type>0</addr_assign_type>"
+                    + "            <addr_len>6</addr_len>"
+                    + "            <dev_id>0x0</dev_id>"
+                    + "            <ifalias/>"
+                    + "            <iflink>3</iflink>"
+                    + "            <ifindex>3</ifindex>"
+                    + "            <features>0x200041a0</features>"
+                    + "            <type>1</type>"
+                    + "            <link_mode>0</link_mode>"
+                    + "            <carrier>1</carrier>"
+                    + "            <speed>100</speed>"
+                    + "            <duplex>full</duplex>"
+                    + "            <dormant>0</dormant>"
+                    + "            <operstate>up</operstate>"
+                    + "            <mtu>1500</mtu>"
+                    + "            <flags>0x1903</flags>"
+                    + "            <tx_queue_len>1000</tx_queue_len>"
+                    + "            <netdev_group>0</netdev_group>"
+                    + "            <SysFSDev>"
+                    + "              <vendor>0x10ec</vendor>"
+                    + "              <device>0x8139</device>"
+                    + "              <subsystem_vendor>0x1af4</subsystem_vendor>"
+                    + "              <subsystem_device>0x1100</subsystem_device>"
+                    + "              <class>0x020000</class>"
+                    + "            </SysFSDev>"
+                    + "          </SysFS>"
+                    + "          <BootProto>none</BootProto>"
+                    + "        </Device>"
+                    + "      </Network>"
+                    + "      <Bonding>"
+                    + "        <Device Name=\"bond1\">"
+                    + "          <Bonding_Mode>active-backup</Bonding_Mode>"
+                    + "          <Primary_Slave>eth1 (primary_reselect always)</Primary_Slave>"
+                    + "          <Currently_Active_Slave>eth1</Currently_Active_Slave>"
+                    + "          <MII_Status>up</MII_Status>"
+                    + "          <MII_Polling_Interval>250</MII_Polling_Interval>"
+                    + "          <Up_Delay>500</Up_Delay>"
+                    + "          <Down_Delay>500</Down_Delay>"
+                    + "          <Slave_Interface Name=\"eth1\">"
+                    + "            <MII_Status>up</MII_Status>"
+                    + "            <Speed>100 Mbps</Speed>"
+                    + "            <Duplex>full</Duplex>"
+                    + "            <Link_Failure_Count>0</Link_Failure_Count>"
+                    + "            <Permanent_HW_addr>52:54:00:26:7f:a0</Permanent_HW_addr>"
+                    + "          </Slave_Interface>"
+                    + "          <Family Type=\"AF_INET\">"
+                    + "            <MAC>52:54:00:26:7F:A0</MAC>"
+                    + "            <mtu>1500</mtu>"
+                    + "          </Family>"
+                    + "          <BootProto>none</BootProto>"
+                    + "        </Device>"
+                    + "      </Bonding>"
+                    + "      <Bridges>"
+                    + "        <Device Name=\""
+                    + INT
+                    + "\">"
+                    + "          <Family Type=\"AF_INET\">"
+                    + "            <MAC>"
+                    + MAC
+                    + "</MAC>"
+                    + "            <Address>"
+                    + IP
+                    + "</Address>"
+                    + "            <Netmask>255.255.255.0</Netmask>"
+                    + "            <Broadcast>"
+                    + BR
+                    + "</Broadcast>"
+                    + "          </Family>"
+                    + "          <Interfaces>"
+                    + "            <PhyInterface>"
+                    + PHY
+                    + "</PhyInterface>"
+                    + "          </Interfaces>"
+                    + "          <BootProto>static</BootProto>"
+                    + "        </Device>"
+                    + "        <Device Name=\"xenbr1\">"
+                    + "          <Family Type=\"AF_INET\">"
+                    + "            <MAC>52:54:00:26:7F:A0</MAC>"
+                    + "          </Family>"
+                    + "          <Interfaces>"
+                    + "            <PhyInterface>bond1</PhyInterface>"
+                    + "          </Interfaces>"
+                    + "          <BootProto>none</BootProto>"
+                    + "        </Device>"
+                    + "        <Device Name=\""
+                    + CONTROL
+                    + "\">"
+                    + "          \"<Family Type=\"AF_INET\">"
+                    + "            <MAC>"
+                    + CONTROLMAC
+                    + "</MAC>"
+                    + "          </Family>"
+                    + "          <Interfaces>"
+                    + "          </Interfaces>"
+                    + "          <BootProto>none</BootProto>"
+                    + "        </Device>"
+                    + "        <Device Name=\"xenbr0.200\">"
+                    + "          <Family Type=\"AF_INET\">"
+                    + "            <MAC>52:54:00:26:7F:A0</MAC>"
+                    + "          </Family>"
+                    + "          <Interfaces>"
+                    + "            <PhyInterface>bond1.200</PhyInterface>"
+                    + "          </Interfaces>"
+                    + "         <BootProto>none</BootProto>"
+                    + "        </Device>"
+                    + "      </Bridges>"
+                    + "      <Infiniband>"
+                    + "      </Infiniband>"
+                    + "    </Active>"
+                    + "  </Network>"
+                    + "</Discover_Network_Result>");
+
+    public String getDiscoverNetwork() {
+        return DISCOVERNETWORK;
+    }
+
+    @Test
+    public void testDiscoverNetwork() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(net.discoverNetwork(), false);
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERNETWORK));
+        results.basicBooleanTest(net.discoverNetwork());
+        results.basicStringTest(net.getBridgeByIp(IP).getName(), INT);
+        results.basicStringTest(net.getBridgeByName(INT).getAddress(), IP);
+        results.basicStringTest(net.getInterfaceByName(CONTROL).getMac(), CONTROLMAC);
+        net.getBridgeByIp("");
+        results.basicBooleanTest(net.getSuccess(), false);
+        net.getBridgeByName("");
+        results.basicBooleanTest(net.getSuccess(), false);
+        // results.basicStringTest(net.getBridgeByIp("").getName(), INT);
+        results.basicStringTest(net.getInterfaceByIp(IP).getName(), INT);
+        results.basicStringTest(net.getInterfaceByName(INT).getAddress(), IP);
+        results.basicStringTest(net.getInterfaceByName(INT).getBroadcast(), BR);
+        results.basicStringTest(net.getInterfaceByName(INT).getMac(), MAC);
+        results.basicStringTest(net.getPhysicalByBridgeName(INT), PHY);
+
+    }
+
+    @Test
+    public void testInterfacesNotFound() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(net.discoverNetwork(), false);
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERNETWORK));
+        results.basicBooleanTest(net.discoverNetwork());
+        if (net.getInterfaceByName(CONTROL+ "xx") == null) {
+            System.out.println("yay!");
+        };
+    }
+
+    @Test(expected = Ovm3ResourceException.class)
+    public void testLocalBreak() throws Ovm3ResourceException {
+        con.setResult(results
+                .errorResponseWrap(
+                        1,
+                        "exceptions.RuntimeError:Command: ['/etc/xen/scripts/linuxbridge/ovs-local-bridge', 'start', 'bridge=control0'] failed (1): stderr: Start local network: Bridge control0 Is Busy"));
+        results.basicBooleanTest(net.startOvsLocalConfig(CONTROL), false);
+    }
+
+    @Test
+    public void testLocal() throws Ovm3ResourceException {
+        String resp = "local bridge " + CONTROL;
+        con.setResult(results.simpleResponseWrap("start " + resp));
+        results.basicBooleanTest(net.startOvsLocalConfig(CONTROL));
+        con.setResult(results.simpleResponseWrap("stop " + resp));
+        results.basicBooleanTest(net.stopOvsLocalConfig(CONTROL));
+    }
+
+    @Test(expected = Ovm3ResourceException.class)
+    public void testVlanBridgeBreak() throws Ovm3ResourceException {
+        con.setResult(results
+                .errorResponseWrap(
+                        1,
+                        "exceptions.RuntimeError:Command: ['/etc/xen/scripts/linuxbridge/ovs-local-bridge', 'start', 'bridge=control0'] failed (1): stderr: Start local network: Bridge control0 Is Busy"));
+        results.basicBooleanTest(net.startOvsVlanBridge(
+                VLANINT + "." + VLAN.toString(), VLANBR, VLAN), false);
+    }
+
+    @Test
+    public void testVlanBridge() throws Ovm3ResourceException {
+        String resp = "bridge=" + VLANINT + "." + VLAN.toString() + " netdev="
+                + VLANBR + " vlan " + VLAN.toString();
+        con.setResult(results.simpleResponseWrap("start " + resp));
+        results.basicBooleanTest(net.startOvsVlanBridge(
+                VLANINT + "." + VLAN.toString(), VLANBR, VLAN));
+        con.setResult(results.simpleResponseWrap("stop " + resp));
+        results.basicBooleanTest(net.stopOvsVlanBridge(
+                VLANINT + "." + VLAN.toString(), VLANBR, VLAN));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NtpTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NtpTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NtpTest.java
new file mode 100644
index 0000000..1c5d374
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/NtpTest.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class NtpTest {
+    ConnectionTest con = new ConnectionTest();
+    Ntp nTp = new Ntp(con);
+    XmlTestResultTest results = new XmlTestResultTest();
+    String details = results.simpleResponseWrapWrapper("<array>\n"
+            + "<data>\n"
+            + "<value>\n"
+            + "<array>\n"
+            + "<data>\n"
+            + "<value><string>ovm-1</string></value>\n"
+            + "<value><string>ovm-2</string></value>\n"
+            + "</data>\n"
+            + "</array>\n"
+            + "</value>\n"
+            + "<value><boolean>1</boolean></value>\n"
+            + "<value><boolean>1</boolean></value>\n"
+            + "</data>\n"
+            + "</array>\n");
+
+    public void testGetNtp() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(nTp.getDetails());
+    }
+
+    @Test
+    public void testEnableNtp() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(nTp.enableNtp());
+    }
+    @Test
+    public void testDisableNtp() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(nTp.disableNtp());
+    }
+
+    @Test
+    public void testGetDetails() throws Ovm3ResourceException {
+        con.setResult(details);
+        results.basicBooleanTest(nTp.getDetails());
+        results.basicBooleanTest(nTp.isRunning());
+        results.basicBooleanTest(nTp.isServer());
+    }
+
+    @Test
+    public void testSetNTP() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(nTp.setNtp("ovm-1", true));
+        con.setResult(details);
+        results.basicBooleanTest(nTp.getDetails());
+        List<String> ntpHosts = new ArrayList<String>();
+        nTp.setServers(ntpHosts);
+        results.basicBooleanTest(nTp.setNtp(true), false);
+    }
+
+    @Test
+    public void testServerAdditionRemoval() throws Ovm3ResourceException {
+        List<String> ntpHosts = new ArrayList<String>();
+        con.setResult(details);
+        nTp.getDetails();
+        ntpHosts = nTp.getServers();
+        assertEquals(ntpHosts.size(), 2);
+        nTp.removeServer("ovm-2");
+        ntpHosts = nTp.getServers();
+        assertEquals(ntpHosts.size(), 1);
+        nTp.removeServer("ovm-2");
+        ntpHosts = nTp.getServers();
+        assertEquals(ntpHosts.size(), 1);
+        nTp.addServer("ovm-1");
+        ntpHosts = nTp.getServers();
+        assertEquals(ntpHosts.size(), 1);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolOCFS2Test.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolOCFS2Test.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolOCFS2Test.java
new file mode 100644
index 0000000..eed26da
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolOCFS2Test.java
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+
+import org.junit.Test;
+
+public class PoolOCFS2Test {
+    ConnectionTest con = new ConnectionTest();
+    PoolOCFS2 poolfs = new PoolOCFS2(con);
+    XmlTestResultTest results = new XmlTestResultTest();
+
+    private String TYPE = "nfs";
+    private String UUID = "f12842eb-f5ed-3fe7-8da1-eb0e17f5ede8";
+    private String BOGUSUUID = "deadbeef-dead-beef-dead-beef0000002d";
+    private String TARGET = "cs-mgmt:/volumes/cs-data/primary/ovm/VirtualMachines";
+    private String BASE = "f12842ebf5ed3fe78da1eb0e17f5ede8";
+    private String MANAGER = "d1a749d4295041fb99854f52ea4dea97";
+    private String CLUSTER = MANAGER.substring(0, 15);
+    private String VERSION = "3.0";
+    private String POOLUUID = "f12842eb-f5ed-3fe7-8da1-eb0e17f5ede8";
+    private String EMPTY = results.escapeOrNot("<?xml version=\"1.0\" ?>"
+            + "<Discover_Pool_Filesystem_Result>"
+            + "</Discover_Pool_Filesystem_Result>");
+    private String DISCOVERPOOLFS = results
+            .escapeOrNot("<?xml version=\"1.0\" ?>"
+                    + "<Discover_Pool_Filesystem_Result>" + "<Pool_Filesystem>"
+                    + "<Pool_Filesystem_Type>"
+                    + TYPE
+                    + "</Pool_Filesystem_Type>"
+                    + "<Pool_Filesystem_Target>"
+                    + TARGET
+                    + "</Pool_Filesystem_Target>"
+                    + "<Pool_Filesystem_Uuid>"
+                    + UUID
+                    + "</Pool_Filesystem_Uuid>"
+                    + "<Pool_Filesystem_Nfsbase_Uuid>"
+                    + BASE
+                    + "</Pool_Filesystem_Nfsbase_Uuid>"
+                    + "<Pool_Filesystem_Manager_Uuid>"
+                    + MANAGER
+                    + "</Pool_Filesystem_Manager_Uuid>"
+                    + "<Pool_Filesystem_Version>"
+                    + VERSION
+                    + "</Pool_Filesystem_Version>"
+                    + "<Pool_Filesystem_Pool_Uuid>"
+                    + POOLUUID
+                    + "</Pool_Filesystem_Pool_Uuid>"
+                    + "</Pool_Filesystem>"
+                    + "</Discover_Pool_Filesystem_Result>");
+
+    @Test
+    public void testDiscoverPoolFS() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(EMPTY));
+        results.basicBooleanTest(poolfs.hasAPoolFs(), false);
+        results.basicBooleanTest(poolfs.hasPoolFs(BOGUSUUID), false);
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOLFS));
+        poolfs.discoverPoolFs();
+        results.basicStringTest(poolfs.getPoolFsId(), UUID);
+        results.basicStringTest(poolfs.getPoolFsManagerUuid(), MANAGER);
+        results.basicStringTest(poolfs.getPoolFsNFSBaseId(), BASE);
+        results.basicStringTest(poolfs.getPoolFsTarget(), TARGET);
+        results.basicStringTest(poolfs.getPoolFsUuid(), UUID);
+        results.basicStringTest(poolfs.getPoolFsVersion(), VERSION);
+        results.basicStringTest(poolfs.getPoolPoolFsId(), POOLUUID);
+        results.basicStringTest(poolfs.getPoolFsType(), TYPE);
+        results.basicBooleanTest(poolfs.hasAPoolFs());
+        results.basicBooleanTest(poolfs.hasPoolFs(UUID));
+    }
+
+    @Test
+    public void testCreatePoolFS() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        poolfs.createPoolFs(TYPE, TARGET, CLUSTER, UUID, BASE, MANAGER);
+
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOLFS));
+        results.basicBooleanTest(poolfs.hasPoolFs(UUID));
+        poolfs.createPoolFs(TYPE, TARGET, CLUSTER, UUID, BASE, MANAGER);
+    }
+
+    @Test
+    public void testDestroyPoolFS() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        poolfs.destroyPoolFs(TYPE, TARGET, UUID, BASE);
+
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOLFS));
+        results.basicBooleanTest(poolfs.hasPoolFs(UUID));
+        poolfs.createPoolFs(TYPE, TARGET, CLUSTER, UUID, BASE, MANAGER);
+    }
+
+    @Test(expected = Ovm3ResourceException.class)
+    public void testCreatePoolFSError() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOLFS));
+        poolfs.createPoolFs(TYPE, TARGET, CLUSTER, BOGUSUUID, BASE, MANAGER);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolTest.java
new file mode 100644
index 0000000..db4e340
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/PoolTest.java
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class PoolTest {
+    ConnectionTest con = new ConnectionTest();
+    Pool pool = new Pool(con);
+    XmlTestResultTest results = new XmlTestResultTest();
+
+    private String UUID = "0004fb0000020000ba9aaf00ae5e2d73";
+    private String BOGUSUUID = "deadbeefdeadbeefdeadbeefdeadbeef";
+    private String VIP = "192.168.1.230";
+    private String ALIAS = "Pool 0";
+    private String HOST = "ovm-1";
+    private String HOST2 = "ovm-2";
+    private String IP = "192.168.1.64";
+    private String IP2 = "192.168.1.65";
+    private String EMPTY = results.escapeOrNot("<?xml version=\"1.0\" ?>"
+            + "<Discover_Server_Pool_Result/>");
+    private String DISCOVERPOOL = results
+            .escapeOrNot("<?xml version=\"1.0\" ?>"
+                    + "<Discover_Server_Pool_Result>" + "  <Server_Pool>"
+                    + "    <Unique_Id>"
+                    + UUID
+                    + "</Unique_Id>"
+                    + "    <Pool_Alias>"
+                    + ALIAS
+                    + "</Pool_Alias>"
+                    + "    <Master_Virtual_Ip>"
+                    + VIP
+                    + "</Master_Virtual_Ip>"
+                    + "    <Member_List>"
+                    + "      <Member>"
+                    + "        <Registered_IP>"
+                    + IP
+                    + "</Registered_IP>"
+                    + "      </Member>"
+                    + "      <Member>"
+                    + "        <Registered_IP>"
+                    + IP2
+                    + "</Registered_IP>"
+                    + "      </Member>"
+                    + "    </Member_List>"
+                    + "  </Server_Pool>" + "</Discover_Server_Pool_Result>");
+
+
+    @Test
+    public void testDiscoverServerPool() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(EMPTY));
+        results.basicBooleanTest(pool.isInAPool(), false);
+        results.basicBooleanTest(pool.isInPool(UUID), false);
+        results.basicBooleanTest(pool.discoverServerPool(), false);
+        results.basicBooleanTest(pool.isInPool(UUID), false);
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOL));
+        results.basicBooleanTest(pool.discoverServerPool());
+        results.basicBooleanTest(pool.isInAPool(), true);
+        results.basicBooleanTest(pool.isInPool(UUID), true);
+        results.basicStringTest(pool.getPoolId(), UUID);
+        results.basicStringTest(pool.getPoolId(), UUID);
+        results.basicStringTest(pool.getPoolAlias(), ALIAS);
+        results.basicStringTest(pool.getPoolMasterVip(), VIP);
+        results.basicBooleanTest(pool.getPoolMemberList().contains(IP));
+        results.basicBooleanTest(pool.getPoolMemberList().contains(IP2));
+    }
+
+    @Test
+    public void poolMembers() throws Ovm3ResourceException {
+        List<String> poolHosts = new ArrayList<String>();
+        poolHosts.add(IP);
+        poolHosts.add(IP2);
+        con.setResult(results.simpleResponseWrapWrapper(EMPTY));
+        results.basicBooleanTest(pool.getPoolMemberList().contains(IP), false);
+
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOL));
+        results.basicBooleanTest(pool.discoverServerPool());
+        con.setResult(results.getNil());
+        results.basicBooleanTest(pool.removePoolMember(IP), true);
+        results.basicBooleanTest(pool.addPoolMember(IP), true);
+        results.basicBooleanTest(pool.setPoolMemberList(poolHosts), true);
+    }
+
+    @Test
+    public void testCreateServerPool() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(
+                pool.createServerPool(ALIAS, UUID, VIP, 1, HOST, IP), true);
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOL));
+        results.basicBooleanTest(pool.discoverServerPool());
+        results.basicBooleanTest(
+                pool.createServerPool(ALIAS, UUID, VIP, 1, HOST, IP), true);
+
+    }
+
+    @Test(expected = Ovm3ResourceException.class)
+    public void testCreateServerPoolFail1() throws Ovm3ResourceException {
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOL));
+        results.basicBooleanTest(
+                pool.createServerPool(ALIAS, BOGUSUUID, VIP, 1, HOST, IP),
+                false);
+    }
+
+    @Test(expected = Ovm3ResourceException.class)
+    public void testCreateServerPoolFail2() throws Ovm3ResourceException {
+        con.setResult(results.errorResponseWrap(1,
+                "exceptions.Exception:Repository already exists"));
+        results.basicBooleanTest(
+                pool.createServerPool(ALIAS, UUID, VIP, 1, HOST, IP), false);
+    }
+
+    @Test
+    public void testJoinServerPool() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        Integer poolsize = 2;
+        results.basicBooleanTest(
+                pool.joinServerPool(ALIAS, UUID, VIP, poolsize, HOST2, IP2),
+                true);
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOL));
+        results.basicBooleanTest(pool.discoverServerPool());
+        results.basicBooleanTest(
+                pool.joinServerPool(ALIAS, UUID, VIP, poolsize, HOST2, IP2),
+                true);
+    }
+    @Test(expected = Ovm3ResourceException.class)
+    public void testJoinServerPoolFail1() throws Ovm3ResourceException {
+        Integer poolsize = 2;
+        con.setResult(results.simpleResponseWrapWrapper(DISCOVERPOOL));
+        results.basicBooleanTest(pool.joinServerPool(ALIAS, BOGUSUUID, VIP,
+                poolsize, HOST2, IP2), false);
+    }
+
+    @Test(expected = Ovm3ResourceException.class)
+    public void testJoinServerPoolFail() throws Ovm3ResourceException {
+        con.setResult(results
+                .errorResponseWrap(1,
+                        "exceptions.Exception:Server already a member of pool: "
+                                + UUID));
+        Integer poolsize = 2;
+        results.basicBooleanTest(pool.joinServerPool(ALIAS, UUID, VIP, poolsize,
+                HOST2, IP2), false);
+    }
+
+    @Test
+    public void testValidPoolRoles() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(pool.setServerRoles(pool.getValidRoles()),
+                true);
+
+    }
+
+    @Test(expected = Ovm3ResourceException.class)
+    public void testValidPoolRolesInvalid() throws Ovm3ResourceException {
+        String broken = "broken_token";
+        con.setResult(results
+                .errorResponseWrap(1,
+                "exceptions.Exception:Invalid roles: set(['xen', '" + broken
+                        + "', 'utility'])"));
+        results.basicBooleanTest(pool.setServerRoles(pool.getValidRoles()),
+                false);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c27c6943/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/RemoteTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/RemoteTest.java b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/RemoteTest.java
new file mode 100644
index 0000000..a5952ab
--- /dev/null
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/objects/RemoteTest.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http:www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ ******************************************************************************/
+package com.cloud.hypervisor.ovm3.objects;
+import org.junit.Test;
+
+public class RemoteTest {
+    ConnectionTest con = new ConnectionTest();
+    Remote rEm = new Remote(con);
+    XmlTestResultTest results = new XmlTestResultTest();
+
+    @Test
+    public void TestSysShutdown() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(rEm.sysShutdown());
+    }
+    @Test
+    public void TestSysReboot() throws Ovm3ResourceException {
+        con.setResult(results.getNil());
+        results.basicBooleanTest(rEm.sysReboot());
+    }
+}


Mime
View raw message