Cannot use same property name between different resource

Bug #1660407 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Undecided
Unassigned
OpenContrail
New
Undecided
Unassigned

Bug Description

The generated c++ code is wrong if we use the a property complexe type with the same name on different resource:

build/production/schema/vnc_cfg_types.h:4184:9: error: redeclaration of ‘ROUTE_TARGET_LIST’
         ROUTE_TARGET_LIST,
         ^
In file included from controller/src/dns/cfg/dns_config.h:23:0,
                 from controller/src/dns/cfg/dns_config_parser.cc:17:
build/production/schema/vnc_cfg_types.h:4184:9: error: redeclaration of ‘ROUTE_TARGET_LIST’
         ROUTE_TARGET_LIST,
         ^
In file included from controller/src/dns/mgr/dns_oper.h:19:0,
                 from controller/src/dns/mgr/dns_mgr.h:10,
                 from controller/src/dns/mgr/dns_oper.cc:8:
build/production/schema/vnc_cfg_types.h:4184:9: error: redeclaration of ‘ROUTE_TARGET_LIST’
         ROUTE_TARGET_LIST,
         ^
In file included from controller/src/dns/cfg/dns_config.h:23:0,
                 from controller/src/dns/cfg/dns_config.cc:10:
build/production/schema/vnc_cfg_types.h:4184:9: error: redeclaration of ‘ROUTE_TARGET_LIST’
         ROUTE_TARGET_LIST,
         ^
build/production/schema/vnc_cfg_types.h:4180:9: note: previous declaration ‘ROUTE_TARGET_LIST’
         ROUTE_TARGET_LIST,
...

Tags: generateds
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/28291
Submitter: ?douard Thuleau (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/28291
Committed: http://github.org/Juniper/contrail-generateDS/commit/a76b7ca1363a2a56bcd09e8f69167b0080be02d5
Submitter: Zuul (<email address hidden>)
Branch: master

commit a76b7ca1363a2a56bcd09e8f69167b0080be02d5
Author: Édouard Thuleau <email address hidden>
Date: Mon Jan 30 18:55:46 2017 +0100

Do not re-create property

If a resource property name and complex type are identique, generated
c++ code duplicate class property declaration.

Change-Id: I0cb574c5c01f4f05a09b10d9fdfbfec65fc863dd
Closes-Bug: #1660407

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.