[MDSAL-271] About Namespace Created: 23/Jun/17  Updated: 16/Mar/19  Resolved: 16/Mar/19

Status: Resolved
Project: mdsal
Component/s: Binding V2 codegen, Binding V2 runtime
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jie Han Assignee: Jie Han
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: PNG File uses-001.png     PNG File uses-002.png     PNG File uses.png    
Issue Links:
Blocks
is blocked by YANGTOOLS-843 The schema path should be unique to e... Resolved
External issue ID: 8731

 Description   

As in binding2-spec , providing "Data" & "Grouping" suffixs to resolve confliction of type name in the same package,
but this solution has drawbacks, there still exists confliction.

In my opinion, there should also provide the namesapce 'data' and 'grp' at sub levels, just shown right side of '->' below,
although this may result in an even longer package name but it works correctly.

module namespace-test-foo2 {
namespace "org.test.namespace.foo2";
prefix "foo2";
revision 2017-05-19;
/* by Suffix / / by Sub NameSpace */
container a { // data.A -> data.A
container a { // data.a.A -> data.a.data.A
container a

{ // data.a.a.A -> data.a.data.a.data.A }

grouping a

{ // data.a.a.AGrouping -> data.a.data.a.grp.A }

}

grouping a { // data.a.AGrouping -> data.a.grp.A
container a { // data.a.a.AData -> data.a.grp.a.data.A
container a

{ // data.a.a.a.AData -> data.a.grp.a.data.a.data.A }

grouping a

{ // data.a.a.a.AGrouping -> data.a.grp.a.data.a.grp.A }

}

grouping a { // data.a.a.AGrouping -> data.a.grp.a.grp.A
container a

{ // data.a.a.a.AData -> data.a.grp.a.grp.a.data.A }

grouping a

{ // data.a.a.a.AGrouping -> data.a.grp.a.grp.a.grp.A }

}
}
}

grouping a { // grp.AGrouping -> grp.A
container a { // grp.a.AData -> grp.a.data.A
container a

{ // grp.a.a.AData -> grp.a.data.a.data.A }

grouping a

{ // grp.a.a.AGrouping -> grp.a.data.a.grp.A }

}

grouping a { // grp.a.AGrouping -> grp.a.grp.A
container a

{ // grp.a.a.AData -> grp.a.grp.a.data.A }

grouping a

{ // grp.a.a.AGrouping -> grp.a.grp.a.grp.A }

}
}
}



 Comments   
Comment by Martin Ciglan [ 03/Jul/17 ]

Hi Jie

is this fully working in patches you have pushed? Can you provide links to gerrit? Thanks.

Comment by Jie Han [ 03/Jul/17 ]

(In reply to Martin Ciglan from comment #1)
> Hi Jie
>
> is this fully working in patches you have pushed? Can you provide links to
> gerrit? Thanks.

Nope, I'am not sure if this design would be agreed, so I did not implement it (if need, I would push another patch for it),
and for my pushed patches they only meet "Section 6 Specific Rules" :

  1. interfaces generated for data children extends (implements) interfaces for
    same children generated for referenced grouping.

But after these, there still exist clashes for the same method in two groupings which one of them uses the other.

Comment by Jie Han [ 03/Jul/17 ]

Attachment uses.png has been added with description: original design

Comment by Jie Han [ 03/Jul/17 ]

Attachment uses-001.png has been added with description: improved design 1

Comment by Jie Han [ 03/Jul/17 ]

Attachment uses-002.png has been added with description: improved design 2

Comment by Jie Han [ 03/Jul/17 ]

(In reply to Jie Han from comment #2)
> (In reply to Martin Ciglan from comment #1)
> > Hi Jie
> >
> > is this fully working in patches you have pushed? Can you provide links to
> > gerrit? Thanks.
>
> Nope, I'am not sure if this design would be agreed, so I did not implement
> it (if need, I would push another patch for it),
> and for my pushed patches they only meet "Section 6 Specific Rules" :
> # interfaces generated for data children extends (implements) interfaces for
> same children generated for referenced grouping.
>
>
> But after these, there still exist clashes for the same method in two
> groupings which one of them uses the other.

Hi, Martin, I did a mistake about clash, it's not necessary to add suffix to getter, I would fix this back later together with improving implements from uses according to the specification document.

Comment by Martin Ciglan [ 14/Jul/17 ]

is this still valid bug with all patches up to today merged?

Comment by Jie Han [ 17/Jul/17 ]

(In reply to Martin Ciglan from comment #7)
> is this still valid bug with all patches up to today merged?

Yes, it's not resolved yet.

Comment by Jie Han [ 13/Sep/18 ]

https://git.opendaylight.org/gerrit/75618

Comment by Robert Varga [ 16/Mar/19 ]

Binding V2 is being removed in 4.0.0.

Generated at Wed Feb 07 20:09:19 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.