diff options
Diffstat (limited to 'nova/api/openstack/common.py')
-rw-r--r-- | nova/api/openstack/common.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py index 74ac21024..d6679de01 100644 --- a/nova/api/openstack/common.py +++ b/nova/api/openstack/common.py @@ -74,3 +74,7 @@ def get_image_id_from_image_hash(image_service, context, image_hash): if abs(hash(image_id)) == int(image_hash): return image_id raise exception.NotFound(image_hash) + + +def get_api_version(req): + return req.environ.get('api.version') |