[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

comments on NETCONF RPC and Protocol Operations Schema



Title: Message
Hi All,
 
some comments on NETCONF RPC and Protocol Operations Schema. (Appendix B)
 
1. edit-config: has a source parameter of rpcOperationSourceType.
    Having source and target both in edit-config doesn't seem appropriate.
    Shouldn't source parameter be removed?
   
2. edit-config: The config parameter is marked as optional in edit-configType, Shouldn't this be mandatory instead?
     <xs:element ref="config" minOccurs=1 />
3. get-config: refers to rpcOperationSourceType, which has a config element.
    config tag inside source parameter is not meaningful, instead we could define a
    rpcOperationGetSourceType without a config element.
 
4. lock and unlock: these commands refer to rpcOperationTargetType, which can take url as a target.
    Enforcing lock on url configuration is not feasible. So url should be removed from target in case of lock and unlock.
 
    Instead we can define a rpcOperationLockTargetType without url, which we can refer in lock and unlock.
 
5. kill-session: has session-id as optional, shouldn't this be mandatory too.
 
    Here is the new protocol operations schema with the above changes
========================================================================
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="rpcType"> <xs:sequence> <xs:element ref="rpcOperation"/> </xs:sequence> <xs:attribute name="message-id" type="xs:string" use="required"/> </xs:complexType> <xs:element name="rpc" type="rpcType"/> <xs:simpleType name="SessionId"> <xs:restriction base="xs:unsignedInt"/> </xs:simpleType> <xs:simpleType name="ErrorType"> <xs:restriction base="xs:string"> <xs:enumeration value="transport"/> <xs:enumeration value="rpc"/> <xs:enumeration value="protocol"/> <xs:enumeration value="application"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="ErrorTag"> <xs:restriction base="xs:string"> <xs:enumeration value="TOO_BIG"/> <xs:enumeration value="MISSING_ATTRIBUTE"/> <xs:enumeration value="BAD_ATTRIBUTE"/> <xs:enumeration value="UNKNOWN_ATTRIBUTE"/> <xs:enumeration value="MISSING_ELEMENT"/> <xs:enumeration value="BAD_ELEMENT"/> <xs:enumeration value="UNKNOWN_ELEMENT"/> <xs:enumeration value="ACCESS_DENIED"/> <xs:enumeration value="LOCK_DENIED"/> <xs:enumeration value="RESOURCE_DENIED"/> <xs:enumeration value="ROLLBACK_FAILED"/> <xs:enumeration value="DATA_EXISTS"/> <xs:enumeration value="DATA_MISSING"/> <xs:enumeration value="OPERATION_NOT_SUPPORTED"/> <xs:enumeration value="OPERATION_FAILED"/> <xs:enumeration value="PARTIAL_OPERATION"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="ErrorSeverity"> <xs:restriction base="xs:string"> <xs:enumeration value="error"/> <xs:enumeration value="warning"/> </xs:restriction> </xs:simpleType> <xs:complexType name="rpc-errorType"> <xs:sequence> <xs:element name="error-type" type="ErrorType"/> <xs:element name="error-tag" type="ErrorTag"/> <xs:element name="error-severity" type="ErrorSeverity"/> <xs:element name="error-app-tag" type="xs:string" minOccurs="0"/> <xs:element name="error-path" type="xs:string" minOccurs="0"/> <xs:element name="error-message" type="xs:string" minOccurs="0"/> <xs:element name="error-info" type="xs:anyType" minOccurs="0"/> </xs:sequence> </xs:complexType> <!---info container --> <xs:element name="bad-attribute" type="xs:QName"/> <xs:element name="bad-element" type="xs:QName"/> <xs:element name="ok-element" type="xs:QName"/> <xs:element name="err-element" type="xs:QName"/> <xs:element name="noop-element" type="xs:QName"/> <xs:element name="session-id" type="SessionId"/> <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="config" minOccurs="0"/> <xs:element ref="data" minOccurs="0"/> </xs:choice> <xs:attribute name="message-id" type="xs:string" use="required"/> </xs:complexType> <xs:element name="rpc-reply" type="rpc-replyType"/> <xs:simpleType name="test-optionType"> <xs:restriction base="xs:string"> <xs:enumeration value="test"/> <xs:enumeration value="test-then-set"/> <xs:enumeration value="set"/> </xs:restriction> </xs:simpleType> <xs:element name="test-option" type="test-optionType"/> <xs:simpleType name="error-optionType"> <xs:restriction base="xs:string"> <xs:enumeration value="stop-on-error"/> <xs:enumeration value="ignore-error"/> <xs:enumeration value="rollback-on-error"/> </xs:restriction> </xs:simpleType> <xs:element name="error-option" type="error-optionType"/> <xs:complexType name="rpcOperationType"/> <xs:element name="rpcOperation" type="rpcOperationType" abstract="true"/> <xs:complexType name="config-inlineType"> <xs:complexContent> <xs:extension base="xs:anyType"/> </xs:complexContent> </xs:complexType> <xs:element name="data" type="xs:anyType"/> <xs:element name="config" type="config-inlineType"/> <xs:element name="filter" type="config-inlineType"/> <xs:complexType name="config-nameType"/> <xs:element name="config-name" type="config-nameType" abstract="true"/> <xs:element name="startup" type="config-nameType" substitutionGroup="config-name"/> <xs:element name="candidate" type="config-nameType" substitutionGroup="config-name"/> <xs:element name="running" type="config-nameType" substitutionGroup="config-name"/> <xs:complexType name="config-uriType"> <xs:simpleContent> <xs:extension base="xs:anyURI"/> </xs:simpleContent> </xs:complexType> <xs:element name="url" type="config-uriType"/> <xs:complexType name="rpcOperationSourceType"> <xs:choice> <xs:element ref="config"/> <xs:element ref="config-name"/> <xs:element ref="url"/> </xs:choice> </xs:complexType> <xs:complexType name="rpcOperationGetSourceType"> <xs:choice> <xs:element ref="config-name"/> <xs:element ref="url"/> </xs:choice> </xs:complexType> <xs:element name="get-source" type="rpcOperationGetSourceType"/> <xs:element name="source" type="rpcOperationSourceType"/> <xs:complexType name="rpcOperationTargetType"> <xs:choice> <xs:element ref="config-name"/> <xs:element ref="url"/> </xs:choice> </xs:complexType> <xs:complexType name="rpcOperationLockTargetType"> <xs:choice> <xs:element ref="config-name"/> </xs:choice> </xs:complexType> <xs:element name="lock-target" type="rpcOperationLockTargetType"/> <xs:element name="target" type="rpcOperationTargetType"/> <xs:complexType name="get-configType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="get-source"/> <xs:element ref="filter" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="get-config" type="get-configType" substitutionGroup="rpcOperation"/> <xs:complexType name="edit-configType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="target"/> <xs:element ref="test-option" minOccurs="0"/> <xs:element ref="error-option" minOccurs="0"/> <xs:element ref="config"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="edit-config" type="edit-configType" substitutionGroup="rpcOperation"/> <xs:complexType name="copy-configType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="source"/> <xs:element ref="target"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="copy-config" type="copy-configType" substitutionGroup="rpcOperation"/> <xs:complexType name="delete-configType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="target"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="delete-config" type="delete-configType" substitutionGroup="rpcOperation"/> <xs:complexType name="getType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="filter" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="get" type="getType" substitutionGroup="rpcOperation"/> <xs:complexType name="lockType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="lock-target"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="lock" type="lockType" substitutionGroup="rpcOperation"/> <xs:complexType name="unlockType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="lock-target"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="unlock" type="unlockType" substitutionGroup="rpcOperation"/> <xs:complexType name="validateType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element ref="source"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="validate" type="validateType" substitutionGroup="rpcOperation"/> <xs:complexType name="commitType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element name="confirmed" minOccurs="0"/> <xs:element name="confirmed-timeout" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="commit" type="commitType" substitutionGroup="rpcOperation"/> <xs:complexType name="discard-changesType"> <xs:complexContent> <xs:extension base="rpcOperationType"/> </xs:complexContent> </xs:complexType> <xs:element name="discard-changes" type="discard-changesType" substitutionGroup="rpcOperation"/> <xs:complexType name="close-sessionType"> <xs:complexContent> <xs:extension base="rpcOperationType"/> </xs:complexContent> </xs:complexType> <xs:element name="close-session" type="close-sessionType" substitutionGroup="rpcOperation"/> <xs:complexType name="kill-sessionType"> <xs:complexContent> <xs:extension base="rpcOperationType"> <xs:sequence> <xs:element name="session-id" type="SessionId"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="kill-session" type="kill-sessionType" substitutionGroup="rpcOperation"/> </xs:schema>

Attachment: NewNetconfSchema.xsd
Description: NewNetconfSchema.xsd