210 likes | 335 Views
IETF69 BOF XSD for accessing SMIv2 data models. Yan Li liyan_77@huawei.com. Outline. Datatypes for Netconf Data Models Using Smidump to Convert MIB to XSD Accessing MIBs using NETCONF. Datatypes for Netconf Data Models Using Smidump to Convert MIB to XSD Accessing MIBs using NETCONF.
E N D
IETF69 BOFXSD for accessing SMIv2 data models Yan Li liyan_77@huawei.com
Outline • Datatypes for Netconf Data Models • Using Smidump to Convert MIB to XSD • Accessing MIBs using NETCONF
Datatypes for Netconf Data Models • Using Smidump to Convert MIB to XSD • Accessing MIBs using NETCONF
Background • RFC 4181 “Guidelines for Authors and Reviewers of MIB Documents” lists an initial set of commonly used Textual Conventions. Their semantics and syntax could be reused by NETCONF and other XML-based management protocols
Open Issues • Is the EnabledStatus (P-BRIDGE-MIB) needed? • SNMP-Specific TCs - TestAndIncr - RowStatus - StorageType
Next Step • Discuss case by case to identify which TCs are needed.
Datatypes for Netconf Data Models • Using Smidump to Convert MIB to XSD • Accessing MIBs using NETCONF
Structure of the XML Instance Documents invented by Smidump • Smidump invents a "flattened" structure of the XML instance documents <snmp-data> | +--<context> | +--A container of scalar elements (one or more) | | | +--scalar objects | +--An instance of table entry (one or more) | +--columnar objects
Example of IF-MIB <snmp-data xmlns="http://www.ibr.cs.tu-bs.de/projects/libsmi/xsd/IF-MIB"> <context ipaddr=“…” hostname=“…” port=“…” community=“…” time=“…”> <interfaces> <ifNumber>…</ifNumber> </interfaces> <ifMIBObjects> <ifTableLastChange>…</ifTableLastChange> <ifStackLastChange>…</ifStackLastChange> </ifMIBObjects> <ifEntry ifIndex="1"> <ifType>…</ifType> … </ifEntry> <ifXEntry>…</ifXEntry> <ifStackEntry>…</ifStackEntry> <ifTestEntry>…</ifTestEntry> <ifRcvAddressEntry>…</ifRcvAddressEntry> </context> </snmp-data>
The Output XSD of Smidump <xsd:element name="ifDescr" minOccurs="0"> <xsd:annotation> <xsd:appinfo> <maxAccess>read-only</maxAccess> <oid>1.3.6.1.2.1.2.2.1.2</oid> <status>current</status> </xsd:appinfo> <xsd:documentation>…</xsd:documentation> </xsd:annotation> <xsd:simpleType> <xsd:annotation> <xsd:appinfo> <displayHint>255a</displayHint> </xsd:appinfo> </xsd:annotation> <xsd:restriction base="xsd:string"> <xsd:pattern value="((((\p{IsBasicLatin})){0,255})){0,1}"/> </xsd:restriction> </xsd:simpleType> </xsd:element>
Datatypes for Netconf Data Models • Using Smidump to Convert MIB to XSD • Accessing MIBs using NETCONF
Motivation • There is no data model for NETCONF, even a data modeling language at this time. But operators expect device vendors support NETCONF right now. What data models should device vendors provide? • The proprietary data models impair interoperability between devices and applications from different vendors. Actually it is another version of CLI. • The standard data models for NETCONF are destined to replace the proprietary data models in the near future. So device vendors will gain little return from developing proprietary data models • There is a need for standard data models for transiting toward NETCONF, the SMI MIB is an alternative - SMI MIB is widely used for a long time, there are over 200 standard MIB modules -There is an open source tool, libsmi, which can convert SMI MIB into XSD conveniently • A standard approach for accessing MIB may be used by not only NETCONF, but other XML-based NM protocols as well.
Approach for Accessing MIB • Use the XSD converted by smidump as data model • Add a capability for NETCONF • The capability contains two SNMP-specific operations - <mib-get>, has a optional “max-repetitions” attribute for retrieving table entries. - <mib-set>, has a optional “operation” attribute for creating or deleting a table entry.
Example of <mib-get> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:mib="urn:ietf:params:xml:ns:netconf:mib:1.0"> <mib:mib-get> <filter type="subtree"> <snmp-data xmlns="http://www.ibr.cs.tu-bs.de/projects/libsmi/xsd/IF-MIB"> <context ipaddr="192.0.2.1" port="830" community="public" time="2006-12-05T08:08:08Z"> <ifEntry ifIndex="1"> <ifType/> <ifMtu/> </ifEntry> </context> </snmp-data> </filter> </mib:mib-get> </rpc>
Example of <mib-set> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:mib="urn:ietf:params:xml:ns:netconf:mib:1.0"> <mib:mib-set> <snmp-data xmlns="http://www.ibr.cs.tu-bs.de/projects/libsmi/xsd/IF-MIB"> <context ipaddr="192.0.2.1" port="830" community="public" time="2006-12-05T08:08:08Z"> <ifStackEntry ifStackHigherLayer="1" ifStackLowerLayer="2" mib:operation="create"/> </context> </snmp-data> </mib:mib-set> </rpc>
Open Issues • <mib-get> vs. <get> • Should the “max-repetitions” attribute be inherited from SNMP? • Is the set functionality needed?
Thank You • Questions? • Contact info Yan Li – liyan_77@huawei.com