diff options
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. |