blob: 76f0cdae379a9db3274b342c070b75095ad671f8 [file] [log] [blame]
Thomas Vachuska73436b52017-03-22 19:50:47 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Generates YANG Model registrator component.
4# -----------------------------------------------------------------------------
5
6output=$1
7package=$2
8shift 2
9
10aux=/tmp/yr-$$
11
12trap "rm -fr $aux" EXIT
13
14pkgDir=$aux/${package//./\/}
15rm -fr $aux $output
16mkdir -p $pkgDir
17cd $aux
18
19cat <<EOF >$output
20// Auto-generated code
21package $package;
22
23import org.onosproject.yang.AbstractYangModelRegistrator;
Ray Milkey47583db2018-10-23 11:56:24 -070024import org.osgi.service.component.annotations.Component;
Thomas Vachuska73436b52017-03-22 19:50:47 -070025
26@Component(immediate = true)
27public class YangModelRegistrator extends AbstractYangModelRegistrator {
28 public YangModelRegistrator() {
29 super(YangModelRegistrator.class);
30 }
31}
32EOF