Retiring openstack/networking-l2gw

networking-l2gw moved to x/networking-l2gw, thus the code in this
location is no longer maintained.

Change-Id: If9c07a1ffafb32d494aeb10bcf6924c5b5e1fd66
changes/79/749579/2
elajkat 2 years ago committed by Lajos Katona
parent b20b90d769
commit baf61c16db
  1. 7
      .coveragerc
  2. 53
      .gitignore
  3. 8
      .testr.conf
  4. 16
      CONTRIBUTING.rst
  5. 4
      HACKING.rst
  6. 176
      LICENSE
  7. 10
      MANIFEST.in
  8. 121
      README.rst
  9. 8
      bindep.txt
  10. 58
      contrib/README_install_and_config_l2gateway_plugin.rst
  11. 59
      contrib/README_install_l2gateway_agent.rst
  12. 100
      contrib/install_and_config_l2gateway_plugin.sh
  13. 99
      contrib/install_l2gateway_agent.sh
  14. 16
      contrib/neutron-l2gateway-agent.conf
  15. 5
      debian/changelog
  16. 1
      debian/compat
  17. 8
      debian/control
  18. 0
      debian/copyright
  19. 4
      debian/rules
  20. 26
      devstack/README.rst
  21. 17
      devstack/devstackgaterc
  22. 108
      devstack/plugin.sh
  23. 18
      devstack/settings
  24. 5
      doc/requirements.txt
  25. 91
      doc/source/conf.py
  26. 4
      doc/source/contributing.rst
  27. BIN
      doc/source/images/L2GW_deployment.png
  28. 23
      doc/source/index.rst
  29. 12
      doc/source/installation.rst
  30. 1
      doc/source/readme.rst
  31. 188
      doc/source/usage.rst
  32. 62
      etc/l2gateway_agent.ini
  33. 25
      etc/l2gw_plugin.ini
  34. 15
      etc/policy.json
  35. 134
      lower-constraints.txt
  36. 19
      networking_l2gw/__init__.py
  37. 32
      networking_l2gw/_i18n.py
  38. 0
      networking_l2gw/cmd/__init__.py
  39. 23
      networking_l2gw/cmd/eventlet/__init__.py
  40. 20
      networking_l2gw/cmd/eventlet/agent.py
  41. 0
      networking_l2gw/db/__init__.py
  42. 0
      networking_l2gw/db/l2gateway/__init__.py
  43. 113
      networking_l2gw/db/l2gateway/db_query.py
  44. 20
      networking_l2gw/db/l2gateway/head.py
  45. 590
      networking_l2gw/db/l2gateway/l2gateway_db.py
  46. 77
      networking_l2gw/db/l2gateway/l2gateway_models.py
  47. 0
      networking_l2gw/db/l2gateway/ovsdb/__init__.py
  48. 571
      networking_l2gw/db/l2gateway/ovsdb/lib.py
  49. 99
      networking_l2gw/db/l2gateway/ovsdb/models.py
  50. 0
      networking_l2gw/db/migration/__init__.py
  51. 1
      networking_l2gw/db/migration/alembic_migrations/README
  52. 0
      networking_l2gw/db/migration/alembic_migrations/__init__.py
  53. 99
      networking_l2gw/db/migration/alembic_migrations/env.py
  54. 36
      networking_l2gw/db/migration/alembic_migrations/script.py.mako
  55. 96
      networking_l2gw/db/migration/alembic_migrations/versions/42438454c556_l2gateway_models.py
  56. 105
      networking_l2gw/db/migration/alembic_migrations/versions/54c9c8fe22bf_db_models_for_ovsdb_hardware_vtep_schema.py
  57. 1
      networking_l2gw/db/migration/alembic_migrations/versions/CONTRACT_HEAD
  58. 1
      networking_l2gw/db/migration/alembic_migrations/versions/EXPAND_HEAD
  59. 0
      networking_l2gw/db/migration/alembic_migrations/versions/__init__.py
  60. 29
      networking_l2gw/db/migration/alembic_migrations/versions/kilo_release.py
  61. 36
      networking_l2gw/db/migration/alembic_migrations/versions/liberty/contract/79919185aa99_initial_contract.py
  62. 36
      networking_l2gw/db/migration/alembic_migrations/versions/liberty/expand/60019185aa99_initial_expand.py
  63. 137
      networking_l2gw/db/migration/alembic_migrations/versions/newton/contract/2f533f7705dd_rename_tenant_to_project.py
  64. 37
      networking_l2gw/db/migration/alembic_migrations/versions/newton/expand/49ce408ac349_add_indexes_to_tenant_id.py
  65. 78
      networking_l2gw/db/migration/alembic_migrations/versions/queens/contract/0fb45e525aa9_add_standard_attribute_id_for_l2gw.py
  66. 37
      networking_l2gw/db/migration/alembic_migrations/versions/queens/expand/8d7d772eafcf_add_standard_attribute_id_for_l2gw.py
  67. 30
      networking_l2gw/db/migration/alembic_migrations/versions/start_networking_l2gw.py
  68. 0
      networking_l2gw/extensions/__init__.py
  69. 111
      networking_l2gw/extensions/l2gateway.py
  70. 110
      networking_l2gw/extensions/l2gatewayconnection.py
  71. 0
      networking_l2gw/l2gatewayclient/__init__.py
  72. 0
      networking_l2gw/l2gatewayclient/l2gw_client_ext/__init__.py
  73. 160
      networking_l2gw/l2gatewayclient/l2gw_client_ext/_l2_gateway.py
  74. 101
      networking_l2gw/l2gatewayclient/l2gw_client_ext/_l2_gateway_connection.py
  75. 0
      networking_l2gw/l2gatewayclient/osc/__init__.py
  76. 256
      networking_l2gw/l2gatewayclient/osc/l2gw.py
  77. 170
      networking_l2gw/l2gatewayclient/osc/l2gw_connection.py
  78. 0
      networking_l2gw/services/__init__.py
  79. 0
      networking_l2gw/services/l2gateway/__init__.py
  80. 0
      networking_l2gw/services/l2gateway/agent/__init__.py
  81. 42
      networking_l2gw/services/l2gateway/agent/agent_api.py
  82. 96
      networking_l2gw/services/l2gateway/agent/base_agent_manager.py
  83. 37
      networking_l2gw/services/l2gateway/agent/l2gateway_config.py
  84. 36
      networking_l2gw/services/l2gateway/agent/ovsdb/README.rst
  85. 0
      networking_l2gw/services/l2gateway/agent/ovsdb/__init__.py
  86. 59
      networking_l2gw/services/l2gateway/agent/ovsdb/api.py
  87. 311
      networking_l2gw/services/l2gateway/agent/ovsdb/base_connection.py
  88. 58
      networking_l2gw/services/l2gateway/agent/ovsdb/impl_idl.py
  89. 397
      networking_l2gw/services/l2gateway/agent/ovsdb/manager.py
  90. 0
      networking_l2gw/services/l2gateway/agent/ovsdb/native/__init__.py
  91. 25
      networking_l2gw/services/l2gateway/agent/ovsdb/native/commands.py
  92. 31
      networking_l2gw/services/l2gateway/agent/ovsdb/native/connection.py
  93. 21
      networking_l2gw/services/l2gateway/agent/ovsdb/ovsdb_common_class.py
  94. 70
      networking_l2gw/services/l2gateway/agent/ovsdb/ovsdb_model.py
  95. 611
      networking_l2gw/services/l2gateway/agent/ovsdb/ovsdb_monitor.py
  96. 434
      networking_l2gw/services/l2gateway/agent/ovsdb/ovsdb_writer.py
  97. 307
      networking_l2gw/services/l2gateway/agent/ovsdb/vtep/vtep.ovsschema
  98. 137
      networking_l2gw/services/l2gateway/agent_scheduler.py
  99. 0
      networking_l2gw/services/l2gateway/common/__init__.py
  100. 90
      networking_l2gw/services/l2gateway/common/config.py
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,7 +0,0 @@
[run]
branch = True
source = networking_l2gw
omit = networking_l2gw/tests/*,networking_l2gw/openstack/*
[report]
ignore_errors = True

53
.gitignore vendored

@ -1,53 +0,0 @@
*.py[cod]
# C extensions
*.so
# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
.testrepository
.venv
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Complexity
output/*.html
output/*/index.html
# Sphinx
doc/build
# pbr generates these
AUTHORS
ChangeLog
# Editors
*~
.*.swp
.*sw?

@ -1,8 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_l2gw/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

@ -1,16 +0,0 @@
If you would like to contribute to the development of OpenStack,
you must follow the steps in this page:
https://docs.openstack.org/infra/manual/developers.html
Once those steps have been completed, changes to OpenStack
should be submitted for review via the Gerrit tool, following
the workflow documented at:
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/networking-l2gw

@ -1,4 +0,0 @@
networking-l2gw Style Commandments
===============================================
Read the OpenStack Style Commandments https://docs.openstack.org/hacking/latest/

@ -1,176 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

@ -1,10 +0,0 @@
include AUTHORS
include ChangeLog
exclude .gitignore
exclude .gitreview
include networking_l2gw/db/migration/alembic_migrations/README
include networking_l2gw/db/migration/alembic_migrations/script.py.mako
recursive-include networking_l2gw/db/migration/alembic_migrations/versions *
global-exclude *.pyc

@ -1,119 +1,6 @@
===============
networking-l2gw
===============
This project is moved to x/networking-l2gw.
API's and implementations to support L2 Gateways in Neutron.
For any further questions, please email
openstack-discuss@lists.openstack.org or join #openstack-dev on
Freenode.
* Free software: Apache license
* Source: https://opendev.org/openstack/networking-l2gw
L2 Gateways
-----------
This project proposes a Neutron API extension that can be used to express
and manage L2 Gateway components. In the simplest terms L2 Gateways are meant
to bridge two or more networks together to make them look at a single L2
broadcast domain.
Initial implementation
----------------------
There are a number of use cases that can be addressed by an L2 Gateway API.
Most notably in cloud computing environments, a typical use case is bridging
the virtual with the physical. Translate this to Neutron and the OpenStack
world, and this means relying on L2 Gateway capabilities to extend Neutron
logical (overlay) networks into physical (provider) networks that are outside
the OpenStack realm. These networks can be, for instance, VLAN's that may or
may not be managed by OpenStack.
More information
----------------
For help using or hacking on L2GW, you can send an email to the
`OpenStack Discuss Mailing List <mailto:openstack-discuss@lists.openstack.org>`;
please use the [L2-Gateway] Tag in the subject. Most folks involved hang out on
the IRC channel #openstack-neutron.
Getting started
---------------
To get started you have to install the l2gw plugin software on the Controller
node where you are already running the Neutron server. Then you need a new
node, that we call the l2gw node, where you do the actual bridging between a
vxlan tenant network and a physical network. The l2gw node could be a bare
metal switch that supports the OVSDB schema, or a server with OVS installed. In
this example we are going to use a server.
In this example the l2gw node has a `ens5` interface attached to a physical
segment, and a management interface with IP 10.225.0.27.
::
ip link set up dev ens5
apt-get install openvswitch-vtep
ovsdb-tool create /etc/openvswitch/vtep.db /usr/share/openvswitch/vtep.ovsschema
ovsdb-tool create /etc/openvswitch/vswitch.db /usr/share/openvswitch/vswitch.ovsschema
ovsdb-server --pidfile --detach --log-file --remote ptcp:6632:10.225.0.27 \
--remote punix:/var/run/openvswitch/db.sock --remote=db:hardware_vtep,Global,managers \
/etc/openvswitch/vswitch.db /etc/openvswitch/vtep.db
ovs-vswitchd --log-file --detach --pidfile unix:/var/run/openvswitch/db.sock
ovs-vsctl add-br myphyswitch
vtep-ctl add-ps myphyswitch
vtep-ctl set Physical_Switch myphyswitch tunnel_ips=10.225.0.27
ovs-vsctl add-port myphyswitch ens5
vtep-ctl add-port myphyswitch ens5
/usr/share/openvswitch/scripts/ovs-vtep \
--log-file=/var/log/openvswitch/ovs-vtep.log \
--pidfile=/var/run/openvswitch/ovs-vtep.pid \
--detach myphyswitch
At this point your l2gw node is running.
For the configuration of the Openstack control plane you have to check three files:
``neutron.conf``, `l2gw_plugin.ini <https://github.com/openstack/networking-l2gw/blob/master/etc/l2gw_plugin.ini>`__, and `l2gateway_agent.ini <https://github.com/openstack/networking-l2gw/blob/master/etc/l2gateway_agent.ini>`__
Edit your ``neutron.conf`` on the controller node and make sure that in the ``service_plugins`` you have the string
``networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin``.
You can add it with:
::
sudo sed -ri 's/^(service_plugins.*)/\1,networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin/' \
/etc/neutron/neutron.conf
Make sure the neutron-server runs with ``--config-file=/etc/neutron/l2gw_plugin.ini``.
The default for the l2gw_plugin.ini file should be okay.
Now you are ready to create the database tables for the neutron l2gw plugin using the command:
``neutron-db-manage upgrade heads``
The file `l2gateway_agent.ini <https://github.com/openstack/networking-l2gw/blob/master/etc/l2gateway_agent.ini>`__ is used to configure the neutron-l2gateway agent.
The agent is the piece of software that will configure the l2gw node when you interact with the Openstack API.
Here it is important to give the pointer to the switch.
``ovsdb_hosts = 'ovsdb1:10.225.0.27:6632'``
The name ``ovsdb1`` is just a name that will be used in the Openstack database to identify this switch.
Now that both the l2gw node and the Openstack control plane are configured, we can use the API service to bridge a VXLAN tenant network to a physical interface of the l2gw node.
First let's create in Openstack a l2-gateway object. We need to give the interface names and the name of the bridge that we used before in the OVS commands.
``l2-gateway-create --device name="myphyswitch",interface_names="ens5" openstackname``
Use the <GATEWAY-NAME/UUID> just created to feed the second command where you do the actual bridging between the VXLAN tenant network and the Physical L2 network.
``l2-gateway-connection-create <GATEWAY-NAME/UUID> <NETWORK-NAME/UUID>``
Now let's see what happened. On the l2gw node you can do the commands:
::
ovs-vsctl show
vtep-ctl show
You should see some VXLAN tunnels are created. You will see a vxlan tunnel to each compute node that is hosting an
instance attached to the tenant network that you bridge. If there is also a router in this tenant network,
you will find a VXLAN tunnel also to the network node.
References:
* http://networkop.co.uk/blog/2016/05/21/neutron-l2gw/
* http://kimizhang.com/neutron-l2-gateway-hp-5930-switch-ovsdb-integration/
* http://openvswitch.org/support/dist-docs-2.5/vtep/README.ovs-vtep.md.html

