summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChuck Short <zulcss@ubuntu.com>2011-06-06 15:32:48 -0400
committerChuck Short <zulcss@ubuntu.com>2011-06-06 15:32:48 -0400
commite52069015aa3ed0ba130f529ebfb93d53ea6053c (patch)
treedc7fb4472db7cb9a02a743df0bab5eb8f5443dcb
parent1eb789625d15b319f5bc070041a42c03e6c6b08c (diff)
downloadnova-e52069015aa3ed0ba130f529ebfb93d53ea6053c.tar.gz
nova-e52069015aa3ed0ba130f529ebfb93d53ea6053c.tar.xz
nova-e52069015aa3ed0ba130f529ebfb93d53ea6053c.zip
Remove ipy from nova-manage and use netaddr
-rwxr-xr-xbin/nova-manage6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index b0cd343f5..5ac0b8a0c 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -56,11 +56,11 @@
import gettext
import glob
import json
+import netaddr
import os
import sys
import time
-import IPy
# If ../nova/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
@@ -513,7 +513,7 @@ class FloatingIpCommands(object):
def create(self, host, range):
"""Creates floating ips for host by range
arguments: host ip_range"""
- for address in IPy.IP(range):
+ for address in netaddr.IPRange(range):
db.floating_ip_create(context.get_admin_context(),
{'address': str(address),
'host': host})
@@ -521,7 +521,7 @@ class FloatingIpCommands(object):
def delete(self, ip_range):
"""Deletes floating ips by range
arguments: range"""
- for address in IPy.IP(ip_range):
+ for address in netaddr.IPRange(ip_range):
db.floating_ip_destroy(context.get_admin_context(),
str(address))