Refactored version attributes
- Promoted the api version status from 'alpha' to 'beta' - Adopted openstack release names in lieu of arbitrary version #'s Change-Id: I23d58fa7417886cceb09d740efa99bc276b435d8
This commit is contained in:
parent
b25c6803c6
commit
aa860e59e6
|
@ -12,17 +12,24 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
'''Main module for Keystone service. This installs the gettext function
|
||||
for all sub modules and packages.'''
|
||||
|
||||
import gettext
|
||||
|
||||
__version__ = '0.9'
|
||||
|
||||
API_VERSION = "2.0"
|
||||
API_VERSION_STATUS = "beta"
|
||||
API_VERSION_DATE = "2011-11-19T00:00:00Z"
|
||||
|
||||
RELEASE_VERSION = "essex"
|
||||
RELEASE_VERSION_FINAL = False # becomes true at Release Candidate time
|
||||
|
||||
|
||||
def version():
|
||||
if RELEASE_VERSION_FINAL:
|
||||
return RELEASE_VERSION
|
||||
else:
|
||||
return '%s-dev' % (RELEASE_VERSION)
|
||||
|
||||
|
||||
# This installs the _(...) function as a built-in so all other modules
|
||||
# don't need to.
|
||||
gettext.install('keystone')
|
||||
|
||||
|
||||
def version():
|
||||
return __version__
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
VERSION_STATUS = "ALPHA"
|
||||
VERSION_DATE = "2011-04-23T00:00:00Z"
|
||||
"""TODO: This file should be dissolved"""
|
||||
|
||||
from keystone.logic.service import IdentityService
|
||||
SERVICE = IdentityService()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"version" : {
|
||||
"id" : "v2.0",
|
||||
"status" : "{{VERSION_STATUS}}",
|
||||
"updated" : "{{VERSION_DATE}}",
|
||||
"id" : "v{{API_VERSION}}",
|
||||
"status" : "{{API_VERSION_STATUS}}",
|
||||
"updated" : "{{API_VERSION_DATE}}",
|
||||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<version xmlns="http://docs.openstack.org/common/api/v2.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
id="v2.0" status="{{VERSION_STATUS}}" updated="{{VERSION_DATE}}">
|
||||
id="v{{API_VERSION}}" status="{{API_VERSION_STATUS}}" updated="{{API_VERSION_DATE}}">
|
||||
|
||||
<media-types>
|
||||
<media-type base="application/xml"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"version" : {
|
||||
"id" : "v2.0",
|
||||
"status" : "{{VERSION_STATUS}}",
|
||||
"updated" : "{{VERSION_DATE}}",
|
||||
"id" : "v{{API_VERSION}}",
|
||||
"status" : "{{API_VERSION_STATUS}}",
|
||||
"updated" : "{{API_VERSION_DATE}}",
|
||||
"links": [
|
||||
{
|
||||
"rel" : "self",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<version xmlns="http://docs.openstack.org/common/api/v2.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
id="v2.0" status="{{VERSION_STATUS}}" updated="{{VERSION_DATE}}">
|
||||
id="v{{API_VERSION}}" status="{{API_VERSION_STATUS}}" updated="{{API_VERSION_DATE}}">
|
||||
|
||||
<media-types>
|
||||
<media-type base="application/xml"
|
||||
|
|
|
@ -8,9 +8,9 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(__file__),
|
|||
os.pardir,
|
||||
os.pardir))
|
||||
|
||||
import keystone
|
||||
from keystone import utils
|
||||
from keystone.common import template, wsgi
|
||||
import keystone.config as config
|
||||
|
||||
|
||||
class VersionController(wsgi.Controller):
|
||||
|
@ -38,7 +38,8 @@ class VersionController(wsgi.Controller):
|
|||
resp.unicode_body = template.template(resp_file,
|
||||
HOST=hostname,
|
||||
PORT=port,
|
||||
VERSION_STATUS=config.VERSION_STATUS,
|
||||
VERSION_DATE=config.VERSION_DATE)
|
||||
API_VERSION=keystone.API_VERSION,
|
||||
API_VERSION_STATUS=keystone.API_VERSION_STATUS,
|
||||
API_VERSION_DATE=keystone.API_VERSION_DATE)
|
||||
|
||||
return resp
|
||||
|
|
5
setup.py
5
setup.py
|
@ -15,8 +15,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
version = '1.0'
|
||||
import keystone
|
||||
|
||||
cmdclass = {}
|
||||
|
||||
|
@ -39,7 +38,7 @@ except:
|
|||
|
||||
setup(
|
||||
name='keystone',
|
||||
version=version,
|
||||
version=keystone.version(),
|
||||
description="Authentication service - proposed for OpenStack",
|
||||
license='Apache License (2.0)',
|
||||
classifiers=["Programming Language :: Python"],
|
||||
|
|
Loading…
Reference in New Issue