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

RE: comments on NETCONF RPC and Protocol Operations Schema



Title: Message
Hi All,
     Resending the schema in text format.
 
 
<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>
 <!-- Standard elements used in the error-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>
 
 
Thanks & Regards,
V.Sarma
 
<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>
	<!-- Standard elements used in the error-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>