Add version number to the documentation footer

Currently, nova-dpm documentation does not have the version number
in the footer.  This patch set adds the version information to the
``doc/source/conf.py``.

Closes-Bug: #1662519
Change-Id: I00de3cadda730fb78303579142d82d1ed10c01fa
This commit is contained in:
Tin Lam 2017-02-07 09:59:49 -06:00
parent eb2bc80389
commit b35d7bd059
2 changed files with 22 additions and 0 deletions

View File

@ -51,6 +51,13 @@ master_doc = 'index'
project = u'nova-dpm'
copyright = u'2016, OpenStack Foundation'
# Version information
import nova_dpm.version
# The short X.Y version.
version = nova_dpm.version.version_info.version_string()
# The full version, including alpha/beta/rc tags.
release = nova_dpm.version.version_info.release_string()
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True

15
nova_dpm/version.py Normal file
View File

@ -0,0 +1,15 @@
# 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.
from pbr import version
version_info = version.VersionInfo('nova-dpm')