feedback from jk0's review, including removing a lot of spaces from docstrings
This commit is contained in:
@@ -779,8 +779,7 @@ class NetworkCommands(object):
|
||||
|
||||
def list(self):
|
||||
"""List all created networks"""
|
||||
_fmt = "%-5s\t%-18s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s"\
|
||||
"\t%-15s\t%-15s"
|
||||
_fmt = "%-5s\t%-18s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s\t%-15s"
|
||||
print _fmt % (_('id'),
|
||||
_('IPv4'),
|
||||
_('IPv6'),
|
||||
|
||||
@@ -946,7 +946,7 @@ def virtual_interface_get_by_address(context, address):
|
||||
def virtual_interface_get_by_uuid(context, vif_uuid):
|
||||
"""Gets a virtual interface from the table.
|
||||
|
||||
:param vif_uuid: = the uuid of the interface you're looking to get
|
||||
:param vif_uuid: the uuid of the interface you're looking to get
|
||||
"""
|
||||
session = get_session()
|
||||
vif_ref = session.query(models.VirtualInterface).\
|
||||
|
||||
@@ -547,7 +547,7 @@ class NetworkManager(manager.SchedulerDependentManager):
|
||||
'network_id': network_id,
|
||||
'uuid': str(utils.gen_uuid())}
|
||||
# try FLAG times to create a vif record with a unique mac_address
|
||||
for i in xrange(FLAGS.create_unique_mac_address_attempts):
|
||||
for _ in xrange(FLAGS.create_unique_mac_address_attempts):
|
||||
try:
|
||||
return self.db.virtual_interface_create(context, vif)
|
||||
except exception.VirtualInterfaceCreateException:
|
||||
|
||||
@@ -142,7 +142,6 @@ class Client(object):
|
||||
:param headers: mapping of key/value pairs to add as headers
|
||||
:param params: dictionary of key/value pairs to add to append
|
||||
to action
|
||||
|
||||
"""
|
||||
|
||||
# Ensure we have a tenant id
|
||||
|
||||
@@ -24,7 +24,7 @@ from nova.network import manager
|
||||
from nova.network.quantum import quantum_connection
|
||||
from nova import utils
|
||||
|
||||
LOG = logging.getLogger("quantum_manager")
|
||||
LOG = logging.getLogger("nova.network.quantum.manager")
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ from nova import log as logging
|
||||
from nova.network.quantum import melange_connection
|
||||
|
||||
|
||||
LOG = logging.getLogger("quantum_melange_ipam")
|
||||
LOG = logging.getLogger("nova.network.quantum.melange_ipam_lib")
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
|
||||
@@ -107,7 +107,8 @@ class QuantumMelangeIPAMLib(object):
|
||||
def get_project_and_global_net_ids(self, context, project_id):
|
||||
"""Fetches all networks associated with this project, or
|
||||
that are "global" (i.e., have no project set).
|
||||
Returns list sorted by 'priority'.
|
||||
Returns list sorted by 'priority' (lowest integer value
|
||||
is highest priority).
|
||||
"""
|
||||
if project_id is None:
|
||||
raise Exception(_("get_project_and_global_net_ids must be called"
|
||||
|
||||
@@ -27,7 +27,7 @@ from nova.network.quantum import melange_connection as melange
|
||||
from nova import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger("quantum_nova_ipam_lib")
|
||||
LOG = logging.getLogger("nova.network.quantum.nova_ipam_lib")
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ from nova.network.quantum import client as quantum_client
|
||||
from nova import utils
|
||||
|
||||
|
||||
LOG = logging.getLogger("nova.network.quantum")
|
||||
LOG = logging.getLogger("nova.network.quantum.quantum_connection")
|
||||
FLAGS = flags.FLAGS
|
||||
|
||||
flags.DEFINE_string('quantum_connection_host',
|
||||
|
||||
Reference in New Issue
Block a user