Remove deprecation warnings
Some deprecation warnings[1] can be observed when running py27 check. Since it is Ocata, they should be removed, in case other modules remove the deprecated object/attribute. [1] http://paste.openstack.org/show/580886/ Change-Id: I1762612829b94040554e41259cda7087b7264a84
This commit is contained in:
parent
b813507f61
commit
d75f446ab0
|
@ -118,8 +118,7 @@ def _get_lock_id_by_resource_type(type, *args, **kwargs):
|
|||
retry_interval=LOCK_INIT_RETRY_INTERVAL,
|
||||
inc_retry_interval=True,
|
||||
max_retry_interval=LOCK_MAX_RETRY_INTERVAL,
|
||||
retry_on_deadlock=True,
|
||||
retry_on_request=True)
|
||||
retry_on_deadlock=True)
|
||||
def _acquire_lock(oid):
|
||||
# generate temporary session id for this API context
|
||||
sid = _generate_session_id()
|
||||
|
@ -140,8 +139,7 @@ def _acquire_lock(oid):
|
|||
retry_interval=LOCK_INIT_RETRY_INTERVAL,
|
||||
inc_retry_interval=True,
|
||||
max_retry_interval=LOCK_MAX_RETRY_INTERVAL,
|
||||
retry_on_deadlock=True,
|
||||
retry_on_request=True)
|
||||
retry_on_deadlock=True)
|
||||
def _release_lock(oid, sid):
|
||||
# NOTE(nick-ma-z): we disallow subtransactions because the
|
||||
# retry logic will bust any parent transactions
|
||||
|
@ -162,8 +160,7 @@ def _generate_session_id():
|
|||
retry_interval=LOCK_INIT_RETRY_INTERVAL,
|
||||
inc_retry_interval=True,
|
||||
max_retry_interval=LOCK_MAX_RETRY_INTERVAL,
|
||||
retry_on_deadlock=True,
|
||||
retry_on_request=True)
|
||||
retry_on_deadlock=True)
|
||||
def _test_and_create_object(id):
|
||||
try:
|
||||
session = db_api.get_session()
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron.db import model_base
|
||||
from neutron_lib.db import model_base
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue