[Netconf] Question on text constraints within <error-message> for NETCONF protocol level errors

Mark Ellison <ellison@ieee.org> Wed, 05 August 2009 19:00 UTC

Return-Path: <mark@ellisonsoftware.com>
X-Original-To: netconf@core3.amsl.com
Delivered-To: netconf@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 0D0A228C631 for <netconf@core3.amsl.com>; Wed, 5 Aug 2009 12:00:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -101.677
X-Spam-Level:
X-Spam-Status: No, score=-101.677 tagged_above=-999 required=5 tests=[AWL=-0.299, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, J_CHICKENPOX_34=0.6, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wlQBwEkx61fN for <netconf@core3.amsl.com>; Wed, 5 Aug 2009 12:00:09 -0700 (PDT)
Received: from mail-yx0-f173.google.com (mail-yx0-f173.google.com [209.85.210.173]) by core3.amsl.com (Postfix) with ESMTP id AC94B3A6C4C for <netconf@ietf.org>; Wed, 5 Aug 2009 11:58:35 -0700 (PDT)
Received: by yxe3 with SMTP id 3so439202yxe.29 for <netconf@ietf.org>; Wed, 05 Aug 2009 11:58:36 -0700 (PDT)
MIME-Version: 1.0
Sender: mark@ellisonsoftware.com
Received: by 10.151.15.2 with SMTP id s2mr16219010ybi.213.1249498716281; Wed, 05 Aug 2009 11:58:36 -0700 (PDT)
Date: Wed, 05 Aug 2009 14:58:36 -0400
X-Google-Sender-Auth: c509b4260459df22
Message-ID: <8a0268750908051158m2658292ctaf2a14cbd0206c39@mail.gmail.com>
From: Mark Ellison <ellison@ieee.org>
To: netconf@ietf.org
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: [Netconf] Question on text constraints within <error-message> for NETCONF protocol level errors
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/netconf>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Aug 2009 19:00:11 -0000

Hi,

I am working from RFC4741/draft-4741bis-00 to develop a compliant
NETCONF implementation and have a question with respect to the
<error-message> element in <rpc-error>.

The <error-message> element is described in section 4.3. as:
     "Contains a string suitable for human display that
      describes the error condition.  This element will not be present
      if no appropriate message is provided for a particular error
      condition.  This element SHOULD include an xml:lang attribute as
      defined in [1] and discussed in [12]."

And just before the examples in this section the following statement appears:

     "Appendix A enumerates the standard NETCONF errors."


If my NETCONF client sends a frame containing NETCONF protocol level
errors as follow:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rpc message-id="106"
     xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <edit-config>
        <target>
            <running/>
        </target>
        <default-operation>splurge</default-operation>
        <test-option>set-then-test</test-option>
        <error-option>contemplate-on-error</error-option>
        <mishigas/>
        <config>
           <a-config-subtree operation="merge">
               blah blah blah blah
           </a-config-subtree>
        </config>
    </edit-config>
</rpc>
]]>]]>



If my NETCONF server is constrained by Appendix A, then it will
respond with: (example reply 1)


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rpc-reply message-id="106" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>bad-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">An element value is not correct;
e.g., wrong type, out of range, pattern mismatch.</error-message>
        <error-info>
            <bad-element>default-operation</bad-element>
        </error-info>
    </rpc-error>
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>bad-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">An element value is not correct;
e.g., wrong type, out of range, pattern mismatch.</error-message>
        <error-info>
            <bad-element>test-option</bad-element>
        </error-info>
    </rpc-error>
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>bad-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">An element value is not correct;
e.g., wrong type, out of range, pattern mismatch.</error-message>
        <error-info>
            <bad-element>error-option</bad-element>
        </error-info>
    </rpc-error>
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>unknown-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">An unexpected element is
present.</error-message>
        <error-info>
            <bad-element>mishigas</bad-element>
        </error-info>
    </rpc-error>
</rpc-reply>
]]>]]>


However, there is more specific information available that my NETCONF
server can provide with respect to the simple types having an
enumeration constraint- <default-operation>, <test-operation> and
<error-option>: (example reply 2)


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rpc-reply message-id="106" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>bad-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">Value 'splurge' is not
facet-valid with respect to enumeration '[merge, replace, none]'. It
must be a value from the enumeration.</error-message>
        <error-info>
            <bad-element>default-operation</bad-element>
        </error-info>
    </rpc-error>
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>bad-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">Value 'set-then-test' is not
facet-valid with respect to enumeration '[test-then-set, set]'. It
must be a value from the enumeration.</error-message>
        <error-info>
            <bad-element>test-option</bad-element>
        </error-info>
    </rpc-error>
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>bad-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">Value 'contemplate-on-error' is
not facet-valid with respect to enumeration '[stop-on-error,
continue-on-error, rollback-on-error]'. It must be a value from the
enumeration.</error-message>
        <error-info>
            <bad-element>error-option</bad-element>
        </error-info>
    </rpc-error>
    <rpc-error>
        <error-type>rpc</error-type>
        <error-tag>unknown-element</error-tag>
        <error-severity>error</error-severity>
        <error-message xml:lang="en">An unexpected element is
present.</error-message>
        <error-info>
            <bad-element>mishigas</bad-element>
        </error-info>
    </rpc-error>
</rpc-reply>
]]>]]>


The above error-message text is taken directly from the SAX/DOM parser
errors based upon the NETCONF schema and appear to be more useful than
the error-message text contained in Appendix A.

Now, in order to be compliant wih respect to 4741/4741bis does my
NETCONF server for errors occurring at the NETCONF protocol level need
to constrain eror-message text to that contained in Appendix A?  Or,
can the error-message text be as in example reply 2?  (Or even a
concatenation of Appendix A error-message text with the text in
example reply 2?)

Regards,

Mark