SFC: Error while using port pair group set/unset commands

Bug #1736977 reported by yannick thomas
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python-neutronclient
New
Undecided
Unassigned

Bug Description

Setting a port-pair to a port pair group currently fails:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/opt/stack/python-neutronclient/neutronclient/osc/v2/sfc/sfc_port_pair_group.py", line 196, in take_action
    attrs['port_pairs'] = sorted(list(set(existing) | set(added)))
TypeError: unhashable type: 'list'
clean_up SetSfcPortPairGroup: unhashable type: 'list'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/opt/stack/python-neutronclient/neutronclient/osc/v2/sfc/sfc_port_pair_group.py", line 196, in take_action
    attrs['port_pairs'] = sorted(list(set(existing) | set(added)))
TypeError: unhashable type: 'list'

Same result when trying to unset a port pair from a port pair group.

This error raises because the result of the call to "client.find_resource(resource, parsed_args.port_pair_group, cmd_resource='sfc_port_pair_group')['port_pairs']" is already a list().
No need to add square brackets around the result.

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.