Browse Source

Replace deprecated LOG.warn with LOG.warning

LOG.warn is deprecated in Python 3 [1].
This change switches it to the non-deprecated LOG.warning

[1]https://docs.python.org/3/library/logging.html#logging.warning

Closes-Bug: #1508442
Change-Id: If57939c68f6bb185d7e19e3fbc2a26fca3ecb5d7
changes/78/326778/2
fumihiko kakuma 3 years ago
parent
commit
39c4649595
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      networking_ofagent/plugins/ofagent/agent/ofa_neutron_agent.py

+ 5
- 5
networking_ofagent/plugins/ofagent/agent/ofa_neutron_agent.py View File

@@ -1,6 +1,6 @@
1
-# Copyright (C) 2014,2015 VA Linux Systems Japan K.K.
1
+# Copyright (C) 2014-2016 VA Linux Systems Japan K.K.
2 2
 # Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
3
-# Copyright (C) 2014,2015 Fumihiko Kakuma <kakuma at valinux co jp>
3
+# Copyright (C) 2014-2016 Fumihiko Kakuma <kakuma at valinux co jp>
4 4
 # All Rights Reserved.
5 5
 #
6 6
 # Based on openvswitch agent.
@@ -683,8 +683,8 @@ class OFANeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
683 683
             # for being treated. If that does not happen, it is a potential
684 684
             # error condition of which operators should be aware
685 685
             if not vif_port.ofport:
686
-                LOG.warn(_LW("VIF port: %s has no ofport configured, "
687
-                             "and might not be able to transmit"),
686
+                LOG.warning(_LW("VIF port: %s has no ofport configured, "
687
+                                "and might not be able to transmit"),
688 688
                          vif_port.port_name)
689 689
             if admin_state_up:
690 690
                 self.port_bound(vif_port, network_id, network_type,
@@ -802,7 +802,7 @@ class OFANeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
802 802
                         self.context, device, self.agent_id, cfg.CONF.host)
803 803
                 LOG.info(_LI("Configuration for device %s completed."), device)
804 804
             else:
805
-                LOG.warn(_LW("Device %s not defined on plugin"), device)
805
+                LOG.warning(_LW("Device %s not defined on plugin"), device)
806 806
                 if (port and port.ofport != -1):
807 807
                     self.port_dead(port)
808 808
         return resync

Loading…
Cancel
Save