Use this API to add server.
166093
public static base_response add(nitro_service client, server resource) throws Exception {
		server addresource = new server();
		addresource.name = resource.name;
		addresource.ipaddress = resource.ipaddress;
		addresource.domain = resource.domain;
		addresource.translationip = resource.translationip;
		addresource.translationmask = resource.translationmask;
		addresource.domainresolveretry = resource.domainresolveretry;
		addresource.state = resource.state;
		addresource.ipv6address = resource.ipv6address;
		addresource.comment = resource.comment;
		addresource.td = resource.td;
		return addresource.add_resource(client);
	}
819027
def server(**kwargs):
    
    start_server(**{k: v for k, v in kwargs.items() if v},
                 blocking=True)
254205
def push_to_server(self, data):
        """"""
        output = add_profile(self.customer.pk, data, data)
        output['response'].raise_if_error()
        self.profile_id = output['profile_id']
        self.payment_profile_ids = output['payment_profile_ids']
711959
def add_service_server(service_server)
      @master.register_service(service_server.service_name,
                               service_server.service_uri)
      service_server.set_manager(self)
      @service_servers.push(service_server)
      service_server
    end
1325261
def server(self):
        """"""

        conn = self.connection_class(self)
        with self.mutex:
            self.connections.append(conn)
        return conn
678482
def set_server(self, pos, key, value):
        """"""
        self._ports_list[pos][key] = value
1165646
public static base_response add(nitro_service client, dnsnameserver resource) throws Exception {
		dnsnameserver addresource = new dnsnameserver();
		addresource.ip = resource.ip;
		addresource.dnsvservername = resource.dnsvservername;
		addresource.local = resource.local;
		addresource.state = resource.state;
		addresource.type = resource.type;
		return addresource.add_resource(client);
	}
1328484
public static base_responses add(nitro_service client, server resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			server addresources[] = new server[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new server();
				addresources[i].name = resources[i].name;
				addresources[i].ipaddress = resources[i].ipaddress;
				addresources[i].domain = resources[i].domain;
				addresources[i].translationip = resources[i].translationip;
				addresources[i].translationmask = resources[i].translationmask;
				addresources[i].domainresolveretry = resources[i].domainresolveretry;
				addresources[i].state = resources[i].state;
				addresources[i].ipv6address = resources[i].ipv6address;
				addresources[i].comment = resources[i].comment;
				addresources[i].td = resources[i].td;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
1313454
def add_nic(self, instance_id, net_id):
        """"""
        #TODO: upgrade with port_id and fixed_ip in future
        self.client.servers.interface_attach(
            instance_id, None, net_id, None)
        return True
1083743
def grab_server(self, onerror = None):
        """"""
        request.GrabServer(display = self.display,
                           onerror = onerror)
1069123
public function add()
	{
		// Get the hook we're setting
		$trigger = $this->arguments->getOpt(3);
		$hook    = $this->arguments->getOpt(4);

		// Delete the primary args so they aren't added as top level config values
		$this->arguments->deleteOpt(3);
		$this->arguments->deleteOpt(4);

		// Set the new hooks argument
		$this->arguments->setOpt('hooks', array($trigger => array($hook)));

		// Redirect back to the basic configuration set method
		App::get('client')->call('configuration', 'set', $this->arguments, $this->output);
	}
383768
private void configureServer(ServerBartender server)
  {
    // XXX: mixing server/client
    
    ServerNetwork serverNet = _serverMap.get(server.getId());
    
    if (serverNet == null) {
      serverNet = new ServerNetwork(_system, server);
      
      configServer(serverNet, server);

      serverNet.init();
      
      _serverMap.put(server.getId(), serverNet);
    }
  }
71626
def _start_update_server(auth_token):
    """"""
    server = AccumulatorServer(("localhost", 0), _UpdateRequestHandler, auth_token)
    thread = threading.Thread(target=server.serve_forever)
    thread.daemon = True
    thread.start()
    return server
886978
def _add_index_server(self):
        """"""
        index_servers = '\n\t'.join(self.servers.keys())
        self.conf.set('distutils', 'index-servers', index_servers)
1221888
def add_platform(name, platform_set, server_url):
    '''
    
    '''
    config = _get_asam_configuration(server_url)
    if not config:
        return False

    platforms = list_platforms(server_url)
    if name in platforms[server_url]:
        return {name: "Specified platform already exists on {0}".format(server_url)}

    platform_sets = list_platform_sets(server_url)
    if platform_set not in platform_sets[server_url]:
        return {name: "Specified platform set does not exist on {0}".format(server_url)}

    url = config['platform_edit_url']

    data = {
        'platformName': name,
        'platformSetName': platform_set,
        'manual': 'false',
        'previousURL': '/config/platformAdd.html',
        'postType': 'PlatformAdd',
        'Submit': 'Apply'
    }

    auth = (
        config['username'],
        config['password']
    )

    try:
        html_content = _make_post_request(url, data, auth, verify=False)
    except Exception as exc:
        err_msg = "Failed to add platform on {0}".format(server_url)
        log.error('%s:\n%s', err_msg, exc)
        return {name: err_msg}

    platforms = list_platforms(server_url)
    if name in platforms[server_url]:
        return {name: "Successfully added platform on {0}".format(server_url)}
    else:
        return {name: "Failed to add platform on {0}".format(server_url)}
77077
def add(self):
        """"""

        yield self.client.create(self.path)
        yield self.client.create(self.path + "/type", self.name)
        yield self.client.create(self.path + "/state")
        yield self.client.create(self.path + "/machines", "[]")

        log.debug("registered service '%s' at %s." % (self.name, self.path))
359029
def server_add(s_name, s_ip, s_state=None, **connection_args):
    '''
    
    '''
    ret = True
    if server_exists(s_name, **connection_args):
        return False
    nitro = _connect(**connection_args)
    if nitro is None:
        return False
    server = NSServer()
    server.set_name(s_name)
    server.set_ipaddress(s_ip)
    if s_state is not None:
        server.set_state(s_state)
    try:
        NSServer.add(nitro, server)
    except NSNitroError as error:
        log.debug('netscaler module error - NSServer.add() failed: %s', error)
        ret = False
    _disconnect(nitro)
    return ret