- /**
- * Creates artificial schema node for edit-config rpc. This artificial schema looks like:
- * <pre>
- * {@code
- * rpc
- * get
- * filter
- * // All schema nodes from remote schema
- * filter
- * get
- * rpc
- * }
- * </pre>
- *
- * This makes the translation of rpc get request(especially the config node)
- * to xml use schema which is crucial for some types of nodes e.g. identity-ref.
- */
- public static DataNodeContainer createSchemaForGet(final SchemaContext schemaContext) {
- final QName filter = QName.create(NETCONF_GET_QNAME, "filter");
- final QName get = QName.create(NETCONF_GET_QNAME, "get");
- final NodeContainerProxy configProxy = new NodeContainerProxy(filter, schemaContext.getChildNodes());
- final NodeContainerProxy editConfigProxy = new NodeContainerProxy(get, Sets.<DataSchemaNode>newHashSet(configProxy));
- return new NodeContainerProxy(NETCONF_RPC_QNAME, Sets.<DataSchemaNode>newHashSet(editConfigProxy));
- }
-
- /**
- * Creates artificial schema node for get rpc. This artificial schema looks like:
- * <pre>
- * {@code
- * rpc
- * get-config
- * filter
- * // All schema nodes from remote schema
- * filter
- * get-config
- * rpc
- * }
- * </pre>
- *
- * This makes the translation of rpc get-config request(especially the config node)
- * to xml use schema which is crucial for some types of nodes e.g. identity-ref.
- */
- public static DataNodeContainer createSchemaForGetConfig(final SchemaContext schemaContext) {
- final QName filter = QName.create(NETCONF_GET_CONFIG_QNAME, "filter");
- final QName getConfig = QName.create(NETCONF_GET_CONFIG_QNAME, "get-config");
- final NodeContainerProxy configProxy = new NodeContainerProxy(filter, schemaContext.getChildNodes());
- final NodeContainerProxy editConfigProxy = new NodeContainerProxy(getConfig, Sets.<DataSchemaNode>newHashSet(configProxy));
- return new NodeContainerProxy(NETCONF_RPC_QNAME, Sets.<DataSchemaNode>newHashSet(editConfigProxy));
- }
+ public static DataContainerChild<?, ?> createEditConfigStructure(final SchemaContext ctx, final YangInstanceIdentifier dataPath,
+ final Optional<ModifyAction> operation, final Optional<NormalizedNode<?, ?>> lastChildOverride) {
+ final NormalizedNode<?, ?> configContent;