tempest security group test fails due to null security group description

Bug #1766508 reported by sureshkvl on 2018-04-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
Medium
Bruno Fernando
R3.2.3.x
In Progress
Medium
Bruno Fernando
R4.0
Fix Committed
Medium
Bruno Fernando
R4.1
Fix Committed
Medium
Bruno Fernando
R5.0
Fix Committed
Medium
Bruno Fernando
Trunk
Fix Committed
Medium
Bruno Fernando
OpenContrail
Fix Committed
Undecided
Bruno Fernando

Bug Description

Tempest expects the string in the security group description. But if the security group is created without description, it returns None. Hence tempest test fails

Fix:
Add a default description to empty string(" "), if the description is not provided by the user during Security Grou creation..

Tempest Failure Logs
=======================
tempest.api.compute.security_groups.test_security_groups.SecurityGroupsTestJSON.test_list_security_groups_by_server

Error:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tempest/api/compute/security_groups/test_security_groups.py", line 157, in test_list_security_groups_by_server
    server_id)['security_groups'])
  File "/usr/local/lib/python2.7/dist-packages/tempest/lib/services/compute/servers_client.py", line 758, in list_security_groups_by_server
    resp, body)
  File "/usr/local/lib/python2.7/dist-packages/tempest/lib/common/rest_client.py", line 913, in validate_response
    raise exceptions.InvalidHTTPResponseBody(msg)
tempest.lib.exceptions.InvalidHTTPResponseBody: HTTP response body is invalid json or xml
Details: HTTP response body is invalid (None is not of type 'string'

Failed validating 'type' in schema['properties']['security_groups']['items']['properties']['description']:
    {'type': 'string'}

On instance['security_groups'][0]['description']:
    None)

Changed in opencontrail:
assignee: nobody → sureshkvl (sureshkumar-s)
Changed in juniperopenstack:
assignee: nobody → sureshkvl (sureshkumar-s)
Changed in juniperopenstack:
assignee: sureshkvl (sureshkumar-s) → nobody
Changed in opencontrail:
assignee: sureshkvl (sureshkumar-s) → nobody

Review in progress for https://review.opencontrail.org/42463
Submitter: Bruno Fernando (<email address hidden>)

Jeba Paulaiyan (jebap) on 2018-04-24
tags: added: config
Sachin Bansal (sbansal) on 2018-04-25
Changed in opencontrail:
assignee: nobody → Bruno Fernando (bfernando)

Reviewed: https://review.opencontrail.org/42463
Committed: http://github.com/Juniper/contrail-controller/commit/e5e43220c86c35750dad8d6a6dc87bc78d3bc29a
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit e5e43220c86c35750dad8d6a6dc87bc78d3bc29a
Author: suresh <email address hidden>
Date: Mon Apr 23 17:05:15 2018 +0530

Use empty string as default value for Security Group description

* Return SG description field to empty string if none value.

Change-Id: Ic40c614b3bafbd93e50569d4c31fcfb584954e7a
Closes-Bug: #1766508

Sachin Bansal (sbansal) on 2018-04-26
Changed in opencontrail:
status: New → Fix Committed

Review in progress for https://review.opencontrail.org/42548
Submitter: Bruno Fernando (<email address hidden>)

Review in progress for https://review.opencontrail.org/42549
Submitter: Bruno Fernando (<email address hidden>)

Review in progress for https://review.opencontrail.org/42550
Submitter: Bruno Fernando (<email address hidden>)

Review in progress for https://review.opencontrail.org/42551
Submitter: Bruno Fernando (<email address hidden>)

Review in progress for https://review.opencontrail.org/42552
Submitter: Bruno Fernando (<email address hidden>)

Reviewed: https://review.opencontrail.org/42549
Committed: http://github.com/Juniper/contrail-controller/commit/90ceda931f951a4cb5e17d81b7ca05a91ed672c4
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 90ceda931f951a4cb5e17d81b7ca05a91ed672c4
Author: suresh <email address hidden>
Date: Mon Apr 23 17:05:15 2018 +0530

Use empty string as default value for Security Group description

* Return SG description field to empty string if none value.

Change-Id: Ic40c614b3bafbd93e50569d4c31fcfb584954e7a
Closes-Bug: #1766508
(cherry picked from commit e5e43220c86c35750dad8d6a6dc87bc78d3bc29a)

Reviewed: https://review.opencontrail.org/42548
Committed: http://github.com/Juniper/contrail-controller/commit/c06a4a68c6472886e4a794fa62a30e134beb8822
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit c06a4a68c6472886e4a794fa62a30e134beb8822
Author: suresh <email address hidden>
Date: Mon Apr 23 17:05:15 2018 +0530

Use empty string as default value for Security Group description

* Return SG description field to empty string if none value.

Change-Id: Ic40c614b3bafbd93e50569d4c31fcfb584954e7a
Closes-Bug: #1766508
(cherry picked from commit e5e43220c86c35750dad8d6a6dc87bc78d3bc29a)

Reviewed: https://review.opencontrail.org/42552
Committed: http://github.com/Juniper/contrail-controller/commit/de15292d0df7f06ba4824aad5b2bbeff03fc440e
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit de15292d0df7f06ba4824aad5b2bbeff03fc440e
Author: suresh <email address hidden>
Date: Mon Apr 23 17:05:15 2018 +0530

Use empty string as default value for Security Group description

* Return SG description field to empty string if none value.

Closes-Bug: #1766508
(cherry picked from commit e5e43220c86c35750dad8d6a6dc87bc78d3bc29a)

Conflicts:
 src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py

Change-Id: Ic40c614b3bafbd93e50569d4c31fcfb584954e7a

Reviewed: https://review.opencontrail.org/42550
Committed: http://github.com/Juniper/contrail-controller/commit/50cc3a811333f3155c950547f4a8262eebe5965c
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 50cc3a811333f3155c950547f4a8262eebe5965c
Author: suresh <email address hidden>
Date: Mon Apr 23 17:05:15 2018 +0530

Use empty string as default value for Security Group description

* Return SG description field to empty string if none value.

Closes-Bug: #1766508
(cherry picked from commit e5e43220c86c35750dad8d6a6dc87bc78d3bc29a)

Conflicts:
 src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py

Change-Id: Ic40c614b3bafbd93e50569d4c31fcfb584954e7a

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers