Function to enable LLDP on the interface.
16845
def enable_lldp(self):
        
        if self.is_ncb:
            self.run_lldptool(["-L", "-i", self.port_name, "-g", "ncb",
                               "adminStatus=rxtx"])
        if self.is_nb:
            self.run_lldptool(["-L", "-i", self.port_name, "-g", "nb",
                               "adminStatus=rxtx"])
513812
def run_lldptool(self, args):
        
        full_args = ['lldptool'] + args
        try:
            return utils.execute(full_args, root_helper=self.root_helper)
        except Exception as exc:
            LOG.error("Unable to execute %(cmd)s. "
                      "Exception: %(exception)s",
                      {'cmd': full_args, 'exception': str(exc)})
108149
def enable(self):
        """"""
        ret = self.get('enable')
        if ret is None:
            return False
        else:
            return ret.lower().startswith('true')
1056977
function addonsManager_enableAddon(aSpec) {
    var spec = aSpec || { };
    spec.button = "enable";

    var button = this.getAddonButton(spec);
    this._controller.click(button);
  }
78454
public function enableVerboseOutput()
    {
        $this->verboseFileHandle = tmpfile();
        $this->setOpt(CURLOPT_VERBOSE, true);
        $this->setOpt(CURLOPT_STDERR, $this->verboseFileHandle);
    }
1257494
def activateAaPdpContextReject(ProtocolConfigurationOptions_presence=0):
    """"""
    a = TpPd(pd=0x8)
    b = MessageType(mesType=0x52)  # 01010010
    c = SmCause()
    packet = a / b / c
    if ProtocolConfigurationOptions_presence is 1:
        d = ProtocolConfigurationOptions(ieiPCO=0x27)
        packet = packet / d
    return packet
627337
public function enable()
    {
        $this->assertIsDebugMode();

	    $extId = $this->getRequestParameter('id');
        $this->getExtensionManager()->setEnabled($extId, true);
	    MenuService::flushCache();
        $this->returnJson(array(
	        'success' => true,
	        'message' => __('Enabled %s', $this->getRequestParameter('id'))
	    ));
	}
1190888
def activatePdpContextRequest(AccessPointName_presence=0,
                              ProtocolConfigurationOptions_presence=0):
    """"""
    a = TpPd(pd=0x8)
    b = MessageType(mesType=0x41)  # 01000001
    c = NetworkServiceAccessPointIdentifier()
    d = LlcServiceAccessPointIdentifier()
    e = QualityOfService()
    f = PacketDataProtocolAddress()
    packet = a / b / c / d / e / f
    if AccessPointName_presence is 1:
        g = AccessPointName(ieiAPN=0x28)
        packet = packet / g
    if ProtocolConfigurationOptions_presence is 1:
        h = ProtocolConfigurationOptions(ieiPCO=0x27)
        packet = packet / h
    return packet
715597
public static function enable(): void
    {
        self::$debugbar = new StandardDebugBar();
        self::$debugbar->addCollector(new ViewCollector());

        self::$renderer = self::$debugbar->getJavascriptRenderer('./vendor/maximebf/debugbar/src/DebugBar/Resources/');
    }
