networking-sfc: dictionary parameters do not work

Bug #1719584 reported by Bernard Cafarelli
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Undecided
Bernard Cafarelli

Bug Description

Testing advanced parameters for SFC plugin (current master), here are the failures I found:
$ openstack sfc port pair create --ingress=p1in --egress=p1out --service-function-parameters correlation=mpls PP1
Invalid input for service_function_parameters. Reason: '[{u'correlation': u'mpls'}]' is not a dictionary.

$ openstack sfc port pair create --ingress=p1in --egress=p1out --service-function-parameters correlation=None PP1
Invalid input for service_function_parameters. Reason: None is not in valid_values.

$ openstack sfc port pair group create --port-pair PP1 --port-pair PP2 --port-pair-group-parameters lb-fields=dst_ip PG1
Invalid input for port_pair_group_parameters. Reason: Unexpected keys supplied: lb-fields.

$ openstack sfc port chain create --port-pair-group PG1 --port-pair-group PG2 --flow-classifier FC_udp --flow-classifier FC_http --chain-parameters correlation=mpls --chain-parameters symmetric=false PC1
DEBUG neutron.api.v2.base [None req-df1b5c0c-a867-45e2-a324-7a0f8ede0d3a demo demo] Request body: {u'port_chain': {u'flow_classifiers': [u'ea01bc00-dd55-4f1e-8f15-b611c3ef6b40', u'37c2e1dd-94a7-4559-8f6e-a1ff41a1154a'], u'name': u'PC1', u'chain_parameters': [{u'correlation': u'mpls'}], u'port_pair_groups': [u'4352af07-22d4-4fe5-be75-24f0cc87a440', u'f72e3985-d0e1-427a-8561-f196356ab483']}} {{(pid=29130) prepare_request_body /opt/stack/neutron/neutron/api/v2/base.py:695}}
(extra "[]" on chain_parameters)

Changed in python-neutronclient:
assignee: nobody → Bernard Cafarelli (bcafarel)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/507541

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/507541
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=6feb30daadb95a85a38194b21e70a00b7d2e5ff3
Submitter: Zuul
Branch: master

commit 6feb30daadb95a85a38194b21e70a00b7d2e5ff3
Author: Bernard Cafarelli <email address hidden>
Date: Tue Sep 26 15:26:27 2017 +0200

    SFC plugin: fix dictionary parameters

    Service function parameters could not be set on a port pair, and "None"
    correlation value was not accepted

    Chain parameters were passed incorrectly to server on a port chain

    On a port pair group, lb_fields must be passed to the API with an
    underscore

    Fix check on empty dictionary parameters (we get [], not None)

    Also fix related unit tests

    Change-Id: Ie60c609b8d33731a7fed732d97ed92982523956b
    Closes-Bug: #1719584

Changed in python-neutronclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-neutronclient 6.6.0

This issue was fixed in the openstack/python-neutronclient 6.6.0 release.

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.