diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-06-18 16:45:03 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-06-18 16:45:03 +0000 |
commit | 60ea96b288d9d8f29d772dce3763fda466c73040 (patch) | |
tree | 20756824bd6aed2dcf68f9ff91427be9b218ee65 /nova/utils.py | |
parent | fb9abcc83935b01746aeba0db4c431fe72b921fc (diff) | |
parent | 31336b35b4604f70150d0073d77dbf63b9bf7598 (diff) | |
download | nova-60ea96b288d9d8f29d772dce3763fda466c73040.tar.gz nova-60ea96b288d9d8f29d772dce3763fda466c73040.tar.xz nova-60ea96b288d9d8f29d772dce3763fda466c73040.zip |
Merge "Add CPU arch filter scheduler support"
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py index ddc998524..8bd71359f 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -1321,6 +1321,15 @@ def strcmp_const_time(s1, s2): return result == 0 +def sys_platform_translate(arch): + """Translate cpu architecture into supported platforms.""" + if (arch[0] == 'i' and arch[1].isdigit() and arch[2:4] == '86'): + arch = 'i686' + elif arch.startswith('arm'): + arch = 'arm' + return arch + + class UndoManager(object): """Provides a mechanism to facilitate rolling back a series of actions when an exception is raised. |