summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShiv Haris <sharis@brocade.com>2015-01-22 14:51:51 -0800
committerShiv Haris <sharis@brocade.com>2015-01-30 18:01:51 -0800
commit2a2e09bf3fe59834fa79e23ee2d01dc7ab8056b6 (patch)
tree8f5ef3832c7d928f70b63e9aa144c4be6a88912a
parentdc80263dfed75294aeb929c503a5a167d6eb9092 (diff)
Updating .gitreview file and adding cookie cutter files
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Shiv Haris <shivharis@hotmail.com> Workflow+1: Shiv Haris <shivharis@hotmail.com> Submitted-by: Jenkins Submitted-at: Mon, 02 Feb 2015 17:54:08 +0000 Reviewed-on: https://review.openstack.org/151407 Project: stackforge/networking-brocade Branch: refs/heads/master
-rw-r--r--.gitignore29
-rw-r--r--.gitreview2
-rw-r--r--.testr.conf7
-rw-r--r--CONTRIBUTING.rst16
-rw-r--r--HACKING.rst4
-rw-r--r--LICENSE176
-rw-r--r--MANIFEST.in6
-rw-r--r--README.rst13
-rw-r--r--babel.cfg2
-rwxr-xr-xdoc/source/conf.py75
-rw-r--r--doc/source/contributing.rst4
-rw-r--r--doc/source/index.rst25
-rw-r--r--doc/source/installation.rst12
-rw-r--r--doc/source/readme.rst1
-rw-r--r--doc/source/usage.rst7
-rw-r--r--networking_brocade/__init__.py19
-rw-r--r--networking_brocade/tests/__init__.py0
-rw-r--r--networking_brocade/tests/base.py23
-rw-r--r--networking_brocade/tests/test_networking_brocade.py28
-rw-r--r--neutron/plugins/ml2/drivers/brocade/db/models.py2
-rw-r--r--neutron/plugins/ml2/drivers/brocade/mechanism_brocade.py43
-rw-r--r--neutron/plugins/ml2/drivers/brocade/nos/nosdriver.py1
-rw-r--r--neutron/services/l3_router/brocade/l3_router_plugin.py7
-rw-r--r--neutron/tests/unit/__init__.py0
-rw-r--r--neutron/tests/unit/ml2/drivers/brocade/test_brocade_l3_plugin.py7
-rw-r--r--neutron/tests/unit/ml2/drivers/brocade/test_brocade_mechanism_driver.py4
-rw-r--r--openstack-common.conf6
-rw-r--r--requirements.txt6
-rw-r--r--setup.cfg47
-rwxr-xr-xsetup.py22
-rw-r--r--test-requirements.txt15
-rw-r--r--tox.ini34
32 files changed, 612 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5f77550
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,29 @@
1AUTHORS
2build/*
3build-stamp
4ChangeLog
5cover/
6covhtml/
7dist/
8doc/build
9*.DS_Store
10*.pyc
11neutron.egg-info/
12neutron/vcsversion.py
13neutron/versioninfo
14pbr*.egg/
15quantum.egg-info/
16quantum/vcsversion.py
17quantum/versioninfo
18setuptools*.egg/
19*.log
20*.mo
21*.sw?
22*~
23/.*
24!/.coveragerc
25!/.gitignore
26!/.gitreview
27!/.mailmap
28!/.pylintrc
29!/.testr.conf
diff --git a/.gitreview b/.gitreview
index edfa123..b18dfc2 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,4 +1,4 @@
1[gerrit] 1[gerrit]
2host=review.openstack.org 2host=review.openstack.org
3port=29418 3port=29418
4project=stackforge/brocade/vdx-AmppML2-SVI.git 4project=stackforge/networking-brocade.git
diff --git a/.testr.conf b/.testr.conf
new file mode 100644
index 0000000..6d83b3c
--- /dev/null
+++ b/.testr.conf
@@ -0,0 +1,7 @@
1[DEFAULT]
2test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
3 OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
4 OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
5 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
6test_id_option=--load-list $IDFILE
7test_list_option=--list
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..aa2b4e4
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,16 @@
1If you would like to contribute to the development of OpenStack,
2you must follow the steps in this page:
3
4 http://docs.openstack.org/infra/manual/developers.html
5
6Once those steps have been completed, changes to OpenStack
7should be submitted for review via the Gerrit tool, following
8the workflow documented at:
9
10 http://docs.openstack.org/infra/manual/developers.html#development-workflow
11
12Pull requests submitted through GitHub will be ignored.
13
14Bugs should be filed on Launchpad, not GitHub:
15
16 https://bugs.launchpad.net/networking-brocade
diff --git a/HACKING.rst b/HACKING.rst
new file mode 100644
index 0000000..75aa4aa
--- /dev/null
+++ b/HACKING.rst
@@ -0,0 +1,4 @@
1networking-brocade Style Commandments
2===============================================
3
4Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..68c771a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,176 @@
1
2 Apache License
3 Version 2.0, January 2004
4 http://www.apache.org/licenses/
5
6 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
8 1. Definitions.
9
10 "License" shall mean the terms and conditions for use, reproduction,
11 and distribution as defined by Sections 1 through 9 of this document.
12
13 "Licensor" shall mean the copyright owner or entity authorized by
14 the copyright owner that is granting the License.
15
16 "Legal Entity" shall mean the union of the acting entity and all
17 other entities that control, are controlled by, or are under common
18 control with that entity. For the purposes of this definition,
19 "control" means (i) the power, direct or indirect, to cause the
20 direction or management of such entity, whether by contract or
21 otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 outstanding shares, or (iii) beneficial ownership of such entity.
23
24 "You" (or "Your") shall mean an individual or Legal Entity
25 exercising permissions granted by this License.
26
27 "Source" form shall mean the preferred form for making modifications,
28 including but not limited to software source code, documentation
29 source, and configuration files.
30
31 "Object" form shall mean any form resulting from mechanical
32 transformation or translation of a Source form, including but
33 not limited to compiled object code, generated documentation,
34 and conversions to other media types.
35
36 "Work" shall mean the work of authorship, whether in Source or
37 Object form, made available under the License, as indicated by a
38 copyright notice that is included in or attached to the work
39 (an example is provided in the Appendix below).
40
41 "Derivative Works" shall mean any work, whether in Source or Object
42 form, that is based on (or derived from) the Work and for which the
43 editorial revisions, annotations, elaborations, or other modifications
44 represent, as a whole, an original work of authorship. For the purposes
45 of this License, Derivative Works shall not include works that remain
46 separable from, or merely link (or bind by name) to the interfaces of,
47 the Work and Derivative Works thereof.
48
49 "Contribution" shall mean any work of authorship, including
50 the original version of the Work and any modifications or additions
51 to that Work or Derivative Works thereof, that is intentionally
52 submitted to Licensor for inclusion in the Work by the copyright owner
53 or by an individual or Legal Entity authorized to submit on behalf of
54 the copyright owner. For the purposes of this definition, "submitted"
55 means any form of electronic, verbal, or written communication sent
56 to the Licensor or its representatives, including but not limited to
57 communication on electronic mailing lists, source code control systems,
58 and issue tracking systems that are managed by, or on behalf of, the
59 Licensor for the purpose of discussing and improving the Work, but
60 excluding communication that is conspicuously marked or otherwise
61 designated in writing by the copyright owner as "Not a Contribution."
62
63 "Contributor" shall mean Licensor and any individual or Legal Entity
64 on behalf of whom a Contribution has been received by Licensor and
65 subsequently incorporated within the Work.
66
67 2. Grant of Copyright License. Subject to the terms and conditions of
68 this License, each Contributor hereby grants to You a perpetual,
69 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 copyright license to reproduce, prepare Derivative Works of,
71 publicly display, publicly perform, sublicense, and distribute the
72 Work and such Derivative Works in Source or Object form.
73
74 3. Grant of Patent License. Subject to the terms and conditions of
75 this License, each Contributor hereby grants to You a perpetual,
76 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 (except as stated in this section) patent license to make, have made,
78 use, offer to sell, sell, import, and otherwise transfer the Work,
79 where such license applies only to those patent claims licensable
80 by such Contributor that are necessarily infringed by their
81 Contribution(s) alone or by combination of their Contribution(s)
82 with the Work to which such Contribution(s) was submitted. If You
83 institute patent litigation against any entity (including a
84 cross-claim or counterclaim in a lawsuit) alleging that the Work
85 or a Contribution incorporated within the Work constitutes direct
86 or contributory patent infringement, then any patent licenses
87 granted to You under this License for that Work shall terminate
88 as of the date such litigation is filed.
89
90 4. Redistribution. You may reproduce and distribute copies of the
91 Work or Derivative Works thereof in any medium, with or without
92 modifications, and in Source or Object form, provided that You
93 meet the following conditions:
94
95 (a) You must give any other recipients of the Work or
96 Derivative Works a copy of this License; and
97
98 (b) You must cause any modified files to carry prominent notices
99 stating that You changed the files; and
100
101 (c) You must retain, in the Source form of any Derivative Works
102 that You distribute, all copyright, patent, trademark, and
103 attribution notices from the Source form of the Work,
104 excluding those notices that do not pertain to any part of
105 the Derivative Works; and
106
107 (d) If the Work includes a "NOTICE" text file as part of its
108 distribution, then any Derivative Works that You distribute must
109 include a readable copy of the attribution notices contained
110 within such NOTICE file, excluding those notices that do not
111 pertain to any part of the Derivative Works, in at least one
112 of the following places: within a NOTICE text file distributed
113 as part of the Derivative Works; within the Source form or
114 documentation, if provided along with the Derivative Works; or,
115 within a display generated by the Derivative Works, if and
116 wherever such third-party notices normally appear. The contents
117 of the NOTICE file are for informational purposes only and
118 do not modify the License. You may add Your own attribution
119 notices within Derivative Works that You distribute, alongside
120 or as an addendum to the NOTICE text from the Work, provided
121 that such additional attribution notices cannot be construed
122 as modifying the License.
123
124 You may add Your own copyright statement to Your modifications and
125 may provide additional or different license terms and conditions
126 for use, reproduction, or distribution of Your modifications, or
127 for any such Derivative Works as a whole, provided Your use,
128 reproduction, and distribution of the Work otherwise complies with
129 the conditions stated in this License.
130
131 5. Submission of Contributions. Unless You explicitly state otherwise,
132 any Contribution intentionally submitted for inclusion in the Work
133 by You to the Licensor shall be under the terms and conditions of
134 this License, without any additional terms or conditions.
135 Notwithstanding the above, nothing herein shall supersede or modify
136 the terms of any separate license agreement you may have executed
137 with Licensor regarding such Contributions.
138
139 6. Trademarks. This License does not grant permission to use the trade
140 names, trademarks, service marks, or product names of the Licensor,
141 except as required for reasonable and customary use in describing the
142 origin of the Work and reproducing the content of the NOTICE file.
143
144 7. Disclaimer of Warranty. Unless required by applicable law or
145 agreed to in writing, Licensor provides the Work (and each
146 Contributor provides its Contributions) on an "AS IS" BASIS,
147 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 implied, including, without limitation, any warranties or conditions
149 of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 PARTICULAR PURPOSE. You are solely responsible for determining the
151 appropriateness of using or redistributing the Work and assume any
152 risks associated with Your exercise of permissions under this License.
153
154 8. Limitation of Liability. In no event and under no legal theory,
155 whether in tort (including negligence), contract, or otherwise,
156 unless required by applicable law (such as deliberate and grossly
157 negligent acts) or agreed to in writing, shall any Contributor be
158 liable to You for damages, including any direct, indirect, special,
159 incidental, or consequential damages of any character arising as a
160 result of this License or out of the use or inability to use the
161 Work (including but not limited to damages for loss of goodwill,
162 work stoppage, computer failure or malfunction, or any and all
163 other commercial damages or losses), even if such Contributor
164 has been advised of the possibility of such damages.
165
166 9. Accepting Warranty or Additional Liability. While redistributing
167 the Work or Derivative Works thereof, You may choose to offer,
168 and charge a fee for, acceptance of support, warranty, indemnity,
169 or other liability obligations and/or rights consistent with this
170 License. However, in accepting such obligations, You may act only
171 on Your own behalf and on Your sole responsibility, not on behalf
172 of any other Contributor, and only if You agree to indemnify,
173 defend, and hold each Contributor harmless for any liability
174 incurred by, or claims asserted against, such Contributor by reason
175 of your accepting any such warranty or additional liability.
176
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..c978a52
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,6 @@
1include AUTHORS
2include ChangeLog
3exclude .gitignore
4exclude .gitreview
5
6global-exclude *.pyc
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..b39fc78
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,13 @@
1===============================
2networking-brocade
3===============================
4
5Brocade Networking Mech. Drivers and Plugins
6
7* Free software: Apache license
8* Source: http://git.openstack.org/cgit/stackforge/networking-brocade
9
10Features
11--------
12
13* TODO
diff --git a/babel.cfg b/babel.cfg
new file mode 100644
index 0000000..15cd6cb
--- /dev/null
+++ b/babel.cfg
@@ -0,0 +1,2 @@
1[python: **.py]
2
diff --git a/doc/source/conf.py b/doc/source/conf.py
new file mode 100755
index 0000000..21907ea
--- /dev/null
+++ b/doc/source/conf.py
@@ -0,0 +1,75 @@
1# -*- coding: utf-8 -*-
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11# implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import os
16import sys
17
18sys.path.insert(0, os.path.abspath('../..'))
19# -- General configuration ----------------------------------------------------
20
21# Add any Sphinx extension module names here, as strings. They can be
22# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
23extensions = [
24 'sphinx.ext.autodoc',
25 #'sphinx.ext.intersphinx',
26 'oslosphinx'
27]
28
29# autodoc generation is a bit aggressive and a nuisance when doing heavy
30# text edit cycles.
31# execute "export SPHINX_DEBUG=1" in your terminal to disable
32
33# The suffix of source filenames.
34source_suffix = '.rst'
35
36# The master toctree document.
37master_doc = 'index'
38
39# General information about the project.
40project = u'networking-brocade'
41copyright = u'2013, OpenStack Foundation'
42
43# If true, '()' will be appended to :func: etc. cross-reference text.
44add_function_parentheses = True
45
46# If true, the current module name will be prepended to all description
47# unit titles (such as .. function::).
48add_module_names = True
49
50# The name of the Pygments (syntax highlighting) style to use.
51pygments_style = 'sphinx'
52
53# -- Options for HTML output --------------------------------------------------
54
55# The theme to use for HTML and HTML Help pages. Major themes that come with
56# Sphinx are currently 'default' and 'sphinxdoc'.
57# html_theme_path = ["."]
58# html_theme = '_theme'
59# html_static_path = ['static']
60
61# Output file base name for HTML help builder.
62htmlhelp_basename = '%sdoc' % project
63
64# Grouping the document tree into LaTeX files. List of tuples
65# (source start file, target name, title, author, documentclass
66# [howto/manual]).
67latex_documents = [
68 ('index',
69 '%s.tex' % project,
70 u'%s Documentation' % project,
71 u'OpenStack Foundation', 'manual'),
72]
73
74# Example configuration for intersphinx: refer to the Python standard library.
75#intersphinx_mapping = {'http://docs.python.org/': None}
diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst
new file mode 100644
index 0000000..1728a61
--- /dev/null
+++ b/doc/source/contributing.rst
@@ -0,0 +1,4 @@
1============
2Contributing
3============
4.. include:: ../../CONTRIBUTING.rst
diff --git a/doc/source/index.rst b/doc/source/index.rst
new file mode 100644
index 0000000..db2b11a
--- /dev/null
+++ b/doc/source/index.rst
@@ -0,0 +1,25 @@
1.. networking-brocade documentation master file, created by
2 sphinx-quickstart on Tue Jul 9 22:26:36 2013.
3 You can adapt this file completely to your liking, but it should at least
4 contain the root `toctree` directive.
5
6Welcome to networking-brocade's documentation!
7========================================================
8
9Contents:
10
11.. toctree::
12 :maxdepth: 2
13
14 readme
15 installation
16 usage
17 contributing
18
19Indices and tables
20==================
21
22* :ref:`genindex`
23* :ref:`modindex`
24* :ref:`search`
25
diff --git a/doc/source/installation.rst b/doc/source/installation.rst
new file mode 100644
index 0000000..17351cc
--- /dev/null
+++ b/doc/source/installation.rst
@@ -0,0 +1,12 @@
1============
2Installation
3============
4
5At the command line::
6
7 $ pip install networking-brocade
8
9Or, if you have virtualenvwrapper installed::
10
11 $ mkvirtualenv networking-brocade
12 $ pip install networking-brocade
diff --git a/doc/source/readme.rst b/doc/source/readme.rst
new file mode 100644
index 0000000..a6210d3
--- /dev/null
+++ b/doc/source/readme.rst
@@ -0,0 +1 @@
.. include:: ../../README.rst
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
new file mode 100644
index 0000000..b2b9c4a
--- /dev/null
+++ b/doc/source/usage.rst
@@ -0,0 +1,7 @@
1========
2Usage
3========
4
5To use networking-brocade in a project::
6
7 import networking-brocade
diff --git a/networking_brocade/__init__.py b/networking_brocade/__init__.py
new file mode 100644
index 0000000..2212d63
--- /dev/null
+++ b/networking_brocade/__init__.py
@@ -0,0 +1,19 @@
1# -*- coding: utf-8 -*-
2
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15import pbr.version
16
17
18__version__ = pbr.version.VersionInfo(
19 'networking_brocade').version_string()
diff --git a/networking_brocade/tests/__init__.py b/networking_brocade/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/networking_brocade/tests/__init__.py
diff --git a/networking_brocade/tests/base.py b/networking_brocade/tests/base.py
new file mode 100644
index 0000000..1c30cdb
--- /dev/null
+++ b/networking_brocade/tests/base.py
@@ -0,0 +1,23 @@
1# -*- coding: utf-8 -*-
2
3# Copyright 2010-2011 OpenStack Foundation
4# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.
17
18from oslotest import base
19
20
21class TestCase(base.BaseTestCase):
22
23 """Test case base class for all unit tests."""
diff --git a/networking_brocade/tests/test_networking_brocade.py b/networking_brocade/tests/test_networking_brocade.py
new file mode 100644
index 0000000..f386726
--- /dev/null
+++ b/networking_brocade/tests/test_networking_brocade.py
@@ -0,0 +1,28 @@
1# -*- coding: utf-8 -*-
2
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15"""
16test_networking_brocade
17----------------------------------
18
19Tests for `networking_brocade` module.
20"""
21
22from networking_brocade.tests import base
23
24
25class TestNetworking_brocade(base.TestCase):
26
27 def test_something(self):
28 pass
diff --git a/neutron/plugins/ml2/drivers/brocade/db/models.py b/neutron/plugins/ml2/drivers/brocade/db/models.py
index 5dfc601..205f27b 100644
--- a/neutron/plugins/ml2/drivers/brocade/db/models.py
+++ b/neutron/plugins/ml2/drivers/brocade/db/models.py
@@ -15,10 +15,10 @@
15 15
16 16
17"""Brocade specific database schema/model.""" 17"""Brocade specific database schema/model."""
18import sqlalchemy as sa
19 18
20from neutron.db import model_base 19from neutron.db import model_base
21from neutron.db import models_v2 20from neutron.db import models_v2
21import sqlalchemy as sa
22 22
23 23
24class ML2_BrocadeNetwork(model_base.BASEV2, models_v2.HasId, 24class ML2_BrocadeNetwork(model_base.BASEV2, models_v2.HasId,
diff --git a/neutron/plugins/ml2/drivers/brocade/mechanism_brocade.py b/neutron/plugins/ml2/drivers/brocade/mechanism_brocade.py
index 24652d2..5433859 100644
--- a/neutron/plugins/ml2/drivers/brocade/mechanism_brocade.py
+++ b/neutron/plugins/ml2/drivers/brocade/mechanism_brocade.py
@@ -16,13 +16,13 @@
16 16
17"""Implentation of Brocade ML2 Mechanism driver for ML2 Plugin.""" 17"""Implentation of Brocade ML2 Mechanism driver for ML2 Plugin."""
18 18
19from oslo.config import cfg 19from neutron.i18n import _LE
20from oslo.utils import importutils 20from neutron.i18n import _LI
21
22from neutron.i18n import _LE, _LI
23from neutron.openstack.common import log as logging 21from neutron.openstack.common import log as logging
24from neutron.plugins.ml2 import driver_api 22from neutron.plugins.ml2 import driver_api
25from neutron.plugins.ml2.drivers.brocade.db import models as brocade_db 23from neutron.plugins.ml2.drivers.brocade.db import models as brocade_db
24from oslo.config import cfg
25from oslo.utils import importutils
26 26
27LOG = logging.getLogger(__name__) 27LOG = logging.getLogger(__name__)
28MECHANISM_VERSION = 0.9 28MECHANISM_VERSION = 0.9
@@ -46,9 +46,10 @@ cfg.CONF.register_opts(ML2_BROCADE, "ml2_brocade")
46 46
47 47
48class BrocadeMechanism(driver_api.MechanismDriver): 48class BrocadeMechanism(driver_api.MechanismDriver):
49 """ML2 Mechanism driver for Brocade VDX switches. This is the upper 49 """ML2 Mechanism driver for Brocade VDX switches.
50 layer driver class that interfaces to lower layer (NETCONF) below.
51 50
51 This is the upper layer driver class that interfaces to
52 lower layer (NETCONF) below.
52 """ 53 """
53 54
54 def __init__(self): 55 def __init__(self):
@@ -85,9 +86,9 @@ class BrocadeMechanism(driver_api.MechanismDriver):
85 self._switch['password']) 86 self._switch['password'])
86 87
87 virtual_fabric_enabled = self._driver.is_virtual_fabric_enabled( 88 virtual_fabric_enabled = self._driver.is_virtual_fabric_enabled(
88 self._switch['address'], 89 self._switch['address'],
89 self._switch['username'], 90 self._switch['username'],
90 self._switch['password']) 91 self._switch['password'])
91 92
92 if virtual_fabric_enabled: 93 if virtual_fabric_enabled:
93 LOG.debug("Virtual Fabric: enabled") 94 LOG.debug("Virtual Fabric: enabled")
@@ -189,10 +190,10 @@ class BrocadeMechanism(driver_api.MechanismDriver):
189 " of network type = %(network_type)s" 190 " of network type = %(network_type)s"
190 " with vlan = %(vlan_id)s" 191 " with vlan = %(vlan_id)s"
191 " for tenant %(tenant_id)s"), 192 " for tenant %(tenant_id)s"),
192 {'network_id': network_id, 193 {'network_id': network_id,
193 'network_type': network_type, 194 'network_type': network_type,
194 'vlan_id': vlan_id, 195 'vlan_id': vlan_id,
195 'tenant_id': tenant_id}) 196 'tenant_id': tenant_id})
196 197
197 def delete_network_precommit(self, mech_context): 198 def delete_network_precommit(self, mech_context):
198 """Delete Network from the plugin specific database table.""" 199 """Delete Network from the plugin specific database table."""
@@ -217,12 +218,14 @@ class BrocadeMechanism(driver_api.MechanismDriver):
217 LOG.info(_LI("delete network (precommit): %(network_id)s" 218 LOG.info(_LI("delete network (precommit): %(network_id)s"
218 " with vlan = %(vlan_id)s" 219 " with vlan = %(vlan_id)s"
219 " for tenant %(tenant_id)s"), 220 " for tenant %(tenant_id)s"),
220 {'network_id': network_id, 221 {'network_id': network_id,
221 'vlan_id': vlan_id, 222 'vlan_id': vlan_id,
222 'tenant_id': tenant_id}) 223 'tenant_id': tenant_id})
223 224
224 def delete_network_postcommit(self, mech_context): 225 def delete_network_postcommit(self, mech_context):
225 """Delete network which translates to removng portprofile 226 """Delete network.
227
228 This translates to removng portprofile
226 from the switch. 229 from the switch.
227 """ 230 """
228 231
@@ -246,9 +249,9 @@ class BrocadeMechanism(driver_api.MechanismDriver):
246 LOG.info(_LI("delete network (postcommit): %(network_id)s" 249 LOG.info(_LI("delete network (postcommit): %(network_id)s"
247 " with vlan = %(vlan_id)s" 250 " with vlan = %(vlan_id)s"
248 " for tenant %(tenant_id)s"), 251 " for tenant %(tenant_id)s"),
249 {'network_id': network_id, 252 {'network_id': network_id,
250 'vlan_id': vlan_id, 253 'vlan_id': vlan_id,
251 'tenant_id': tenant_id}) 254 'tenant_id': tenant_id})
252 255
253 def update_network_precommit(self, mech_context): 256 def update_network_precommit(self, mech_context):
254 """Noop now, it is left here for future.""" 257 """Noop now, it is left here for future."""
diff --git a/neutron/plugins/ml2/drivers/brocade/nos/nosdriver.py b/neutron/plugins/ml2/drivers/brocade/nos/nosdriver.py
index c028eeb..37ba2c5 100644
--- a/neutron/plugins/ml2/drivers/brocade/nos/nosdriver.py
+++ b/neutron/plugins/ml2/drivers/brocade/nos/nosdriver.py
@@ -20,6 +20,7 @@ Neutron network life-cycle management.
20 20
21from ncclient import manager 21from ncclient import manager
22from oslo.utils import excutils 22from oslo.utils import excutils
23
23from xml.etree import ElementTree 24from xml.etree import ElementTree
24 25
25from neutron.i18n import _LE 26from neutron.i18n import _LE
diff --git a/neutron/services/l3_router/brocade/l3_router_plugin.py b/neutron/services/l3_router/brocade/l3_router_plugin.py
index e3d0965..f12bfc1 100644
--- a/neutron/services/l3_router/brocade/l3_router_plugin.py
+++ b/neutron/services/l3_router/brocade/l3_router_plugin.py
@@ -17,16 +17,17 @@
17 17
18"""Implentation of Brocade SVI service Plugin.""" 18"""Implentation of Brocade SVI service Plugin."""
19 19
20from oslo.config import cfg
21from oslo.utils import excutils
22 20
23from neutron.common import constants as l3_constants 21from neutron.common import constants as l3_constants
24from neutron.i18n import _LE, _LI 22from neutron.i18n import _LE
23from neutron.i18n import _LI
25from neutron.openstack.common import log as logging 24from neutron.openstack.common import log as logging
26from neutron.plugins.ml2 import db 25from neutron.plugins.ml2 import db
27from neutron.plugins.ml2.drivers.brocade.db import models as brocade_db 26from neutron.plugins.ml2.drivers.brocade.db import models as brocade_db
28from neutron.plugins.ml2.drivers.brocade.nos import nosdriver as driver 27from neutron.plugins.ml2.drivers.brocade.nos import nosdriver as driver
29from neutron.services.l3_router import l3_router_plugin as router 28from neutron.services.l3_router import l3_router_plugin as router
29from oslo.config import cfg
30from oslo.utils import excutils
30 31
31 32
32DEVICE_OWNER_ROUTER_INTF = l3_constants.DEVICE_OWNER_ROUTER_INTF 33DEVICE_OWNER_ROUTER_INTF = l3_constants.DEVICE_OWNER_ROUTER_INTF
diff --git a/neutron/tests/unit/__init__.py b/neutron/tests/unit/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/neutron/tests/unit/__init__.py
diff --git a/neutron/tests/unit/ml2/drivers/brocade/test_brocade_l3_plugin.py b/neutron/tests/unit/ml2/drivers/brocade/test_brocade_l3_plugin.py
index 81cffc2..fbab00c 100644
--- a/neutron/tests/unit/ml2/drivers/brocade/test_brocade_l3_plugin.py
+++ b/neutron/tests/unit/ml2/drivers/brocade/test_brocade_l3_plugin.py
@@ -16,13 +16,12 @@
16# 16#
17 17
18import mock 18import mock
19from oslo.config import cfg
20from oslo.utils import importutils
21from oslo_context import context as oslo_context
22
23from neutron.db import api as db 19from neutron.db import api as db
24from neutron.openstack.common import log as logging 20from neutron.openstack.common import log as logging
25from neutron.tests.unit import test_l3_plugin 21from neutron.tests.unit import test_l3_plugin
22from oslo.config import cfg
23from oslo.utils import importutils
24from oslo_context import context as oslo_context
26 25
27LOG = logging.getLogger(__name__) 26LOG = logging.getLogger(__name__)
28L3_SVC_PLUGIN = ('neutron.services.l3_router.' 27L3_SVC_PLUGIN = ('neutron.services.l3_router.'
diff --git a/neutron/tests/unit/ml2/drivers/brocade/test_brocade_mechanism_driver.py b/neutron/tests/unit/ml2/drivers/brocade/test_brocade_mechanism_driver.py
index b8cbb5f..c1b5467 100644
--- a/neutron/tests/unit/ml2/drivers/brocade/test_brocade_mechanism_driver.py
+++ b/neutron/tests/unit/ml2/drivers/brocade/test_brocade_mechanism_driver.py
@@ -14,13 +14,12 @@
14# limitations under the License. 14# limitations under the License.
15 15
16import mock 16import mock
17from oslo.utils import importutils
18
19from neutron.openstack.common import log as logging 17from neutron.openstack.common import log as logging
20from neutron.plugins.ml2 import config as ml2_config 18from neutron.plugins.ml2 import config as ml2_config
21from neutron.plugins.ml2.drivers.brocade import (mechanism_brocade 19from neutron.plugins.ml2.drivers.brocade import (mechanism_brocade
22 as brocademechanism) 20 as brocademechanism)
23from neutron.tests.unit.ml2 import test_ml2_plugin 21from neutron.tests.unit.ml2 import test_ml2_plugin
22from oslo.utils import importutils
24 23
25LOG = logging.getLogger(__name__) 24LOG = logging.getLogger(__name__)
26MECHANISM_NAME = ('neutron.plugins.ml2.' 25MECHANISM_NAME = ('neutron.plugins.ml2.'
@@ -29,6 +28,7 @@ MECHANISM_NAME = ('neutron.plugins.ml2.'
29 28
30class TestBrocadeMechDriverV2(test_ml2_plugin.Ml2PluginV2TestCase): 29class TestBrocadeMechDriverV2(test_ml2_plugin.Ml2PluginV2TestCase):
31 """Test Brocade VCS/VDX mechanism driver. 30 """Test Brocade VCS/VDX mechanism driver.
31
32 """ 32 """
33 33
34 _mechanism_name = MECHANISM_NAME 34 _mechanism_name = MECHANISM_NAME
diff --git a/openstack-common.conf b/openstack-common.conf
new file mode 100644
index 0000000..37eac90
--- /dev/null
+++ b/openstack-common.conf
@@ -0,0 +1,6 @@
1[DEFAULT]
2
3# The list of modules to copy from oslo-incubator.git
4
5# The base module to hold the copy of openstack.common
6base=networking_brocade
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..95137a6
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,6 @@
1# The order of packages is significant, because pip processes them in the order
2# of appearance. Changing the order has an impact on the overall integration
3# process, which may cause wedges in the gate later.
4
5pbr>=0.6,!=0.7,<1.0
6Babel>=1.3
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..568cb67
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,47 @@
1[metadata]
2name = networking-brocade
3summary = Brocade Networking Mech. Drivers and Plugins
4description-file =
5 README.rst
6author = OpenStack
7author-email = openstack-dev@lists.openstack.org
8home-page = http://www.openstack.org/
9classifier =
10 Environment :: OpenStack
11 Intended Audience :: Information Technology
12 Intended Audience :: System Administrators
13 License :: OSI Approved :: Apache Software License
14 Operating System :: POSIX :: Linux
15 Programming Language :: Python
16 Programming Language :: Python :: 2
17 Programming Language :: Python :: 2.7
18 Programming Language :: Python :: 2.6
19 Programming Language :: Python :: 3
20 Programming Language :: Python :: 3.3
21 Programming Language :: Python :: 3.4
22
23[files]
24packages =
25 networking_brocade
26
27[build_sphinx]
28source-dir = doc/source
29build-dir = doc/build
30all_files = 1
31
32[upload_sphinx]
33upload-dir = doc/build/html
34
35[compile_catalog]
36directory = networking_brocade/locale
37domain = networking-brocade
38
39[update_catalog]
40domain = networking-brocade
41output_dir = networking_brocade/locale
42input_file = networking_brocade/locale/networking-brocade.pot
43
44[extract_messages]
45keywords = _ gettext ngettext l_ lazy_gettext
46mapping_file = babel.cfg
47output_file = networking_brocade/locale/networking-brocade.pot
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..70c2b3f
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,22 @@
1#!/usr/bin/env python
2# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13# implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
18import setuptools
19
20setuptools.setup(
21 setup_requires=['pbr'],
22 pbr=True)
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..d494076
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,15 @@
1# The order of packages is significant, because pip processes them in the order
2# of appearance. Changing the order has an impact on the overall integration
3# process, which may cause wedges in the gate later.
4
5hacking>=0.9.2,<0.10
6
7coverage>=3.6
8discover
9python-subunit
10sphinx>=1.1.2
11oslosphinx
12oslotest>=1.1.0.0a1
13testrepository>=0.0.18
14testscenarios>=0.4
15testtools>=0.9.34
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..5d30cec
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,34 @@
1[tox]
2minversion = 1.6
3envlist = py33,py34,py26,py27,pypy,pep8
4skipsdist = True
5
6[testenv]
7usedevelop = True
8install_command = pip install -U {opts} {packages}
9setenv =
10 VIRTUAL_ENV={envdir}
11deps = -r{toxinidir}/requirements.txt
12 -r{toxinidir}/test-requirements.txt
13commands = python setup.py testr --slowest --testr-args='{posargs}'
14
15[testenv:pep8]
16commands = flake8
17
18[testenv:venv]
19commands = {posargs}
20
21[testenv:cover]
22commands = python setup.py testr --coverage --testr-args='{posargs}'
23
24[testenv:docs]
25commands = python setup.py build_sphinx
26
27[flake8]
28# H803 skipped on purpose per list discussion.
29# E123, E125 skipped as they are invalid PEP-8.
30
31show-source = True
32ignore = E123,E125,H803
33builtins = _
34exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build