[INTDIST-37] need mechanism to get ODL version Created: 11/Sep/15 Updated: 20/Oct/17 Resolved: 04/Jan/17 |
|
| Status: | Resolved |
| Project: | integration-distribution |
| Component/s: | Version |
| Affects Version/s: | unspecified |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Giles Heron | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 4296 | ||||||||
| Description |
|
We need a mechanism to get the ODL version from: I'm not sure where this should live - odlparent, controller (does that still exist as a project post-Lithium), or md-sal (but then you need to have md-sal to make this work - though does a controller with no md-sal make sense?) |
| Comments |
| Comment by Vratko Polak [ 29/Jan/16 ] |
|
It looks like Restconf already exposes some statistics [0], perhaps a Restconf version string can be added there. Netconf is the most sure place to put such addition. Odlparent does not depend on mdsal, so there is no easy way to expose anything. |
| Comment by Robert Varga [ 09/Feb/16 ] |
|
The concept of 'the ODL version' makes sense in terms of a Simultaneous Release, and thus can be exposed only by the leaf (distribution) project. All other projects have independent versioning. |
| Comment by Giles Heron [ 16/Mar/16 ] |
|
Is it possible to get this fixed by Beryllium-SR2? |
| Comment by Vratko Polak [ 16/Mar/16 ] |
|
> Is it possible to get this fixed by Beryllium-SR2? >> 1) karaf CLI It is already there: >> 2) REST (or RESTCONF) The simplest workaround is GET to <host>:8181/restconf/modules and classify modules (and revisions) present there. For example this one is in Beryllium but not in Lithium: {"name":"aaa-authn-netconf-plugin","revision":"2015-07-15","namespace":"config:aaa:authn:netconf:plugin"}and this one is in Beryllium-SR1 (possibly by an oversight) but not in Beryllium release: {"name":"instance-identifier-patch-module","revision":"2015-11-21","namespace":"instance:identifier:patch:module"}The downside is that presence of modules depends on features installed. As integration/distribution projects does not currently contain any yang models or config files, it is not probable to have a more straightforward solution before Beryllium-SR2. |
| Comment by Giles Heron [ 16/Mar/16 ] |
|
Hi Vratko, thanks for the info re Karaf. That's helpful. re REST and NETCONF/YANG yes, I've already suggested that people use the method you suggested. However it does feel like something of a hack to have to find a module that is in e.g. Beryllium but not in Lithium, and as you say it depends on features installed. So far I'm using ietf-inet-types Giles |
| Comment by Vratko Polak [ 17/Mar/16 ] |
|
> As integration/distribution projects does not currently contain any yang I gave it a try anyway. Still, it may take some time to merge that, as there are not many committers familiar with Java in integration/distribution. |
| Comment by Giles Heron [ 22/Mar/16 ] |
|
looks good to me any value in me reviewing the code? |
| Comment by Vratko Polak [ 23/Mar/16 ] |
|
> any value in me reviewing the code? Yes, there are several string identifiers visible, and I am not sure my chosen values are systematic enough. This includes module name "odl-distribution-version", XML namespace "urn:opendaylight:params:xml:ns:yang:integration:distribution:version", type identity "odl-version", leaf name "version", config file name "odl-version.xml" and the two config-module names defined in it "odl-distribution-version" and "odl-odlparent-version". I should also find someone who is familiar with config subsystem to decide whether I got all the dependencies right (or whether it only works by accident). |
| Comment by Vratko Polak [ 23/Mar/16 ] |
|
> there are several string identifiers visible I forgot the feature name, currently "odl-distribution-version". |
| Comment by Giles Heron [ 23/Mar/16 ] |
|
the default-config.xml is hand-generated, right? is there any way to auto-generate it? that way there'd be no risk of the versions being out of sync between what we report and what we've actually built (if that makes sense...) |
| Comment by Vratko Polak [ 23/Mar/16 ] |
|
> the default-config.xml is hand-generated, right? Yes, and further manual edits are expected, as other projects may want to add their version. I am not expert enough to figure a way to make config-parent do replacements from defined properties (such as ${feature.odlparent.version}) before packaging the config file into the jar bundle. (I can open improvement Bug when this gets merged.) So far I am only trying to make sure that version bumping scripts will bump the value too. https://git.opendaylight.org/gerrit/#/c/36408 |
| Comment by Vratko Polak [ 26/May/16 ] |
|
> the default-config.xml is hand-generated, right? Currently, I favor using property values from pom file (where they would get bumped by current version bumping script). https://git.opendaylight.org/gerrit/#/c/37210/6 (current Boron integration/distribution patch) |
| Comment by Vratko Polak [ 03/Jun/16 ] |
|
Merged: https://git.opendaylight.org/gerrit/37210 |
| Comment by Vratko Polak [ 31/Aug/16 ] |
|
So, Beryllium-SR3 and (almost surely) Boron do have the most of functionality, but user has to edit config file (or use restonf at runtime) to modify version values, due to |
| Comment by Vratko Polak [ 26/Sep/16 ] |
|
Carbon is on its way to get fixed: https://git.opendaylight.org/gerrit/46198 |
| Comment by Vratko Polak [ 14/Nov/16 ] |
|
Carbon is fixed. |
| Comment by Vratko Polak [ 04/Jan/17 ] |
|
Boron change merged, test [0] passes. |