Brocade: Add HTTP connection cleanup
Method for get device mapping opens connection to the switch but does not close the connection. Add finally block to close the session. Closes Bug: #1718762 Change-Id: Ic4c7fd66858039db3f9d09a0babd5601b25a95e3
This commit is contained in:
parent
68c668cfc8
commit
4dd33f7e50
@ -33,10 +33,11 @@ class BrcdFCSanLookupService(fc_service.FCSanLookupService):
|
|||||||
Version History:
|
Version History:
|
||||||
1.0.0 - Initial version
|
1.0.0 - Initial version
|
||||||
1.1 - Add support to use config option for switch southbound protocol
|
1.1 - Add support to use config option for switch southbound protocol
|
||||||
|
1.2 - Fix open sessions issue
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VERSION = "1.1"
|
VERSION = "1.2"
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
"""Initializing the client."""
|
"""Initializing the client."""
|
||||||
@ -125,6 +126,9 @@ class BrcdFCSanLookupService(fc_service.FCSanLookupService):
|
|||||||
) % {'fabric': fabric_ip, 'err': e}
|
) % {'fabric': fabric_ip, 'err': e}
|
||||||
LOG.error(msg)
|
LOG.error(msg)
|
||||||
raise exception.FCSanLookupServiceException(message=msg)
|
raise exception.FCSanLookupServiceException(message=msg)
|
||||||
|
finally:
|
||||||
|
if conn:
|
||||||
|
conn.cleanup()
|
||||||
|
|
||||||
LOG.debug("Lookup service:nsinfo-%s", nsinfo)
|
LOG.debug("Lookup service:nsinfo-%s", nsinfo)
|
||||||
LOG.debug("Lookup service:initiator list from "
|
LOG.debug("Lookup service:initiator list from "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user