Skip to content

Commit eea6d40

Browse files
Merge branch 'transformer_merge' into transformer-phase2
2 parents b39c568 + 211f17e commit eea6d40

19 files changed

+499
-5572
lines changed

Makefile

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,10 @@ yamlGen:
9898

9999
go-patch: go-deps
100100
cd $(BUILD_GOPATH)/src/github.com/openconfig/ygot/; git reset --hard HEAD; git checkout 724a6b18a9224343ef04fe49199dfb6020ce132a 2>/dev/null ; true; \
101-
cp $(TOPDIR)/ygot-modified-files/debug.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/../util/debug.go; \
102-
cp $(TOPDIR)/ygot-modified-files/node.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/node.go; \
103-
cp $(TOPDIR)/ygot-modified-files/container.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/container.go; \
104-
cp $(TOPDIR)/ygot-modified-files/list.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/list.go; \
105-
cp $(TOPDIR)/ygot-modified-files/leaf.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/leaf.go; \
106-
cp $(TOPDIR)/ygot-modified-files/util_schema.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/util_schema.go; \
107-
cp $(TOPDIR)/ygot-modified-files/schema.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/../util/schema.go; \
108-
cp $(TOPDIR)/ygot-modified-files/unmarshal.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/unmarshal.go; \
109-
cp $(TOPDIR)/ygot-modified-files/validate.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/validate.go; \
110-
cp $(TOPDIR)/ygot-modified-files/reflect.go $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ytypes/../util/reflect.go; \
111-
cp $(TOPDIR)/goyang-modified-files/README.md $(BUILD_GOPATH)/src/github.com/openconfig/goyang/README.md; \
112-
cp $(TOPDIR)/goyang-modified-files/yang.go $(BUILD_GOPATH)/src/github.com/openconfig/goyang/yang.go; \
113-
cp $(TOPDIR)/goyang-modified-files/annotate.go $(BUILD_GOPATH)/src/github.com/openconfig/goyang/annotate.go; \
114-
cp $(TOPDIR)/goyang-modified-files/entry.go $(BUILD_GOPATH)/src/github.com/openconfig/goyang/pkg/yang/entry.go; \
115-
$(GO) install -v -gcflags "-N -l" $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ygot; \
116-
$(GO) install -v -gcflags "-N -l" $(BUILD_GOPATH)/src/github.com/openconfig/goyang
101+
cd ../; cp $(TOPDIR)/ygot-modified-files/ygot.patch .; \
102+
patch -p1 < ygot.patch; rm -f ygot.patch; \
103+
$(GO) install -v -gcflags "-N -l" $(BUILD_GOPATH)/src/github.com/openconfig/ygot/ygot
104+
117105

118106
install:
119107
$(INSTALL) -D $(REST_BIN) $(DESTDIR)/usr/sbin/rest_server

src/cvl/cvl_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func prepareDb() {
221221
fmt.Printf("read file %v err: %v", fileName, err)
222222
}
223223

224-
port_map := loadConfig("", PortsMapByte)
224+
port_map = loadConfig("", PortsMapByte)
225225

226226
loadConfigDB(rclient, port_map)
227227
loadConfigDB(rclient, depDataMap)

src/cvl/schema/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ all: schema
3434
schema: $(out) $(out_common)
3535

3636

37+
3738
schema-tree: $(out_tree)
3839

3940
#Build YANG models
@@ -49,10 +50,18 @@ schema-tree: $(out_tree)
4950
%.yin:$(sonic_yang_common)/%.yang
5051
@echo "Generating `basename $@` ..."
5152
@devFile="`echo $@ | cut -d . -f1`-deviation.yang"; \
53+
5254
if [ -f $$devFile ] ; then devOpt="--deviation-module $$devFile"; fi; \
5355
pyang -p $(search_path) --plugindir $(pyang_plugin_dir) \
5456
-f yin-cvl $$devOpt $< -o `basename $@`
5557

58+
#Build common YANG models
59+
%.yin:$(sonic_yang_common)/%.yang
60+
@echo "Generating `basename $@` ..."
61+
@devFile="`echo $@ | cut -d . -f1`-deviation.yang"; \
62+
if [ -f $$devFile ] ; then devOpt="--deviation-module $$devFile"; fi; \
63+
pyang -p $(search_path) --plugindir $(pyang_plugin_dir) \
64+
-f yin-cvl $$devOpt $< -o `basename $@`
5665
%.tree:%.yang
5766
@echo "Generating `basename $@` ..."
5867
@devFile="`echo $< | cut -d . -f1`-dev.yang"; \

0 commit comments

Comments
 (0)