Fix a few pep8 errors in db.py
Change-Id: Ib29875453e90869226b01f96fb0f2b942333dff9
This commit is contained in:
parent
7b1999f5c5
commit
f47209e697
@ -66,7 +66,7 @@ def delete_network_bindings(session, network_id):
|
|||||||
def add_network_binding(session, network_id, binding_type, phy_uuid, vlan_id):
|
def add_network_binding(session, network_id, binding_type, phy_uuid, vlan_id):
|
||||||
with session.begin(subtransactions=True):
|
with session.begin(subtransactions=True):
|
||||||
binding = nsx_models.TzNetworkBinding(network_id, binding_type,
|
binding = nsx_models.TzNetworkBinding(network_id, binding_type,
|
||||||
phy_uuid, vlan_id)
|
phy_uuid, vlan_id)
|
||||||
session.add(binding)
|
session.add(binding)
|
||||||
return binding
|
return binding
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ def add_qos_policy_profile_mapping(session, qos_policy_id, switch_profile_id):
|
|||||||
def get_switch_profile_by_qos_policy(session, qos_policy_id):
|
def get_switch_profile_by_qos_policy(session, qos_policy_id):
|
||||||
try:
|
try:
|
||||||
entry = (session.query(nsx_models.QosPolicySwitchProfile).
|
entry = (session.query(nsx_models.QosPolicySwitchProfile).
|
||||||
filter_by(qos_policy_id=qos_policy_id).one())
|
filter_by(qos_policy_id=qos_policy_id).one())
|
||||||
return entry.switch_profile_id
|
return entry.switch_profile_id
|
||||||
except exc.NoResultFound:
|
except exc.NoResultFound:
|
||||||
raise nsx_exc.NsxQosPolicyMappingNotFound(policy=qos_policy_id)
|
raise nsx_exc.NsxQosPolicyMappingNotFound(policy=qos_policy_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user