:type annot: dict
        :type config: NetworkConfig
        :type id: str
        :type ui: dict
        :rtype: Network
182245
def create(annot=None, config=None, id=None, ui=None):
        

        return Network(
            annot=annot,
            config=config,
            id=id,
            ui=ui,
        )
871485
def inspect(self):
        
        if not self.client_config.features['networks']:
            raise ValueError("Client does not support network configuration.", self.client_name)
        config_id = self.config_id
        network_name = self.network_name = self.policy.nname(config_id.map_name, config_id.config_name)
        if network_name in self.policy.network_names[self.client_name]:
            self.detail = self.client.inspect_network(network_name)
        else:
            self.detail = NOT_FOUND
475401
def network_type=(type)
      no_cmd = (type == default_network_type) ? 'no' : ''
      network = (type == default_network_type) ? '' : type
      network = 'point-to-point' if type.to_s == 'p2p'
      config_set('interface_ospf', 'network_type', @interface.name,
                 no_cmd, network)
    end
1179968
def _get_network(self):
        '''
        
        '''
        data = dict()
        data['interfaces'] = salt.utils.network.interfaces()
        data['subnets'] = salt.utils.network.subnets()

        return data
437863
def config(self, body):
        
        return self.client.post(self._url(), data=body)
493580
function(next) {
            if (options.noDns || core.noDns) return next();
            core.loadDnsConfig(options, next);
        }
1191825
def _func_router(self, msg, fname, **config):
        
        FNAME = 'handle_%s_autocloud_%s'

        if ('compose_id' in msg['msg'] or 'compose_job_id' in msg['msg'] or
                'autocloud.compose' in msg['topic']):
            return getattr(self, FNAME % ('v2', fname))(msg, **config)
        else:
            return getattr(self, FNAME % ('v1', fname))(msg, **config)
282809
def configure(self, config):
        
        connections = ConnectionParams.many_from_config(config)
        for connection in connections:
            self._connections.append(connection)
790448
def _set_boutons_interface(self, buttons):
        """"""
        for id_action, f, d, is_active in buttons:
            icon = self.get_icon(id_action)
            action = self.addAction(QIcon(icon), d)
            action.setEnabled(is_active)
            action.triggered.connect(f)
531653
private static NetworkConfig load(JsonObject jsonConfig) throws InvalidArgumentException, NetworkConfigurationException {

        // Sanity check
        if (jsonConfig == null) {
            throw new InvalidArgumentException("config must be specified");
        }

        return new NetworkConfig(jsonConfig);
    }
913543
def loadAnns(self, ids=[]):
        
        if _isArrayLike(ids):
            return [self.anns[id] for id in ids]
        elif type(ids) == int:
            return [self.anns[ids]]
577385
def all_to_annot(self, annot, names=['TPd', 'TPs', 'FP', 'FN']):
        """"""
        self.to_annot(annot, 'tp_det', names[0])
        self.to_annot(annot, 'tp_std', names[1])
        self.to_annot(annot, 'fp', names[2])
        self.to_annot(annot, 'fn', names[3])
600422
def tracer_config(__init__, app, args, kwargs):
    
    __init__(*args, **kwargs)

    tracing = app.settings.get('opentracing_tracing')
    tracer_callable = app.settings.get('opentracing_tracer_callable')
    tracer_parameters = app.settings.get('opentracing_tracer_parameters', {})

    if tracer_callable is not None:
        if not callable(tracer_callable):
            tracer_callable = _get_callable_from_name(tracer_callable)

        tracer = tracer_callable(**tracer_parameters)
        tracing = TornadoTracing(tracer)

    if tracing is None:
        tracing = TornadoTracing()  # fallback to the global tracer

    app.settings['opentracing_tracing'] = tracing

    tracing._trace_all = app.settings.get('opentracing_trace_all',
                                          DEFAULT_TRACE_ALL)
    tracing._trace_client = app.settings.get('opentracing_trace_client',
                                             DEFAULT_TRACE_CLIENT)
    tracing._start_span_cb = app.settings.get('opentracing_start_span_cb',
                                              None)

    httpclient._set_tracing_enabled(tracing._trace_client)
    if tracing._trace_client:
        httpclient._set_tracing_info(tracing._tracer_obj,
                                     tracing._start_span_cb)
1325639
def from_config(cls, config: dict):
        
        timestamp = config.get('timestamp', None)
        return cls(config.get('id'),
                   config.get('type'),
                   config.get('data', dict()),
                   config.get('origin', None),
                   timestamp,
                   config.get('object_type', None),
                   config.get('object_id', None),
                   config.get('object_key', None))
955256
def get_config(self):
        
        config = {
            'location': self.location,
            'language': self.language,
            'topic': self.topic,
        }
        return config
248792
def show_network(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The show_network function must be called with -f or --function.'
        )
    if not kwargs or 'name' not in kwargs:
        log.error(
            'Must specify name of network.'
        )
        return False

    conn = get_conn()
    return _expand_item(conn.ex_get_network(kwargs['name']))
38760
def configure():
    
    import os
    from uwsgiconf.presets.nice import PythonSection

    FILE = os.path.abspath(__file__)
    port = 8000

    configurations = []

    for idx in range(2):

        alias = 'app_%s' % (idx + 1)

        section = PythonSection(
            # Automatically reload uWSGI if this file is changed.
            touch_reload=FILE,

            # To differentiate easily.
            process_prefix=alias,

            # Serve WSGI application (see above) from this very file.
            wsgi_module=FILE,

            # Custom WSGI callable for second app.
            wsgi_callable=alias,

            # One is just enough, no use in worker on every core
            # for this demo.
            workers=1,

        ).networking.register_socket(
            PythonSection.networking.sockets.http('127.0.0.1:%s' % port)
        )

        port += 1

        configurations.append(
            # We give alias for configuration to prevent clashes.
            section.as_configuration(alias=alias))

    return configurations