diff options
| author | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-10-04 14:26:55 -0400 |
|---|---|---|
| committer | Michael Gundlach <michael.gundlach@rackspace.com> | 2010-10-04 14:26:55 -0400 |
| commit | 2a8e4a3e818f1d279a886e2e5f5ae49f3de26a4d (patch) | |
| tree | 931b30904f3058da928e9d879b5e3d7899c78667 /nova | |
| parent | 06cdef056b508e15869623da28ad18cc817e6848 (diff) | |
Revert r312
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/utils.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nova/utils.py b/nova/utils.py index 86ff3d22e..5f64b13c4 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -126,9 +126,8 @@ def runthis(prompt, cmd, check_exit_code = True): def generate_uid(topic, size=8): - #TODO(gundlach): we want internal ids to just be ints now. i just dropped - #off a topic prefix, so what have I broken? - return random.randint(0, 2**64-1) + return '%s-%s' % (topic, ''.join([random.choice('01234567890abcdefghijklmnopqrstuvwxyz') for x in xrange(size)])) + def generate_mac(): |
