GBP: Updating 'shared' flag does not throw CLI error

Bug #1474582 reported by puppet-py
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Group Based Policy Client
Fix Released
Medium
Sumit Naiksatam

Bug Description

Using the GBP CLI:

1. Create Policy-classifier with shared=True
2. Create a Policy-rule using the above classifier and shared=True
3.Now update the classifier by setting shared=False.

Observation: CLI does NOT throw any error however the UI does.

Also, in the CLI show cmd of the policy-classifier it shows that 'shared' flag with its updated value(the one which was set during the initial creation of the classifier object)

----------
test@ubuntu-87:~/gatejobgbp/testcases$ gbp policy-classifier-create C1 --shared True
Created a new policy_classifier:
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| description | |
| direction | |
| id | 3286914a-56f8-41f4-8a00-b3bfb852c0b7 |
| name | C1 |
| port_range | |
| protocol | |
| shared | True |
| tenant_id | 1a65e85d214e426d8cdac2d365e44cd3 |
+-------------+--------------------------------------+
test@ubuntu-87:~/gatejobgbp/testcases$
test@ubuntu-87:~/gatejobgbp/testcases$
test@ubuntu-87:~/gatejobgbp/testcases$ gbp policy-rule-create R1 --classifier C1 --shared True
Created a new policy_rule:
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| description | |
| enabled | True |
| id | eae4e4e6-1825-44d1-9019-c5c93d85f56d |
| name | R1 |
| policy_actions | |
| policy_classifier_id | 3286914a-56f8-41f4-8a00-b3bfb852c0b7 |
| shared | True |
| tenant_id | 1a65e85d214e426d8cdac2d365e44cd3 |
+----------------------+--------------------------------------+
test@ubuntu-87:~/gatejobgbp/testcases$
test@ubuntu-87:~/gatejobgbp/testcases$
test@ubuntu-87:~/gatejobgbp/testcases$ gbp policy-classifier-update C1 --shared False
Updated policy_classifier: C1 <<<<<<<<<<<<<<<<<<<<<<<This should throw CLI error
test@ubuntu-87:~/gatejobgbp/testcases$

puppet-py (jbanerje)
description: updated
Changed in group-based-policy-client:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → next
Changed in group-based-policy-client:
assignee: nobody → Sumit Naiksatam (snaiksat)
Changed in group-based-policy-client:
milestone: next → 1.0.0
Revision history for this message
Sumit Naiksatam (snaiksat) wrote :
Changed in group-based-policy-client:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
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.