X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Ftest%2Fresources%2Fschemas%2Fconfig-test-rpc.yang;fp=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Ftest%2Fresources%2Fschemas%2Fconfig-test-rpc.yang;h=f67c2df256a4eff75e50f6dde02c5e6077093048;hb=0641378748b8e4f801b4eff88f429b4ac7068b37;hp=0000000000000000000000000000000000000000;hpb=4e4e9f0dc21b2dc9823960d2e984bb122b291c66;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/test/resources/schemas/config-test-rpc.yang b/opendaylight/md-sal/sal-netconf-connector/src/test/resources/schemas/config-test-rpc.yang new file mode 100644 index 0000000000..f67c2df256 --- /dev/null +++ b/opendaylight/md-sal/sal-netconf-connector/src/test/resources/schemas/config-test-rpc.yang @@ -0,0 +1,167 @@ +module config-test-rpc { + namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:rpc:config:defs"; + prefix "rpc"; + + organization + "Cisco Systems, Inc."; + + contact + "lsedlak@cisco.com"; + + description "Test model containing hacked definition of rpc edit-config and definitions for + get and get-config rpc operations. + The rpc definition is copied from rfc 6241 Appendix C: http://tools.ietf.org/html/rfc6241#appendix-C"; + + revision 2014-07-21 { + description "Initial revision."; + } + + extension get-filter-element-attributes { + description + "If this extension is present within an 'anyxml' + statement named 'filter', which must be conceptually + defined within the RPC input section for the + and protocol operations, then the + following unqualified XML attribute is supported + within the element, within a or + protocol operation: + + type : optional attribute with allowed + value strings 'subtree' and 'xpath'. + If missing, the default value is 'subtree'. + + If the 'xpath' feature is supported, then the + following unqualified XML attribute is + also supported: + + select: optional attribute containing a + string representing an XPath expression. + The 'type' attribute must be equal to 'xpath' + if this attribute is present."; + } + + rpc edit-config { + description "The operation loads all or part of a specified + configuration to the specified target configuration."; + + reference "RFC 6241, Section 7.2"; + + input { + container target { + description "Particular configuration to edit."; + + choice config-target { + mandatory true; + description "The configuration target."; + + leaf candidate { + if-feature candidate; + type empty; + description "The candidate configuration is the config target."; + } + + leaf running { + if-feature writable-running; + type empty; + description "The running configuration is the config source."; + } + } + } + + choice edit-content { + mandatory true; + description "The content for the edit operation."; + + anyxml config { + description + "Inline Config content."; + } + + leaf url { + if-feature url; + type string; + description + "URL-based config content."; + } + } + } + } + + rpc get-config { + description + "Retrieve all or part of a specified configuration."; + + reference "RFC 6241, Section 7.1"; + + input { + container source { + description "Particular configuration to retrieve."; + + choice config-source { + mandatory true; + description + "The configuration to retrieve."; + leaf candidate { + if-feature candidate; + type empty; + description + "The candidate configuration is the config source."; + } + leaf running { + type empty; + description + "The running configuration is the config source."; + } + leaf startup { + if-feature startup; + type empty; + description + "The startup configuration is the config source. + This is optional-to-implement on the server because + not all servers will support filtering for this + datastore."; + } + } + } + + anyxml filter { + description "Subtree or XPath filter to use."; + get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the source datastore subset that matched + the filter criteria (if any). An empty data container + indicates that the request did not produce any results."; + } + } + } + + rpc get { + description "Retrieve running configuration and device state information."; + + reference "RFC 6241, Section 7.7"; + + input { + anyxml filter { + description + "This parameter specifies the portion of the system + configuration and state data to retrieve."; + get-filter-element-attributes; + } + } + + output { + anyxml data { + description + "Copy of the running datastore subset and/or state + data that matched the filter criteria (if any). + An empty data container indicates that the request did not + produce any results."; + } + } + } +}