def is_vlanid_used(vlan_id):
 LOG.debug(_('is_vlanid_used() called'))
 session = db.get_session()
 try:
  vlanid = session.query(network_models_v2.VlanID).filter_by(vlan_id=vlan_id).one()
  return vlanid['vlan_used']
 except exc.NoResultFound:
  raise c_exc.VlanIDNotFound(vlan_id=vlan_id)

def is_vlanid_used ( vlan_id ) : LOG . debug ( _ ( 'is_vlanid_used() called' ) ) session = db . get_session ( ) try : vlanid = session . query ( network_models_v2 . VlanID ) . filter_by ( vlan_id = vlan_id ) . one ( ) return vlanid [ 'vlan_used' ] except exc . NoResultFound : raise c_exc . VlanIDNotFound ( vlan_id = vlan_id )
checks if a vlanid is in use .