def _get_subnet_data(self, subnet_id, get_mapping=True): subnet = None subl2dom = None try: if get_mapping: subl2dom_db = nuagedb.get_subnet_l2dom_with_lock( self.context.session, subnet_id) subl2dom = nuagedb.make_subnl2dom_dict(subl2dom_db) subnet_db = nuagedb.get_subnet_with_lock(self.context.session, subnet_id) subnet = self._make_subnet_dict(subnet_db) except db_exc.NoResultFound: LOG.warning(_LW("Subnet %s not found in neutron for sync"), subnet_id) return subnet, subl2dom