// Path: itests/src/main/java/org/opennms/core/wsman/AbstractWSManClientDracIT.java
// public abstract class AbstractWSManClientDracIT {
//     private final static Logger LOG = LoggerFactory.getLogger(AbstractWSManClientDracIT.class);
// 
//     private WSManClient client;
// 
//     public abstract WSManClientFactory getFactory();
// 
//     @BeforeClass
//     public static void setupClass() {
//         System.setProperty(org.slf4j.impl.SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "TRACE");
//     }
// 
//     @Before
//     public void setUp() throws IOException {
//         WSManEndpoint endpoint = TestUtils.getEndpointFromLocalConfiguration();
//         LOG.info("Using endpoint: {}", endpoint);
//         client = getFactory().getClient(endpoint);
//     }
// 
//     @Test
//     public void canGetInputVoltage() {
//         List<Node> powerSupplies = Lists.newLinkedList();
//         client.enumerateAndPullUsingFilter(
//                 WSManConstants.CIM_ALL_AVAILABLE_CLASSES,
//                 WSManConstants.XML_NS_WQL_DIALECT,
//                 "select DeviceDescription,PrimaryStatus,TotalOutputPower,InputVoltage,Range1MaxInputPower,FirmwareVersion,RedundancyStatus from DCIM_PowerSupplyView where DetailedState != 'Absent' and PrimaryStatus != 0",
//                 powerSupplies,
//                 true);
//         assertEquals(1, powerSupplies.size());
// 
//         XMLTag tag = XMLDoc.from(powerSupplies.get(0), true);
//         int inputVoltage = Integer.valueOf(tag.gotoChild("n1:InputVoltage").getText());
//         assertEquals(120, inputVoltage);
//     }
// 
//     @Test
//     public void canGetSystemPrimaryStatus() {
//         Map<String, String> selectors = Maps.newHashMap();
//         selectors.put("CreationClassName", "DCIM_ComputerSystem");
//         selectors.put("Name", "srv:system");
//         Node node = client.get("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_ComputerSystem", selectors);
//         assertNotNull(node);
// 
//         assertEquals("DCIM_ComputerSystem", node.getLocalName());
//         assertEquals("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_ComputerSystem", node.getNamespaceURI());
// 
//         XMLTag tag = XMLDoc.from(node, true);
//         System.err.println(tag.getCurrentTagName());
//         System.err.println(tag);
//         int primaryStatus = Integer.valueOf(tag.gotoChild("n1:PrimaryStatus").getText());
//         assertEquals(1, primaryStatus);
//     }
// }
// 
// Path: api/src/main/java/org/opennms/core/wsman/WSManClientFactory.java
// public interface WSManClientFactory {
// 
//     /**
//      * Constructs a new {@link WSManClient} for the given endpoint.
//      *
//      * @param endpoint target
//      * @return a new client instance
//      */
//     public WSManClient getClient(WSManEndpoint endpoint);
// }


import org.junit.Ignore;
import org.opennms.core.wsman.AbstractWSManClientDracIT;
import org.opennms.core.wsman.WSManClientFactory;
/*
 * Copyright 2015, The OpenNMS Group
 * 
 * Licensed 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 org.opennms.core.wsman.openwsman;


@Ignore("Expects an iDrac to be configured in ~/wsman.properties")
public class OpenWSManClientDracIT extends AbstractWSManClientDracIT {
    @Override
// Path: itests/src/main/java/org/opennms/core/wsman/AbstractWSManClientDracIT.java
// public abstract class AbstractWSManClientDracIT {
//     private final static Logger LOG = LoggerFactory.getLogger(AbstractWSManClientDracIT.class);
// 
//     private WSManClient client;
// 
//     public abstract WSManClientFactory getFactory();
// 
//     @BeforeClass
//     public static void setupClass() {
//         System.setProperty(org.slf4j.impl.SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "TRACE");
//     }
// 
//     @Before
//     public void setUp() throws IOException {
//         WSManEndpoint endpoint = TestUtils.getEndpointFromLocalConfiguration();
//         LOG.info("Using endpoint: {}", endpoint);
//         client = getFactory().getClient(endpoint);
//     }
// 
//     @Test
//     public void canGetInputVoltage() {
//         List<Node> powerSupplies = Lists.newLinkedList();
//         client.enumerateAndPullUsingFilter(
//                 WSManConstants.CIM_ALL_AVAILABLE_CLASSES,
//                 WSManConstants.XML_NS_WQL_DIALECT,
//                 "select DeviceDescription,PrimaryStatus,TotalOutputPower,InputVoltage,Range1MaxInputPower,FirmwareVersion,RedundancyStatus from DCIM_PowerSupplyView where DetailedState != 'Absent' and PrimaryStatus != 0",
//                 powerSupplies,
//                 true);
//         assertEquals(1, powerSupplies.size());
// 
//         XMLTag tag = XMLDoc.from(powerSupplies.get(0), true);
//         int inputVoltage = Integer.valueOf(tag.gotoChild("n1:InputVoltage").getText());
//         assertEquals(120, inputVoltage);
//     }
// 
//     @Test
//     public void canGetSystemPrimaryStatus() {
//         Map<String, String> selectors = Maps.newHashMap();
//         selectors.put("CreationClassName", "DCIM_ComputerSystem");
//         selectors.put("Name", "srv:system");
//         Node node = client.get("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_ComputerSystem", selectors);
//         assertNotNull(node);
// 
//         assertEquals("DCIM_ComputerSystem", node.getLocalName());
//         assertEquals("http://schemas.dell.com/wbem/wscim/1/cim-schema/2/DCIM_ComputerSystem", node.getNamespaceURI());
// 
//         XMLTag tag = XMLDoc.from(node, true);
//         System.err.println(tag.getCurrentTagName());
//         System.err.println(tag);
//         int primaryStatus = Integer.valueOf(tag.gotoChild("n1:PrimaryStatus").getText());
//         assertEquals(1, primaryStatus);
//     }
// }
// 
// Path: api/src/main/java/org/opennms/core/wsman/WSManClientFactory.java
// public interface WSManClientFactory {
// 
//     /**
//      * Constructs a new {@link WSManClient} for the given endpoint.
//      *
//      * @param endpoint target
//      * @return a new client instance
//      */
//     public WSManClient getClient(WSManEndpoint endpoint);
// }


// Path: openwsman/src/test/java/org/opennms/core/wsman/openwsman/OpenWSManClientDracIT.java
import org.junit.Ignore;
import org.opennms.core.wsman.AbstractWSManClientDracIT;
import org.opennms.core.wsman.WSManClientFactory;

/*
 * Copyright 2015, The OpenNMS Group
 * 
 * Licensed 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 org.opennms.core.wsman.openwsman;


@Ignore("Expects an iDrac to be configured in ~/wsman.properties")
public class OpenWSManClientDracIT extends AbstractWSManClientDracIT {
    @Override
    public WSManClientFactory getFactory() {