Bug 8739: Autogenerate date for yang in archetype
[controller.git] / opendaylight / archetypes / opendaylight-startup / src / main / resources / archetype-resources / api / src / main / yang / __artifactId__.yang
1 #set( $ldt = $package.getClass().forName("java.time.LocalDateTime").getMethod("now").invoke(null) )
2 #set( $dtf = $package.getClass().forName("java.time.format.DateTimeFormatter").getMethod("ofPattern", $package.getClass()).invoke(null, "yyyy-MM-dd") )
3 #set( $date = $ldt.format($dtf) )
4 module ${artifactId} {
5     yang-version 1;
6     namespace "urn:opendaylight:params:xml:ns:yang:${artifactId}";
7     prefix "${artifactId}";
8
9     revision "${date}" {
10         description "Initial revision of ${artifactId} model";
11     }
12 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.