Subject: RE: reporting multiple rpc-errors

From: "Rob Enns" <[email-masked]>
Date: Wed, 23 Mar 2005 16:34:17 -0800

Thanks for the text Andy.

With the modification to allow additional attributes, it looks like
this.
Note that message-id is optional on the rpc-reply because an error must
be returned if <rpc> is sent without a message-id.

  <xs:complexType name="rpcReplyType">
    <xs:choice>
      <xs:element name="ok"/>
      <xs:group ref="rpcReplyGroup"/>
    </xs:choice>
    <xs:attribute name="message-id" type="xs:string" use="optional"/>
    <!--
      any attributes supplied with <rpc> element must be returned
      on <rpc-reply>
    -->
    <xs:anyAttribute/>  
  </xs:complexType>

  <xs:group name="rpcReplyGroup">
    <xs:sequence>
      <xs:element name="rpc-error"
        type="rpc-errorType" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="data" minOccurs="0"/>
    </xs:sequence>
  </xs:group>

Rob

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]] On Behalf Of Andy Bierman
> Sent: Wednesday, March 23, 2005 8:55 AM
> To: [email-masked]
> Subject: reporting multiple rpc-errors
> 
> Hi,
> 
> The section on <rpc-error> and its XSD fragment are wrong in 
> the -05 draft.
> 
> The following text (or something like it) should be added to sec. 4.3:
> 
>    If an agent encounters multiple errors during the 
> processing of an <rpc>
>    request, the <rpc-reply> MAY contain multiple <rpc-error> elements.
>    However, an agent is not required to detect or report more than one
>    <rpc-error> element, if a request contains multiple 
> errors.  An agent
>    is not required to check for particular error conditions 
> in a specific
>    sequence.  An agent MUST return an <rpc-error> element if any error
>    conditions occur during processing, and SHOULD return an 
> <rpc-error>
>    element if any warning conditions occur during processing.
>  
> 
> Here is the XSD for <rpc-reply>:
> 
>      <xs:complexType name="rpc-replyType">
>        <xs:choice>
>          <xs:element name="ok" minOccurs="0"/>
>          <xs:element name="rpc-error"
>            type="rpc-errorType" minOccurs="0"/>
>          <xs:element ref="data" minOccurs="0"/>
>        </xs:choice>
>        <xs:attribute name="message-id" type="xs:string" 
> use="required"/>
>      </xs:complexType>
> 
> 1) The <rpc-error> element should have maxOccurs="unbounded" 
> specified.
> 2) This XSD design 'choice' doesn't allow for errors/warnings 
> and data to be
>    returned (just one or the other).  This is broken.  It doesn't
>    allow for the 'ignore-error' error-option in the 
> <edit-config> operation.
> 
>    I think this XSD is more what we wanted when we designed the 
> <edit-config>
>    operation:
> 
>      <xs:complexType name="rpc-replyType">
>        <xs:choice>
>          <xs:element name="ok"/>
>          <xs:group ref="rpc-response"/>
>        </xs:choice>
>        <xs:attribute name="message-id" type="xs:string" 
> use="required"/>
>      </xs:complexType>
> 
>      <xs:group name="rpc-response">
>        <xs:sequence>
>          <xs:element name="rpc-error"
>            type="rpc-errorType" minOccurs="0" maxOccurs="unbounded"/>
>          <xs:element ref="data" minOccurs="0"/>
>        </xs:sequence>
>      </xs:group>
> 
> 
> Andy
> 
> 
> --
> to unsubscribe send a message to [email-masked] with
> the word 'unsubscribe' in a single line as the message text body.
> archive: <http://ops.ietf.org/lists/netconf/>
> 

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>

---

From: Andy Bierman <[email-masked]>
Date: Tue, 29 Mar 2005 07:06:09 -0800

>      <xs:element ref="data" minOccurs="0"/>
This XSD still allows for an empty <rpc-reply>.  I think the text says 
the agent must send
one of these non-empty permutations:
     <ok>
     <rpc-error>+
     (<rpc-error>+ <data>)
     <data>.

Andy