Replace deprecated LOG.warn with LOG.warning

LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.

Change-Id: I3d4285ab4f42a5cba61d8f54f379e70891b32e1e
Closes-Bug:#1508442
This commit is contained in:
Swapnil Kulkarni (coolsvap) 2016-03-11 12:13:58 +05:30
parent e837656043
commit f49d3e3a90
3 changed files with 13 additions and 11 deletions

View File

@ -188,7 +188,7 @@ def initialize_for_swift(host, admin_token, ssl=None, public=None):
:param public: ip/hostname to use as the public endpoint, if the default
is not suitable
"""
LOG.warn('This function is deprecated.')
LOG.warning('This function is deprecated.')
keystone = _create_admin_client_v2(host, admin_token, public)
@ -328,8 +328,8 @@ def setup_endpoints(endpoints, public_host=None, region=None, client=None,
}
if not client:
LOG.warn('Creating client inline is deprecated, please pass '
'the client as parameter.')
LOG.warning('Creating client inline is deprecated, please pass '
'the client as parameter.')
client = clients.get_keystone_client(
os_username, os_password, os_tenant_name, os_auth_url)

View File

@ -23,12 +23,14 @@ LOG = logging.getLogger(__name__)
def initialize_neutron(network_desc, neutron_client=None,
keystone_client=None):
if not neutron_client:
LOG.warn('Creating neutron client inline is deprecated, please pass '
'the client as parameter.')
LOG.warning(
'Creating neutron client inline is deprecated, please pass '
'the client as parameter.')
neutron_client = clients.get_neutron_client()
if not keystone_client:
LOG.warn('Creating keystone client inline is deprecated, please pass '
'the client as parameter.')
LOG.warning(
'Creating keystone client inline is deprecated, please pass '
'the client as parameter.')
keystone_client = clients.get_keystone_client()
admin_tenant = _get_admin_tenant_id(keystone_client)

View File

@ -363,16 +363,16 @@ def register_all_nodes(service_host, nodes_list, client=None, remove=False,
kernel_name=None, ramdisk_name=None):
LOG.debug('Registering all nodes.')
if client is None:
LOG.warn('Creating ironic client inline is deprecated, please '
'pass the client as parameter.')
LOG.warning('Creating ironic client inline is deprecated, please '
'pass the client as parameter.')
client = clients.get_ironic_client()
register_func = _update_or_register_ironic_node
node_map = _populate_node_mapping(client)
glance_ids = {'kernel': None, 'ramdisk': None}
if kernel_name and ramdisk_name:
if glance_client is None:
LOG.warn('Creating glance client inline is deprecated, please '
'pass the client as a parameter.')
LOG.warning('Creating glance client inline is deprecated, please '
'pass the client as a parameter.')
client = clients.get_glance_client()
glance_ids = glance.create_or_find_kernel_and_ramdisk(
glance_client, kernel_name, ramdisk_name)