From e2d1b49a13d2de943bbeb4a120c7f27dbc6e46d6 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sat, 8 Jul 2017 09:08:05 +0000 Subject: [PATCH] doc: rendering cleanup * Remove unnecessary leading spaces (to avoid unexpected vertical line which means quote blocks) * Use code-block directive for proper highlighting Change-Id: Ie32c2034d9d3e16b68472bf8a94c6bf58447fd3c --- doc/source/contributor/future/attributes.rst | 12 ++- doc/source/install/index.rst | 58 ++++++----- doc/source/user/drivers/bagpipe/index.rst | 46 +++++---- doc/source/user/drivers/nuage/index.rst | 8 +- .../user/drivers/opencontrail/index.rst | 6 +- .../user/drivers/opendaylight/index.rst | 18 ++-- doc/source/user/heat.rst | 96 +++++++++---------- doc/source/user/horizon.rst | 6 +- doc/source/user/overview.rst | 6 +- doc/source/user/usage.rst | 6 +- 10 files changed, 149 insertions(+), 113 deletions(-) diff --git a/doc/source/contributor/future/attributes.rst b/doc/source/contributor/future/attributes.rst index 5dbbdd81..8a8daf66 100644 --- a/doc/source/contributor/future/attributes.rst +++ b/doc/source/contributor/future/attributes.rst @@ -43,18 +43,24 @@ Currently defined techniques are: API call to list the available techniques, with example answers: - * GET /bgpvpn/techniques :: +* GET /bgpvpn/techniques: + + .. code-block:: json { "techniques": { "l3": [ "ipvpn" ], "l2": [ "evpn" ] } } - * GET /bgpvpn/techniques/l3 :: +* GET /bgpvpn/techniques/l3: + + .. code-block:: json { "l3": [ "ipvpn"] } - * GET /bgpvpn/techniques/l2 :: +* GET /bgpvpn/techniques/l2: + + .. code-block:: json { "l2": [ "evpn"] } diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst index 442ad640..6761fe73 100644 --- a/doc/source/install/index.rst +++ b/doc/source/install/index.rst @@ -13,21 +13,23 @@ Openstack distribution. If you use ``pip``, follow these steps to install networking-bgpvpn: - * identify the version of the networking-bgpvpn package that matches - your Openstack version: +* identify the version of the networking-bgpvpn package that matches + your Openstack version: - * Liberty: most recent of 3.0.x - * Mitaka: most recent of 4.0.x - * Newton: most recent of 5.0.x - * Ocata: most recent of 6.0.x - * Pike: most recent of 7.0.x - * (see ``_) + * Liberty: most recent of 3.0.x + * Mitaka: most recent of 4.0.x + * Newton: most recent of 5.0.x + * Ocata: most recent of 6.0.x + * Pike: most recent of 7.0.x + * (see ``_) - * indicate pip to (a) install precisely this version and (b) take into - account Openstack upper constraints on package versions for dependencies - (example for ocata):: +* indicate pip to (a) install precisely this version and (b) take into + account Openstack upper constraints on package versions for dependencies + (example for ocata): - $ pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata networking-bgpvpn=6.0.0 + .. code-block:: console + + $ pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata networking-bgpvpn=6.0.0 Configuration ============= @@ -35,18 +37,22 @@ Configuration The service plugin is enabled in Neutron, by adding ``bgpvpn`` to the list of enabled service plugins in ``neutron.conf`` (typically in ``/etc/neutron/`` -but the location used may depend on your setup or packaging). For instance:: +but the location used may depend on your setup or packaging). For instance: + +.. code-block:: ini service_plugins = router,bgpvpn The BGPVPN driver to use is then specified in the ``networking_bgpvpn.conf`` file (located by default under ``/etc/neutron/``, but in any case in one of the directories specified with ``--config-dir`` at neutron startup, which may -differ from ``/etc/neutron`` in your setup):: +differ from ``/etc/neutron`` in your setup): - [service_providers] - service_provider = BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:default - #service_provider= BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default +.. code-block:: ini + + [service_providers] + service_provider = BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:default + #service_provider= BGPVPN:Dummy:networking_bgpvpn.neutron.services.service_drivers.driver_api.BGPVPNDriver:default A given driver may require additional packages to work; the driver section provides detailed installation information for each @@ -62,20 +68,26 @@ When pip is used to install the package, a default policy file is installed at ` Database setup ============== -The DB tables for networking-bgpvpn are created and upgraded with:: +The DB tables for networking-bgpvpn are created and upgraded with: - neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-bgpvpn upgrade +.. code-block:: console + + neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-bgpvpn upgrade Devstack ======== -You can easily test the bgpvpn service plugin with devstack, by adding the following line to your local.conf:: +You can easily test the bgpvpn service plugin with devstack, by adding the following line to your local.conf: - enable_plugin networking-bgpvpn git://git.openstack.org/openstack/networking-bgpvpn.git +.. code-block:: none -Or the following if you want a specific branch or version (example for Mitaka):: + enable_plugin networking-bgpvpn git://git.openstack.org/openstack/networking-bgpvpn.git - enable_plugin networking-bgpvpn git://git.openstack.org/openstack/networking-bgpvpn.git stable/mitaka +Or the following if you want a specific branch or version (example for Mitaka): + +.. code-block:: none + + enable_plugin networking-bgpvpn git://git.openstack.org/openstack/networking-bgpvpn.git stable/mitaka By default, the service driver will use a dummy driver, that only responds to API calls, and stores data in the database. If you want to test a fully functional driver with devstack, you can configure the bagpipe driver with its devstack plugin (see :doc:`/user/drivers/bagpipe/index`). diff --git a/doc/source/user/drivers/bagpipe/index.rst b/doc/source/user/drivers/bagpipe/index.rst index e0bd01bc..e7b2c563 100644 --- a/doc/source/user/drivers/bagpipe/index.rst +++ b/doc/source/user/drivers/bagpipe/index.rst @@ -24,7 +24,7 @@ The bagpipe driver for the BGPVPN service plugin interacts with the openvswitch compute node, which is extended to support new RPCs to trigger the local configuration on compute nodes of BGP VPN instances and of their MPLS dataplane. - .. blockdiag:: overview.blockdiag +.. blockdiag:: overview.blockdiag Limitations ----------- @@ -56,16 +56,22 @@ In devstack * ``local.conf``: - * add the following to enable the BaGPipe driver for the BGPVPN service plugin:: + * add the following to enable the BaGPipe driver for the BGPVPN service plugin: - NETWORKING_BGPVPN_DRIVER="BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:default" + .. code-block:: ini - * enable networking-bagpipe_, which contains code for agent extensions:: + NETWORKING_BGPVPN_DRIVER="BGPVPN:BaGPipe:networking_bgpvpn.neutron.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:default" - enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git - # enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git stable/ocata + * enable networking-bagpipe_, which contains code for agent extensions: -* on a control node, if you want to run the Fake Route-Reflector there (relevant only for a multinode setup):: + .. code-block:: ini + + enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git + # enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git stable/ocata + +* on a control node, if you want to run the Fake Route-Reflector there (relevant only for a multinode setup): + + .. code-block:: none enable_service b-fakerr @@ -73,10 +79,12 @@ In devstack * the compute node Neutron agent is the Neutron openvswitch agent, with the ``bagpipe_bgpvpn`` agent extension: - * install networking-bagpipe_ (the code to interact with ``bagpipe-bgp`` comes from there):: + * install networking-bagpipe_ (the code to interact with ``bagpipe-bgp`` comes from there): - enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git - # enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git stable/ocata + .. code-block:: ini + + enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git + # enable_plugin networking-bagpipe git://git.openstack.org/openstack/networking-bagpipe.git stable/ocata * define ``Q_AGENT=openvswitch`` in ``local.conf`` (optional, this is actually the default now) @@ -84,17 +92,19 @@ In devstack * bagpipe-bgp will be installed automatically (part of networking-bagpipe since Pike, or as a submodule before) - * you need to enable and configure bagpipe-bgp, typically with a peering to a BGP Route-Reflector or BGP router(s):: + * you need to enable and configure bagpipe-bgp, typically with a peering to a BGP Route-Reflector or BGP router(s): - enable_service b-bgp + .. code-block:: ini - BAGPIPE_DATAPLANE_DRIVER_IPVPN=mpls_ovs_dataplane.MPLSOVSDataplaneDriver - # BAGPIPE_DATAPLANE_DRIVER_IPVPN=ovs # simpler config available> after Ocata + enable_service b-bgp - # IP of your route-reflector or BGP router, or fakeRR - # BAGPIPE_BGP_PEERS defaults to $SERVICE_HOST, which will point to the controller in a - # multi-node devstack setup - #BAGPIPE_BGP_PEERS=1.2.3.4,2.3.4.5 + BAGPIPE_DATAPLANE_DRIVER_IPVPN=mpls_ovs_dataplane.MPLSOVSDataplaneDriver + # BAGPIPE_DATAPLANE_DRIVER_IPVPN=ovs # simpler config available> after Ocata + + # IP of your route-reflector or BGP router, or fakeRR + # BAGPIPE_BGP_PEERS defaults to $SERVICE_HOST, which will point to the controller in a + # multi-node devstack setup + #BAGPIPE_BGP_PEERS=1.2.3.4,2.3.4.5 .. _networking-bagpipe: https://docs.openstack.org/developer/networking-bagpipe diff --git a/doc/source/user/drivers/nuage/index.rst b/doc/source/user/drivers/nuage/index.rst index 817439f6..a722f615 100644 --- a/doc/source/user/drivers/nuage/index.rst +++ b/doc/source/user/drivers/nuage/index.rst @@ -16,7 +16,9 @@ installation and configuration steps have been applied; in particular the installation of the ``nuage_neutron`` package. Please refer to Nuage Networks documentation. -The driver will be enabled, by specifying in ``/etc/neutron/networking_bgpvpn.conf``:: +The driver will be enabled, by specifying in ``/etc/neutron/networking_bgpvpn.conf``: - [service_providers] - service_provider = BGPVPN:Nuage:nuage_neutron.bgpvpn.services.service_drivers.driver.NuageBGPVPNDriver:default +.. code-block:: ini + + [service_providers] + service_provider = BGPVPN:Nuage:nuage_neutron.bgpvpn.services.service_drivers.driver.NuageBGPVPNDriver:default diff --git a/doc/source/user/drivers/opencontrail/index.rst b/doc/source/user/drivers/opencontrail/index.rst index 2ef270e3..00d02ecb 100644 --- a/doc/source/user/drivers/opencontrail/index.rst +++ b/doc/source/user/drivers/opencontrail/index.rst @@ -47,13 +47,15 @@ A `devstack plugin`_ can be used to setup an OpenContrail dev/test platform. * Clone devstack: - git clone git@github.com:openstack-dev/devstack + .. code-block:: console + + git clone git@github.com:openstack-dev/devstack * Here a proposed devstack ``local.conf`` file which permits to deploy OpenStack keystone, glance, nova, neutron/networking-bgpvpn and compile/install all OpenContrail services and dependences: -.. code:: bash +.. code-block:: bash [[local|localrc]] LOG=True diff --git a/doc/source/user/drivers/opendaylight/index.rst b/doc/source/user/drivers/opendaylight/index.rst index ff8bfaca..0a844e0c 100644 --- a/doc/source/user/drivers/opendaylight/index.rst +++ b/doc/source/user/drivers/opendaylight/index.rst @@ -9,17 +9,23 @@ OpenDaylight driver requires `networking-odl plugin`_ which comes with its own devstack scripts. Details on how to configure devstack for OpenDaylight plugin can be found at `networking-odl/devstack`_. -* add the following to local.conf to enable networking-odl plugin:: +* add the following to local.conf to enable networking-odl plugin: - enable_plugin networking-odl http://git.openstack.org/openstack/networking-odl + .. code-block:: none -* add the following to local.conf to enable ODL Driver for BGPVPN service Plugin:: + enable_plugin networking-odl http://git.openstack.org/openstack/networking-odl - NETWORKING_BGPVPN_DRIVER="BGPVPN:OpenDaylight:networking_bgpvpn.neutron.services.service_drivers.opendaylight.odl.OpenDaylightBgpvpnDriver:default" +* add the following to local.conf to enable ODL Driver for BGPVPN service Plugin: -* Run stack.sh:: + .. code-block:: ini - ./stack.sh + NETWORKING_BGPVPN_DRIVER="BGPVPN:OpenDaylight:networking_bgpvpn.neutron.services.service_drivers.opendaylight.odl.OpenDaylightBgpvpnDriver:default" + +* Run stack.sh: + + .. code-block:: console + + ./stack.sh .. _networking-odl plugin : https://launchpad.net/networking-odl .. _networking-odl/devstack : https://github.com/openstack/networking-odl/tree/master/devstack diff --git a/doc/source/user/heat.rst b/doc/source/user/heat.rst index d118214d..bf12051b 100644 --- a/doc/source/user/heat.rst +++ b/doc/source/user/heat.rst @@ -1,6 +1,6 @@ -======== +==== Heat -======== +==== Installation and Configuration ============================== @@ -12,9 +12,9 @@ to ``plugin_dirs`` in the heat config: ``/etc/heat/heat.conf``. This directory can be found out with: - .. code-block:: shell +.. code-block:: console - dirname $(python -c "import networking_bgpvpn_heat as n;print(n.__file__)") + dirname $(python -c "import networking_bgpvpn_heat as n;print(n.__file__)") Examples ======== @@ -25,34 +25,34 @@ Heat Orchestration Template (HOT) example 1 This template has to be run with admin rights and will create a BGPVPN for the current tenant, along with a Network associated with it: - .. literalinclude:: ../../../networking_bgpvpn_heat/examples/bgpvpn_test-00.yaml - :language: yaml +.. literalinclude:: ../../../networking_bgpvpn_heat/examples/bgpvpn_test-00.yaml + :language: yaml In devstack, this HOT file can be used with cloud admin privileges in the demo project; such privileges can be obtained with the command: - .. code-block:: shell +.. code-block:: console - source openrc admin demo + source openrc admin demo This example can then be run: - .. code-block:: shell-session +.. code-block:: console + + $ heat stack-create networks -f bgpvpn_test-00.yaml + +--------------------------------------+------------+--------------------+---------------------+--------------+ + | id | stack_name | stack_status | creation_time | updated_time | + +--------------------------------------+------------+--------------------+---------------------+--------------+ + | 5a6c2bf1-c5da-4f8f-9838-4c3e59d13d41 | networks | CREATE_IN_PROGRESS | 2016年03月02日T08:32:52 | None | + +--------------------------------------+------------+--------------------+---------------------+--------------+ + + $ heat stack-list + +--------------------------------------+------------+-----------------+---------------------+--------------+ + | id | stack_name | stack_status | creation_time | updated_time | + +--------------------------------------+------------+-----------------+---------------------+--------------+ + | 5a6c2bf1-c5da-4f8f-9838-4c3e59d13d41 | networks | CREATE_COMPLETE | 2016年03月02日T08:32:52 | None | + +--------------------------------------+------------+-----------------+---------------------+--------------+ - $ heat stack-create networks -f bgpvpn_test-00.yaml - +--------------------------------------+------------+--------------------+---------------------+--------------+ - | id | stack_name | stack_status | creation_time | updated_time | - +--------------------------------------+------------+--------------------+---------------------+--------------+ - | 5a6c2bf1-c5da-4f8f-9838-4c3e59d13d41 | networks | CREATE_IN_PROGRESS | 2016年03月02日T08:32:52 | None | - +--------------------------------------+------------+--------------------+---------------------+--------------+ - - $ heat stack-list - +--------------------------------------+------------+-----------------+---------------------+--------------+ - | id | stack_name | stack_status | creation_time | updated_time | - +--------------------------------------+------------+-----------------+---------------------+--------------+ - | 5a6c2bf1-c5da-4f8f-9838-4c3e59d13d41 | networks | CREATE_COMPLETE | 2016年03月02日T08:32:52 | None | - +--------------------------------------+------------+-----------------+---------------------+--------------+ - Heat Orchestration Template (HOT) example 2 ------------------------------------------- @@ -61,38 +61,36 @@ This is a set of two templates: * one that has to be run with admin rights and will create a BGPVPN for the 'demo' tenant: - .. literalinclude:: ../../../networking_bgpvpn_heat/examples/bgpvpn_test-04-admin.yaml - :language: yaml +.. literalinclude:: ../../../networking_bgpvpn_heat/examples/bgpvpn_test-04-admin.yaml + :language: yaml - .. code-block:: shell-session - - $ source openrc admin admin - $ heat stack-create bgpvpn -f bgpvpn_test-04-admin.yaml +.. code-block:: console + + $ source openrc admin admin + $ heat stack-create bgpvpn -f bgpvpn_test-04-admin.yaml * one to run as a plain 'demo' tenant user, that will: - * create a Network and bind it to the 'default_vpn' BGPVPN + * create a Network and bind it to the 'default_vpn' BGPVPN - * create a second Network connected to a Router, and bind the Router to the 'default_vpn' + * create a second Network connected to a Router, and bind the Router to the 'default_vpn' - .. literalinclude:: ../../../networking_bgpvpn_heat/examples/bgpvpn_test-04-tenant.yaml - :language: yaml + .. literalinclude:: ../../../networking_bgpvpn_heat/examples/bgpvpn_test-04-tenant.yaml + :language: yaml - .. code-block:: shell-session - - $ source openrc demo demo - $ heat stack-create networks_bgpvpn -f bgpvpn_test-04-tenant.yaml - +--------------------------------------+-----------------+--------------------+---------------------+--------------+ - | id | stack_name | stack_status | creation_time | updated_time | - +--------------------------------------+-----------------+--------------------+---------------------+--------------+ - | a3cf1c1b-ac6c-425c-a4b5-d8ca894539f2 | networks_bgpvpn | CREATE_IN_PROGRESS | 2016年03月02日T09:16:39 | None | - +--------------------------------------+-----------------+--------------------+---------------------+--------------+ - - $ neutron bgpvpn-list - +--------------------------------------+-------------+------+-------------------------------------------+------------------------------------------------+ - | id | name | type | networks | routers | - +--------------------------------------+-------------+------+-------------------------------------------+------------------------------------------------+ - | 473e5218-f4a2-46bd-8086-36d6849ecf8e | default VPN | l3 | [u'5b1af75b-0608-4e03-aac1-2608728be45d'] | [u'cb9c7304-e844-447d-88e9-4a0a2dc14d21'] | - +--------------------------------------+-------------+------+-------------------------------------------+------------------------------------------------+ + .. code-block:: console + $ source openrc demo demo + $ heat stack-create networks_bgpvpn -f bgpvpn_test-04-tenant.yaml + +--------------------------------------+-----------------+--------------------+---------------------+--------------+ + | id | stack_name | stack_status | creation_time | updated_time | + +--------------------------------------+-----------------+--------------------+---------------------+--------------+ + | a3cf1c1b-ac6c-425c-a4b5-d8ca894539f2 | networks_bgpvpn | CREATE_IN_PROGRESS | 2016年03月02日T09:16:39 | None | + +--------------------------------------+-----------------+--------------------+---------------------+--------------+ + $ neutron bgpvpn-list + +--------------------------------------+-------------+------+-------------------------------------------+------------------------------------------------+ + | id | name | type | networks | routers | + +--------------------------------------+-------------+------+-------------------------------------------+------------------------------------------------+ + | 473e5218-f4a2-46bd-8086-36d6849ecf8e | default VPN | l3 | [u'5b1af75b-0608-4e03-aac1-2608728be45d'] | [u'cb9c7304-e844-447d-88e9-4a0a2dc14d21'] | + +--------------------------------------+-------------+------+-------------------------------------------+------------------------------------------------+ diff --git a/doc/source/user/horizon.rst b/doc/source/user/horizon.rst index 880ff63c..9948a628 100644 --- a/doc/source/user/horizon.rst +++ b/doc/source/user/horizon.rst @@ -38,10 +38,10 @@ installed. Their installation folders are respectively and Copy configuration file: - .. code-block:: shell +.. code-block:: shell - cp /bgpvpn_dashboard/enabled/_[0-9]*.py /openstack_dashboard/local/enabled/ + cp /bgpvpn_dashboard/enabled/_[0-9]*.py /openstack_dashboard/local/enabled/ Restart the web server hosting Horizon. -The BGPVPN Interconnections panels will now be in your Horizon dashboard. \ No newline at end of file +The BGPVPN Interconnections panels will now be in your Horizon dashboard. diff --git a/doc/source/user/overview.rst b/doc/source/user/overview.rst index 882f36d0..161e2933 100644 --- a/doc/source/user/overview.rst +++ b/doc/source/user/overview.rst @@ -113,7 +113,7 @@ So there are two workflows, one for the admin, one for a tenant. Sequence diagram summarizing these two workflows: - .. seqdiag:: workflows.seqdiag +.. seqdiag:: workflows.seqdiag Component architecture overview @@ -121,12 +121,12 @@ Component architecture overview This diagram gives an overview of the architecture: - .. blockdiag:: components-sdn.blockdiag +.. blockdiag:: components-sdn.blockdiag This second diagram depicts how the *bagpipe* reference driver implements its backend: - .. blockdiag:: drivers/bagpipe/overview.blockdiag +.. blockdiag:: drivers/bagpipe/overview.blockdiag References ---------- diff --git a/doc/source/user/usage.rst b/doc/source/user/usage.rst index 5b36eadf..f540ce14 100644 --- a/doc/source/user/usage.rst +++ b/doc/source/user/usage.rst @@ -7,7 +7,7 @@ Use from Neutron API CLI Example commands to use by the admin to create a BGPVPN resource: -.. code-block:: shell +.. code-block:: console neutron bgpvpn-create --route-targets 64512:1 --tenant-id b954279e1e064dc9b8264474cb3e6bd2 neutron bgpvpn-list @@ -15,7 +15,7 @@ Example commands to use by the admin to create a BGPVPN resource: Example commands to use by the tenant owning the BGPVPN to associate a Network to it: -.. code-block:: shell +.. code-block:: console neutron bgpvpn-net-assoc-create myBGPVPN --network 828cddad3b834e79b79abc1b87b6cca0 # returns @@ -103,6 +103,6 @@ Examples BGPVPN + Network Association Resources ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - .. literalinclude:: ../samples/bgpvpn-sample01.py +.. literalinclude:: ../samples/bgpvpn-sample01.py

AltStyle によって変換されたページ (->オリジナル) /