Commit Graph

30 Commits

Author SHA1 Message Date
Boden R 9c2e55cf8e
use object common_types from neutron-lib
Switch over to neutron-lib for OVO common_types.

Also update lower constraints and requirements to pass gates

Depends-On: https://review.opendev.org/#/c/664646/
Change-Id: I8d3175f95f567a4ca4ae9d06de09a57ea4656b6a
2019-12-03 18:08:24 +01:00
Sara Nierodzik 1603f200d7
Functional Job fix
This patch includes various changes in order to get the functional
job gate for the neutron-classifier to work as expected.

Previous patch includes changes made to openstack tox py36 and py37
jobs. Link to merged patch: https://review.opendev.org/#/c/672725/
Due to the dependency on neutron-lib the patch had to remove
the failing functional job from the gate in order to get merged.

Changes Include:
 - removes files that were used by the Zuul v2 functional test
and are not needed anymore.
 - adds dsvm-functional tox.ini changes as carried out by
 https://review.opendev.org/#/c/674336/ patch.
- remove unneeded extra job variables, the defaults are just fine
  and include these settings
- make test_path overridable in .stestr.conf
- make job voting

Change-Id: I180ac6df807864a4fd2b129ab525c7e78bca67c0
Co-Authored-By: Andreas Jaeger <aj@suse.com>
2019-08-08 15:21:56 +02:00
Boden R 7e3ae0075a Update Neutron Classifier for Zuulv3
This patch updates the testing of the neutron classifier
repository to be zuulv3 compliant. Changes include:
 - Added lower-constraints.txt file.
 - Added clarifying comments to requirements.txt including
   neutron-lib-current update.
 - Removed playbooks/legacy yaml files.
 - Modified coverage package version.
 - Added to testenv, testenv:dev in tox.ini

 This patch is part of the neutron-sibling-setup
 as documented in [1]. Changes were also based on zuulv3
 opencontrail patch [2] as well as updates made to
 x/vmware-nsx project.[3]

[1] https://etherpad.openstack.org/p/neutron-sibling-setup
[2] https://review.opendev.org/#/c/624782/
[3] https://review.opendev.org/#/c/670134/

Change-Id: I46ac45d97a5af24ae234f11952d6883cd3088ff7
2019-07-18 11:02:21 -06:00
Sara Nierodzik 30906ec3ff Neutron Classifier bug fixes
Changes include:
 -Replace openstack.org link with opendev.org
 -Delete pylint
 -Change way of adding neutron in the requirements.
 -Replace common_db_mixin with 'object'. [Reference:] 957eca96f4
 -Update Sphinx requirement version

Change-Id: Ie4eaa32819e04ec8c486e71430b29912e06fab29
Signed-off-by: Sara Nierodzik <sara.nierodzik@intel.com>
2019-07-05 15:51:46 +00:00
David Shaughnessy 30b9277229 Updates to Openstack CLI to reflect Database.
Updates to Openstack Client to reflect current
state of Neutron Classiifier classifications
and comply with pep8 standards. Tests included but incomplete
until further changes to core code takes place.

Change-Id: I33165dcf3519912cdbb975366cdc5324d91f3fd7
Co-Authored-By: Nakul Dahiwade <nakul.dahiwade@intel.com>
2019-01-29 19:08:36 +00:00
Thaynara Silva 133d5be638 Version 0 Patch
- All classification types expressed in a single
   resource.
 - Classifications can be grouped inside classification
   groups resource which can be consumed by other
   neutron resources.
 - A list of supported classifications exists through
   classification type list resource.
 - Switch to stestr

Change-Id: I05acaf6419c294692ff270ad4a488a5e68749d67
Co-Authored-By: David Shaughnessy <david.shaughnessy@intel.com>
Co-Authored-By: Nakul Dahiwade <nakul.dahiwade@intel.com>
2018-08-21 17:37:40 +00:00
Thaynara Silva 28f020f592 Add Database Models and OVOs for classifications
- Introducing database models and oslo versioned objects for
   classification resources used by the common classification
   framework service plugin.
 - Add playbooks, post_test_hook, gate_hook,
   modify requirements, .zuul.yaml for gate.
   Add migration test, fix models and migration scripts.
 - Change ClassificationType decorator to NeutronObjectRegistry,
   add get_objects method.
   Remove ClassificationType from object version test,
   Add get_bound_tenant_ids to ClassificationGroups
   Add openstack-python35-jobs-neutron to zuul.
Change-Id: I41d5b399352b47d74000596e6518e199d36709a7
Co-Authored-By: David Shaughnessy <david.shaughnessy@intel.com>
Co-Authored-By: Nakul Dahiwade <nakul.dahiwade@intel.com>
Co-Authored-By: John Hinman <john.hinman@intel.com>
2018-06-07 21:10:29 +00:00
david shaughnessy 61b187d768 Functional Tests and Gate stub
- Adds modifications to tox.ini to enable functional testing
- adds the functional sub directory to the tests folder
- adds .zuul file to enable the Gate to start functional testing.

Change-Id: Id40c0feba1741328027bd285e10aa8899b4a12b9
2018-01-09 16:59:10 +00:00
Thaynara Silva d73e2bafa4 Add Database Migrations Classifications
- Introducing database migrations for the neutron common
   classification framework.

