Use this API to enable dnsnameserver of given name.
435256
public static base_response enable(nitro_service client, String ip) throws Exception {
		dnsnameserver enableresource = new dnsnameserver();
		enableresource.ip = ip;
		return enableresource.perform_operation(client,"enable");
	}
1314736
private static AuthoritativeNameServerList extractAuthoritativeNameServers(String questionName, DnsResponse res) {
        int authorityCount = res.count(DnsSection.AUTHORITY);
        if (authorityCount == 0) {
            return null;
        }

        AuthoritativeNameServerList serverNames = new AuthoritativeNameServerList(questionName);
        for (int i = 0; i < authorityCount; i++) {
            serverNames.add(res.recordAt(DnsSection.AUTHORITY, i));
        }
        return serverNames.isEmpty() ? null : serverNames;
    }
494998
public ObjectName preRegister(MBeanServer server, ObjectName name)
			throws Exception {
		oname=name;
        mserver=server;
        domain=name.getDomain();
        return name;
	}
1011740
def allow_client_incoming(self, client_name):
        
        self.client_name = client_name
        self.capabilities['incoming'] = ScopeURI('client', 'incoming', {'clientName': client_name})
1026982
def server(name=None, description=None, **kwargs):
    '''
    '''
    return UdpSocketServer(
        EchoServerProtocol,
        name=name or 'echoudpserver',
        description=description or 'Echo Udp Server',
        **kwargs
    )
795252
public static base_response delete(nitro_service client, dnsnameserver resource) throws Exception {
		dnsnameserver deleteresource = new dnsnameserver();
		deleteresource.ip = resource.ip;
		deleteresource.dnsvservername = resource.dnsvservername;
		return deleteresource.delete_resource(client);
	}
1315851
def enable(name):
    '''
    
    '''
    cmd = 'systemctl enable systemd-nspawn@{0}'.format(name)
    if __salt__['cmd.retcode'](cmd, python_shell=False) != 0:
        __context__['retcode'] = salt.defaults.exitcodes.EX_UNAVAILABLE
        return False
    return True
1369584
public static authenticationvserver_binding get(nitro_service service, String name) throws Exception{
		authenticationvserver_binding obj = new authenticationvserver_binding();
		obj.set_name(name);
		authenticationvserver_binding response = (authenticationvserver_binding) obj.get_resource(service);
		return response;
	}
1341202
public void setRegistrationName(String name) {
    NamespaceService[] nsos = namespaceManager.getAllNamenodeThreads();
    for (NamespaceService ns : nsos) {
      ((NSOfferService) ns).setRegistrationName(name);
    }
  }
362524
public static SocketAddress resolve(InetSocketAddress inetSocketAddress, DnsResolver dnsResolver) {

        try {
            InetAddress inetAddress = dnsResolver.resolve(inetSocketAddress.getHostString())[0];
            return new InetSocketAddress(inetAddress, inetSocketAddress.getPort());
        } catch (UnknownHostException e) {
            return new InetSocketAddress(inetSocketAddress.getHostString(), inetSocketAddress.getPort());
        }

    }
1024054
public static DnsServerAddresses singleton(final InetSocketAddress address) {
        if (address == null) {
            throw new NullPointerException("address");
        }
        if (address.isUnresolved()) {
            throw new IllegalArgumentException("cannot use an unresolved DNS server address: " + address);
        }

        return new SingletonDnsServerAddresses(address);
    }
691559
public ServerRedirect enableServerMapping(int serverMappingId, Boolean enabled) {
        ServerRedirect redirect = new ServerRedirect();
        BasicNameValuePair[] params = {
            new BasicNameValuePair("enabled", enabled.toString()),
            new BasicNameValuePair("profileIdentifier", this._profileName)
        };
        try {
            JSONObject response = new JSONObject(doPost(BASE_SERVER + "/" + serverMappingId, params));
            redirect = getServerRedirectFromJSON(response);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
        return redirect;
    }
67688
def UpdateDNS(self, domain, environment):
        """"""
        self.dns_set_conf(domain, self.dns.config,
                          environment, self.dns.token)
136812
public static base_response enable(nitro_service client, String trapname) throws Exception {
		snmpalarm enableresource = new snmpalarm();
		enableresource.trapname = trapname;
		return enableresource.perform_operation(client,"enable");
	}
787957
def nameservers_for_device(n_ip)
      nameservers = []
      raw_nameservers = ENV["RS_IP#{n_ip}_NAMESERVERS"].to_s.strip.split(/[, ]+/)
      raw_nameservers.each do |nameserver|
        if valid_ipv4?(nameserver)
          nameservers << nameserver
        else
          # Non-fatal error, we only need one working
          logger.error("Invalid nameserver #{nameserver} for interface##{n_ip}")
        end
      end
      # Also a non-fatal error, DHCP or another interface specify nameservers and we're still good
      logger.warn("No valid nameservers specified for static interface##{n_ip}") unless nameservers.length > 0
      nameservers
    end
954085
def get_name_servers(self, id_or_uri):
        

        uri = self._client.build_uri(id_or_uri) + "/nameServers"
        return self._client.get(uri)
27822
public static base_response enable(nitro_service client, nspbr resource) throws Exception {
		nspbr enableresource = new nspbr();
		enableresource.name = resource.name;
		return enableresource.perform_operation(client,"enable");
	}