removing pep8 errors
This commit is contained in:
parent
e92064d745
commit
67ee9c1fd4
|
@ -243,9 +243,9 @@ class FakePlugin(object):
|
|||
FakePlugin._net_counter = 0
|
||||
|
||||
def _get_network(self, tenant_id, network_id):
|
||||
try:
|
||||
try:
|
||||
network = db.network_get(network_id)
|
||||
except:
|
||||
except:
|
||||
raise exc.NetworkNotFound(net_id=network_id)
|
||||
return network
|
||||
|
||||
|
@ -331,7 +331,7 @@ class FakePlugin(object):
|
|||
Virtual Network.
|
||||
"""
|
||||
LOG.debug("FakePlugin.rename_network() called")
|
||||
try:
|
||||
try:
|
||||
db.network_rename(net_id, tenant_id, new_name)
|
||||
except:
|
||||
raise exc.NetworkNotFound(net_id=net_id)
|
||||
|
|
|
@ -76,7 +76,7 @@ class Server(object):
|
|||
if kwargs:
|
||||
conf_override.update(**kwargs)
|
||||
|
||||
# Create temporary configuration file for Quantum Unit tests.
|
||||
# Create temporary configuration file for Quantum Unit tests.
|
||||
|
||||
conf_file = tempfile.NamedTemporaryFile()
|
||||
conf_file.write(self.conf_base % conf_override)
|
||||
|
@ -188,7 +188,6 @@ class FunctionalTest(unittest.TestCase):
|
|||
self.quantum_server = QuantumAPIServer(self.test_dir,
|
||||
self.test_port)
|
||||
|
||||
|
||||
def tearDown(self):
|
||||
self.cleanup()
|
||||
# We destroy the test data store between each test case,
|
||||
|
@ -227,7 +226,6 @@ class FunctionalTest(unittest.TestCase):
|
|||
exitcode, out, err = execute(cmd)
|
||||
self.assertEqual(0, exitcode)
|
||||
|
||||
|
||||
def start_servers(self, **kwargs):
|
||||
"""
|
||||
Starts the Quantum API server on an unused port.
|
||||
|
@ -242,7 +240,7 @@ class FunctionalTest(unittest.TestCase):
|
|||
"Failed to spin up the Quantum server. "
|
||||
"Got: %s" % err)
|
||||
#self.assertTrue("Starting quantum with" in out)
|
||||
#TODO: replace with appropriate assert
|
||||
#TODO: replace with appropriate assert
|
||||
|
||||
self.wait_for_servers()
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ def new_network_request(tenant_id, network_name, format='xml'):
|
|||
body = Serializer().serialize(data, content_type)
|
||||
return create_request(path, body, content_type, method)
|
||||
|
||||
|
||||
def update_network_request(tenant_id, network_id, network_name, format='xml'):
|
||||
method = 'PUT'
|
||||
path = "/tenants/%(tenant_id)s/networks" \
|
||||
|
@ -44,6 +45,7 @@ def update_network_request(tenant_id, network_id, network_name, format='xml'):
|
|||
body = Serializer().serialize(data, content_type)
|
||||
return create_request(path, body, content_type, method)
|
||||
|
||||
|
||||
def network_delete_request(tenant_id, network_id, format='xml'):
|
||||
method = 'DELETE'
|
||||
path = "/tenants/%(tenant_id)s/networks/" \
|
||||
|
|
Loading…
Reference in New Issue