diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-12-13 18:56:24 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2012-12-19 18:32:03 +0000 |
commit | ba9ee7eb22ca17553e2e768365220c9a9838ae1d (patch) | |
tree | cbade7e6d8ef034166e4f493d1193b9ca6d6b05f /nova/version.py | |
parent | cbf9d897384b22b45f253fa78c1dd08d13f6a2e8 (diff) | |
download | nova-ba9ee7eb22ca17553e2e768365220c9a9838ae1d.tar.gz nova-ba9ee7eb22ca17553e2e768365220c9a9838ae1d.tar.xz nova-ba9ee7eb22ca17553e2e768365220c9a9838ae1d.zip |
Define a product, vendor & package strings in version.py
To have one single place where all code in Nova can access
product, vendor & package strings, extend version.py to
expose a product_string(), vendor_string() and package_string()
methods. The product will default to "OpenStack Nova", the
vendor to "OpenStack" and the package to None. The latter is
intended solely for OS distro vendors to include their package
version suffix (eg the "Release:" field from RPM or perhaps
a VCS tag)
Following changes will make this data configurable via a
plain text file, and then update various parts of Nova to
make use of the data.
Change-Id: I3eb14d11f8949ce909a8f529851913d3dccf0e8c
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'nova/version.py')
-rw-r--r-- | nova/version.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nova/version.py b/nova/version.py index ad7670849..eb05058f3 100644 --- a/nova/version.py +++ b/nova/version.py @@ -14,11 +14,26 @@ # License for the specific language governing permissions and limitations # under the License. +NOVA_VENDOR = "OpenStack Foundation" +NOVA_PRODUCT = "OpenStack Nova" +NOVA_PACKAGE = None # OS distro package version suffix NOVA_VERSION = ['2013', '1', None] YEAR, COUNT, REVISION = NOVA_VERSION FINAL = False # This becomes true at Release Candidate time +def vendor_string(): + return NOVA_VENDOR + + +def product_string(): + return NOVA_PRODUCT + + +def package_string(): + return NOVA_PACKAGE + + def canonical_version_string(): return '.'.join(filter(None, NOVA_VERSION)) |