Network Working Group S. Yang Internet-Draft X. Ji Intended status: Experimental T. Zou Expires: January 12, 2014 G. Yan Huawei Technologies July 11, 2013 NETCONF rpc-error extension draft-ysc-netconf-rpc-error-extension-00 Abstract The NETCONF is a machine-machine interface, it is easy to expand. This document will expand the rpc-error message to make multiple language support easily. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on January 12, 2014. Copyright Notice Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of Yang, et al. Expires January 12, 2014 [Page 1] Internet-Draft NETCONF rpc-error extension July 2013 publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. The definition in NETCONF Protocol . . . . . . . . . . . . . 2 3. The solution . . . . . . . . . . . . . . . . . . . . . . . . 3 4. Error-parameters Capability . . . . . . . . . . . . . . . . . 3 4.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3 4.2. Dependencies . . . . . . . . . . . . . . . . . . . . . . 4 4.3. Capability Identifier . . . . . . . . . . . . . . . . . . 4 4.4. New Operation . . . . . . . . . . . . . . . . . . . . . . 4 4.5. Modifications to Existing Operations . . . . . . . . . . 4 4.6. Interactions with Other Capabilities . . . . . . . . . . 5 5. Use Case in NMS . . . . . . . . . . . . . . . . . . . . . . . 5 6. YANG Module for the . . . . . . . . . . . 5 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 8. Security Considerations . . . . . . . . . . . . . . . . . . . 8 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 10. Normative References . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 1. Introduction The Network Configuration Protocol (NETCONF) provides mechanisms to install, manipulate, and delete the configuration of network devices. It uses a RPC-based communication model. NETCONF peer use and elements to provide transport protocol-independent framing of NETCONF requests and responses. The element is used to enclose a NETCONF request sent from the client to the server. The message is sent in response to an message. The element is sent in messages if an error occurs during the processing of an request. The error-message is part of rpc-error information; it contains a string suitable for human display that describes the error condition. The network device of one producer may be used in many industries and be integrated with many NMS all over the world, each industry or NMS has different custom and demand in the GUI style. So there is a need for the error-message to support multiple language and customization. 2. The definition in NETCONF Protocol Yang, et al. Expires January 12, 2014 [Page 2] Internet-Draft NETCONF rpc-error extension July 2013 Although NETCONF already support identify the language type by xml:lang="en" in the error-message, but it's very difficult for network devices to support multiple languages or customization for error-message, because of storage limitation, complexity on software release, unexpected customization requirement, and so on. This document describes another solution to resolve this issue by extending the rpc-error with a new capability: error-parameters. 3. The solution First of all, we classify all languages into two types: common language and local language. English is specified as common language, and all other languages are specified as local language. Each error-message contains 2 parts, static format string and dynamic error parameters, each format string mapping to a unique an error- app-tag. NMS could translate the format string from common language to local language for each error-app-tag, and network devices could return the error parameters in the rpc-reply. So network devices only need support common language in error-message, NMS could support local language for error-message by combining the format string of local language and error-parameters. It's similar to customization, network device only need support default error-message in common language, and NMS could support customization for error-message. Example: error-app-tag: 00010001 Error message: MTU value 25000 of interface ethernet1/0/1 is not within range 256..9192 Error-message definition for common language: Error-parameters:25000, ethernet1/0/1, 256, 9192 Format string: MTU value $1 of interface $2 is not within range $3..$4 4. Error-parameters Capability 4.1. Overview The :error-parameters capability indicates that the device supports to carry error parameters which are referred by error-message in the rpc-error. The error-parameters could be used to support local language and customization for error-message by NMS. Yang, et al. Expires January 12, 2014 [Page 3] Internet-Draft NETCONF rpc-error extension July 2013 4.2. Dependencies None. 4.3. Capability Identifier The :error-parameters capability is identified by the following capability string: urn:ietf:params:netconf:capability:error-parameters:1.0 4.4. New Operation None. 4.5. Modifications to Existing Operations All operation which may cause an rpc-error carrying error-message which refers error parameter. The rpc-reply will carry error parameters which are referred by the error-message in the rpc-error. For example: application invalid-value error 00010001 /t:top/t:interface[t:name="Ethernet1/0/1"]/t:mtu MTU value 25000 of interface ethernet1/0/1 is not within range 256..9192 25000 ethernet1/0/1 256 9192 Yang, et al. Expires January 12, 2014 [Page 4] Internet-Draft NETCONF rpc-error extension July 2013 4.6. Interactions with Other Capabilities None. 5. Use Case in NMS One example is provided to describe how this solution support local language for error-message in NMS. Example: error-app-tag: 00010001 Error message: MTU value 25000 of interface ethernet1/0/1 is not within range 256..9192 Error-message definition for common language: Error-parameters:25000, ethernet1/0/1, 256, 9192 Format string: MTU value $1 of interface $2 is not within range $3..$4 Major work in NMS for each error-message: 1. Translation format string to local language: Format string: La valeur MTU $1 de l'interface $2 n'est pas dans la plage de $3 a $4. Remark: The order of error-parameters in the format string of local language may be different with format string of common language. 2. Search the error-message by error-app-tag and combine the error- parameters into the format string in local language to generate the error-message for local language La valeur MTU 25000 de l'interface ethernet1/0/1 n'est pas dans la plage de 256 a 9192. 6. YANG Module for the file="ietf-netconf-error-parameters@2013-07-11.yang" module ietf-netconf-error-parameters { namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-error-parameters"; Yang, et al. Expires January 12, 2014 [Page 5] Internet-Draft NETCONF rpc-error extension July 2013 prefix ncep; import yuma-netconf { prefix nc; } organization "IETF NETCONF (Network Configuration Protocol) Working Group"; contact "WG Web: WG List: WG Chair: Bert Wijnen WG Chair: Mehmet Ersue Editor: Andy Bierman Editor: Balazs Lengyel "; description "This module defines an extension to the NETCONF protocol that allows the NETCONF server to return error parameters in the rpc-error which are refered in the error-message. Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and remove this // note. // RFC Ed.: remove this note // Note: extracted from draft-ysc-netconf-rpc-error-extension-00.txt Yang, et al. Expires January 12, 2014 [Page 6] Internet-Draft NETCONF rpc-error extension July 2013 // RFC Ed.: update the date below with the date of RFC publication // and remove this note. revision 2013-07-11 { description "Initial version."; reference "RFC XXXX: NETCONF rpc-error extension"; } grouping ErrorParameters { description "Contains the for the extension."; container error-parameters { description "The container of all error parameters in the "; reference "RFC XXXX; Section 4.5"; leaf-list error-parameter { type string; description "error-parameter element"; reference "RFC XXXX; Section 4.5"; } } } // extending the rpc-error augment /nc:rpc-reply/nc:rpc-error { description "Adds the parameter to the ."; reference "RFC XXXX; Section 4.5"; uses ErrorParameters; } } 7. IANA Considerations Yang, et al. Expires January 12, 2014 [Page 7] Internet-Draft NETCONF rpc-error extension July 2013 This document registers the following capability identifier URN in the 'Network Configuration Protocol (NETCONF) Capability URNs' registry: urn:ietf:params:netconf:capability:error-parameters:1.0 This document registers two XML namespace URNs in the 'IETF XML registry', following the format defined in [RFC3688]. URI: urn:ietf:params:xml:ns:yang:ietf-netconf-error-parameters Registrant Contact: The NETCONF WG of the IETF. XML: N/A, the requested URIs are XML namespaces. This document registers one module name in the 'YANG Module Names' registry, defined in [RFC6020] . name: ietf-netconf-error-parameters prefix: ncep namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-error-parameters RFC: XXXX 8. Security Considerations This document does not introduce any further security issues other than that discussed in [RFC6241]. 9. Acknowledgements NA 10. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. Yang, et al. Expires January 12, 2014 [Page 8] Internet-Draft NETCONF rpc-error extension July 2013 [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, "Network Configuration Protocol (NETCONF)", RFC 6241, June 2011. Authors' Addresses Shouchuan Yang Huawei Technologies Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: yangshouchuan@huawei.com Xiaofeng Ji Huawei Technologies Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: jixiaofeng@huawei.com Ting Zou Huawei Technologies Santa Clara-2330 Central Expressway Santa Clara, CA 95050 America Email: Tina.Tsou.Zouting@huawei.com Gang Yan Huawei Technologies Huawei Bld., No.156 Beiqing Rd. Beijing 100095 China Email: yangang@huawei.com Yang, et al. Expires January 12, 2014 [Page 9]