openstack-manuals/doc/contributor-guide/source/rst-conv/profiling.rst
Pranav Salunke 31416cf33e Document new rst syntax for parser.
Updates rst syntax changes for the installation guides in specific but
could potentially also be followed by other guides providing BASH like
code.

- Documents parser related syntax changes.
- Updates current documentation for profiling (only blocks) and source
  code (code-blocks).

Change-Id: I831b79f01ea9b5c8fe9f7861887d2c14a9e213bc
2016-10-29 22:44:16 +02:00

1.7 KiB

Profiling (conditional content)

Installation Tutorials and Guides has content that depends upon the operating systems.

Use the only directive to specify the content that is operating-system specific. Define one or several tags depending on the operating system the content belongs to. Make sure to close the only tag with endonly.

The valid tags for the only directive are:

  • ubuntu for Ubuntu
  • debian for Debian
  • rdo for Red Hat Enterprise Linux and CentOS
  • obs for openSUSE and SUSE Linux Enterprise

Note

The endonly tag allows the parser to identify the distro-specific blocks. For more information, refer to the rst2bash section. These changes are mandatory only for the installation guides.

Input

Install the NTP service
-----------------------

.. only:: ubuntu or debian

   .. code-block:: console

      # apt-get install chrony

   .. end

.. endonly

.. only:: rdo

   .. code-block:: console

      # yum install chrony

   .. end

.. endonly

.. only:: obs

   On openSUSE:

   .. code-block:: console

      # zypper addrepo http://download.opensuse.org/repositories/network:time/openSUSE_13.2/network:time.repo
      ...

   .. end

   On SLES:

   .. code-block:: console

      # zypper addrepo http://download.opensuse.org/repositories/network:time/SLE_12/network:time.repo
      ...

   .. end

.. endonly

For more details refer to Including content based on tags.