diff options
| author | Ilya Alekseyev <ilyaalekseyev@acm.org> | 2011-08-05 19:45:17 +0400 |
|---|---|---|
| committer | Ilya Alekseyev <ilyaalekseyev@acm.org> | 2011-08-05 19:45:17 +0400 |
| commit | a77f10ee052fdafeb9d52407695719397c52e68d (patch) | |
| tree | e89941e99aaa1da47c418e0afaaf1d1febb1385b | |
| parent | b068e1edd79a5382ef1237d0b47e60dc141bae35 (diff) | |
| download | nova-a77f10ee052fdafeb9d52407695719397c52e68d.tar.gz nova-a77f10ee052fdafeb9d52407695719397c52e68d.tar.xz nova-a77f10ee052fdafeb9d52407695719397c52e68d.zip | |
methods renamed
| -rwxr-xr-x | bin/nova-manage | 2 | ||||
| -rw-r--r-- | nova/tests/test_nova_manage.py | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index ba08f136b..6f71bc403 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -601,7 +601,7 @@ class FixedIpCommands(object): @args('--address', dest="address", metavar='<ip address>', help='IP address') - def waste(self, address): + def unreserve(self, address): """Mark fixed ip as free to use arguments: address""" self._set_reserved(address, False) diff --git a/nova/tests/test_nova_manage.py b/nova/tests/test_nova_manage.py index ca9ffa222..9c6563f14 100644 --- a/nova/tests/test_nova_manage.py +++ b/nova/tests/test_nova_manage.py @@ -16,6 +16,7 @@ # under the License. import os +import sys TOPDIR = os.path.normpath(os.path.join( os.path.dirname(os.path.abspath(__file__)), @@ -23,8 +24,10 @@ TOPDIR = os.path.normpath(os.path.join( os.pardir)) NOVA_MANAGE_PATH = os.path.join(TOPDIR, 'bin', 'nova-manage') +sys.dont_write_bytecode = True import imp -nova_manage = imp.load_source('nova_manage', NOVA_MANAGE_PATH) +nova_manage = imp.load_source('nova_manage.py', NOVA_MANAGE_PATH) +sys.dont_write_bytecode = False import netaddr from nova import context @@ -70,10 +73,10 @@ class FixedIpCommandsTestCase(test.TestCase): '10.0.0.100') self.assertEqual(address['reserved'], True) - def test_waste(self): + def test_unreserve(self): db.fixed_ip_update(context.get_admin_context(), '10.0.0.100', {'reserved': True}) - self.commands.waste('10.0.0.100') + self.commands.unreserve('10.0.0.100') address = db.fixed_ip_get_by_address(context.get_admin_context(), '10.0.0.100') self.assertEqual(address['reserved'], False) |
