This routine calls the Tenant Edge routine if FW Type is TE.
977750
def _create_fw_fab_dev(self, tenant_id, drvr_name, fw_dict):
        
        if fw_dict.get('fw_type') == fw_constants.FW_TENANT_EDGE:
            self._create_fw_fab_dev_te(tenant_id, drvr_name, fw_dict)
835010
def create_fw(self, proj_name, pol_id, fw_id, fw_name, fw_type, rtr_id):
        
        self.tenant_name = proj_name
        self.fw_id = fw_id
        self.fw_name = fw_name
        self.fw_created = True
        self.active_pol_id = pol_id
        self.fw_type = fw_type
        self.router_id = rtr_id
397395
public void eInit(EObject context, Procedure1<? super XExpression> setter, IJvmTypeProvider typeContext) {
		this.builder.eInit(context, setter, typeContext);
	}
685099
def _any_would_run(func, filenames, *args):
    """"""
    if os.environ.get("_POLYSQUARE_GENERIC_FILE_LINTER_NO_STAMPING", None):
        return True

    for filename in filenames:
        # suppress(E204)
        stamp_args, stamp_kwargs = _run_lint_on_file_stamped_args(filename,
                                                                  *args,
                                                                  **{})
        dependency = jobstamp.out_of_date(func,
                                          *stamp_args,
                                          **stamp_kwargs)

        if dependency:
            return True

    return False
1159781
function isIIFE(node) {
            return node.type === "FunctionExpression" && node.parent && node.parent.type === "CallExpression" && node.parent.callee === node;
        }
20029
def _walk_for_type(self, check_type):
        """"""
        for class_name, properties in sorted(self.resources.items()):
            for key, value in sorted(properties.items()):
                if self._check_type(check_type, value):
                    return True
        for class_name, properties in sorted(self.properties.items()):
            for key, value in sorted(properties.items()):
                if self._check_type(check_type, value):
                    return True

        return False
1242969
private Iterator<Edge> logicalPredecessorEdgeIterator(BasicBlock block) {
        return isForwards ? cfg.incomingEdgeIterator(block) : cfg.outgoingEdgeIterator(block);
    }
1128761
public function hasType(TenantParticipantContract $tenant, $type)
    {
        if ( null === $class = $this->getMapping($type) ) {
            throw new \InvalidArgumentException(
                sprintf('Type "%s" is not mapped to the TenantParticipant class', $type)
            );
        }

        if ( $tenant instanceof $class ) {
            return true;
        }

        return false;
    }
819782
private void checkTenantApps(Tenant tenant) {
        m_logger.info("   Tenant: {}", tenant.getName());
        try {
            Iterator<DRow> rowIter =
                DBService.instance(tenant).getAllRows(SchemaService.APPS_STORE_NAME).iterator();
            if (!rowIter.hasNext()) {
                m_logger.info("      <no applications>");
            }
            while (rowIter.hasNext()) {
                DRow row = rowIter.next();
                ApplicationDefinition appDef = loadAppRow(tenant, getColumnMap(row.getAllColumns(1024).iterator()));
                if (appDef != null) {
                    String appName = appDef.getAppName();
                    String ssName = getStorageServiceOption(appDef);
                    m_logger.info("      Application '{}': StorageService={}; keyspace={}",
                                  new Object[]{appName, ssName, tenant.getName()});
                    if (DoradusServer.instance().findStorageService(ssName) == null) {
                        m_logger.warn("      >>>Application '{}' uses storage service '{}' which has not been " +
                                        "initialized; application will not be accessible via this server",
                                        appDef.getAppName(), ssName);
                    }
                }
            }
        } catch (Exception e) {
            m_logger.warn("Could not check tenant '" + tenant.getName() +
                          "'. Applications may be unavailable.", e);
        }
    }
1041789
@Override
    public/* final */Fact getFactOnEdge(Edge edge) throws DataflowAnalysisException {
        BasicBlock block = isForwards() ? edge.getSource() : edge.getTarget();

        Fact predFact = createFact();
        copy(getResultFact(block), predFact);

        edgeTransfer(edge, predFact);

        Fact result = createFact();
        makeFactTop(result);
        if (this instanceof UnconditionalValueDerefAnalysis) {
            ((UnconditionalValueDerefAnalysis)this).meetInto((UnconditionalValueDerefSet)predFact,
                    edge, (UnconditionalValueDerefSet)result, true);
        } else {
            meetInto(predFact, edge, result);
        }


        return result;
    }