@ -1,8 +0,0 @@
# This is a cross-platform list tracking distribution packages needed for install and tests;
# see https://docs.openstack.org/infra/bindep/ for additional information.
mysql-client [platform:dpkg]
mysql-server [platform:dpkg]
postgresql
postgresql-client [platform:dpkg]
libpq-dev [platform:dpkg]

@ -1,58 +0,0 @@
Debian packaging, installation and configuration of
neutron-l2gateway plugin.
Prior requirements
script install_and_config_l2gateway_plugin.sh will run on openstack controller.
install_and_config_l2gateway_plugin.sh will create and install debian package of networking-l2gw,
and it will enable neutron-l2gateway service plugin.
Creation of debian package requires copyright, changelog, control, compat
and rules file inside the debian folder.
debian folder is to be placed inside the folder which needs to be packaged (networking-l2gw).
command dpkg-buildpackage -b, builds debian package of networking-l2gw which uses the files
mentioned inside debian folder to create debian package.
please refer https://www.debian.org/doc/manuals/maint-guide/dreq.en.html
for further details.
Installation procedure example:
The script will ask for further details for packaging and installing as shown below.
press ENTER for assigning default values to debian/changelog and debian/control file.
#info for debian/changelog file
enter package name for debian/changelog
networking-l2gw
enter package version for debian/changelog
1.0
#info for debian/control file
enter the networking-l2gw source name
networking-l2gw
enter the networking-l2gw package name
networking-l2gw
enter the version number
1.0
enter the maintainer info
user@hp.com
enter the architecture
all
enter the description title
l2gateway package
enter the description details
description details of l2gateway package
#info of neutron.conf file path
press ENTER for assigning default file path /etc/neutron/neutron.conf for neutron.conf file.
enter neutron.conf file path
/etc/neutron/neutron.conf
after execution of install_and_config_l2gateway_plugin.sh
check neutron-server status.
sudo service neutron-server status
neutron-server start/running, process 17876
and also check service_plugins in neutron.conf file whether
l2gw is enabled or not.

