Setting logical_interface_vlan_tag to 0 in constructor of LogicalInterface is not working

Bug #1420697 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
Medium
Hampapur Ajay
R2.1
Fix Committed
Medium
Hampapur Ajay

Bug Description

R2.1 Build 26 Ubuntu 14.04 Multi-node setup

Setting logical_interface_vlan_tag to 0 in constructor of LogicalInterface is not setting logical_interface_vlan_tag attribute at all.

>>> lif1 = LogicalInterface(name='ovstap1lif2', logical_interface_vlan_tag=0, parent_obj=phy_intf, display_name='ovstap1lif2')
>>> lif1.parent_uuid=phy_intf.uuid
>>> vh.logical_interface_create(lif1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/vnc_api/gen/vnc_api_client_gen.py", line 5268, in logical_interface_create
    data = json_body)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 345, in _request_server
    retry_count=retry_count)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 388, in _request
    raise PermissionDenied(content)
cfgm_common.exceptions.PermissionDenied: Vlan id not specified for interface
>>>

-----------
The problem seems to be :

class LogicalInterface(vnc_api.gen.resource_common.LogicalInterface):
    create_uri = ''
    resource_uri_base = {}
    def __init__(self, name = None, parent_obj = None, logical_interface_vlan_tag = None, logical_interface_type = None, id_perms = None, display_name = None, *args, **kwargs):
        pending_fields = ['fq_name', 'parent_type']

        self._server_conn = None

        if logical_interface_vlan_tag: <<<<<<<<<<< check for 0 fails..
            pending_fields.append('logical_interface_vlan_tag')

Tags: config
Revision history for this message
Sachin Bansal (sbansal) wrote :
Changed in juniperopenstack:
status: New → Fix Committed
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.