602810
def _call(self, x):
        """"""
        if self.impl == 'pywt':
            coeffs = pywt.wavedecn(
                x, wavelet=self.pywt_wavelet, level=self.nlevels,
                mode=self.pywt_pad_mode, axes=self.axes)
            return pywt.ravel_coeffs(coeffs, axes=self.axes)[0]
        else:
            raise RuntimeError("bad `impl` '{}'".format(self.impl))
386412
def is_subnet_source_fw(cls, tenant_id, subnet):
        
        cfg = config.CiscoDFAConfig().cfg
        subnet = subnet.split('/')[0]
        in_sub_dict = cls.get_in_ip_addr(tenant_id)
        if not in_sub_dict:
            return False
        if in_sub_dict.get('subnet') == subnet:
            return True
        out_sub_dict = cls.get_out_ip_addr(tenant_id)
        if not out_sub_dict:
            return False
        if out_sub_dict.get('subnet') == subnet:
            return True
        dummy_sub = cfg.firewall.fw_service_dummy_ip_subnet
        dummy_sub = dummy_sub.split('/')[0]
        return subnet == dummy_sub
249428
private <R> R runInNewTx(final SQLSupplier<R> supplier) {
		try (LocalTransactionContext txContext = new LocalTransactionContext(this.connectionSupplier,
				this.sqlFilterManager)) {
			this.txCtxStack.push(txContext);
			try {
				return supplier.get();
			} catch (Exception ex) {
				txContext.setRollbackOnly();
				throw ex;
			} finally {
				try {
					txContext.close();
				} finally {
					this.txCtxStack.pop();
				}
			}
		}
	}
1296057
def _create_fw(self, tenant_id, data):
        
        LOG.debug("In creating Native FW data is %s", data)
        # TODO(padkrish):
        # Check if router is already added and only then add, needed for
        # restart cases since native doesn't have a special DB
        ret, in_sub, out_sub = self.attach_intf_router(tenant_id,
                                                       data.get('tenant_name'),
                                                       data.get('router_id'))
        if not ret:
            LOG.error("Native FW: Attach intf router failed for tenant "
                      "%s", tenant_id)
            return False

        self.create_tenant_dict(tenant_id, data.get('router_id'))
        arg_dict = self._create_arg_dict(tenant_id, data, in_sub, out_sub)

        # Program DCNM to update profile's static IP address on OUT part
        ret = self.update_dcnm_partition_static_route(tenant_id, arg_dict)
        if not ret:
            return False
        # Program the default GW in router namespace
        ret = self.program_default_gw(tenant_id, arg_dict)
        if not ret:
            return False

        # Program router namespace to have all tenant networks to be routed
        # to IN service network
        ret = self.program_next_hop(tenant_id, arg_dict)
        if not ret:
            return False

        # Send message for router port auto config for in service nwk
        ret = self.send_in_router_port_msg(tenant_id, arg_dict, 'up')
        if not ret:
            return False

        # Send message for router port auto config for out service nwk
        return self.send_out_router_port_msg(tenant_id, arg_dict, 'up')
1066070
private void descendingForEach(KTypeProcedure<? super KType> procedure, int fromIndex, final int toIndex) {
    if (fromIndex == toIndex)
      return;

    final KType[] buffer = Intrinsics.<KType[]> cast(this.buffer);
    int i = toIndex;
    do {
      i = oneLeft(i, buffer.length);
      procedure.apply(buffer[i]);
    } while (i != fromIndex);
  }
208533
def _fw_delete(self, drvr_name, data):
        
        fw_id = data.get('firewall_id')
        tenant_id = self.tenant_db.get_fw_tenant(fw_id)

        if tenant_id not in self.fwid_attr:
            LOG.error("Invalid tenant id for FW delete %s", tenant_id)
            return

        tenant_obj = self.fwid_attr[tenant_id]
        ret = self._check_delete_fw(tenant_id, drvr_name)
        if ret:
            tenant_obj.delete_fw(fw_id)
            self.tenant_db.del_fw_tenant(fw_id)
921520
function(record, tnf, type) {

        if (record.tnf === tnf) {
            return (s(record.type) === s(type));
        }
        return false;

    }