@ -1,59 +0,0 @@
Debian packaging and installation of neutron-l2gateway-agent.
Prior requirements
script install_l2gateway_agent.sh will run on neutron installed and configured nodes
(controller, compute and network nodes).
install_l2gateway_agent.sh will create and install debian package of networking-l2gw,
and it will start neutron-l2gateway-agent.
Creation of debian package requires copyright, changelog, control, compat
and rules file inside the debian folder.
debian folder is to be placed inside the folder which needs to be packaged (networking-l2gw).
command dpkg-buildpackage -b, builds debian package of networking-l2gw which uses the files
mentioned inside debian folder to create debian package.
please refer https://www.debian.org/doc/manuals/maint-guide/dreq.en.html
for further details.
Installation procedure example:
The script will ask for further details for packaging and installing as shown below.
press ENTER for assigning default values to debian/changelog and debian/control file.
#info for debian/changelog file
enter package name for debian/changelog
networking-l2gw
enter package version for debian/changelog
1.0
#info for debian/control file
enter the networking-l2gw source name
networking-l2gw
enter the networking-l2gw package name
networking-l2gw
enter the version number
1.0
enter the maintainer info
user@hp.com
enter the architecture
all
enter the description title
l2gateway package
enter the description details
description details of l2gateway package
#info for neutron-l2gateway-agent.conf file
enter the networking-l2gw binary path
/usr/bin/neutron-l2gateway-agent
enter the neutron config file path
/etc/neutron/neutron.conf
enter the l2gateway agent config file path
/usr/etc/neutron/l2gateway_agent.ini
enter the l2gateway log file path
/var/log/neutron/l2gateway-agent.log
after execution of install_l2gateway_agent.sh check neutron-l2gateway-agent status
sudo service neutron-l2gateway-agent status
neutron-l2gateway-agent start/running, process 15276

@ -1,100 +0,0 @@
#!/bin/bash
# Copyright (c) 2015 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License
if [ $(id -u -r) -ne 0 ]
then
echo "Requires root privileges. Please re-run using sudo."
exit 1
fi
apt-get update -y
apt-get install devscripts -y
apt-get install debhelper -y
apt-get install dh-make -y
#read the package name and version,if not take default values and enter to
#debian/changelog file.
cd ..
if [ -f "debian/changelog" ]
then
echo info for debian/changelog file
echo enter package name for debian/changelog
read pck
sed -i 's/PACKAGE/'${pck:-networking-l2gw}'/' debian/changelog
echo enter package version for debian/changelog
read pck_ver
sed -i 's/VERSION/'${pck_ver:-1.0}'/' debian/changelog
fi
#control file contains various values which dpkg, dselect, apt-get, apt-cache, aptitude,
#and other package management tools will use to manage the package.
#It is defined by the Debian Policy Manual, 5 "Control files and their fields".
if [ -f "debian/control" ]
then
echo info for debian/control file
echo enter the networking-l2gw source name
read src_name
echo enter the networking-l2gw package name
read pck_name
echo enter the version number
read ver
echo enter the maintainer info
read maintainer_info
echo enter the architecture
read architecture
echo enter the description title
read description
echo enter the description details
read description_details
sed -i 's/source/'${src_name:-networking-l2gw}'/' debian/control
sed -i 's/package/'${pck_name:-networking-l2gw}'/' debian/control
sed -i 's/version/'${ver:-1.0}'/' debian/control
sed -i 's/maintainer/'${maintainer_info:-user@openstack}'/' debian/control
sed -i 's/arch/'${architecture:-all}'/' debian/control
sed -i 's/desc/'${description:-networking-l2gw}'/' debian/control
sed -i 's/desc_details/'${description_details:-networking-l2gw}'/' debian/control
fi
#dpkg-buildpackage, build binary or source packages from sources.
#-b Specifies a binary-only build, no source files are to be built and/or distributed.
echo building debian package
dpkg-buildpackage -b
cd ../
if [ -z "$pck_name" ]
then
pck_name="networking-l2gw"
fi
if [ -z "$pck_ver" ]
then
pck_ver=1.0
fi
if [ -z "$architecture" ]
then
architecture="all"
fi
echo installing $pck_name\_$pck_ver\_$architecture.deb
dpkg -i $pck_name\_$pck_ver\_$architecture.deb
echo enter neutron.conf file path
read neutron_conf
l2gw_plugin=", l2gw"
while read line
do
if [[ $line == *"service_plugins"* ]]
then
if [[ $line != *$l2gw_plugin* ]]
then
serv_plugin=$line$l2gw_plugin
sed -i "s|$line|$serv_plugin|" ${neutron_conf:-/etc/neutron/neutron.conf}
fi
fi
done <${neutron_conf:-/etc/neutron/neutron.conf}
service neutron-server restart

