Link hosts with realms

        :param notificationways: notificationways object to link with
        :type notificationways: alignak.objects.notificationway.Notificationways
        :return: None
427017
def linkify_with_notificationways(self, notificationways):
        
        for i in self:
            if not hasattr(i, 'notificationways'):
                continue
            new_notificationways = []
            for nw_name in strip_and_uniq(i.notificationways):
                notifway = notificationways.find_by_name(nw_name)
                if notifway is not None:
                    new_notificationways.append(notifway.uuid)
                else:
                    err = "The 'notificationways' of the %s '%s' named '%s' is unknown!" %\
                          (i.__class__.my_type, i.get_name(), nw_name)
                    i.add_error(err)
            # Get the list, but first make elements unique
            i.notificationways = list(set(new_notificationways))

            # Update the contact host/service notification commands properties
            i.get_notification_commands(notificationways, 'host', command_name=True)
            i.get_notification_commands(notificationways, 'service', command_name=True)
426244
def links(tself, group=None):
    ''''''
    pr = ProviderRun(tself, group)
    pr.run()
    return mark_safe(pr.getvalue())
412578
def cli(env, identifier):
    

    dh_mgr = SoftLayer.DedicatedHostManager(env.client)

    host_id = helpers.resolve_id(dh_mgr.resolve_ids, identifier, 'dedicated host')

    if not (env.skip_confirmations or formatting.no_going_back(host_id)):
        raise exceptions.CLIAbort('Aborted')

    table = formatting.Table(['id', 'server name', 'status'])

    result = dh_mgr.cancel_guests(host_id)

    if result:
        for status in result:
            table.add_row([
                status['id'],
                status['fqdn'],
                status['status']
            ])

        env.fout(table)
    else:
        click.secho('There is not any guest into the dedicated host %s' % host_id, fg='red')
344837
def target(self, hosts):
        
        if self.__is_retargeted:
            raise TypeError('Cannot use target more than once.')
        rv = FanoutClient(hosts, connection_pool=self.connection_pool,
                          max_concurrency=self._max_concurrency)
        rv._cb_poll = self._cb_poll
        rv.__is_retargeted = True
        return rv
716094
def linkify_h_by_realms(self, realms):
        
        default_realm = realms.get_default()
        for host in self:
            if not getattr(host, 'realm', None):
                # Applying default realm to an host
                host.realm = default_realm.uuid if default_realm else ''
                host.realm_name = default_realm.get_name() if default_realm else ''
                host.got_default_realm = True

            if host.realm not in realms:
                realm = realms.find_by_name(host.realm)
                if not realm:
                    continue
                host.realm = realm.uuid
            else:
                realm = realms[host.realm]
480299
def hosting_devices_assigned_to_cfg_agent(self, context, ids, host):
        
        self._host_notification(context,
                                'hosting_devices_assigned_to_cfg_agent',
                                {'hosting_device_ids': ids}, host)
1078027
def notification_channel_path(cls, project, notification_channel):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/notificationChannels/{notification_channel}",
            project=project,
            notification_channel=notification_channel,
        )
869658
def enable_host_notifications(self, host):
        
        if not host.notifications_enabled:
            host.modified_attributes |= \
                DICT_MODATTR["MODATTR_NOTIFICATIONS_ENABLED"].value
            host.notifications_enabled = True
            self.send_an_element(host.get_update_status_brok())
288995
public void setNotificationConfigurations(java.util.Collection<NotificationConfiguration> notificationConfigurations) {
        if (notificationConfigurations == null) {
            this.notificationConfigurations = null;
            return;
        }

        this.notificationConfigurations = new com.amazonaws.internal.SdkInternalList<NotificationConfiguration>(notificationConfigurations);
    }
1212891
def create_notification_routes(options = {}, resources_options = [])
        self.resources options[:model], resources_options do
          collection do
            post :open_all unless ignore_path?(:open_all, options)
          end
          member do
            get  :move     unless ignore_path?(:move, options)
            post :open     unless ignore_path?(:open, options)
          end
        end
      end
755846
def connect(creds):
    
    return swiftclient.Connection(
        authurl=creds.authurl,
        user=creds.user,
        key=creds.password,
        auth_version=creds.auth_version,
        tenant_name=creds.tenant_name,
        os_options={
            "region_name": creds.region,
            "endpoint_type": creds.endpoint_type,
            "domain_id": creds.domain_id,
            "domain_name": creds.domain_name,
            "tenant_id": creds.tenant_id,
            "user_id": creds.user_id,
            "user_domain_id": creds.user_domain_id,
            "user_domain_name": creds.user_domain_name,
            "project_id": creds.project_id,
            "project_name": creds.project_name,
            "project_domain_id": creds.project_domain_id,
            "project_domain_name": creds.project_domain_name,
        }
    )
81119
def network_sub_create_notif(self, tenant_id, tenant_name, cidr):
        
        if not self.fw_init:
            return
        self.network_create_notif(tenant_id, tenant_name, cidr)
846612
def whois_nameservers(self, nameservers):
        
        api_name = 'opendns-whois-nameservers'
        fmt_url_path = u'whois/nameservers/{0}'
        return self._multi_get(api_name, fmt_url_path, nameservers)
90090
def set_rest_notification(self, hit_type, url, event_types=None):
        
        return self._set_notification(hit_type, 'REST', url, event_types)
843757
def publishToRoom(self, roomId, name, data, userList=None):
        
        if userList is None:
            userList = self.getRoom(roomId)

        # Publish data to all room users
        logging.debug("%s: broadcasting (name: %s, data: %s, number of users: %s)" % (self._gcls(), name, data, len(userList)))
        self.broadcast(userList, {
            "name": name,
            "data": SockJSRoomHandler._parser.encode(data)
        })
1217506
public void addMEToRemoteQueuePointGuessSet(SIBUuid8 messagingEngineUuid)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "addMEToRemoteQueuePointGuessSet");

    synchronized (_remoteQueuePointsGuessSet)
    {
      _remoteQueuePointsGuessSet.add(messagingEngineUuid);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addMEToRemoteQueuePointGuessSet");
  }
1348396
def init_realms(self, realms):
        
        # this eliminates the need for an authorizing_realms attribute:
        self.realms = tuple(realm for realm in realms
                            if isinstance(realm, realm_abcs.AuthorizingRealm))
        self.register_cache_clear_listener()