176716
@SuppressWarnings({ "rawtypes", "unchecked" })
    public static synchronized void enable() {
        if (enabled) {
            return;
        }

        oldOnObservableAssembly = RxJavaPlugins.getOnObservableAssembly();
        RxJavaPlugins.setOnObservableAssembly(compose(
                oldOnObservableAssembly,
                new ConditionalOnCurrentRequestContextFunction<Observable>() {
                    @Override
                    Observable applyActual(Observable o, RequestContext ctx) {
                        if (!(o instanceof Callable)) {
                            return new RequestContextObservable(o, ctx);
                        }
                        if (o instanceof ScalarCallable) {
                            return new RequestContextScalarCallableObservable(o, ctx);
                        }
                        return new RequestContextCallableObservable(o, ctx);
                    }
                }));

        oldOnConnectableObservableAssembly = RxJavaPlugins.getOnConnectableObservableAssembly();
        RxJavaPlugins.setOnConnectableObservableAssembly(compose(
                oldOnConnectableObservableAssembly,
                new ConditionalOnCurrentRequestContextFunction<ConnectableObservable>() {
                    @Override
                    ConnectableObservable applyActual(ConnectableObservable co, RequestContext ctx) {
                        return new RequestContextConnectableObservable(co, ctx);
                    }
                }));

        oldOnCompletableAssembly = RxJavaPlugins.getOnCompletableAssembly();
        RxJavaPlugins.setOnCompletableAssembly(
                compose(oldOnCompletableAssembly,
                        new ConditionalOnCurrentRequestContextFunction<Completable>() {
                            @Override
                            Completable applyActual(Completable c,
                                                    RequestContext ctx) {
                                if (!(c instanceof Callable)) {
                                    return new RequestContextCompletable(c, ctx);
                                }
                                if (c instanceof ScalarCallable) {
                                    return new RequestContextScalarCallableCompletable(
                                            c, ctx);
                                }
                                return new RequestContextCallableCompletable(c, ctx);
                            }
                        }));

        oldOnSingleAssembly = RxJavaPlugins.getOnSingleAssembly();
        RxJavaPlugins.setOnSingleAssembly(
                compose(oldOnSingleAssembly, new ConditionalOnCurrentRequestContextFunction<Single>() {
                    @Override
                    Single applyActual(Single s, RequestContext ctx) {
                        if (!(s instanceof Callable)) {
                            return new RequestContextSingle(s, ctx);
                        }
                        if (s instanceof ScalarCallable) {
                            return new RequestContextScalarCallableSingle(s, ctx);
                        }
                        return new RequestContextCallableSingle(s, ctx);
                    }
                }));

        oldOnMaybeAssembly = RxJavaPlugins.getOnMaybeAssembly();
        RxJavaPlugins.setOnMaybeAssembly(
                compose(oldOnMaybeAssembly, new ConditionalOnCurrentRequestContextFunction<Maybe>() {
                    @Override
                    Maybe applyActual(Maybe m, RequestContext ctx) {
                        if (!(m instanceof Callable)) {
                            return new RequestContextMaybe(m, ctx);
                        }
                        if (m instanceof ScalarCallable) {
                            return new RequestContextScalarCallableMaybe(m, ctx);
                        }
                        return new RequestContextCallableMaybe(m, ctx);
                    }
                }));

        oldOnFlowableAssembly = RxJavaPlugins.getOnFlowableAssembly();
        RxJavaPlugins.setOnFlowableAssembly(
                compose(oldOnFlowableAssembly, new ConditionalOnCurrentRequestContextFunction<Flowable>() {
                    @Override
                    Flowable applyActual(Flowable f, RequestContext ctx) {
                        if (!(f instanceof Callable)) {
                            return new RequestContextFlowable(f, ctx);
                        }
                        if (f instanceof ScalarCallable) {
                            return new RequestContextScalarCallableFlowable(f, ctx);
                        }
                        return new RequestContextCallableFlowable(f, ctx);
                    }
                }));

        oldOnConnectableFlowableAssembly = RxJavaPlugins.getOnConnectableFlowableAssembly();
        RxJavaPlugins.setOnConnectableFlowableAssembly(
                compose(oldOnConnectableFlowableAssembly,
                        new ConditionalOnCurrentRequestContextFunction<ConnectableFlowable>() {
                            @Override
                            ConnectableFlowable applyActual(
                                    ConnectableFlowable cf,
                                    RequestContext ctx) {
                                return new RequestContextConnectableFlowable(
                                        cf, ctx);
                            }
                        }
                ));

        oldOnParallelAssembly = RxJavaPlugins.getOnParallelAssembly();
        RxJavaPlugins.setOnParallelAssembly(
                compose(oldOnParallelAssembly,
                        new ConditionalOnCurrentRequestContextFunction<ParallelFlowable>() {
                            @Override
                            ParallelFlowable applyActual(ParallelFlowable pf, RequestContext ctx) {
                                return new RequestContextParallelFlowable(pf, ctx);
                            }
                        }
                ));
        enabled = true;
    }
126347
def get_lldp_status(cls, intf):
        
        if intf not in cls.topo_intf_obj_dict:
            LOG.error("Interface %s not configured at all", intf)
            return False
        intf_obj = cls.topo_intf_obj_dict.get(intf)
        return intf_obj.get_lldp_status()
484769
def enable_wrapper(cls, enable, new_class):
        
        def _wrapped(self, *args, **kwargs):
            if not self.installed:
                raise AssertionError('Module %s cannot be enabled'
                                     ', you should install it first'
                                     % self.verbose_name)

            if self.enabled:
                raise AssertionError('Module %s is already enabled'
                                     % self.verbose_name)

            logger.info("Enabling %s module" % self.verbose_name)
            pre_enable.send(sender=self)
            res = enable(self, *args, **kwargs)

            # Register interfaces (if present)
            if isinstance(self, DropletInterface):
                self.register()

            post_enable.send(sender=self)

            info = self._info
            info.status = ModuleInfo.ENABLED
            info.save()

            logger.info("Enabled %s module" % self.verbose_name)
            return res

        return _wrapped
235306
public void enable(int level) {
        if (level >= PmiConstants.LEVEL_HIGH)
            sync = true;
        else
            sync = false;

        if (!enabled) {
            enabled = true;
            reset();
        }
    }
326492
def process_allow_action(processors, action, argument):
    """"""
    for processor in processors:
        processor(action, argument)
    db.session.commit()
289317
void enableKeepAlive(boolean enable, long keepAliveTimeNanos,
      long keepAliveTimeoutNanos, boolean keepAliveWithoutCalls) {
    enableKeepAlive = enable;
    this.keepAliveTimeNanos = keepAliveTimeNanos;
    this.keepAliveTimeoutNanos = keepAliveTimeoutNanos;
    this.keepAliveWithoutCalls = keepAliveWithoutCalls;
  }
205815
def enable_spi(self):
        
        config = self._interface_configuration(CONFIG_QUERY)
        return config == CONFIG_SPI_GPIO or config == CONFIG_SPI_I2C
297735
public static void enable() {
        final MetaClassRegistry metaClassRegistry = GroovySystem.getMetaClassRegistry();
        synchronized (metaClassRegistry) {
            if (metaClassRegistry.getMetaClassCreationHandler() != instance) {
                ClassInfo.clearModifiedExpandos();
                metaClassRegistry.setMetaClassCreationHandle(instance);
            }
        }
    }