@ -1,99 +0,0 @@
#!/bin/bash
# Copyright (c) 2015 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License
if [ $(id -u -r) -ne 0 ]
then
echo "Requires root privileges. Please re-run using sudo."
exit 1
fi
#apt-get update -y
apt-get install devscripts -y
apt-get install debhelper -y
apt-get install dh-make -y
#read the package name and version,if not take default values and enter to
#debian/changelog file.
cd ..
if [ -f "debian/changelog" ]
then
echo info for debian/changelog file
echo enter package name for debian/changelog
read pck
sed -i 's/PACKAGE/'${pck:-networking-l2gw}'/' debian/changelog
echo enter package version for debian/changelog
read pck_ver
sed -i 's/VERSION/'${pck_ver:-1.0}'/' debian/changelog
fi
#control file contains various values which dpkg, dselect, apt-get, apt-cache, aptitude,
#and other package management tools will use to manage the package.
#It is defined by the Debian Policy Manual, 5 "Control files and their fields".
if [ -f "debian/control" ]
then
echo info for debian/control file
echo enter the networking-l2gw source name
read src_name
echo enter the networking-l2gw package name
read pck_name
echo enter the version number
read ver
echo enter the maintainer info
read maintainer_info
echo enter the architecture
read architecture
echo enter the description title
read description
echo enter the description details
read description_details
sed -i 's/source/'${src_name:-networking-l2gw}'/' debian/control
sed -i 's/package/'${pck_name:-networking-l2gw}'/' debian/control
sed -i 's/version/'${ver:-1.0}'/' debian/control
sed -i 's/maintainer/'${maintainer_info:-user@openstack}'/' debian/control
sed -i 's/arch/'${architecture:-all}'/' debian/control
sed -i 's/desc/'${description:-networking-l2gw}'/' debian/control
sed -i 's/desc_details/'${description_details:-networking-l2gw}'/' debian/control
fi
#dpkg-buildpackage, build binary or source packages from sources.
#-b Specifies a binary-only build, no source files are to be built and/or distributed.
echo building debian package
dpkg-buildpackage -b
cd ../
if [ -z "$pck_name" ]
then
pck_name="networking-l2gw"
fi
if [ -z "$pck_ver" ]
then
pck_ver=1.0
fi
if [ -z "$architecture" ]
then
architecture="all"
fi
echo installing $pck_name\_$pck_ver\_$architecture.deb
dpkg -i $pck_name\_$pck_ver\_$architecture.deb
echo enter the networking-l2gw binary path
read l2gw_bin_path
echo enter the neutron config file path
read neutron_conf
echo enter the l2gateway config file path
read l2gw_conf
echo enter the l2gateway log file path
read l2gw_log
sed -i 's|l2gw_bin_path|'$l2gw_bin_path'|' networking-l2gw/contrib/neutron-l2gateway-agent.conf
sed -i 's|neutron_conf|'$neutron_conf'|' networking-l2gw/contrib/neutron-l2gateway-agent.conf
sed -i 's|l2gw_conf|'$l2gw_conf'|' networking-l2gw/contrib/neutron-l2gateway-agent.conf
sed -i 's|l2gw_log|'$l2gw_log'|' networking-l2gw/contrib/neutron-l2gateway-agent.conf
cp networking-l2gw/contrib/neutron-l2gateway-agent.conf /etc/init/
service neutron-l2gateway-agent restart

@ -1,16 +0,0 @@
# vim:set ft=upstart ts=2 et:
description "Neutron L2GW Agent"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
chdir /var/run
pre-start script
mkdir -p /var/run/neutron
chown neutron:root /var/run/neutron
end script
exec start-stop-daemon --start --chuid neutron --exec l2gw_bin_path -- --config-file=neutron_conf --config-file=l2gw_conf --log-file l2gw_log

5
debian/changelog vendored

@ -1,5 +0,0 @@
PACKAGE (VERSION) UNRELEASED; urgency=medium
* Initial release. (Closes: #XXXXXX)
-- root <root@user> Mon, 23 Mar 2015 02:17:32 -0700

1
debian/compat vendored

@ -1 +0,0 @@
9

8
debian/control vendored

@ -1,8 +0,0 @@
Source: source
Version: version
Maintainer: maintainer
Package: package
Architecture: arch
Description: desc
desc_details

4
debian/rules vendored

@ -1,4 +0,0 @@
#!/usr/bin/make -f
%:
dh $@ --with python2

@ -1,26 +0,0 @@
======================
Enabling in Devstack
======================
1. Download DevStack
2. Add this repo as an external repository and configure following flags in ``local.conf``::
[[local|localrc]]
enable_plugin networking-l2gw https://github.com/openstack/networking-l2gw
enable_service l2gw-plugin l2gw-agent
OVSDB_HOSTS=<ovsdb_name>:<ip address>:<port>
3. If you want to override the default service driver for L2Gateway (which uses
L2Gateway Agent with RPC) with an alternative service driver, please give that
alternative service driver inside the parameter NETWORKING_L2GW_SERVICE_DRIVER
of your ``local.conf``.
For example, to configure ODL service driver to be used for L2Gateway,
you need to include ODL Service Driver in ``local.conf`` as below:
NETWORKING_L2GW_SERVICE_DRIVER=L2GW:OpenDaylight:networking_odl.l2gateway.driver.OpenDaylightL2gwDriver:default
3. Read the settings file for more details.
4. run ``stack.sh``

@ -1,17 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# This script is executed in the OpenStack CI jobs located here:
# http://git.openstack.org/cgit/openstack-infra/project-config/tree/jenkins/jobs/networking-l2gw.yaml
#
export OVERRIDE_ENABLED_SERVICES=key,n-api,n-cpu,n-cond,n-sch,n-crt,n-cauth,n-obj,g-api,g-reg,c-sch,c-api,c-vol,q-meta,q-dhcp,rabbit,mysql,dstat,l2gw-plugin,l2gw-agent,q-svc,q-l3,q-agt

@ -1,108 +0,0 @@
#!/bin/bash
# devstack/plugin.sh
# Functions to control the configuration and operation of the l2gw
# Dependencies:
#
# ``functions`` file
# ``DEST`` must be defined
# ``STACK_USER`` must be defined
# ``stack.sh`` calls the entry points in this order:
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace
function install_l2gw {
setup_develop $L2GW_DIR
Q_PLUGIN_CONF_PATH=etc/neutron/plugins/ml2
Q_PLUGIN_CONF_FILENAME=ml2_conf.ini
Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME
}
function configure_agent_conf {
sudo cp $L2GW_DIR/etc/l2gateway_agent.ini $L2GW_CONF_FILE
iniset $L2GW_CONF_FILE ovsdb ovsdb_hosts $OVSDB_HOSTS
}
function start_l2gw_agent {
run_process l2gw-agent "$L2GW_AGENT_BINARY --config-file $NEUTRON_CONF --config-file=$L2GW_CONF_FILE"
}
function run_l2gw_alembic_migration {
$NEUTRON_BIN_DIR/neutron-db-manage --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
}
function configure_l2gw_plugin {
sudo cp $L2GW_DIR/etc/l2gw_plugin.ini $L2GW_PLUGIN_CONF_FILE
neutron_server_config_add $L2GW_PLUGIN_CONF_FILE
}
function configure_tempest_for_l2gw {
if is_service_enabled tempest; then
iniset $TEMPEST_CONFIG l2gw l2gw_switch "cell08-5930-01::FortyGigE1/0/1|100"
source $TEMPEST_DIR/.tox/tempest/bin/activate
pip install -r $L2GW_DIR/test-requirements.txt
deactivate
fi
}
# main loop
if is_service_enabled l2gw-plugin; then
if [[ "$1" == "source" ]]; then
# no-op
:
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
install_l2gw
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
configure_tempest_for_l2gw
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
neutron_service_plugin_class_add $L2GW_PLUGIN
configure_l2gw_plugin
run_l2gw_alembic_migration
if is_service_enabled neutron-api || is_service_enabled q-svc; then
echo_summary "Configuring networking-l2gw"
if [ "$NETWORKING_L2GW_SERVICE_DRIVER" ]; then
inicomment $L2GW_PLUGIN_CONF_FILE service_providers service_provider
iniadd $L2GW_PLUGIN_CONF_FILE service_providers service_provider $NETWORKING_L2GW_SERVICE_DRIVER
fi
fi
elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
# no-op
:
fi
if [[ "$1" == "clean" ]]; then
# no-op
:
fi
fi
if is_service_enabled l2gw-agent; then
if [[ "$1" == "source" ]]; then
# no-op
:
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
install_l2gw
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
configure_agent_conf
start_l2gw_agent
fi
if [[ "$1" == "unstack" ]]; then
#no-op
:
fi
if [[ "$1" == "clean" ]]; then
#no-op
:
fi
fi
# Restore xtrace
$XTRACE

@ -1,18 +0,0 @@
# Devstack settings
L2GW_DIR=$DEST/networking-l2gw
L2GW_AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-l2gateway-agent"
L2GW_PLUGIN=${L2GW_PLUGIN:-"l2gw"}
L2GW_CONF_FILE=/etc/neutron/l2gateway_agent.ini
L2GW_PLUGIN_CONF_FILE=/etc/neutron/l2gw_plugin.ini
#NETWORKING_L2GW_SERVICE_DRIVER=L2GW:OpenDaylight:networking_odl.l2gateway.driver.OpenDaylightL2gwDriver:default
#
# Each service you enable has the following meaning:
# l2gw-plugin - Add this config flag to enable l2gw service plugin
# l2gw-agent - Add this config flag to enable l2gw agent
#
# An example of enabling all-in-one l2gw is below.
# enable_service l2gw-plugin l2gw-agent
#
# This can be overridden in the localrc file
OVSDB_HOSTS=${OVSDB_HOSTS:-"ovsdb1:127.0.0.1:6632"}

@ -1,5 +0,0 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0

@ -1,91 +0,0 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'openstackdocstheme'
]
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/networking-l2gw'
openstackdocs_pdf_link = True
openstackdocs_auto_name = False
openstackdocs_bug_project = 'networking-l2gw'
openstackdocs_bug_tag = ''
html_theme = 'openstackdocs'
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'networking-l2gw'
copyright = u'2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'native'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'doc-%s.tex' % project,
u'Networking L2GW Documentation',
u'networking-l2gw developers', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
latex_elements = {
'makeindex': '',
'printindex': '',
'preamble': r'\setcounter{tocdepth}{3}',
# openany: Skip blank pages in generated PDFs
# oneside: Use the same page layout for both even and odd pages
'extraclassoptions': 'openany,oneside',
}

