summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-10-25 23:08:57 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-10-25 23:08:57 -0700
commit23ab6ceedd7d552faf2b97c44aadeccc45c9c333 (patch)
treeea1e257180cb9abe31f993e4807150d9b6c80388 /nova/utils.py
parent627a968e79ed21d970225e5ece332d9100abe022 (diff)
parentf0d79d7d602a31fff03d8d934203128a2cd8940d (diff)
downloadnova-23ab6ceedd7d552faf2b97c44aadeccc45c9c333.tar.gz
nova-23ab6ceedd7d552faf2b97c44aadeccc45c9c333.tar.xz
nova-23ab6ceedd7d552faf2b97c44aadeccc45c9c333.zip
merged gundlach's excision
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/nova/utils.py b/nova/utils.py
index e58302c11..2c53b027e 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -132,13 +132,9 @@ def runthis(prompt, cmd, check_exit_code=True):
def generate_uid(topic, size=8):
- if topic == "i":
- # Instances have integer internal ids.
- return random.randint(0, 2 ** 32 - 1)
- else:
- characters = '01234567890abcdefghijklmnopqrstuvwxyz'
- choices = [random.choice(characters) for x in xrange(size)]
- return '%s-%s' % (topic, ''.join(choices))
+ characters = '01234567890abcdefghijklmnopqrstuvwxyz'
+ choices = [random.choice(characters) for x in xrange(size)]
+ return '%s-%s' % (topic, ''.join(choices))
def generate_mac():