Enable or disable NAT-T on this endpoint. If enabled, it will be
        disabled and vice versa.

        :return: None
424806
def enable_disable_force_nat_t(self):
        
        if self.force_nat_t:
            self.data['force_nat_t'] = False
        else:
            self.data['force_nat_t'] = True
        self.update()
641102
def enable(self):
        
        npair = self.npair.value()
        for label, xsl, xsr, ys, nx, ny in \
                zip(self.label[:npair], self.xsl[:npair], self.xsr[:npair],
                    self.ys[:npair], self.nx[:npair], self.ny[:npair]):
            label.config(state='normal')
            xsl.enable()
            xsr.enable()
            ys.enable()
            nx.enable()
            ny.enable()

        for label, xsl, xsr, ys, nx, ny in \
                zip(self.label[npair:], self.xsl[npair:], self.xsr[npair:],
                    self.ys[npair:], self.nx[npair:], self.ny[npair:]):
            label.config(state='disable')
            xsl.disable()
            xsr.disable()
            ys.disable()
            nx.disable()
            ny.disable()

        self.npair.enable()
        self.xbin.enable()
        self.ybin.enable()
        self.sbutt.enable()
555481
def turn_on(host, did, token=None):
    """"""
    urllib3.disable_warnings()
    if token:
        scheme = "https"
    if not token:
        scheme = "http"
        token = "1234567890"
    url = (
            scheme + '://' + host + '/gwr/gop.php?cmd=DeviceSendCommand&data=<gip><version>1</version><token>' + token + '</token><did>' + did + '</did><value>1</value></gip>&fmt=xml')
    response = requests.get(url, verify=False)
    if response.status_code == '200':
        return True
    else:
        return False
888039
private boolean checkEnabled() {
        /* Enable this analyzer ONLY if the Nexus URL has been set to something
         other than the default one (if it's the default one, we'll use the
         central one) and it's enabled by the user.
         */
        boolean retval = false;
        try {
            if (!DEFAULT_URL.equals(getSettings().getString(Settings.KEYS.ANALYZER_NEXUS_URL))
                    && getSettings().getBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED)) {
                LOGGER.info("Enabling Nexus analyzer");
                retval = true;
            } else {
                LOGGER.debug("Nexus analyzer disabled, using Central instead");
            }
        } catch (InvalidSettingException ise) {
            LOGGER.warn("Invalid setting. Disabling Nexus analyzer");
        }

        return retval;
    }
956363
public static base_response disable(nitro_service client, dnsnameserver resource) throws Exception {
		dnsnameserver disableresource = new dnsnameserver();
		disableresource.ip = resource.ip;
		disableresource.dnsvservername = resource.dnsvservername;
		return disableresource.perform_operation(client,"disable");
	}
22793
def reset
      self.access_token       = DEFAULT_ACCESS_TOKEN
      self.adapter            = DEFAULT_ADAPTER
      self.connection_options = DEFAULT_CONNECTION_OPTIONS
      self.endpoint           = DEFAULT_ENDPOINT
      self.gateway            = DEFAULT_GATEWAY
      self.proxy              = DEFAULT_PROXY
      self.user_agent         = DEFAULT_USER_AGENT
      self
    end
317465
def delete(self):
        
        cmd = self.command_builder('ntp source', disable=True)
        return self.configure(cmd)
175289
def remove_server(self, name):
        
        cmd = self.command_builder('no ntp server', value=name)
        return self.configure(cmd)
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)
866988
def disable(self):
        
        self.engine.data.update(dns_relay_interface=[])
        self.engine.data.pop('dns_relay_profile_ref', None)
758077
def _DisableNetworkManager(self, interfaces, logger):
    
    for interface in interfaces:
      interface_config = os.path.join(
          self.network_path, 'ifcfg-%s' % interface)
      if os.path.exists(interface_config):
        self._ModifyInterface(
            interface_config, 'DEVICE', interface, replace=False)
        self._ModifyInterface(
            interface_config, 'NM_CONTROLLED', 'no', replace=True)
      else:
        with open(interface_config, 'w') as interface_file:
          interface_content = [
              '# Added by Google.',
              'BOOTPROTO=none',
              'DEFROUTE=no',
              'DEVICE=%s' % interface,
              'IPV6INIT=no',
              'NM_CONTROLLED=no',
              'NOZEROCONF=yes',
              '',
          ]
          interface_file.write('\n'.join(interface_content))
        logger.info('Created config file for interface %s.', interface)
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
7539
public static QueryableStateConfiguration disabled() {
		final Iterator<Integer> proxyPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.PROXY_PORT_RANGE.defaultValue());
		final Iterator<Integer> serverPorts = NetUtils.getPortRangeFromString(QueryableStateOptions.SERVER_PORT_RANGE.defaultValue());
		return new QueryableStateConfiguration(proxyPorts, serverPorts, 0, 0, 0, 0);
	}
1227070
def enable_disable(self):
        
        if self.enabled:
            self.update(enabled=False)
        else:
            self.update(enabled=True)
905032
def enable(self, force=False):
        
        log = logging.getLogger('ipsv.models.sites.site')
        log.debug('Disabling all other sites under the domain %s', self.domain.name)
        Session.query(Site).filter(Site.id != self.id).filter(Site.domain == self.domain).update({'enabled': 0})

        sites_enabled_path = _cfg.get('Paths', 'NginxSitesEnabled')
        server_config_path = os.path.join(_cfg.get('Paths', 'NginxSitesAvailable'), self.domain.name)
        server_config_path = os.path.join(server_config_path, '{fn}.conf'.format(fn=self.slug))
        symlink_path = os.path.join(sites_enabled_path, '{domain}-{fn}'.format(domain=self.domain.name,
                                                                               fn=os.path.basename(server_config_path)))
        links = glob(os.path.join(sites_enabled_path, '{domain}-*'.format(domain=self.domain.name)))
        for link in links:
            if os.path.islink(link):
                log.debug('Removing existing configuration symlink: %s', link)
                os.unlink(link)
            else:
                if not force:
                    log.error('Configuration symlink path already exists, but it is not a symlink')
                    raise Exception('Misconfiguration detected: symlink path already exists, but it is not a symlink '
                                    'and --force was not passed. Unable to continue')
                log.warn('Configuration symlink path already exists, but it is not a symlink. Removing anyways '
                         'since --force was set')
                if os.path.isdir(symlink_path):
                    shutil.rmtree(symlink_path)
                else:
                    os.remove(symlink_path)

        log.info('Enabling Nginx configuration file')
        os.symlink(server_config_path, symlink_path)

        self.enabled = 1
        Session.commit()
1183894
def disable_cors(self):
        
        return self.update_cors_configuration(
            enable_cors=False,
            allow_credentials=False,
            origins=[],
            overwrite_origins=True
        )
394135
def set_source_interface(self, name):
        
        cmd = self.command_builder('ntp source', value=name)
        return self.configure(cmd)