@ -1,4 +0,0 @@
============
Contributing
============
.. include:: ../../CONTRIBUTING.rst

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

@ -1,23 +0,0 @@
.. networking-l2gw documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to networking-l2gw's documentation!
========================================================
.. toctree::
:maxdepth: 2
Introduction <readme>
installation
usage
contributing
.. only:: html
.. rubric:: Indices:
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

@ -1,12 +0,0 @@
============
Installation
============
At the command line::
$ pip install networking-l2gw
Or, if you have virtualenvwrapper installed::
$ mkvirtualenv networking-l2gw
$ pip install networking-l2gw

@ -1 +0,0 @@
.. include:: ../../README.rst

@ -1,188 +0,0 @@
=====
Usage
=====
.. _whatisl2gw:
1. What is L2 Gateway
=============================
L2 Gateway (L2GW) is an API framework for OpenStack that offers bridging two or more networks together to make them look at a
single broadcast domain. A typical use case is bridging the virtual with the physical networks
.. _model:
2. The L2GW model
=================
L2GW introduces a various models to describe the relationships between logical and the physical entities.
========================= =====================================================================
Models Description
========================= =====================================================================
l2gateways logical gateways that represents for the set of physical devices
l2gatewaydevices l2 gateway devices that represents for logical gateways.
l2gatewayinterfaces it represents the physical ports for the devices
l2gatewayconnections represents connection between neutron network and the logical gateway
========================= =====================================================================
.. _usage:
3. L2GW NB API usage
=====================
L2GW NB REST API definitions are below,
3.1 Openstack CLI
-----------------
OpenStackClient provides
`the basic network commands <https://docs.openstack.org/python-openstackclient/latest/cli/command-list.html>`__
and networking-l2gw has an extension for l2gw related commands.
* Create l2gateway: **openstack l2gw create** <l2gateway-name> --device name="<device_name>",interface_names=”<interface_name1>|[<segid1] ; <interface_name2>|[<segid2]”
**Note** : segid is an optional parameter , if it’s not provided while creating l2gateway , it needs to be provided while creating l2-gateway-connection
* List l2gateways: **openstack l2gw list**
* Show l2gateway: **openstack l2gw show** <l2gateway-id/l2gateway-name>
* Delete l2gateway: **openstack l2gw delete** <l2gateway-id/l2gateway-name>
* Update l2gateway: **openstack l2gw update** <l2gateway-id/l2gateway-name> --name <new l2gateway-name> --device name=<device_name>,interface_names=”<interface_name1>|[<segid1] ; <interface_name2>|[<segid2]”
* Create l2gateway-connection: **openstack l2gw connection create** <l2gateway-id > <network-id> --default-segmentation-id [seg-id]
* List l2gateway-connection: **openstack l2gw connection list**
* Show l2gateway-connection: **openstack l2gw connection show** <l2gateway-connection-id>
* Delete l2gateway-connection: **openstack l2gw connection delete** <l2gateway-connection-id>
3.2 Neutron CLI
---------------
.. warning::
neutron CLI is now deprecated, and will be removed in the future.
Use openstack CLI instead.
* Create l2gateway: neutron-l2gw l2-gateway-create <l2gateway-name> --device name="<device_name>",interface_names=”<interface_name1>|[<segid1] ; <interface_name2>|[<segid2]”
**Note** : segid is an optional parameter , if it’s not provided while creating l2gateway , it needs to be provided while creating l2-gateway-connection
* List l2gateways: neutron-l2gw l2-gateway-list
* Show l2gateway: neutron-l2gw l2-gateway-show <l2gateway-id/l2gateway-name>
* Delete l2gateway: neutron-l2gw l2-gateway-delete <l2gateway-id/l2gateway-name>
* Update l2gateway: neutron-l2gw l2-gateway-update <l2gateway-id/l2gateway-name> --name <new l2gateway-name> --device name=<device_name>,interface_names=”<interface_name1>|[<segid1] ; <interface_name2>|[<segid2]”
* Create l2gateway-connection: neutron-l2gw l2-gateway-connection-create <l2gateway-id > <network-id> --default-segmentation-id [seg-id]
* List l2gateway-connection: neutron-l2gw l2-gateway-connection-list
* Show l2gateway-connection: neutron-l2gw l2-gateway-connection-show <l2gateway-connection-id>
* Delete l2gateway-connection: neutron-l2gw l2-gateway-connection-delete <l2gateway-connection-id>
.. _l2gw_agent:
4. L2GW agent
=============
Configure the OVSDB parameters in /etc/neutron/l2gateway_agent.ini in case for openstack deployment.
Ex:
[ovsdb
ovsdb_hosts = ovsdb1:127.0.0.1:6632
In devstack local.conf will do a trick.(Refer - networking-l2gw/devstack/README.rst)
L2GW agent will be listed as part of "neutron agent-list".
Details of L2GW Agent can be seen using "neutron agent-show <agent-id>" command
L2 Gateway Agent connects to ovsdb server to configure and fetch L2 Gateways
.. _l2gw_deployment:
5. L2GW Deployment
==================
.. image:: images/L2GW_deployment.png
:height: 225px
:width: 450px
:align: center
.. _l2gw_release_management:
6. L2GW Package Versioning and Release Management
=================================================
Versioning of L2 Gateway Package
--------------------------------
L2 Gateway package will be uploaded, as networking-l2gw,
to https://pypi.python.org.
In order to upload this package, it will be versioned.
Any subsequent updates will require version updates.
This sub-section describes the versioning and release management of this package.
By keeping L2 Gateway repository out of Neutron main repository gives us
flexibility in terms of development and enhancements.
This flexibility is extended for versioning of this project as well - this
means, if we wanted to, we could version this project sequentially.
This means whenever a new fix is released, we could bump up the version to
the next number.
Flexibility comes with cost. Thinking in terms of future, assuming this API
is deployed by many users along with different releases of Neutron.
Many enhancements/fixes may be introduced to this project.
If we incremented the version/release number sequentially, this may force
uninterested users to upgrade as well.
This may or may not be desirable. Therefore, following release/versioning
proposal is suggested for this package.
Versioning of L2 Gateway will be aligned closely with Neutron releases.
Neutron releases are formatted as follows::
<year>.<major-release>.<minor-release>
year = 2015, 2014, etc...
major-release = 1 or 2 - only two releases in a year
minor-release = 1,2,3 or b1,b2,b3, or rc1,rc2,rc3, etc
2015.1.1, 2014.2.rc2, etc…
L2 Gateway package is versioned in the same manner with an exception that the
last tuple is used for intermediate patches/fixes between major release.
As an example, the first release will be::
2015.1.X where X will continue to increment as we add fixes to this release
When kilo is released, L2 Gateway repository will also be tagged as kilo/stable
to match with Neutron release.
At this time the version of this package will be tagged to
2015.1.X ("X" will continue to increase as bug fixes are added to kilo/stable).
For liberty release, the version of this package will be changed to 2015.2.Y.
All the new features will be added to 2015.2.Y and all the bug fixes for kilo
will be back-ported to 2015.1.X.
This gives the flexibility of keeping the contents/features of this package
closely aligned with Neutron releases.
Which Version of L2 Gateway Package to use?
-------------------------------------------
Anybody who wants to use L2 Gateway package, they can install it by issuing::
pip install networking-l2gw
This will always pick the latest version of the package.
However, for those users who are already using this package and want to pick
up point fixes for a given release may use the specific version.
For example, if a user wants to pick the latest version of the package that is
suitable for kilo/stable, may use the following::
pip install networking-l2gw>=2015.1.X,<2015.2.0
For information on deploying L2GW refer networking-l2gw/doc/source/installation.rst and in devstack , networking-l2gw/devstack/README.rst

@ -1,62 +0,0 @@
[DEFAULT]
# Show debugging output in log (sets DEBUG log level output)
# debug = False
[ovsdb]
# (StrOpt) OVSDB server tuples in the format
# <ovsdb_name>:<ip address>:<port>[,<ovsdb_name>:<ip address>:<port>]
# - ovsdb_name: a symbolic name that helps identifies keys and certificate files
# - ip address: the address or dns name for the ovsdb server
# - port: the port (ssl is supported)
# ovsdb_hosts =
# Example: ovsdb_hosts = 'ovsdb1:16.95.16.1:6632,ovsdb2:16.95.16.2:6632'
# enable_manager = False
# (BoolOpt) connection can be initiated by the ovsdb server.
# By default 'enable_manager' value is False, turn on the variable to True
# to initiate the connection from ovsdb server to l2gw agent.
# manager_table_listening_port = 6632
# (PortOpt) set port number for l2gateway agent, so that it can listen
# for ovsdb server,whenever its IP is entered in manager table of ovsdb server.
# by default it is set to port 6632.
# you can use vtep-ctl utility to populate manager table of ovsdb.
# For Example: sudo vtep-ctl set-manager tcp:x.x.x.x:6640,
# where x.x.x.x is IP of l2gateway agent and 6640 is a port.
# (StrOpt) Base path to private key file(s).
# Agent will find key file named
# $l2_gw_agent_priv_key_base_path/$ovsdb_name.key
# l2_gw_agent_priv_key_base_path =
# Example: l2_gw_agent_priv_key_base_path = '/home/someuser/keys'
# (StrOpt) Base path to cert file(s).
# Agent will find cert file named
# $l2_gw_agent_cert_base_path/$ovsdb_name.cert
# l2_gw_agent_cert_base_path =
# Example: l2_gw_agent_cert_base_path = '/home/someuser/certs'
# (StrOpt) Base path to ca cert file(s).
# Agent will find ca cert file named
# $l2_gw_agent_ca_cert_base_path/$ovsdb_name.ca_cert
# l2_gw_agent_ca_cert_base_path =
# Example: l2_gw_agent_ca_cert_base_path = '/home/someuser/ca_certs'
# (IntOpt) The L2 gateway agent checks connection state with the OVSDB
# servers.
# The interval is number of seconds between attempts.
# periodic_interval =
# Example: periodic_interval = 20
# (IntOpt) The L2 gateway agent retries to connect to the OVSDB server
# if a socket does not get opened in the first attempt.
# the max_connection_retries is the maximum number of such attempts
# before giving up.
# max_connection_retries =
# Example: max_connection_retries = 10
# (IntOpt) The remote OVSDB server sends echo requests every 4 seconds.
# If there is no echo request on the socket for socket_timeout seconds,
# by default socket_timeout is set to 30 seconds. The agent can
# safely assume that the connection with the remote OVSDB server is lost.
# socket_timeout =
# Example: socket_timeout = 30

@ -1,25 +0,0 @@
[DEFAULT]
# (StrOpt) default interface name of the l2 gateway
# default_interface_name =
# Example: default_interface_name = "FortyGigE1/0/1"
# (StrOpt) default device name of the l2 gateway
# default_device_name =
# Example: default_device_name = "Switch1"
# (IntOpt) quota of the l2 gateway
# quota_l2_gateway =
# Example: quota_l2_gateway = 10
# (IntOpt) The periodic interval at which the plugin
# checks for the monitoring L2 gateway agent
# periodic_monitoring_interval =
# Example: periodic_monitoring_interval = 5
[service_providers]
# Must be in form:
# service_provider=<service_type>:<name>:<driver>[:default]
# List of allowed service types includes L2GW
# Combination of <service type> and <name> must be unique; <driver> must also be unique
# This is multiline option
service_provider=L2GW:l2gw:networking_l2gw.services.l2gateway.service_drivers.rpc_l2gw.L2gwRpcDriver:default

@ -1,15 +0,0 @@
{
"admin_only": "rule:context_is_admin",
"admin_or_owner": "rule:context_is_admin or tenant_id:%(tenant_id)s",
"create_l2_gateway": "rule:admin_only",
"update_l2_gateway": "rule:admin_only",
"get_l2_gateway": "rule:admin_only",
"delete_l2_gateway": "rule:admin_only",
"get_l2_gateways": "rule:admin_only",
"create_l2_gateway_connection": "rule:admin_only",
"get_l2_gateway_connections": "rule:admin_only",
"get_l2_gateway_connection": "rule:admin_only",
"delete_l2_gateway_connection": "rule:admin_only"
}

@ -1,134 +0,0 @@
alabaster==0.7.10
alembic==0.8.10
amqp==2.1.1
appdirs==1.3.0
beautifulsoup4==4.6.0
cachetools==2.0.0
cffi==1.7.0
cliff==2.8.0
cmd2==0.8.0
contextlib2==0.4.0
coverage==4.0
ddt==1.0.1
debtcollector==1.2.0
decorator==3.4.0
deprecation==1.0
docutils==0.11
dogpile.cache==0.6.2
eventlet==0.18.2
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
future==0.16.0
futurist==1.2.0
greenlet==0.4.10
httplib2==0.9.1
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10
jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
jsonschema==2.6.0
keystoneauth1==3.4.0
keystonemiddleware==4.17.0
kombu==4.0.0
linecache2==1.0.0
logutils==0.3.5
Mako==0.4.0
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
monotonic==0.6
mox3==0.20.0
msgpack-python==0.4.0
munch==2.1.0
netaddr==0.7.18
netifaces==0.10.4
neutron==13.0.0
neutron-lib==1.29.0
openstacksdk==0.11.2
os-client-config==1.28.0
os-service-types==1.2.0
os-testr==1.0.0
os-xenapi==0.3.1
osc-lib==1.8.0
oslo.cache==1.26.0
oslo.concurrency==3.25.0
oslo.config==5.2.0
oslo.context==2.19.2
oslo.db==4.27.0
oslo.i18n==3.15.3
oslo.log==3.36.0
oslo.messaging==5.29.0
oslo.middleware==3.31.0
oslo.policy==1.30.0
oslo.privsep==1.23.0
oslo.reports==1.18.0
oslo.rootwrap==5.8.0
oslo.serialization==2.18.0
oslo.service==1.24.0
oslo.utils==3.33.0
oslo.versionedobjects==1.31.2