Change-Id: Iceca7c10aaec7a8566d994ed1acd057818e54d5d
Co-Authored-By: David Shaughnessy <david.shaughnessy@intel.com>
2017-10-13 14:07:31 +00:00
Igor Duarte Cardoso b945ada11f Update the neutron-classifier repo
This is essentially a maintenance patch to make the neutron-classifier
repo pass the gate again, and add a few bits and pieces before the
Common Classification Framework starts to be applied.

Change-Id: I6f075363aeb06820c3ba3262454c5820b1c16bef
2017-07-04 14:06:19 +00:00
Ramanjaneya 10b2eb3127 Validation for classification attributes
This patch validate classification attributes for
security-group and firewall rules create.

Co-Authored-By: Mohankumar <mohankumar.n@huawei.com>
Change-Id: Iad3bb9792dbb08d21b5072f6740c2f622f5b706d
2016-04-14 09:42:15 +00:00
Ramanjaneya ce02c2d101 Implement Firewall conversions
This patch implements API's for
* Saving firewall rules in common classifier model.
* Retrieving firewall rule from the common classfier db.

Change-Id: I64ff4ce875fd909d57375d1c601dc61e86c79f40
Co-Authored-By: Mohankumar <mohankumar.n@huawei.com>
2015-12-11 16:38:22 +05:30
Sean M. Collins 7b2c6a7ce6 Create unit tests to test v4 and v6 security group rules
The branch for if classifier_type is model.Ipv4Classifier was
not covered by a unit test, so a typo slipped through. My bad.

Change-Id: Id1ec95d6131226ee8a0055e35f98c24b846499a4
2015-12-11 16:38:22 +05:30
Jenkins 0b0fbc413c Merge "Remove CLASSIFIER_TYPES constant - it was never used" 2015-12-06 09:39:07 +00:00
Sean M. Collins 2413003cfd TransportClassifier - change params to __int__
* For clarity, don't abbreviate destination to dst.

* Add support for source_port_range_max and source_port_range_max kwargs

Change-Id: I2ed3bc273a08fe0ec6529432c2416fff409fd309
2015-12-04 12:04:23 -05:00
Sean M. Collins 4216d79ef1 Revert "Only call create_all once"
Since this database is in memory there seems to be an interaction with
tox and how it sets up and runs tests. So let's just create it each time

This reverts commit b32284e787.

Change-Id: I56be0354eae2028f50efe6d5e8034dcdb1766b54
2015-12-04 12:00:28 -05:00
Sean M. Collins 4d7daaa32e Implement ClassifierGroup and Security Group conversions
* The Security Group Rule ethertype only has two values: 4 or 6, but the
  actual Ethernet protocol specifies Ethertype as a two-octet field. So
  lets fix it up and handle the conversion.

* Create a DirectionClassifier that can store INGRESS, EGRESS
  and BIDIRECTIONAL directives

* Add get_classifier_group API method to query the DB for a
  ClassifierGroup

Change-Id: Ib7d5d83b0c06ad326d100d55a506262dbfc520b3
2015-12-03 12:28:18 -05:00
Sean M. Collins ae689c9de6 Remove CLASSIFIER_TYPES constant - it was never used
Change-Id: Ia6ba4453f6bc9b9de0da1e83d2dc75147fb91882
2015-12-03 10:46:36 -05:00
Jenkins 5663af1ea8 Merge "Fix Ipv4Classifier protocol field declaration" 2015-12-02 18:08:33 +00:00
Jenkins 6f689d6e9c Merge "License header for constants" 2015-12-02 18:08:09 +00:00
Sean M. Collins 137cd5f9b6 Fix Ipv4Classifier protocol field declaration
Change-Id: Ica659e9b61328dc2838db4d7367efd75b21521e4
2015-12-02 12:43:15 -05:00
Sean M. Collins c2f27c7775 License header for constants
Change-Id: I85d04c395ef1e89ba59d6328bc625f53675e12cb
2015-12-02 12:41:56 -05:00
Sean M. Collins 4e8772668f Fix up ethertype and next_header declarations
Change-Id: I7ce9948e40bf9bbf2830d4e4d7a14f0e8e2a69ca
2015-12-02 11:25:43 -05:00
Sean M. Collins 5812ab6217 Reorder model classes to be alphabetical
Change-Id: Ide16dd1c71d228b8a0c2bbad35bcf2404fc1ff6b
2015-12-02 10:35:34 -05:00
Sean M. Collins c53a5933e2 Simplistic check for convert_security_group_rule_to_classifier
Change-Id: I476f3d559dbe9f6cf6b9f617b2c63885c861cd53
2015-12-01 12:49:29 -05:00
Sean M. Collins b32284e787 Only call create_all once
Change-Id: I74b520a558cb813a9cbaf0e845296885892b788c
2015-12-01 12:22:19 -05:00
Sean M. Collins 79cc73fcd3 Continue to flesh out the Database API
Begin to follow the pattern of passing in a context, that contains a
session which is used to conduct database transactions and operations.

Change-Id: I4a0cfe45bf51d5548eb9e2fd0206cb51b44320e8
2015-11-19 21:38:16 -05:00
Sean M. Collins 1b9984fbce Initial Database Models
Use SQLAlchemy support for joined table inheritance

http://docs.sqlalchemy.org/en/rel_1_0/orm/extensions/declarative/inheritance.html#joined-table-inheritance
2015-11-01 16:17:53 +09:00
Sean M. Collins 268cf94051 Fix unit test imports 2015-10-30 18:08:52 +09:00
Sean M. Collins f708b92aa9 Move neutron-classifier so it can be imported 2015-10-30 16:22:40 +09:00