Convert vlan_id from unicode to int

Temporary solution for opnfv CI job
https://build.opnfv.org/ci/job/daisy-deploy-baremetal-daily-master/169/

Change-Id: I0aa68442067d3416e9a0665648b204b669d44816
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
This commit is contained in:
Alex Yang 2017-09-30 16:09:20 +08:00
parent cbf13e8413
commit 993f058dfe
1 changed files with 2 additions and 2 deletions

View File

@ -575,12 +575,12 @@ class Controller(controller.BaseController):
for network in networks:
if network['cidr'] and network['vlan_id']:
if cidr == network['cidr'] \
and vlan_id != network['vlan_id'] \
and vlan_id != eval(network['vlan_id']) \
and network['id'] != network_id:
msg = (_('Networks with the same cidr must have '
'the same vlan_id'))
raise HTTPBadRequest(explanation=msg)
if vlan_id == network['vlan_id'] \
if vlan_id == eval(network['vlan_id']) \
and cidr != network['cidr'] \
and network['id'] != network_id:
msg = (_('Networks with the same vlan_id must '