VN creation through contrail-api getting failed

Bug #1642277 reported by aswani kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
Medium
aswani kumar
R3.2
Fix Committed
High
aswani kumar
Trunk
Fix Committed
High
aswani kumar

Bug Description

setup 3.1.1 mitaka build 41

ERROR - Api exception while creating network EVPN-L2-VN
Traceback (most recent call last):
  File "/contrail-test-local/fixtures/vn_test.py", line 361, in _create_vn_api
    self.vnc_lib_h.virtual_network_update(self.api_vn_obj)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 42, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 507, in _object_update
    for x in getattr(obj, ref_name, [])])
  File "/usr/lib/python2.7/dist-packages/vnc_api/gen/resource_xsd.py", line 7378, in __hash__
    self.host_routes))
  File "/usr/lib/python2.7/dist-packages/vnc_api/gen/resource_xsd.py", line 7049, in __hash__
    self.alloc_unit))
TypeError: unhashable type: 'dict'

Tags: api automation
Revision history for this message
aswani kumar (aswanikumar90) wrote :
Changed in juniperopenstack:
milestone: r3.1.1.0 → none
Jeba Paulaiyan (jebap)
tags: added: api
Revision history for this message
Sachin Bansal (sbansal) wrote :

This could be a test issue. Please check the value of self.api_vn_obj and if you think all fields in that object are correct, please post them here or provide setup where it is happening.

Revision history for this message
Jeba Paulaiyan (jebap) wrote :

Hi sachin,

During network_update, failure was due to setting dhcp_option_list as dictionay in IpamSubnet.
But this used to pass in earlier builds of 3.1

I have self.dhcp_option_list = {'dhcp_option': [{'dhcp_option_value': '0.0.0.0', 'dhcp_option_name': '6'}]}
ipam_sn.set_dhcp_option_list(self.dhcp_option_list) which is getting failed during network_update

So after below fix I am able to resolve the issue and VN is getting created

 diff contrail-test-ci/fixtures/vn_test.py aswin/contrail-test-ci/fixtures/vn_test.py
356c356
< ipam_sn.set_dhcp_option_list(self.dhcp_option_list)
---
> ipam_sn.set_dhcp_option_list(DhcpOptionsListType(params_dict=self.dhcp_option_list))

So can please tell me are there any changes to schema where we need to pass DhcpOptionsListType as parameter instead of dictionary

Thanks,
Aswani Kumar

Jeba Paulaiyan (jebap)
tags: added: automation
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.