1. Decouple GBP resource mapping from neutron plugins and use
Neutron RESTful APIs instead.
2. Move neutron_client related calls to neutron_api_mixin for
easier removing in the future.
3. Add mock_neutronv2_api to provide methods to patch the
Neutron RESTful API calls with WSGI calls.
4. Modify the existing 'UT' for the resource mapping driver, by
patching the RESTful APIs with the WSGI calls, to ensure the
test scenarios are still examined and passed.
5. Modify the existing 'UT' for the APIC mapping driver, by
patching the RESTful APIs with the WSGI calls, to ensure the
test scenarios are still examined and passed.
Change-Id: I9ec6d159b87e77fcd034b2ff6d4e5c0969798b34
Author: Yi Yang <yyos1999@gmail.com>
Co-Authored-By: Yapeng Wu <yapengwu@gmail.com>
Co-Authored-By: Ivar Lazzaro <ivarlazzaro@gmail.com>
Co-Authored-By: Robert Kukura <kukura@noironetworks.com>
Service chains are now formed also when one of the
consumers is an External Policy.
In the current patch, external Policies providing a redirect
rule don't trigger the chain instantiation, need some
discussion to understand whether it makes sense and
how to test it.
Change-Id: I71323de7272b74f673ef9c368c6d60272e3dc6de
Partially Closes-Bug: 1432779
This patch implements the hooks so that functional and integration
tests can be run in the group-based-policy repo.
Currently, the configured devstack for this job is enabled to run GBP
exercise scripts, which result in complete end-to-end integration
testing of the GBP service and client components along with integration
with Neutron and Nova.
A placeholder functional test case is also added. A functional test suite
will be added in a separate commit.
Change-Id: Id705e5755b9662f6e297f29836d6983d66f845a8
1. Add GBP APIs to interact with Neutron RESTful client to:
CRUD networks
CRUD subnets
CRUD ports
CRUD security groups
CRD security group rules
CRUD routers
add/remove router interfaces
2. Add UT for the above APIs
Change-Id: If7d73284ad9e7e09bd261e5ba0d82d67ec99ec49
Signed-off-by: Yi Yang <yyos1999@gmail.com>
Author: Yi Yang <yyos1999@gmail.com>
Co-Authored-By: Yapeng Wu <yapengwu@gmail.com>
The resource_mapping driver's PTG cleanup code no longer assumes PTG
has at least one subnet, which can occur when subnet allocation fails
when the PTG is created. Unit test for subnet exhaustion added.
Closes-bug: 1416177
Change-Id: I45529255723282b6e0d8a884cac2bd604ea9b61a
If any exception is raised by a driver's create_<resource>_postcommit
method, the partially-created resource is deleted before returning the
exception to the client.
If any exception is raised by a driver's delete_<resource>_postcommit
method, the exception is logged, but is not returned to the client.
Also, the log messages are made more consistent and readable.
Closes-bug: 1407321
Partial-bug: 1416177
Change-Id: I7c3096ae436f23d68d695b813f7d8d0b2588dbfe
1) Adds validation for supported NSP parameters in RMD
2) Fixes issue with unset/cleanup of NSP from PTG
3) Prevent deletion of in use NSP
Change-Id: Ic67c705d239741f35792ed0e4b06f48663df63ff
Closes-Bug: 1423689
Closes-Bug: 1426902
Partial-Bug: 1421413
The resource_mapping policy driver rejects L2Policy updates that
attempt to change the l3_policy_id attribute.
Closes-Bug: 1417724
Change-Id: Ib744bb03bb0ad561dcf9961b9a29c8d484c7367d
Heat throws an error if the stack name has space in between.
Remove any space before invoking Heat Api in ServiceChainInstance
Change-Id: I0b43a135ec7697b00d459f52568f66ad239b01e0
Closes-Bug: #1427523
When cleaning up services in a service chain instance, NotFound
exception is safely ignored rather than propagating the exception
Change-Id: If974bdc31efd44feb77fa5eac09dba31f221ce16
Closes-Bug: 1420058
Before deleting an L2Policy, check that no PolicyTargetGroups
reference it. Before deleting an L3Policy, ensure that no L2Policies
reference it. Raise exceptions if they are in-use.
Closes-bug: 1415244
Closes-bug: 1407323
Change-Id: Ie5d3c8a01a57a331eed46354c80ed28acad0fd04
1) Fixes Parent redirect enforcement when Parent ruleset is created after
the child ruleset is asoociated with PTGs
2) Fixes child ruleset add/delete on parent ruleset update
Change-Id: I2771d6ce2fc3dcac3e9ec3f7a9556933cd9aae48
Closes-bug: 1407636