Merge lp://staging/~rohitagarwalla/neutron/l2network-plugin-db into lp://staging/~cisco-openstack/neutron/plugin-framework

Proposed by Rohit Agarwalla
Status: Merged
Merged at revision: 40
Proposed branch: lp://staging/~rohitagarwalla/neutron/l2network-plugin-db
Merge into: lp://staging/~cisco-openstack/neutron/plugin-framework
Diff against target: 1851 lines (+1814/-0)
7 files modified
quantum/plugins/cisco/README (+8/-0)
quantum/plugins/cisco/db/db_conn.ini (+5/-0)
quantum/plugins/cisco/db/db_test_plugin.py (+1049/-0)
quantum/plugins/cisco/db/l2network_db.py (+239/-0)
quantum/plugins/cisco/db/l2network_models.py (+86/-0)
quantum/plugins/cisco/db/ucs_db.py (+314/-0)
quantum/plugins/cisco/db/ucs_models.py (+113/-0)
To merge this branch: bzr merge lp://staging/~rohitagarwalla/neutron/l2network-plugin-db
Reviewer Review Type Date Requested Status
Sumit Naiksatam (community) Approve
Review via email: mp+69910@code.staging.launchpad.net

Description of the change

persistence of l2network & ucs plugins using mysql
- db_conn.ini - configuration details of making a connection to the database
- db_test_plugin.py - contains abstraction methods for storing database values in a dict and unit test cases for DB testing
- l2network_db.py - db methods for l2network models
- l2network_models.py - class definitions for the l2 network tables
- ucs_db.py - db methods for ucs models
- ucs_models.py - class definition for the ucs tables
dynamic loading of the 2nd layer plugin db's based on passed arguments
Create, Delete, Get, Getall, Update database methods at - Quantum, L2Network and Ucs
Unit test cases for create, delete, getall and update operations for L2Network and Ucs plugins
pep8 checks done
branch based off revision 34 plugin-framework

To post a comment you must log in.
Revision history for this message
Sumit Naiksatam (snaiksat) wrote :

Thanks, great job! Looks mostly good to me. I ran the tests provided with this code and they executed fine. Just a few small fixes suggested (some are nits):

1. As discussed in a separate thread, please move the code to the new "db' directory.

2. The quantum component is following the convention of "getting" a logger component and logging to that (so that the logs get flagged with the name of the component). Can you please do this in the modules in which you are writing to the logs? This is how to do it:

from quantum.plugins.cisco.common import cisco_constants as const

LOG.basicConfig(level=LOG.WARN)
LOG.getLogger(const.LOGGER_COMPONENT_NAME)

3. The requirement for the creation of "cisco_naas" DB should be documented in the README file. Please also provide instructions on how to create it.

4. Specifically on the name "cisco_naas", Ram earlier had the suggestion that it be called something else. I would definitely recommend getting away from "naas" since we are not using it any more. Maybe call it "quantum_l2network" since we are calling our plugin "l2network-plugin".

5. The nova coding guidelines require that imports be arranged in the alphabetical order. The following order does not seem correct to me, please check this (and other places as well):

+import ConfigParser
33 +import os
34 +import logging as LOG
35 +import unittest
36 +from optparse import OptionParser

More info on imports order can be found in the HACKING file in the nova branch.

review: Needs Fixing
36. By Rohit Agarwalla

merged the latest changes from plugin-framework branch - revision 39
conforming to the new cisco plugin directory structure and moving all db related modules into cisco/db folder
updated db_test_plugin.py
 - added import of cisco constants module
 - added LOG.getLogger for logging component name
 - updated import module paths for l2network_models/db and ucs_models/db to use the new directory structure
 - updated (rearranged) imports section to obey openstack alphabetical placement convention
updated db_conn.ini
 - updated database name from cisco_naas to quantum_l2network
unit test cases ran successfully and pep8 checks done again

Revision history for this message
Sumit Naiksatam (snaiksat) wrote :

Great, lgtm. I recommend going ahead with the merge. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches