Enable or disable SSH

        :param bool enable: enable or disable SSH daemon
        :param str comment: optional comment for audit
        :raises NodeCommandFailed: cannot enable SSH daemon
        :return: None
504892
def ssh(self, enable=True, comment=None):
        
        self.make_request(
            NodeCommandFailed,
            method='update',
            resource='ssh',
            params={'enable': enable, 'comment': comment})
524801
def enable(iface):
    '''
    
    '''
    if is_enabled(iface):
        return True
    cmd = ['netsh', 'interface', 'set', 'interface',
           'name={0}'.format(iface),
           'admin=ENABLED']
    __salt__['cmd.run'](cmd, python_shell=False)
    return is_enabled(iface)
1016794
def enable_node(self, service_name, node_name):
        
        logger.info("Enabling server %s/%s", service_name, node_name)
        return self.send_command(
            "enable server %s/%s" % (service_name, node_name)
        )
546613
function pemToRsaSSHKey(pem, comment) {
    assert.equal('string', typeof (pem), 'typeof pem');

    var k = sshpk.parseKey(pem, 'pem');
    k.comment = comment;
    return (k.toString('ssh'));
  }
497662
async def enable(self, reason=None):
        
        params = {"enable": False, "reason": reason}
        response = await self._api.put("/v1/agent/maintenance", params=params)
        return response.status == 200
98246
function enableCommand(consoleService, moduleId, msg, cb) {
    if (!moduleId) {
        logger.error(`fail to enable admin module for ${moduleId}`);
        cb('empty moduleId');
        return;
    }

    const modules = consoleService.modules;
    if (!modules[moduleId]) {
        cb(null, protocol.PRO_FAIL);
        return;
    }

    if (consoleService.master) {
        consoleService.enable(moduleId);
        consoleService.agent.notifyCommand('enable', moduleId, msg);
        cb(null, protocol.PRO_OK);
    } else {
        consoleService.enable(moduleId);
        cb(null, protocol.PRO_OK);
    }
}
602420
def server_enable(s_name, **connection_args):
    '''
    
    '''
    ret = True
    server = _server_get(s_name, **connection_args)
    if server is None:
        return False
    if server.get_state() == 'ENABLED':
        return True
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    try:
        NSServer.enable(nitro, server)
    except NSNitroError as error:
        log.debug('netscaler module error - NSServer.enable() failed: %s', error)
        ret = False
    _disconnect(nitro)
    return ret
888827
def comment_sync(self, comment):
        """"""
        self.host.update(key="comment", value=comment)
        self.host.emit("commented", comment=comment)
142536
def enable(name, **kwargs):
    '''
    
    '''
    if 'runlevels' in kwargs:
        requested_levels = set(kwargs['runlevels'] if isinstance(kwargs['runlevels'],
                                                                 list) else [kwargs['runlevels']])
        enabled_levels, disabled_levels = _enable_delta(name, requested_levels)
        commands = []
        if disabled_levels:
            commands.append(_enable_disable_cmd(name, 'delete', disabled_levels))
        if enabled_levels:
            commands.append(_enable_disable_cmd(name, 'add', enabled_levels))
        if not commands:
            return True
    else:
        commands = [_enable_disable_cmd(name, 'add')]
    for cmd in commands:
        if _ret_code(cmd):
            return False
    return True
765590
def enable(name, **kwargs):
    '''
    
    '''
    osmajor = _osrel()[0]
    if osmajor < '6':
        cmd = 'update-rc.d -f {0} defaults 99'.format(_cmd_quote(name))
    else:
        cmd = 'update-rc.d {0} enable'.format(_cmd_quote(name))
    try:
        if int(osmajor) >= 6:
            cmd = 'insserv {0} && '.format(_cmd_quote(name)) + cmd
    except ValueError:
        osrel = _osrel()
        if osrel == 'testing/unstable' or osrel == 'unstable' or osrel.endswith("/sid"):
            cmd = 'insserv {0} && '.format(_cmd_quote(name)) + cmd
    return not __salt__['cmd.retcode'](cmd, python_shell=True)
823649
def enable(soft_fail=False):
    
    if is_enabled():
        return True

    if not is_ipv6_ok(soft_fail):
        disable_ipv6()

    output = subprocess.check_output(['ufw', 'enable'],
                                     universal_newlines=True,
                                     env={'LANG': 'en_US',
                                          'PATH': os.environ['PATH']})

    m = re.findall('^Firewall is active and enabled on system startup\n',
                   output, re.M)
    hookenv.log(output, level='DEBUG')

    if len(m) == 0:
        hookenv.log("ufw couldn't be enabled", level='WARN')
        return False
    else:
        hookenv.log("ufw enabled", level='INFO')
        return True
453963
def enable():
    
    Benchmark.enable = True
    ComparisonBenchmark.enable = True
    BenchmarkedFunction.enable = True
    BenchmarkedClass.enable = True
1247321
def ssh(cmd=''):
    '''
    
    '''
    with settings(warn_only=True):
        local('ssh -A -o StrictHostKeyChecking=no -i "%s" %s@%s "%s"' % (
            env.key_filename, env.user, env.host, cmd))
277726
async def enable(self, ctx, *, command: str):
        
        command = command.lower()
        guild_id = ctx.message.server.id
        cmds = self.config.get('commands', {})
        entries = cmds.get(guild_id, [])

        try:
            entries.remove(command)
        except KeyError:
            await self.bot.responses.failure(message='The command does not exist or is not disabled.')
        else:
            cmds[guild_id] = entries
            await self.config.put('commands', cmds)
            await self.bot.responses.success(message='"%s" command enabled in this server.' % command)
665900
def comments_are_open(content_object):
    
    moderator = get_model_moderator(content_object.__class__)
    if moderator is None:
        return True

    # Check the 'enable_field', 'auto_close_field' and 'close_after',
    # by reusing the basic Django policies.
    return CommentModerator.allow(moderator, None, content_object, None)
873713
def set_enable(self, on, channel=1):
        
        if isinstance(channel, str):
            cmd = "OPALL %d" % int(on)
        elif isinstance(channel, int):
            cmd = "OP%d %d" % (channel, int(on))
        self.write(cmd)
1286396
function enable(options, cb) {
  options = options || {};
  var travis = new Travis({
    version: '2.0.0',
    // user-agent needs to start with "Travis"
    // https://github.com/travis-ci/travis-ci/issues/5649
    headers: {'user-agent': 'Travis: jonschlinkert/enable-travis'}
  });

  travis.auth.github.post({
    github_token: options.GITHUB_OAUTH_TOKEN
  }, function(err, res) {
    if (err) return cb(err);

    travis.authenticate({
      access_token: res.access_token
    }, function(err) {

      if (err) return cb(err);
      var segs = options.repo.split('/');

      travis.repos(segs[0], segs[1]).get(function(err, res) {
        if (err) return cb(err);

        travis.hooks(res.repo && res.repo.id).put({
          hook: {active: true}

        }, function(err, content) {
          if (err) return cb(err);
          cb(null, content);
        });
      });
    });
  });
}