Merge "fixed_ip_get_by_address read_deleted from context" into stable/essex
This commit is contained in:
commit
17a6cd91ef
1
.mailmap
1
.mailmap
|
@ -80,3 +80,4 @@
|
|||
<nsokolov@griddynamics.com> <nsokolov@griddynamics.net>
|
||||
<troy.toman@rackspace.com> <ttcl@mac.com>
|
||||
<zulcss@ubuntu.com> <chuck.short@canonical.com>
|
||||
<jhtran@att.com> <jtran@attinteractive.com>
|
||||
|
|
2
Authors
2
Authors
|
@ -101,7 +101,7 @@ John Dewey <john@dewey.ws>
|
|||
John Garbutt <john.garbutt@citrix.com>
|
||||
John Griffith <john.griffith@solidfire.com>
|
||||
John Kennedy <john.m.kennedy@intel.com>
|
||||
John Tran <jtran@attinteractive.com>
|
||||
John Tran <jhtran@att.com>
|
||||
Jonathan Bryce <jbryce@jbryce.com>
|
||||
Jordan Rinke <jordan@openstack.org>
|
||||
Joseph Suh <jsuh@isi.edu>
|
||||
|
|
|
@ -1047,7 +1047,7 @@ def fixed_ip_get_all(context, session=None):
|
|||
@require_context
|
||||
def fixed_ip_get_by_address(context, address, session=None):
|
||||
result = model_query(context, models.FixedIp, session=session,
|
||||
read_deleted="yes").\
|
||||
read_deleted=context.read_deleted).\
|
||||
filter_by(address=address).\
|
||||
first()
|
||||
if not result:
|
||||
|
|
|
@ -151,6 +151,8 @@ class DbApiTestCase(test.TestCase):
|
|||
db.network_delete_safe, ctxt, network['id'])
|
||||
db.fixed_ip_update(ctxt, address2, {'allocated': False})
|
||||
network = db.network_delete_safe(ctxt, network['id'])
|
||||
self.assertRaises(exception.FixedIpNotFoundForAddress,
|
||||
db.fixed_ip_get_by_address, ctxt, address1)
|
||||
ctxt = ctxt.elevated(read_deleted='yes')
|
||||
fixed_ip = db.fixed_ip_get_by_address(ctxt, address1)
|
||||
self.assertTrue(fixed_ip['deleted'])
|
||||
|
|
Loading…
Reference in New Issue