Cisco Cisco Configuration Engine 3.5 Entwickleranleitung

Seite von 344
9-23
Cisco Configuration Engine Software Development Kit API Reference and Programmer Guide 3.5
OL-17661-02
Chapter 9      DTDs for Cisco IOS Devices
Event Gateway Communications
examples:
Example of XML data to get all the ifEntries:
<?xml version="1.0" encoding="UTF-8"?>
<Get request-id="100"  device-id="event_3600_1">
  <Getvarbind oid="1.3.6.1.2.1.2.2.1"></Getvarbind>
</Get>
Example of XML data to get all the instances of ifDescr Object:
<?xml version="1.0" encoding="UTF-8"?>
<Get device-id = “Networkmanager1” request-id = “200”>
  <Getvarbind oid= “1.3.6.1.2.1.2.2.1.2 “/>
</Get>
Example of XML data to set instance of ifAdminStatus.2 to ë1
<?xml version="1.0" encoding="UTF-8"?>
<Set device-id = “Networkmanager1” request-id = “400”>
  <Setvarbind oid= “1.3.6.1.2.1.2.2.1.7.2.1” > 1</Setvarbind>
</Set>
cisco.mgmt.cns.mibaccess.response
These messages contain the granular snmp responses from Get/Set operations.
DTD for a granular mibaccess response message
<!ELEMENT Response (Varbind)*>
    <!ATTLIST Response
request-id CDATA #REQUIRED
fragment-id CDATA #REQUIRED
        error-status(genError | wrongValue | noCreation | inconsistentValue | 
resourceUnavailable 
          | notWritable | wrongType | inconsistentName | noSuchObject | noSuchInstance 
          | endOfMibView|noError) PCDATA #REQUIRED
error_index CDATA #REQUIRED>
    <!ELEMENT Varbind (#PCDATA)>
    <!ATTLIST Varbind
Set
The root tag of a snmp set request. Perform a 
snmp set on the listed varbinds. device-id contains 
the device id. request-id has the request identifier.
Setvarbind
The varbind to set. oid contains the object ID of 
the MIB object. type is the type of the object. For 
types int, int32, uint32, couter32, counter64, 
gauge32 adn timeticks, value is in string form of 
decimal representation. For types opaque, bits, ip, 
octetstrings and any, it is the base64 encoded 
value of the string of octets. For type oid, it is in 
the form "a.b.c.d..."
Table 9-21
Elements for a granular mibaccess request message.
Element
Descriptions