[jboss-jira] [JBoss JIRA] Commented: (JBAS-3786) SNMP Adaptor doen't accept TruthValue according to SNMP v2

Dimitris Andreadis (JIRA) jira-events at lists.jboss.org
Mon Apr 16 12:18:59 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBAS-3786?page=comments#action_12359451 ] 
            
Dimitris Andreadis commented on JBAS-3786:
------------------------------------------

After a quick search I found TruthValues to be mapped as integers:

TruthValue ::= INTEGER { true (1) , false (2) }

Example: Conversion of SNMP TextualConvention
Textual Convention

TruthValue ::= TEXTUAL-CONVENTION
  STATUS current
  DESCRIPTION
     "Represents a boolean value."
  SYNTAX INTEGER { true (1) , false (2) }

In general, we need to expand type support and make it overridable with explicit references in the mapping files.

> SNMP Adaptor doen't accept TruthValue according to SNMP v2
> ----------------------------------------------------------
>
>                 Key: JBAS-3786
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3786
>             Project: JBoss Application Server
>          Issue Type: Patch
>      Security Level: Public(Everyone can see) 
>          Components: Management services
>    Affects Versions: JBossAS-4.0.4.GA
>         Environment: linux , eclipse,  I'm using jboss 4.0.4-GA
>            Reporter: Luca Stancapiano
>         Assigned To: Dimitris Andreadis
>             Fix For: JBossAS-4.2.1.CR1
>
>         Attachments: RequestHandlerImpl.java
>
>
> hi.......if you try to take a TruthValue using a MIB Browser , you receive nothing because org.jboss.jmx.adaptor.snmp.agent.RequestHandlerImpl doesn't manage booleans ....I added a patch into getValueFor method ( row 474 )  that manage it with good results. I think that setValue method doesn't need the same correction because joesnmp can simply to interpret TruthValue as SnmpStringOctet object
> row 474:
>             else if (val instanceof Boolean)
>             {
>             	    Boolean in = (Boolean) val;
> 	   ssy = new SnmpOctetString(in.toString().getBytes());
>             }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list