Hi all,
Now I'm creating sample app that provides TAPI-based RESTCONF NBI and OpenConfig-based SBI using DCS.
I'm in the middle of development, but I've found out that there are some problems with DCS, especially YANG Runtime/Synchronizer. I created issues at github, please check them and let me know your ideas.
https://github.com/opennetworkinglab/onos-yang-tools/issues/2
https://github.com/opennetworkinglab/onos-yang-tools/issues/3
https://github.com/opennetworkinglab/onos-yang-tools/issues/4
Thanks,
Hiroki
--
You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-dynconfig/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/3bf76fc9-3820-4d67-9241-a3431c274177%40onosproject.org.
For more options, visit https://groups.google.com/a/onosproject.org/d/optout.
We use github only as a mirror for ease of browsing, anduse JIRA https://jira.onosproject.org for issue trackingso next time, please post it here or use JIRA tickets.Regarding #3, this is a known limitation right now, assuming the first rpc after the DCS write went through correctly.It is caused by DCEvent not getting consolidated issue, where DCStore emits unnecessary events.To fix it properly, we would need to do a bit of a overhaul in the DCStore.In the meantime, we might be able to come up with a hack to heuristically consolidate duplicate events, but next step is TBD at the moment.Issue #2 seems like YangTools issue so can Gaurav take a look?Issue #4 seems like RESTCONF NBI related issue, so can Henry take a look?
On Tue, Jan 16, 2018 at 3:21 PM, <hirok...@gmail.com> wrote:
Hi all,
Now I'm creating sample app that provides TAPI-based RESTCONF NBI and OpenConfig-based SBI using DCS.
I'm in the middle of development, but I've found out that there are some problems with DCS, especially YANG Runtime/Synchronizer. I created issues at github, please check them and let me know your ideas.
https://github.com/opennetworkinglab/onos-yang-tools/issues/2
https://github.com/opennetworkinglab/onos-yang-tools/issues/3
https://github.com/opennetworkinglab/onos-yang-tools/issues/4
Thanks,
Hiroki
--
You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dyncon...@onosproject.org.
To post to this group, send email to brigade-...@onosproject.org.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/7cc371c5-ce56-4f69-a21f-76f26e422898%40onosproject.org.
Thomas
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsub...@onosproject.org.
Hi Hiroki,
There is a below JSON provided at https://github.com/opennetworkinglab/onos-yang-tools/issues/2, looks like that is not a valid one, kindly check.
{
"openconfig-interfaces:interfaces": {
"interface": [
{
"name": "foo",
"config": {
"enabled": "true",
"type": "ianaift:fastEther"
}
}
]
}
}
Value needs to be preceded by value’s namespace (In case of JSON, module’s name acts as namespace) so if you are referring to type defined in “module iana-if-type” it should be “iana-if-type”
Regarding the ModelConverter exception piece, Janani is helping us to figure the issue.
Thanks and Regards,
Gaurav
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/7cc371c5-ce56-4f69-a21f-76f26e422898%40onosproject.org.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-dynconfig/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/7cc371c5-ce56-4f69-a21f-76f26e422898%40onosproject.org.
For more options, visit https://groups.google.com/a/onosproject.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Dynamic configuration" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/2F2059F256F9B24F82EAC5EE47F446C6E915B65B%40dggemi501-mbx.china.huawei.com.
Hi Hiroki,
My apologies for the late reply. I did not see the email until now. The JSON-to-datanode converter may not handle an empty array (see below). That’s my guess. Have you tried an non-empty array?
{
"tapi-common:context": {
"service-interface-point": []
}
}
Thanks,
Henry
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/7c7df103-6027-4aa8-a843-959209f6c38e%40onosproject.org.
Hi Gaurav,
I need your help. I am debugging the problem that Hiroki reported. The problem is that convertJsonToDataNode() fails to convert the following JSON. The stack trace is in Hiroki’s email below. The exception says “Method called for other then data node”.
You have a testing method in yangtools that can trouble shoot JSON to dataNode conversion, correct? Could please help test the following JSON using that method, as I don’t know how to do so from RESTCONF side. Thanks, Henry
{
"tapi-common:context": {
"service-interface-point": [
{
"uuid": "00000000-0000-4200-0001-110000000000",
"name": [
{
"value-name": "sip11"
}
]
}
]
}
}
From: Hiroki Okui [mailto:hirok...@gmail.com]
Sent: Tuesday, February 06, 2018 12:17 PM
To: Henry Yu <henr...@huawei.com>
Subject: Re: [brigade-dynconfig] Some issues regarding YANG Runtime/Synchronizer
Hi Henry,
Thank you for your reply.
This is the stack trace:
2018-02-06 17:12:16,699 | DEBUG | s/restconf/data/ | RestconfUtils | 175 - org.onosproject.onos-apps-restconf-utils - 1.13.0.SNAPSHOT | convertJsonToDataNode failure
java.lang.IllegalArgumentException: Method called for other then data node
at org.onosproject.yang.runtime.SerializerHelper.addDataNode(SerializerHelper.java:373)
at org.onosproject.yang.serializers.json.DefaultJsonWalker.addDataNode(DefaultJsonWalker.java:144)[166:org.onosproject.onos-yang-serializers-json:2.3.0]
at org.onosproject.yang.serializers.json.DefaultJsonWalker.addNoneLeafDataNode(DefaultJsonWalker.java:150)[166:org.onosproject.onos-yang-serializers-json:2.3.0]
at org.onosproject.yang.serializers.json.DefaultJsonWalker.addSingleInstanceNodeToDataTree(DefaultJsonWalker.java:158)[166:org.onosproject.onos-yang-serializers-json:2.3.0]
at org.onosproject.yang.serializers.json.DefaultJsonWalker.walkJsonNode(DefaultJsonWalker.java:121)[166:org.onosproject.onos-yang-serializers-json:2.3.0]
at org.onosproject.yang.serializers.json.DefaultJsonWalker.walkJsonNode(DefaultJsonWalker.java:130)[166:org.onosproject.onos-yang-serializers-json:2.3.0]
at org.onosproject.yang.serializers.json.DecoderUtils.convertJsonToDataNode(DecoderUtils.java:57)
at org.onosproject.yang.serializers.json.JsonSerializer.decode(JsonSerializer.java:92)
at org.onosproject.yang.runtime.impl.DefaultYangRuntimeHandler.decode(DefaultYangRuntimeHandler.java:62)
at org.onosproject.yang.impl.YangRuntimeManager.decode(YangRuntimeManager.java:148)
at org.onosproject.restconf.utils.RestconfUtils.convertJsonToDataNode(RestconfUtils.java:143)
at org.onosproject.restconf.restconfmanager.RestconfManager.runPostOperationOnDataResource(RestconfManager.java:132)
at org.onosproject.protocol.restconf.server.rpp.RestconfWebResource.handlePostRequest(RestconfWebResource.java:185)[177:org.onosproject.onos-protocols-restconf-server-rpp:1.13.0.SNAPSHOT]
at org.onosproject.protocol.restconf.server.rpp.RestconfWebResource.handlePostDatastore(RestconfWebResource.java:159)[177:org.onosproject.onos-protocols-restconf-server-rpp:1.13.0.SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_151]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_151]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_151]
at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_151]
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)[139:org.glassfish.jersey.core.jersey-common:2.25.1]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)[139:org.glassfish.jersey.core.jersey-common:2.25.1]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)[139:org.glassfish.jersey.core.jersey-common:2.25.1]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)[139:org.glassfish.jersey.core.jersey-common:2.25.1]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)[139:org.glassfish.jersey.core.jersey-common:2.25.1]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)[139:org.glassfish.jersey.core.jersey-common:2.25.1]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)[147:org.glassfish.jersey.core.jersey-server:2.25.1]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)[153:org.glassfish.jersey.containers.jersey-container-servlet-core:2.25.1]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)[153:org.glassfish.jersey.containers.jersey-container-servlet-core:2.25.1]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)[153:org.glassfish.jersey.containers.jersey-container-servlet-core:2.25.1]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)[153:org.glassfish.jersey.containers.jersey-container-servlet-core:2.25.1]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)[153:org.glassfish.jersey.containers.jersey-container-servlet-core:2.25.1]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:69)[66:org.ops4j.pax.web.pax-web-jetty:3.2.9]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:240)[66:org.ops4j.pax.web.pax-web-jetty:3.2.9]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:75)[66:org.ops4j.pax.web.pax-web-jetty:3.2.9]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.Server.handle(Server.java:366)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:236)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[57:org.eclipse.jetty.aggregate.jetty-all-server:8.1.19.v20160209]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_151]
Please let me know if you need additional information.
Thanks,
Hiroki
2018-02-06 9:02 GMT-08:00 Henry Yu <henr...@huawei.com>:
Hi Hiroki, thanks for the clarification. It seems that we have a real bug supporting the TAPI model. Do you have the exception stack trace from covnertJsonToDataNode()? We need to set the log level to DEBUG:
log.debug("convertJsonToDataNode failure", ex);
Thanks,
Henry
From: Hiroki Okui [mailto:hirok...@gmail.com]
Sent: Tuesday, February 06, 2018 10:55 AM
To: Henry Yu <henr...@huawei.com>
Subject: Re: [brigade-dynconfig] Some issues regarding YANG Runtime/Synchronizer
Hi Henry,
"service-interface-point" group uses "resource-spec" group, and "uses global-class" is inside of "resource-spec", so my JSON example should be valid.
grouping resource-spec {
uses global-class;
description "none";
}
grouping service-spec {
uses global-class;
description "none";
}
grouping service-interface-point {
leaf-list layer-protocol-name {
type layer-protocol-name;
// config false;
min-elements 1;
description "Usage of layerProtocolName [>1] in the ServiceInterfacePoint should be considered experimental";
}
uses resource-spec;
uses tapi-common:admin-state-pac;
uses tapi-common:capacity-pac;
description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers.
The structure of LTP supports all transport protocols including circuit and packet forms.";
}
And yang-tree for tapi-common.yang shows that uuid and name are attribute of service-interface-point.
module: tapi-common
+--rw context!
+--rw service-interface-point* [uuid]
| +--ro layer-protocol-name* layer-protocol-name
| +--rw uuid uuid
| +--rw name* [value-name]
| | +--rw value-name string
| | +--rw value? string
...
Thanks,
Hiroki
2018-02-06 6:36 GMT-08:00 Henry Yu <henr...@huawei.com>:
Hi Hiroki,
In the tapi-common model, should “uses global-class” be inside service-interface-point? Otherwise, the model does not seem to match your JSON. Am I missing something?
container context {
presence "TAPI";
uses context;
description "none";
}
grouping context {
list service-interface-point {
key 'uuid';
min-elements 2;
uses service-interface-point;
description "none";
}
uses global-class;
description "The Network Control Domain (NCD) object class represents the scope of control that a particular SDN controller has with respect to a particular network, (i.e., encompassing a designated set of interconnected (virtual) network elements).";
}
From: Henry Yu
Sent: Monday, February 05, 2018 11:16 PM
To: 'Hiroki Okui' <hirok...@gmail.com>
Subject: RE: [brigade-dynconfig] Some issues regarding YANG Runtime/Synchronizer
Hi Hiroki, Thanks for trying. I will have to take a look at the YANG models tomorrow. I will get back to you ASAP.
Henry
From: Hiroki Okui [mailto:hirok...@gmail.com]
Sent: Monday, February 05, 2018 11:10 PM
To: Henry Yu <henr...@huawei.com>
Subject: Re: [brigade-dynconfig] Some issues regarding YANG Runtime/Synchronizer
Hi Henry,
I tried both of them with Postman:
Thanks,
Hiroki
2018-02-05 19:24 GMT-08:00 Henry Yu <henr...@huawei.com>:
Could you please try:
to http://localhost:8181/onos/restconf/data
i.e., without the “/” at the end?
From: Hiroki Okui [mailto:hirok...@gmail.com]
Sent: Monday, February 05, 2018 10:09 PM
To: Henry Yu <henr...@huawei.com>
Subject: Re: [brigade-dynconfig] Some issues regarding YANG Runtime/Synchronizer
2018-02-05 18:37 GMT-08:00 Henry Yu <henr...@huawei.com>:
Hi Hiroki,
What’s your URL for post?
Thanks,
Henry
From: Hiroki Okui [mailto:hirok...@gmail.com]
Sent: Monday, February 05, 2018 9:35 PM
To: Henry Yu <henr...@huawei.com>
Subject: Re: [brigade-dynconfig] Some issues regarding YANG Runtime/Synchronizer
Hi Henry,
Thank you for your reply.
I've tried non-empty array config:
{
"tapi-common:context": {
"service-interface-point": [
{
"uuid": "00000000-0000-4200-0001-110000000000",
"name": [
{
"value-name": "sip11"
}
]
}
]
}
}
but it resulted in the same error.
2018-02-06 02:25:34,380 | INFO | qtp23103869-36 | RestconfUtils | 175 - org.onosproject.onos-apps-restconf-utils - 1.13.0.SNAPSHOT | org.onosproject.yang.runtime.DefaultCompositeStream@66a76cf5
2018-02-06 02:25:34,382 | ERROR | qtp23103869-36 | RestconfUtils | 175 - org.onosproject.onos-apps-restconf-utils - 1.13.0.SNAPSHOT | convertJsonToDataNode failure: Method called for other then data node
2018-02-06 02:25:34,382 | ERROR | qtp23103869-36 | RestconfWebResource | 177 - org.onosproject.onos-protocols-restconf-server-rpp - 1.13.0.SNAPSHOT | ERROR: handlePostRequest: ERROR: JSON cannot be converted to DataNode
I've also tried:
{
"tapi-common:context": {}
}
and it also raised the same error.
As I mentioned in github(https://github.com/opennetworkinglab/onos-yang-tools/issues/4),
I've tried JSON below with OpenConfig model:
{
"openconfig-interfaces:interfaces": {}
}
it worked properly, so the previous JSON seems to be valid.
Thanks,
Hiroki
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-dynconfig/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/7c7df103-6027-4aa8-a843-959209f6c38e%40onosproject.org.
For more options, visit https://groups.google.com/a/onosproject.org/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Dynamic configuration" group.
To unsubscribe from this topic, visit https://groups.google.com/a/onosproject.org/d/topic/brigade-dynconfig/Ac-q5FlA8_c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brigade-dynconfig+unsubscribe@onosproject.org.
To post to this group, send email to brigade-dynconfig@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/brigade-dynconfig/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/brigade-dynconfig/766FF86A398C2C4F8A8C1D1D78D4898155E63E49%40YYZEML701-CHM.china.huawei.com.
grouping context {
list service-interface-point {
key 'uuid';
min-elements 2;
module tapi-connectivity {
augment "/tapi-common:context" {
uses connectivity-context;
description "Augments the base TAPI Context with ConnectivityService information";
}
/**
* Component to register the TAPI 2.0 service model and its dependencies.
*/
@Component(immediate = true)
public class TapiServiceModelRegistrator extends AbstractYangModelRegistrator {
// SNIP
private static Map<YangModuleId, AppModuleInfo> getAppInfo() {
Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>();
// The main module is tapi-connectivity
// tapi-connectivity:context
// rpc create-connectivity-service
appInfo.put(new DefaultYangModuleId("tapi-connectivity", "2017-05-31"),
new DefaultAppModuleInfo(TapiConnectivity.class, null));
// Additional modules and dependencies
appInfo.put(new DefaultYangModuleId("tapi-common", "2017-05-31"),
new DefaultAppModuleInfo(TapiCommon.class, null));
{
"tapi-connectivity:context":
{
"service-interface-point" : [
{
"uuid": "00000000-0000-4200-0001-110000000000",
curl -X GET http://localhost:8181/onos/restconf/data/tapi-common:context
{"ietf-restconf:errors":[{"error":{"error-type":"application","error-tag":"operation-failed","error-path":"/onos/restconf/data/tapi-common:context","error-message":"ERROR: JSON cannot be converted to DataNode","error-info":"Method called for other then data node"}}]}
curl -X GET http://localhost:8181/onos/restconf/data/tapi-connectivity:context
{"ietf-restconf:errors":[{"error":{"error-type":"application","error-tag":"operation-failed","error-path":"/onos/restconf/data/tapi-connectivity:context","error-message":"ERROR: JSON cannot be converted to DataNode","error-info":"Schema node with name context doesn't exist."}}]}
"ietf-restconf:errors": [{
"error": {
"error-app-tag": "handleGetRequest",
"error-message": "Resource not found",
"error-path": "tapi-connectivity (or common):context",
"error-tag": "invalid-value",
"error-type": "protocol"
}}]
curl -X GET http://localhost:8181/onos/restconf/data/tapi-common:context/tapi-connectivity:connectivity-service
Hi all,
Ramon
You have a grouping "context", but I don't see what "uses" this grouping. I was expecting to see a container using this grouping.
Sean
Ramon
You have a grouping "context", but I don't see what "uses" this grouping. I was expecting to see a container using this grouping.
OK - I see now. I have to say that I always find it useful to use the "pyang" tool to generate a jstree to show how the YANG is really being interpreted.
I presume the models are loading as you expect -
http://localhost:8181/onos/yang/models
My understanding of the augment is that your POST payload should be on
http://localhost:8181/onos/restconf/data as
{
"tapi-common:context":
{
"tapi-conectivity:service-interface-point"
: [
{
"uuid":
"00000000-0000-4200-0001-110000000000",
OK - I see now. I have to say that I always find it useful to use the "pyang" tool to generate a jstree to show how the YANG is really being interpreted.
I presume the models are loading as you expect - http://localhost:8181/onos/yang/models
{"Model_ids":["org.onosproject.models.metrohaul","org.onosproject.models.common","org.onosproject.models.openconfig","org.onosproject.models.tapi"]}
My understanding of the augment is that your POST payload should be on http://localhost:8181/onos/restconf/data as
{
"tapi-common:context":
{
"tapi-conectivity:service-interface-point" : [
{
"uuid": "00000000-0000-4200-0001-110000000000",
To unsubscribe from this group and stop receiving emails from it, send an email to brigade-...@onosproject.org.