Notification for Network delete.

        Since FW ID not present, it's not possible to know which FW instance
        to call. So, calling everyone, each instance will figure out if it
        applies to them.
514734
def network_delete_notif(self, tenant_id, tenant_name, net_id):
        
        for ip in self.obj_dict:
            drvr_obj = self.obj_dict.get(ip).get('drvr_obj')
            ret = drvr_obj.network_delete_notif(tenant_id, tenant_name,
                                                net_id)
            LOG.info("Driver with IP %(ip)s return %(ret)s for network "
                     "delete notification", {'ip': ip, 'ret': ret})
503510
function HouseholdCommunications (f1, householdID) {
  if (!householdID) {
    throw new Error('HouseholdCommunications requires a household ID!')
  }
  Communications.call(this, f1, {
    path: '/Households/' + householdID + '/Communications'
  })
}
558071
def remove_network(self, net_id):
        
        url = self._url("/networks/{0}", net_id)
        res = self._delete(url)
        self._raise_for_status(res)
706851
def delete_dispatch(self, dispatch_id):
        
        self._validate_uuid(dispatch_id)

        url = "/notification/v1/dispatch/{}".format(dispatch_id)
        response = NWS_DAO().deleteURL(url, self._write_headers())

        if response.status != 204:
            raise DataFailureException(url, response.status, response.data)
        return response.status
657849
private void getNetworkInfo() {
		// Create a listener to check for new network connections (e.g. switching from mobile to Wifi, or losing internet connection)
		NetworkConnectionListener listener = new NetworkConnectionListener() {

			@Override
			public void networkChanged(NetworkConnectionType newConnection) {
				Log.i("BMSCore", "New network connection: " + newConnection.toString());
			}
		};

		// Initilize the network monitor with the application context and network change listener
		this.networkMonitor = new NetworkMonitor(getApplicationContext(), listener);

		// Start listening for network changes
		networkMonitor.startMonitoringNetworkChanges();

		// See if the device currently has internet access, and see what type of connection it is using
		Log.i("BMSCore", "Is connected to the internet: " + networkMonitor.isInternetAccessAvailable());
		Log.i("BMSCore", "Connection type: " + networkMonitor.getCurrentConnectionType().toString());

		// Check that the user has given permissions to read the phone's state.
		// If permission is granted, get the type of mobile data network being used.
		int networkPermission = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE);
		if (networkPermission == PackageManager.PERMISSION_GRANTED) {
			Log.i("BMSCore", "Mobile network type: " + networkMonitor.getMobileNetworkType());
		}
		else {
			Log.i("BMSCore", "Obtaining permission to read phone state");
			if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_PHONE_STATE)) {
				// Asynchronously explain to the user why you are attempting to request this permission.
				// Once this is done, try to request the permission again.
			}
			else {
				ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_PHONE_STATE}, MY_PERMISSIONS_READ_PHONE_STATE);
			}
		}
	}
402836
def retry_failure_fab_dev_delete(self, tenant_id, fw_data, fw_dict):
        
        result = fw_data.get('result').split('(')[0]
        name = dfa_dbm.DfaDBMixin.get_project_name(self, tenant_id)
        fw_dict['tenant_name'] = name
        is_fw_virt = self.is_device_virtual()
        if result == fw_constants.RESULT_FW_DELETE_INIT:
            if self.fwid_attr[tenant_id].is_fw_drvr_created():
                ret = self.delete_fw_device(tenant_id, fw_dict.get('fw_id'),
                                            fw_dict)
                if ret:
                    # Device portion
                    self.update_fw_db_dev_status(fw_dict.get('fw_id'),
                                                 '')
                    self.fwid_attr[tenant_id].fw_drvr_created(False)
                    LOG.info("Retry failue dev return success for delete"
                             " tenant %s", tenant_id)
                else:
                    return
            name = dfa_dbm.DfaDBMixin.get_project_name(self, tenant_id)
            ret = self.fabric.retry_failure(tenant_id, name, fw_dict,
                                            is_fw_virt, result)
            if not ret:
                LOG.error("Retry failure returned fail for tenant %s",
                          tenant_id)
                return
            result = fw_constants.RESULT_FW_DELETE_DONE
            self.update_fw_db_final_result(fw_dict.get('fw_id'), result)
            self.delete_fw(fw_dict.get('fw_id'))
            self.fwid_attr[tenant_id].delete_fw(fw_dict.get('fw_id'))
            self.tenant_db.del_fw_tenant(fw_dict.get('fw_id'))
1136637
def delete_fw(self, fw_id):
        
        self.fw_id = None
        self.fw_name = None
        self.fw_created = False
        self.active_pol_id = None
491338
public boolean deleteNotification(Notification notification) {
        boolean result = notification.canDelete();

        if (result) {
            broker.callRPC("RGCWXQ ALRPP", notification.getAlertId());
        }

        return result;
    }
