modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt
| 94 ++++++----
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/alert/AlertSender.java
| 13 -
modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfo.java
| 12 +
modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpSender.java
| 10 -
modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpTrapSender.java
| 42 +++-
modules/enterprise/server/plugins/alert-snmp/src/main/resources/META-INF/rhq-serverplugin.xml
| 42 +++-
modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java
| 24 ++
modules/integration-tests/rest-api/pom.xml
| 2
8 files changed, 173 insertions(+), 66 deletions(-)
New commits:
commit 4381d307b87bb8ca5e7cba265633aa585adcf27f
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Jul 9 17:13:00 2013 +0200
BZ 966294 Fix mib file and related code. Also fix some other smaller issues.
diff --git a/modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt
b/modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt
index ced6071..5586ac0 100644
--- a/modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt
+++ b/modules/enterprise/server/appserver/src/main/resources/etc/RHQ-mib.txt
@@ -3,39 +3,51 @@ RHQ-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, snmpModules, enterprises
FROM SNMPv2-SMI
- coldStart
- FROM SNMPv2-MIB
OBJECT-GROUP, NOTIFICATION-GROUP, MODULE-COMPLIANCE
FROM SNMPv2-CONF
DisplayString
FROM SNMPv2-TC;
rhqMIB MODULE-IDENTITY
- LAST-UPDATED "201112200000Z"
+ LAST-UPDATED "201307020000Z"
ORGANIZATION "RHQ-Project"
CONTACT-INFO "http://www.jboss.org/rhq"
DESCRIPTION
"The MIB module for RHQ alerts.
This file is part of the RHQ management platform
- Copyright (C) 2005-2012 Red Hat, Inc.
+ Copyright (C) 2005-2013 Red Hat, Inc.
All rights reserved.
"
- REVISION "200807110000Z"
- DESCRIPTION "Initial version"
- REVISION "201010180000Z"
- DESCRIPTION "Better trap support"
+ REVISION "201307020000Z"
+ DESCRIPTION "Bug fixes"
REVISION "201112200000Z"
DESCRIPTION "Also emit resource lineage"
+ REVISION "201010180000Z"
+ DESCRIPTION "Better trap support"
+ REVISION "200807110000Z"
+ DESCRIPTION "Initial version"
::= { snmpModules 1 }
+-- 1.3.6.1.4.1.18016
jboss OBJECT IDENTIFIER ::= {enterprises 18016 }
+-- 1.3.6.1.4.1.18016.2
rhq OBJECT IDENTIFIER ::= {jboss 2 }
+-- 1.3.6.1.4.1.18016.2.1
alert OBJECT IDENTIFIER ::= {rhq 1 }
+-- 1.3.6.1.4.1.18016.2.1.2
+alertNotifications OBJECT IDENTIFIER ::= {rhq 2}
+
+-- 1.3.6.1.4.1.18016.2.3
+rhqServer OBJECT IDENTIFIER ::= {rhq 3}
+
+
+-- 1.3.6.1.4.1.18016.2.1.2.0
+alertNotifPrefix OBJECT IDENTIFIER ::= {alertNotifications 0 }
alertName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
@@ -93,28 +105,10 @@ alertHierarchy OBJECT-TYPE
STATUS current
DESCRIPTION
"The hierarchy of the resource that triggered the alert"
- ::= { alert 6 }
-
--- conformance information
-
-snmpMIBConformance
- OBJECT IDENTIFIER ::= { rhqMIB 2 }
-
-snmpMIBCompliances
- OBJECT IDENTIFIER ::= { snmpMIBConformance 1 }
-snmpMIBGroups OBJECT IDENTIFIER ::= { snmpMIBConformance 2 }
-
--- compliance statements
-
-snmpBasicCompliance MODULE-COMPLIANCE
- STATUS current
- DESCRIPTION "TODO"
- MODULE
- MANDATORY-GROUPS { alertGroup, trapGroup }
-
- ::= { snmpMIBCompliances 2 }
+ ::= { alert 7 }
-alertGroup OBJECT-GROUP
+-- 1.3.6.1.4.1.18016.2.1.2.0.1
+alertNotification NOTIFICATION-TYPE
OBJECTS { alertName,
alertResourceName,
alertPlatformName,
@@ -124,12 +118,46 @@ alertGroup OBJECT-GROUP
alertHierarchy }
STATUS current
DESCRIPTION "A collection of objects providing information about an alert"
- ::= { snmpMIBGroups 1 }
+ ::= { alertNotifPrefix 1 }
+
+
+-- conformance information
+
+rhqMIBConformance OBJECT IDENTIFIER ::= { rhqMIB 2 }
+rhqTraps OBJECT IDENTIFIER ::= { rhqMIB 3 }
+rhqTrapPrefix OBJECT IDENTIFIER ::= { rhqTraps 0 }
-trapGroup NOTIFICATION-GROUP
- NOTIFICATIONS { coldStart }
+rhqMIBCompliances OBJECT IDENTIFIER ::= { rhqMIBConformance 1 }
+rhqMIBGroups OBJECT IDENTIFIER ::= { rhqMIBConformance 2 }
+
+-- compliance statements
+
+rhqMibBasicCompliance MODULE-COMPLIANCE
+ STATUS current
+ DESCRIPTION "Module compliance definition for the RHQ-MIB extension
module"
+ MODULE
+ MANDATORY-GROUPS { rhqAlertGroup, rhqNotificationGroup }
+
+ ::= { rhqMIBCompliances 2 }
+
+rhqAlertGroup OBJECT-GROUP
+ OBJECTS { alertName,
+ alertResourceName,
+ alertPlatformName,
+ alertCondition,
+ alertSeverity,
+ alertUrl,
+ alertHierarchy
+ }
+ STATUS current
+ DESCRIPTION "A collection of entries for a notifications for alerts"
+ ::= { rhqMIBGroups 2 }
+
+rhqNotificationGroup NOTIFICATION-GROUP
+ NOTIFICATIONS { alertNotification }
STATUS current
DESCRIPTION "A collection of notifications for alerts"
- ::= { snmpMIBGroups 2 }
+ ::= { rhqMIBGroups 3 }
+
END
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/alert/AlertSender.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/alert/AlertSender.java
index 88c140f..bda7f99 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/alert/AlertSender.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/alert/AlertSender.java
@@ -1,6 +1,6 @@
/*
* RHQ Management Platform
- * Copyright (C) 2005-2009 Red Hat, Inc.
+ * Copyright (C) 2005-2013 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -13,8 +13,8 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
package org.rhq.enterprise.server.plugin.pc.alert;
@@ -30,7 +30,6 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.Property;
import org.rhq.core.domain.configuration.PropertyMap;
import org.rhq.core.domain.configuration.PropertySimple;
-import org.rhq.enterprise.server.plugin.pc.ControlResults;
import org.rhq.enterprise.server.plugin.pc.ServerPluginComponent;
import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
@@ -103,7 +102,7 @@ public abstract class AlertSender<T extends
ServerPluginComponent> {
/**
* Validates the alert and extra parameters. The results should be initialized with
the current
- * parameters of this alert sender and the erroneous properties should have their
+ * parameters of this alert sender and the erroneous properties should have their
* {@link Property#getErrorMessage() error messages} set.
* <p>
* The implementation is free to change (add/update/delete) properties in either of
the configurations
@@ -111,14 +110,14 @@ public abstract class AlertSender<T extends
ServerPluginComponent> {
* further processed in an alert sender specific way before they get stored into the
database.
* <p>
* The default implementation makes no changes to the configurations.
- *
+ *
* @param subject the subject requesting the changes in the configuration
* @return the validation results
*/
public AlertSenderValidationResults validateAndFinalizeConfiguration(Subject subject)
{
return new AlertSenderValidationResults(alertParameters, extraParameters);
}
-
+
private String printProperty(Property property) {
if (property instanceof PropertySimple) {
return ((PropertySimple) property).getStringValue();
diff --git
a/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfo.java
b/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfo.java
index c92daae..7b174cc 100644
---
a/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfo.java
+++
b/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfo.java
@@ -79,6 +79,18 @@ public class SnmpInfo {
return new SnmpInfo(host, port, oid, trapOid);
}
+ protected static SnmpInfo load(Configuration configuration, Configuration
preferences) {
+ String host = configuration.getSimpleValue(PARAM_HOST, null); // optional
+ if (host==null || host.isEmpty()) {
+ host = preferences.getSimpleValue("defaultTargetHost",null);
+ }
+ String port = configuration.getSimpleValue(PARAM_PORT, DEFAULT_PORT);
+ String oid = configuration.getSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, null);
// required
+ String trapOid = configuration.getSimpleValue(PARAM_TRAP_OID, null);
+ return new SnmpInfo(host, port, oid, trapOid);
+
+ }
+
@Override
public String toString() {
String hostString = (host == null ? "UnknownHost" : host);
diff --git
a/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpSender.java
b/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpSender.java
index 5c6d1e7..521589d 100644
---
a/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpSender.java
+++
b/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpSender.java
@@ -45,7 +45,7 @@ public class SnmpSender extends AlertSender {
private AlertManagerLocal alertManager;
/**
- * Default constructor needed for instanciation by server plugin container
+ * Default constructor needed for instantiation by server plugin container
*/
public SnmpSender() {
this(LookupUtil.getResourceManager(), LookupUtil.getAlertManager());
@@ -59,7 +59,7 @@ public class SnmpSender extends AlertSender {
@Override
public SenderResult send(Alert alert) {
- SnmpInfo info = SnmpInfo.load(alertParameters);
+ SnmpInfo info = SnmpInfo.load(alertParameters, preferences);
if (info.error != null) {
return SenderResult.getSimpleFailure(info.error);
}
@@ -75,8 +75,8 @@ public class SnmpSender extends AlertSender {
String platformName = lineage.get(0).getName();
String conditions = alertManager.prettyPrintAlertConditions(alert, false);
String alertUrl = alertManager.prettyPrintAlertURL(alert);
-
-
+
+
String hierarchy = getResourceHierarchyAsString(lineage);
Date bootTime = new Date(); // TODO: want to use
LookupUtil.getCoreServer().getBootTime() but ServiceMBean is not visible
@@ -102,7 +102,7 @@ public class SnmpSender extends AlertSender {
@Override
public String previewConfiguration() {
- SnmpInfo info = SnmpInfo.load(alertParameters);
+ SnmpInfo info = SnmpInfo.load(alertParameters, preferences);
return info.toString();
}
}
diff --git
a/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpTrapSender.java
b/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpTrapSender.java
index 2556b38..ea3d985 100644
---
a/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpTrapSender.java
+++
b/modules/enterprise/server/plugins/alert-snmp/src/main/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpTrapSender.java
@@ -76,7 +76,9 @@ import org.rhq.core.util.StringUtil;
/**
* @author Ian Springer
+ * @author Heiko W. Rupp
*/
+@SuppressWarnings("unused")
public class SnmpTrapSender implements PDUFactory {
public static final int DEFAULT = 0;
private static final String UDP_TRANSPORT = "udp";
@@ -104,7 +106,10 @@ public class SnmpTrapSender implements PDUFactory {
private TimeTicks sysUpTime = new TimeTicks(0);
- private OID trapOID = SnmpConstants.coldStart;
+ public static final OID enterpriseSpecificTrap =
+ new OID(new int[] { 1,3,6,1,6,3,1,1,5,6 });
+
+ private OID trapOID = enterpriseSpecificTrap;
private PDUv1 v1TrapPDU = new PDUv1();
@@ -338,14 +343,33 @@ public class SnmpTrapSender implements PDUFactory {
return octetString;
}
- private static Address createAddress(Configuration properties) {
- // TODO: Make transport configurable (ips, 09/12/07).
+ private Address createAddress(Configuration properties) {
String host = properties.getSimpleValue("host",null);
- String portS = properties.getSimpleValue("port","162");
+ String portS = properties.getSimpleValue("port",null);
+
+
+ if (host==null) {
+ String tmp =
systemConfig.getSimpleValue("defaultTargetHost",null);
+ if ((tmp != null) && (tmp.length() > 0)) {
+ host=tmp;
+ }
+ }
+
+ if (portS==null) {
+ String tmp =
systemConfig.getSimpleValue("defaultPort","162");
+ if ((tmp != null) && (tmp.length() > 0)) {
+ portS = tmp;
+ }
+ }
Integer port = Integer.valueOf(portS);
+ if (port==0) {
+ port = 162; // just to make sure
+ }
+
+ String transport =
systemConfig.getSimpleValue("transport","UDP");
+
- final String transport = UDP_TRANSPORT;
String address = host + "/" + port;
if (transport.equalsIgnoreCase(UDP_TRANSPORT)) {
return new UdpAddress(address);
@@ -357,7 +381,7 @@ public class SnmpTrapSender implements PDUFactory {
}
protected String getVariableBindings(PDU response) {
- StringBuffer strBuf = new StringBuffer();
+ StringBuilder strBuf = new StringBuilder();
for (int i = 0; i < response.size(); i++) {
VariableBinding vb = response.get(i);
strBuf.append(vb.toString());
@@ -473,7 +497,7 @@ public class SnmpTrapSender implements PDUFactory {
String variableBindingPrefix =
alertParameters.getSimpleValue(SnmpInfo.PARAM_VARIABLE_BINDING_PREFIX, null);
- // TODO add a request id and a timestamp
+ // request id and a timestamp are added below in setSysUpTime..
this.address = createAddress(alertParameters);
// bind the alert definitions name on the oid set in the alert
@@ -532,7 +556,7 @@ public class SnmpTrapSender implements PDUFactory {
delta = now - bootTime.getTime();
} else
delta = 0;
- setSysUpTime(new TimeTicks(delta / 1000)); // TT is 100th of a second TODO : fix
this !!!
+ setSysUpTime(new TimeTicks(delta / 100)); // TT is 100th of a second
}
@@ -571,6 +595,8 @@ public class SnmpTrapSender implements PDUFactory {
this.authProtocol = AuthMD5.ID;
} else if (tmp.equals("SHA")) {
this.authProtocol = AuthSHA.ID;
+ } else if (tmp.equals("none")) {
+ this.authProtocol=null;
} else {
throw new IllegalStateException("SNMP authentication protocol
unsupported: " + tmp);
}
diff --git
a/modules/enterprise/server/plugins/alert-snmp/src/main/resources/META-INF/rhq-serverplugin.xml
b/modules/enterprise/server/plugins/alert-snmp/src/main/resources/META-INF/rhq-serverplugin.xml
index 83a55e9..3f7a35c 100644
---
a/modules/enterprise/server/plugins/alert-snmp/src/main/resources/META-INF/rhq-serverplugin.xml
+++
b/modules/enterprise/server/plugins/alert-snmp/src/main/resources/META-INF/rhq-serverplugin.xml
@@ -25,15 +25,29 @@
</c:property-options>
</c:simple-property>
- <c:simple-property name="trapOid" displayName="Trap OID"
description="OID for the trap sent" type="string" />
+ <c:simple-property name="defaultTargetHost"
displayName="Default trap target host" required="false"/>
+ <c:simple-property name="defaultPort" displayName="Default trap
target port" required="false" type="integer"
+ default="162" defaultValue="162"/>
+ <c:simple-property name="transport"
defaultValue="UDP">
+ <c:property-options allowCustomValue="false">
+ <c:option value="UDP" name="UDP"/>
+ <c:option value="TCP" name="TCP"/>
+ </c:property-options>
+ </c:simple-property>
+
+ <c:simple-property name="trapOid" displayName="Trap OID"
description="OID for the trap sent" type="string"
+ default="1.3.6.1.4.1.18016.2.1.2.0.1"/>
<c:simple-property name="community" type="string"
default="public" description="Community - v1 and v2c only"
required="false"/>
<c:group name="1" displayName="SNMP version 1 properties"
hiddenByDefault="true" >
- <c:simple-property name="engineId"
required="false"/>
- <c:simple-property name="genericId"
required="false"/>
- <c:simple-property name="enterpriseOid"
required="false"/>
- <c:simple-property name="specificId"
required="false"/>
- <c:simple-property name="agentAddress" description="Address
of our SNMP agent" required="false"/>
+
+ <c:simple-property name="genericId" required="false"
default="6" type="integer"
+ description="Set the generic trap type. Default is 6
(=Enterprise specific)."/>
+ <c:simple-property name="enterpriseOid"
required="false" default="1.3.6.1.4.1.18016.2.3"
+ description="OID of the sender, identifies the type of managed
object generating the trap. Default is enterprise.jboss.rhq.rhqServer"/>
+ <c:simple-property name="specificId" required="false"
default="0" type="integer"
+ description="Enterprise-specific ID of the trap. If this is set, the
generic ID must be set to 6."/>
+ <c:simple-property name="agentAddress" description="Address
of our SNMP agent (=the RHQ server)" required="false"/>
</c:group>
<!--
<c:group name="2c" displayName="SNMP version 2c
properties" hiddenByDefault="true">
@@ -41,14 +55,15 @@
</c:group>
-->
<c:group name="3" displayName="SNMP version 3 properties"
hiddenByDefault="true">
- <c:simple-property name="authProtocol" type="string"
default="MD5">
+ <c:simple-property name="authProtocol" type="string"
default="MD5"
+ description="Authorization protocol to use. If no
Auth Passphrase is given, this must be set to 'none'.">
<c:property-options>
<c:option value="none"/>
<c:option value="MD5"/>
<c:option value="SHA"/>
</c:property-options>
</c:simple-property>
- <c:simple-property name="privacyProtocol"
default="AES">
+ <c:simple-property name="privacyProtocol"
default="AES" description="The privacy protocol to use in conjunction when
the auth protocol is set">
<c:property-options>
<c:option value="DES"/>
<c:option value="AES"/>
@@ -56,8 +71,9 @@
<c:option value="AES256"/>
</c:property-options>
</c:simple-property>
+ <c:simple-property name="engineId"
required="false"/> <!-- TODO this was not here before, but in v1, where it
is wrong -->
<c:simple-property name="targetContext" displayName="Target
Context Name" type="string" required="false"/>
- <c:simple-property name="authPassphrase" description="Auto
Passphrase is required with autorization enabled" type="password"
required="false"/>
+ <c:simple-property name="authPassphrase" description="Auto
Passphrase is required with authorization enabled. If this is not set, authProtocol must
be not set as well. Length must be > 8." type="password"
required="false"/>
<c:simple-property name="privacyPassphrase"
description="Privacy Passphrase is required with privacy enabled"
type="password" required="false"/>
<c:simple-property name="securityName" type="string"
required="false"/>
@@ -71,13 +87,15 @@
<a:plugin-class>SnmpSender</a:plugin-class>
<a:alert-configuration>
- <c:simple-property name="host" type="string"
required="true" description="Trap target host"/>
+ <c:simple-property name="host" type="string"
required="false" description="Trap target host. Required if not yet set in
the
+ sender-wide preferences"/>
<c:simple-property name="port" type="integer"
required="false" default="162" description="Trap target
port"/>
- <c:simple-property name="oid" displayName="Variable bindings
prefix" type="string" required="true">
+ <c:simple-property name="oid" displayName="Variable bindings
prefix" type="string" required="true"
+ defaultValue="1.3.6.1.4.1.18016.2.1">
<c:description>
<![CDATA[
<p>RHQ will send alert notification details as a list of variable
bindings in the
- SNMP trap PDU.</p>
+ SNMP trap PDU. This OID is the common prefix of those bindings.</p>
<p><strong>Do not confuse this paramater with 'Trap
Oid'.</strong></p>
]]>
</c:description>
diff --git
a/modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java
b/modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java
index c46c8b6..97b9a05 100644
---
a/modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java
+++
b/modules/enterprise/server/plugins/alert-snmp/src/test/java/org/rhq/enterprise/server/plugins/alertSnmp/SnmpInfoTest.java
@@ -29,6 +29,7 @@ import static org.testng.Assert.*;
import org.testng.annotations.Test;
import org.rhq.core.domain.configuration.Configuration;
+import org.rhq.core.domain.configuration.PropertySimple;
/**
* @author Thomas Segismont
@@ -69,6 +70,29 @@ public class SnmpInfoTest {
}
@Test
+ public void fallBackToGlobalValues() throws Exception {
+ Configuration configuration = new Configuration();
+ configuration.setSimpleValue(PARAM_VARIABLE_BINDING_PREFIX, "molo");
+
+ Configuration preferences = new Configuration();
+ preferences.put(new
PropertySimple("defaultTargetHost","hugo"));
+ SnmpInfo snmpInfo = SnmpInfo.load(configuration,preferences);
+ assertNull(snmpInfo.error, "SnmpInfo#load should not have detected an
error");
+ assertEquals(snmpInfo.host, "hugo");
+ assertEquals(snmpInfo.oid, "molo");
+ assertEquals(snmpInfo.port, SnmpInfo.DEFAULT_PORT);
+
+
+ configuration.setSimpleValue(PARAM_HOST, "pipo");
+
+ snmpInfo = SnmpInfo.load(configuration,preferences);
+ assertNull(snmpInfo.error, "SnmpInfo#load should not have detected an
error");
+ assertEquals(snmpInfo.host, "pipo");
+ assertEquals(snmpInfo.oid, "molo");
+ assertEquals(snmpInfo.port, SnmpInfo.DEFAULT_PORT);
+ }
+
+ @Test
public void shouldExposeAllParams() throws Exception {
Configuration configuration = new Configuration();
configuration.setSimpleValue(PARAM_HOST, "pipo");
commit 44e927da01ac1d6fb0252c71615c675815787408
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jul 8 10:01:47 2013 +0200
Bump rest-assured version.
diff --git a/modules/integration-tests/rest-api/pom.xml
b/modules/integration-tests/rest-api/pom.xml
index 7b42b45..47bfe18 100644
--- a/modules/integration-tests/rest-api/pom.xml
+++ b/modules/integration-tests/rest-api/pom.xml
@@ -19,7 +19,7 @@
<properties>
<surefire-plugin.version>2.10</surefire-plugin.version>
<jackson.version>1.9.5</jackson.version>
- <rest-assured.version>1.7.2</rest-assured.version>
+ <rest-assured.version>1.8.1</rest-assured.version>
</properties>
<build>