<commit_before>
========
Overview
========

.. _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 Create l2gateway: neutron 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

3.2 List l2gateways: neutron l2-gateway-list

3.3 Show l2gateway: neutron l2-gateway-show <l2gateway-id/l2gateway-name>

3.4 Delete l2gateway: neutron l2-gateway-delete <l2gateway-id/l2gateway-name>

3.5 Updatel2gateway: neutron l2-gateway-update <l2gateway-id/l2gateway-name> --name <new l2gateway-name> --device name=<device_name>,interface_names=”<interface_name1>|[<segid1] ; <interface_name2>|[<segid2]”

3.6 Create l2gateway-connection: neutron l2-gateway-connection-create <l2gateway-id > <network-id> --default-segmentation-id [seg-id]

3.7 List l2gateway-connection: neutron l2-gateway-connection-list

3.8 Show l2gateway-connection: neutron l2-gateway-connection-show <l2gateway-connection-id>

3.9 Delete l2gateway-connection: neutron 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

For information on deploying L2GW refer networking-l2gw/doc/source/installation.rst  and  in devstack , networking-l2gw/devstack/README.rst<commit_msg>Replace neutron with neutron-l2gw in doc<commit_after>
========
Overview
========

.. _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 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

3.2 List l2gateways: neutron-l2gw l2-gateway-list

3.3 Show l2gateway: neutron-l2gw l2-gateway-show <l2gateway-id/l2gateway-name>

3.4 Delete l2gateway: neutron-l2gw l2-gateway-delete <l2gateway-id/l2gateway-name>

3.5 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]”

3.6 Create l2gateway-connection: neutron-l2gw l2-gateway-connection-create <l2gateway-id > <network-id> --default-segmentation-id [seg-id]

3.7 List l2gateway-connection: neutron-l2gw l2-gateway-connection-list

3.8 Show l2gateway-connection: neutron-l2gw l2-gateway-connection-show <l2gateway-connection-id>

3.9 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

For information on deploying L2GW refer networking-l2gw/doc/source/installation.rst  and  in devstack , networking-l2gw/devstack/README.rst
{'fraction_non_alphanumeric': 0.19135517612674974, 'fraction_numerical': 0.03414859252422704, 'mean_word_length': 4.779555555555556, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3177059', 'n_tokens_mistral': 2071, 'n_tokens_neox': 1920, 'n_words': 583}