881113
public void setNotifyDelete(boolean notify)  {
        addField(ConfigureNodeFields.notify_delete, FormField.Type.bool);
        setAnswer(ConfigureNodeFields.notify_delete.getFieldName(), notify);
    }
716171
def network_delete_event(self, network_info):
        """"""

        net_id = network_info['network_id']
        if net_id not in self.network:
            LOG.error('network_delete_event: net_id %s does not exist.',
                      net_id)
            return

        segid = self.network[net_id].get('segmentation_id')
        tenant_id = self.network[net_id].get('tenant_id')
        tenant_name = self.get_project_name(tenant_id)
        net = utils.Dict2Obj(self.network[net_id])
        if not tenant_name:
            LOG.error('Project %(tenant_id)s does not exist.',
                      {'tenant_id': tenant_id})
            self.update_network_db(net.id, constants.DELETE_FAIL)
            return

        try:
            self.dcnm_client.delete_network(tenant_name, net)
            # Put back the segmentation id into the pool.
            self.seg_drvr.release_segmentation_id(segid)

            # Remove entry from database and cache.
            self.delete_network_db(net_id)
            del self.network[net_id]
            snets = [k for k in self.subnet if (
                self.subnet[k].get('network_id') == net_id)]
            [self.subnet.pop(s) for s in snets]
        except dexc.DfaClientRequestFailed:
            LOG.error('Failed to create network %(net)s.',
                      {'net': net.name})
            self.update_network_db(net_id, constants.DELETE_FAIL)
        # deleting all related VMs
        instances = self.get_vms()
        instances_related = [k for k in instances if k.network_id == net_id]
        for vm in instances_related:
            LOG.debug("deleting vm %s because network is deleted", vm.name)
            self.delete_vm_function(vm.port_id, vm)
        self.network_del_notif(tenant_id, tenant_name, net_id)
834123
def _check_delete_fw(self, tenant_id, drvr_name):
        
        fw_dict = self.fwid_attr[tenant_id].get_fw_dict()
        ret = False
        try:
            with self.fwid_attr[tenant_id].mutex_lock:
                self.update_fw_db_final_result(fw_dict.get('fw_id'), (
                    fw_constants.RESULT_FW_DELETE_INIT))
                ret = self._delete_fw_fab_dev(tenant_id, drvr_name, fw_dict)
        except Exception as exc:
            LOG.error("Exception raised in delete fw %s", str(exc))
        return ret
141211
private function handle_delete_network() {
		$network_id = filter_input( INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT );
		$override   = (bool) filter_input( INPUT_POST, 'override' );

		$result = delete_network( $network_id, $override );
		if ( is_wp_error( $result ) ) {
			wp_die( esc_html( $result->get_error_message() ) );
		}

		$this->handle_redirect( array(
			'network_deleted' => '1',
		) );
	}
1150645
def delete_fw_device(self, tenant_id, fw_id, data):
        
        drvr_dict, mgmt_ip = self.sched_obj.get_fw_dev_map(fw_id)
        ret = drvr_dict.get('drvr_obj').delete_fw(tenant_id, data)
        # FW DB gets deleted, so no need to remove the MGMT IP
        if ret:
            self.sched_obj.deallocate_fw_dev(fw_id)
        return ret
212893
protected void onServiceInstanceAvailable(ServiceInstance instance){
        String serviceName = instance.getServiceName();
        synchronized(notificationHandlers){
            if(notificationHandlers.containsKey(serviceName)){
                for(NotificationHandler h : notificationHandlers.get(serviceName)){
                    h.serviceInstanceAvailable(instance);
                }
            }
        }
    }
1270637
public function callback_dismiss_notification() {
        if ( isset( $_POST['namespace'] ) || isset( $_POST['id'] ) ) {
            $namespace = $_POST['namespace'];
            $id = $_POST['id'];

			$n_class = get_class();
            $notify = new $n_class( $namespace );
            $notify->hide_notification( $id );
        }
        exit;
    }
959577
def delete_os_out_nwk(self, tenant_id, fw_dict, is_fw_virt=False):
        
        ret = True
        tenant_name = fw_dict.get('tenant_name')
        try:
            ret = self._delete_os_nwk(tenant_id, tenant_name, "out",
                                      is_fw_virt=is_fw_virt)
        except Exception as exc:
            LOG.error("Deletion of Out Openstack Network failed tenant "
                      "%(tenant)s, Exception %(exc)s",
                      {'tenant': tenant_id, 'exc': str(exc)})
            ret = False
        # Updating the FW DB
        if ret:
            res = fw_const.OS_OUT_NETWORK_DEL_SUCCESS
        else:
            res = fw_const.OS_OUT_NETWORK_DEL_FAIL
        self.update_fw_db_result(tenant_id, os_status=res)
        return ret
587782
private static boolean insideGetUniqueIdCall(Node n) {
    Node parent = n.getParent();
    String name = parent.isCall() ?
        parent.getFirstChild().getQualifiedName() : null;

    return name != null && name.endsWith(GET_UNIQUE_ID_FUNCTION);
  }