~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/version.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2013-02-22 09:27:29 UTC
  • mfrom: (1.1.68)
  • Revision ID: package-import@ubuntu.com-20130222092729-nn3gt8rf97uvts77
Tags: 2013.1.g3-0ubuntu1
[ Chuck Short ]
* New usptream release. 
* debian/patches/debian/patches/fix-ubuntu-tests.patch: Refreshed.
* debian/nova-baremetal.logrotate: Fix logfile path.
* debian/control, debian/nova-spiceproxy.{install, logrotate, upstart}:
  Add spice html5 proxy support.
* debian/nova-novncproxy.upstart: Start on runlevel [2345]
* debian/rules: Call testr directly since run_tests.sh -N gives weird return
  value when tests pass.
* debian/pyddist-overrides: Add websockify.
* debian/nova-common.postinst: Removed config file conversion, since
  the option is no longer available. (LP: #1110567)
* debian/control: Add python-pyasn1 as a dependency.
* debian/control: Add python-oslo-config as a dependency.
* debian/control: Suggest sysfsutils, sg3-utils, multipath-tools for fibre
  channel support.

[ Adam Gandelman ]
* debian/control: Fix typo (websocikfy -> websockify).

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#    License for the specific language governing permissions and limitations
15
15
#    under the License.
16
16
 
 
17
from nova.openstack.common import version as common_version
 
18
 
17
19
NOVA_VENDOR = "OpenStack Foundation"
18
20
NOVA_PRODUCT = "OpenStack Nova"
19
21
NOVA_PACKAGE = None  # OS distro package version suffix
20
 
NOVA_VERSION = ['2013', '1', None]
21
 
YEAR, COUNT, REVISION = NOVA_VERSION
22
 
FINAL = False   # This becomes true at Release Candidate time
23
22
 
24
23
loaded = False
 
24
version_info = common_version.VersionInfo('nova')
 
25
version_string = version_info.version_string
25
26
 
26
27
 
27
28
def _load_config():
30
31
    # this module
31
32
    import ConfigParser
32
33
 
33
 
    from nova.openstack.common import cfg
 
34
    from oslo.config import cfg
 
35
 
34
36
    from nova.openstack.common import log as logging
35
37
 
36
38
    global loaded, NOVA_VENDOR, NOVA_PRODUCT, NOVA_PACKAGE
81
83
    return NOVA_PACKAGE
82
84
 
83
85
 
84
 
def canonical_version_string():
85
 
    return '.'.join(filter(None, NOVA_VERSION))
86
 
 
87
 
 
88
 
def version_string():
89
 
    if FINAL:
90
 
        return canonical_version_string()
91
 
    else:
92
 
        return '%s-dev' % (canonical_version_string(),)
93
 
 
94
 
 
95
86
def version_string_with_package():
96
87
    if package_string() is None:
97
 
        return canonical_version_string()
 
88
        return version_info.version_string()
98
89
    else:
99
 
        return "%s-%s" % (canonical_version_string(), package_string())
 
90
        return "%s-%s" % (version_info.version_string(), package_string())