netconf.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3. xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
  4. targetNamespace="urn:ietf:params:xml:ns:netconf:base:1.0"
  5. elementFormDefault="qualified"
  6. attributeFormDefault="unqualified"
  7. xml:lang="en">
  8. <!--
  9. import standard XML definitions
  10. -->
  11. <xs:import namespace="http://www.w3.org/XML/1998/namespace"
  12. schemaLocation="http://www.w3.org/2001/xml.xsd">
  13. <xs:annotation>
  14. <xs:documentation>
  15. This import accesses the xml: attribute groups for the
  16. xml:lang as declared on the error-message element.
  17. </xs:documentation>
  18. </xs:annotation>
  19. </xs:import>
  20. <!--
  21. message-id attribute
  22. -->
  23. <xs:simpleType name="messageIdType">
  24. <xs:restriction base="xs:string">
  25. <xs:maxLength value="4095"/>
  26. </xs:restriction>
  27. </xs:simpleType>
  28. <!--
  29. Types used for session-id
  30. -->
  31. <xs:simpleType name="SessionId">
  32. <xs:restriction base="xs:unsignedInt">
  33. <xs:minInclusive value="1"/>
  34. </xs:restriction>
  35. </xs:simpleType>
  36. <xs:simpleType name="SessionIdOrZero">
  37. <xs:restriction base="xs:unsignedInt"/>
  38. </xs:simpleType>
  39. <!--
  40. <rpc> element
  41. -->
  42. <xs:complexType name="rpcType">
  43. <xs:sequence>
  44. <xs:element ref="rpcOperation"/>
  45. </xs:sequence>
  46. <xs:attribute name="message-id" type="messageIdType"
  47. use="required"/>
  48. <!--
  49. Arbitrary attributes can be supplied with <rpc> element.
  50. -->
  51. <xs:anyAttribute processContents="lax"/>
  52. </xs:complexType>
  53. <xs:element name="rpc" type="rpcType"/>
  54. <!--
  55. data types and elements used to construct rpc-errors
  56. -->
  57. <xs:simpleType name="ErrorType">
  58. <xs:restriction base="xs:string">
  59. <xs:enumeration value="transport"/>
  60. <xs:enumeration value="rpc"/>
  61. <xs:enumeration value="protocol"/>
  62. <xs:enumeration value="application"/>
  63. </xs:restriction>
  64. </xs:simpleType>
  65. <xs:simpleType name="ErrorTag">
  66. <xs:restriction base="xs:string">
  67. <xs:enumeration value="in-use"/>
  68. <xs:enumeration value="invalid-value"/>
  69. <xs:enumeration value="too-big"/>
  70. <xs:enumeration value="missing-attribute"/>
  71. <xs:enumeration value="bad-attribute"/>
  72. <xs:enumeration value="unknown-attribute"/>
  73. <xs:enumeration value="missing-element"/>
  74. <xs:enumeration value="bad-element"/>
  75. <xs:enumeration value="unknown-element"/>
  76. <xs:enumeration value="unknown-namespace"/>
  77. <xs:enumeration value="access-denied"/>
  78. <xs:enumeration value="lock-denied"/>
  79. <xs:enumeration value="resource-denied"/>
  80. <xs:enumeration value="rollback-failed"/>
  81. <xs:enumeration value="data-exists"/>
  82. <xs:enumeration value="data-missing"/>
  83. <xs:enumeration value="operation-not-supported"/>
  84. <xs:enumeration value="operation-failed"/>
  85. <xs:enumeration value="partial-operation"/>
  86. </xs:restriction>
  87. </xs:simpleType>
  88. <xs:simpleType name="ErrorSeverity">
  89. <xs:restriction base="xs:string">
  90. <xs:enumeration value="error"/>
  91. <xs:enumeration value="warning"/>
  92. </xs:restriction>
  93. </xs:simpleType>
  94. <xs:complexType name="errorInfoType">
  95. <xs:sequence>
  96. <xs:choice>
  97. <xs:element name="session-id" type="SessionIdOrZero"/>
  98. <xs:sequence minOccurs="0" maxOccurs="unbounded">
  99. <xs:sequence>
  100. <xs:element name="bad-attribute" type="xs:QName"
  101. minOccurs="0" maxOccurs="1"/>
  102. <xs:element name="bad-element" type="xs:QName"
  103. minOccurs="0" maxOccurs="1"/>
  104. <xs:element name="ok-element" type="xs:QName"
  105. minOccurs="0" maxOccurs="1"/>
  106. <xs:element name="err-element" type="xs:QName"
  107. minOccurs="0" maxOccurs="1"/>
  108. <xs:element name="noop-element" type="xs:QName"
  109. minOccurs="0" maxOccurs="1"/>
  110. <xs:element name="bad-namespace" type="xs:QName"
  111. minOccurs="0" maxOccurs="1"/>
  112. </xs:sequence>
  113. </xs:sequence>
  114. </xs:choice>
  115. <!-- elements from any other namespace are also allowed
  116. to follow the NETCONF elements -->
  117. <xs:any namespace="##other"
  118. minOccurs="0" maxOccurs="unbounded"/>
  119. </xs:sequence>
  120. </xs:complexType>
  121. <xs:complexType name="rpcErrorType">
  122. <xs:sequence>
  123. <xs:element name="error-type" type="ErrorType"/>
  124. <xs:element name="error-tag" type="ErrorTag"/>
  125. <xs:element name="error-severity" type="ErrorSeverity"/>
  126. <xs:element name="error-app-tag" type="xs:string"
  127. minOccurs="0"/>
  128. <xs:element name="error-path" type="xs:string" minOccurs="0"/>
  129. <xs:element name="error-message" minOccurs="0">
  130. <xs:complexType>
  131. <xs:simpleContent>
  132. <xs:extension base="xs:string">
  133. <xs:attribute ref="xml:lang" use="optional"/>
  134. </xs:extension>
  135. </xs:simpleContent>
  136. </xs:complexType>
  137. </xs:element>
  138. <xs:element name="error-info" type="errorInfoType"
  139. minOccurs="0"/>
  140. </xs:sequence>
  141. </xs:complexType>
  142. <!--
  143. <rpc-reply> element
  144. -->
  145. <xs:complexType name="rpcReplyType">
  146. <xs:choice>
  147. <xs:element name="ok"/>
  148. <xs:group ref="rpcResponse"/>
  149. </xs:choice>
  150. <xs:attribute name="message-id" type="messageIdType"
  151. use="optional"/>
  152. <!--
  153. Any attributes supplied with <rpc> element must be returned
  154. on <rpc-reply>.
  155. -->
  156. <xs:anyAttribute processContents="lax"/>
  157. </xs:complexType>
  158. <xs:group name="rpcResponse">
  159. <xs:sequence>
  160. <xs:element name="rpc-error" type="rpcErrorType"
  161. minOccurs="0" maxOccurs="unbounded"/>
  162. <xs:element name="data" type="dataInlineType" minOccurs="0"/>
  163. </xs:sequence>
  164. </xs:group>
  165. <xs:element name="rpc-reply" type="rpcReplyType"/>
  166. <!--
  167. Type for <test-option> parameter to <edit-config>
  168. -->
  169. <xs:simpleType name="testOptionType">
  170. <xs:restriction base="xs:string">
  171. <xs:enumeration value="test-then-set"/>
  172. <xs:enumeration value="set"/>
  173. </xs:restriction>
  174. </xs:simpleType>
  175. <!--
  176. Type for <error-option> parameter to <edit-config>
  177. -->
  178. <xs:simpleType name="errorOptionType">
  179. <xs:restriction base="xs:string">
  180. <xs:annotation>
  181. <xs:documentation>
  182. Use of the rollback-on-error value requires
  183. the :rollback-on-error capability.
  184. </xs:documentation>
  185. </xs:annotation>
  186. <xs:enumeration value="stop-on-error"/>
  187. <xs:enumeration value="continue-on-error"/>
  188. <xs:enumeration value="rollback-on-error"/>
  189. </xs:restriction>
  190. </xs:simpleType>
  191. <!--
  192. rpcOperationType: used as a base type for all
  193. NETCONF operations
  194. -->
  195. <xs:complexType name="rpcOperationType"/>
  196. <xs:element name="rpcOperation"
  197. type="rpcOperationType" abstract="true"/>
  198. <!--
  199. Type for <config> element
  200. -->
  201. <xs:complexType name="configInlineType">
  202. <xs:complexContent>
  203. <xs:extension base="xs:anyType"/>
  204. </xs:complexContent>
  205. </xs:complexType>
  206. <!--
  207. Type for <data> element
  208. -->
  209. <xs:complexType name="dataInlineType">
  210. <xs:complexContent>
  211. <xs:extension base="xs:anyType"/>
  212. </xs:complexContent>
  213. </xs:complexType>
  214. <!--
  215. Type for <filter> element
  216. -->
  217. <xs:simpleType name="FilterType">
  218. <xs:restriction base="xs:string">
  219. <xs:annotation>
  220. <xs:documentation>
  221. Use of the xpath value requires the :xpath capability.
  222. </xs:documentation>
  223. </xs:annotation>
  224. <xs:enumeration value="subtree"/>
  225. <xs:enumeration value="xpath"/>
  226. </xs:restriction>
  227. </xs:simpleType>
  228. <xs:complexType name="filterInlineType">
  229. <xs:complexContent>
  230. <xs:extension base="xs:anyType">
  231. <xs:attribute name="type"
  232. type="FilterType" default="subtree"/>
  233. <!-- if type="xpath", the xpath expression
  234. appears in the select element -->
  235. <xs:attribute name="select"/>
  236. </xs:extension>
  237. </xs:complexContent>
  238. </xs:complexType>
  239. <!--
  240. configuration datastore names
  241. -->
  242. <xs:annotation>
  243. <xs:documentation>
  244. The startup datastore can be used only if the :startup
  245. capability is advertised. The candidate datastore can
  246. be used only if the :candidate datastore is advertised.
  247. </xs:documentation>
  248. </xs:annotation>
  249. <xs:complexType name="configNameType"/>
  250. <xs:element name="config-name"
  251. type="configNameType" abstract="true"/>
  252. <xs:element name="startup" type="configNameType"
  253. substitutionGroup="config-name"/>
  254. <xs:element name="candidate" type="configNameType"
  255. substitutionGroup="config-name"/>
  256. <xs:element name="running" type="configNameType"
  257. substitutionGroup="config-name"/>
  258. <!--
  259. operation attribute used in <edit-config>
  260. -->
  261. <xs:simpleType name="editOperationType">
  262. <xs:restriction base="xs:string">
  263. <xs:enumeration value="merge"/>
  264. <xs:enumeration value="replace"/>
  265. <xs:enumeration value="create"/>
  266. <xs:enumeration value="delete"/>
  267. </xs:restriction>
  268. </xs:simpleType>
  269. <xs:attribute name="operation"
  270. type="editOperationType" default="merge"/>
  271. <!--
  272. <default-operation> element
  273. -->
  274. <xs:simpleType name="defaultOperationType">
  275. <xs:restriction base="xs:string">
  276. <xs:enumeration value="merge"/>
  277. <xs:enumeration value="replace"/>
  278. <xs:enumeration value="none"/>
  279. </xs:restriction>
  280. </xs:simpleType>
  281. <!--
  282. <url> element
  283. -->
  284. <xs:complexType name="configURIType">
  285. <xs:annotation>
  286. <xs:documentation>
  287. Use of the url element requires the :url capability.
  288. </xs:documentation>
  289. </xs:annotation>
  290. <xs:simpleContent>
  291. <xs:extension base="xs:anyURI"/>
  292. </xs:simpleContent>
  293. </xs:complexType>
  294. <!--
  295. Type for <source> element (except <get-config>)
  296. -->
  297. <xs:complexType name="rpcOperationSourceType">
  298. <xs:choice>
  299. <xs:element name="config" type="configInlineType"/>
  300. <xs:element ref="config-name"/>
  301. <xs:element name="url" type="configURIType"/>
  302. </xs:choice>
  303. </xs:complexType>
  304. <!--
  305. Type for <source> element in <get-config>
  306. -->
  307. <xs:complexType name="getConfigSourceType">
  308. <xs:choice>
  309. <xs:element ref="config-name"/>
  310. <xs:element name="url" type="configURIType"/>
  311. </xs:choice>
  312. </xs:complexType>
  313. <!--
  314. Type for <target> element
  315. -->
  316. <xs:complexType name="rpcOperationTargetType">
  317. <xs:choice>
  318. <xs:element ref="config-name"/>
  319. <xs:element name="url" type="configURIType"/>
  320. </xs:choice>
  321. </xs:complexType>
  322. <!--
  323. <get-config> operation
  324. -->
  325. <xs:complexType name="getConfigType">
  326. <xs:complexContent>
  327. <xs:extension base="rpcOperationType">
  328. <xs:sequence>
  329. <xs:element name="source"
  330. type="getConfigSourceType"/>
  331. <xs:element name="filter"
  332. type="filterInlineType" minOccurs="0"/>
  333. </xs:sequence>
  334. </xs:extension>
  335. </xs:complexContent>
  336. </xs:complexType>
  337. <xs:element name="get-config" type="getConfigType"
  338. substitutionGroup="rpcOperation"/>
  339. <!--
  340. <edit-config> operation
  341. -->
  342. <xs:complexType name="editConfigType">
  343. <xs:complexContent>
  344. <xs:extension base="rpcOperationType">
  345. <xs:sequence>
  346. <xs:annotation>
  347. <xs:documentation>
  348. Use of the test-option element requires the
  349. :validate capability. Use of the url element
  350. requires the :url capability.
  351. </xs:documentation>
  352. </xs:annotation>
  353. <xs:element name="target"
  354. type="rpcOperationTargetType"/>
  355. <xs:element name="default-operation"
  356. type="defaultOperationType"
  357. minOccurs="0"/>
  358. <xs:element name="test-option"
  359. type="testOptionType"
  360. minOccurs="0"/>
  361. <xs:element name="error-option"
  362. type="errorOptionType"
  363. minOccurs="0"/>
  364. <xs:choice>
  365. <xs:element name="config"
  366. type="configInlineType"/>
  367. <xs:element name="url"
  368. type="configURIType"/>
  369. </xs:choice>
  370. </xs:sequence>
  371. </xs:extension>
  372. </xs:complexContent>
  373. </xs:complexType>
  374. <xs:element name="edit-config" type="editConfigType"
  375. substitutionGroup="rpcOperation"/>
  376. <!--
  377. <copy-config> operation
  378. -->
  379. <xs:complexType name="copyConfigType">
  380. <xs:complexContent>
  381. <xs:extension base="rpcOperationType">
  382. <xs:sequence>
  383. <xs:element name="target" type="rpcOperationTargetType"/>
  384. <xs:element name="source" type="rpcOperationSourceType"/>
  385. </xs:sequence>
  386. </xs:extension>
  387. </xs:complexContent>
  388. </xs:complexType>
  389. <xs:element name="copy-config" type="copyConfigType"
  390. substitutionGroup="rpcOperation"/>
  391. <!--
  392. <delete-config> operation
  393. -->
  394. <xs:complexType name="deleteConfigType">
  395. <xs:complexContent>
  396. <xs:extension base="rpcOperationType">
  397. <xs:sequence>
  398. <xs:element name="target" type="rpcOperationTargetType"/>
  399. </xs:sequence>
  400. </xs:extension>
  401. </xs:complexContent>
  402. </xs:complexType>
  403. <xs:element name="delete-config" type="deleteConfigType"
  404. substitutionGroup="rpcOperation"/>
  405. <!--
  406. <get> operation
  407. -->
  408. <xs:complexType name="getType">
  409. <xs:complexContent>
  410. <xs:extension base="rpcOperationType">
  411. <xs:sequence>
  412. <xs:element name="filter"
  413. type="filterInlineType" minOccurs="0"/>
  414. </xs:sequence>
  415. </xs:extension>
  416. </xs:complexContent>
  417. </xs:complexType>
  418. <xs:element name="get" type="getType"
  419. substitutionGroup="rpcOperation"/>
  420. <!--
  421. <lock> operation
  422. -->
  423. <xs:complexType name="lockType">
  424. <xs:complexContent>
  425. <xs:extension base="rpcOperationType">
  426. <xs:sequence>
  427. <xs:element name="target"
  428. type="rpcOperationTargetType"/>
  429. </xs:sequence>
  430. </xs:extension>
  431. </xs:complexContent>
  432. </xs:complexType>
  433. <xs:element name="lock" type="lockType"
  434. substitutionGroup="rpcOperation"/>
  435. <!--
  436. <unlock> operation
  437. -->
  438. <xs:complexType name="unlockType">
  439. <xs:complexContent>
  440. <xs:extension base="rpcOperationType">
  441. <xs:sequence>
  442. <xs:element name="target" type="rpcOperationTargetType"/>
  443. </xs:sequence>
  444. </xs:extension>
  445. </xs:complexContent>
  446. </xs:complexType>
  447. <xs:element name="unlock" type="unlockType"
  448. substitutionGroup="rpcOperation"/>
  449. <!--
  450. <validate> operation
  451. -->
  452. <xs:complexType name="validateType">
  453. <xs:annotation>
  454. <xs:documentation>
  455. The validate operation requires the :validate capability.
  456. </xs:documentation>
  457. </xs:annotation>
  458. <xs:complexContent>
  459. <xs:extension base="rpcOperationType">
  460. <xs:sequence>
  461. <xs:element name="source" type="rpcOperationSourceType"/>
  462. </xs:sequence>
  463. </xs:extension>
  464. </xs:complexContent>
  465. </xs:complexType>
  466. <xs:element name="validate" type="validateType"
  467. substitutionGroup="rpcOperation"/>
  468. <!--
  469. <commit> operation
  470. -->
  471. <xs:simpleType name="confirmTimeoutType">
  472. <xs:restriction base="xs:unsignedInt">
  473. <xs:minInclusive value="1"/>
  474. </xs:restriction>
  475. </xs:simpleType>
  476. <xs:complexType name="commitType">
  477. <xs:annotation>
  478. <xs:documentation>
  479. The commit operation requires the :candidate capability.
  480. </xs:documentation>
  481. </xs:annotation>
  482. <xs:complexContent>
  483. <xs:extension base="rpcOperationType">
  484. <xs:sequence>
  485. <xs:annotation>
  486. <xs:documentation>
  487. Use of the confirmed and confirm-timeout elements
  488. requires the :confirmed-commit capability.
  489. </xs:documentation>
  490. </xs:annotation>
  491. <xs:element name="confirmed" minOccurs="0"/>
  492. <xs:element name="confirm-timeout"
  493. type="confirmTimeoutType"
  494. minOccurs="0"/>
  495. </xs:sequence>
  496. </xs:extension>
  497. </xs:complexContent>
  498. </xs:complexType>
  499. <xs:element name="commit" type="commitType"
  500. substitutionGroup="rpcOperation"/>
  501. <!--
  502. <discard-changes> operation
  503. -->
  504. <xs:complexType name="discardChangesType">
  505. <xs:annotation>
  506. <xs:documentation>
  507. The discard-changes operation requires the
  508. :candidate capability.
  509. </xs:documentation>
  510. </xs:annotation>
  511. <xs:complexContent>
  512. <xs:extension base="rpcOperationType"/>
  513. </xs:complexContent>
  514. </xs:complexType>
  515. <xs:element name="discard-changes"
  516. type="discardChangesType"
  517. substitutionGroup="rpcOperation"/>
  518. <!--
  519. <close-session> operation
  520. -->
  521. <xs:complexType name="closeSessionType">
  522. <xs:complexContent>
  523. <xs:extension base="rpcOperationType"/>
  524. </xs:complexContent>
  525. </xs:complexType>
  526. <xs:element name="close-session" type="closeSessionType"
  527. substitutionGroup="rpcOperation"/>
  528. <!--
  529. <kill-session> operation
  530. -->
  531. <xs:complexType name="killSessionType">
  532. <xs:complexContent>
  533. <xs:extension base="rpcOperationType">
  534. <xs:sequence>
  535. <xs:element name="session-id"
  536. type="SessionId" minOccurs="1"/>
  537. </xs:sequence>
  538. </xs:extension>
  539. </xs:complexContent>
  540. </xs:complexType>
  541. <xs:element name="kill-session" type="killSessionType"
  542. substitutionGroup="rpcOperation"/>
  543. <!--
  544. <hello> element
  545. -->
  546. <xs:element name="hello">
  547. <xs:complexType>
  548. <xs:sequence>
  549. <xs:element name="capabilities">
  550. <xs:complexType>
  551. <xs:sequence>
  552. <xs:element name="capability" type="xs:anyURI"
  553. maxOccurs="unbounded"/>
  554. </xs:sequence>
  555. </xs:complexType>
  556. </xs:element>
  557. <xs:element name="session-id"
  558. type="SessionId" minOccurs="0"/>
  559. </xs:sequence>
  560. </xs:complexType>
  561. </xs:element>
  562. </xs:schema>