Use this API to add snmpuser.
975889
public static base_response add(nitro_service client, snmpuser resource) throws Exception {
		snmpuser addresource = new snmpuser();
		addresource.name = resource.name;
		addresource.group = resource.group;
		addresource.authtype = resource.authtype;
		addresource.authpasswd = resource.authpasswd;
		addresource.privtype = resource.privtype;
		addresource.privpasswd = resource.privpasswd;
		return addresource.add_resource(client);
	}
1327236
public void addUser(PrincipalUser user) {
        SystemAssert.requireArgument(user != null, "Null user can not be added.");
        users.add(user);
    }
325775
def add_user(self, user):
        """"""
        if not isinstance(user, User):
            user = User(user)
        if user.nick in self.members:
            _log.warning("Ignoring request to add user '%s' to channel '%s' "
                         "because that user is already in the member list.",
                         user, self.name)
            return
        self.members[user.nick] = user
        _log.debug("Added '%s' to channel '%s'", user, self.name)
993483
public void addUser(UserDefinition userDef) {
        String userID = userDef.getID();
        Utils.require(!Utils.isEmpty(userID), "User ID must be set");
        Utils.require(!m_users.containsKey(userID), "Duplicate user ID: " + userID);
        m_users.put(userID, userDef);
    }
249471
public static snmpuser get(nitro_service service, String name) throws Exception{
		snmpuser obj = new snmpuser();
		obj.set_name(name);
		snmpuser response = (snmpuser) obj.get_resource(service);
		return response;
	}
900191
def add(self, client_id, email_address, name, access_level, password):
        """"""
        body = {
            "EmailAddress": email_address,
            "Name": name,
            "AccessLevel": access_level,
            "Password": password}
        response = self._post("/clients/%s/people.json" %
                              client_id, json.dumps(body))
        return json_to_py(response)
915680
public static mpsuser[] add(nitro_service client, mpsuser[] resources) throws Exception
	{
		if(resources == null)
			throw new Exception("Null resource array");
		
		for(int i = 0; i < resources.length; i++)
		{
			resources[i].validate("add");
		}
		
		if(resources.length == 1)
			return ((mpsuser[]) resources[0].perform_operation(client, "add"));
		
		return ((mpsuser[]) perform_operation_bulk_request(client, resources, "add"));
	}
1241109
def adduser(app, username, password):
    """"""
    with app.app_context():
        create_user(username=username, password=password)
        click.echo('user created!')
143143
public static base_response add(nitro_service client, snmptrap resource) throws Exception {
		snmptrap addresource = new snmptrap();
		addresource.trapclass = resource.trapclass;
		addresource.trapdestination = resource.trapdestination;
		addresource.version = resource.version;
		addresource.destport = resource.destport;
		addresource.communityname = resource.communityname;
		addresource.srcip = resource.srcip;
		addresource.severity = resource.severity;
		return addresource.add_resource(client);
	}
1159522
function appendUser(socket, params) {
        try {
            var extra = params.extra;

            var params = socket.handshake.query;

            if (params.extra) {
                try {
                    if (typeof params.extra === 'string') {
                        params.extra = JSON.parse(params.extra);
                    }
                    extra = params.extra;
                } catch (e) {
                    extra = params.extra;
                }
            }

            listOfUsers[socket.userid] = {
                socket: socket,
                connectedWith: {},
                extra: extra || {},
                admininfo: {},
                socketMessageEvent: params.socketMessageEvent || '',
                socketCustomEvent: params.socketCustomEvent || ''
            };
        } catch (e) {
            pushLogs(config, 'appendUser', e);
        }

        sendToAdmin();
    }
332140
public static base_responses add(nitro_service client, snmpmanager resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			snmpmanager addresources[] = new snmpmanager[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new snmpmanager();
				addresources[i].ipaddress = resources[i].ipaddress;
				addresources[i].netmask = resources[i].netmask;
				addresources[i].domainresolveretry = resources[i].domainresolveretry;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
180957
def create_user(self, user):
        
        self.run("useradd -m %s" % user)
        usr =  getpwnam(user)
        return usr
977054
public void addUserInUserManager(User user) {
        if (!userManager.getUserList().contains(user.getUsername())) {
            try {
                userManager.createUser(user.getUsername());
            } catch (UserExistsException e) {
                LOGGER.warn("User already exists!", e);
                return;
            }
        }
        for (Attribute attribute : user.getAttributes()) {
            userManager.setUserAttribute(user.getUsername(), attribute.getAttributeName(), attribute.getValues()
                    .toArray());
        }
    }
1354619
public static login add(nitro_service client, login resource) throws Exception
	{
		resource.validate("add");
		return ((login[]) resource.perform_operation(client, "add"))[0];
	}
1023084
public static snmp_user[] get(nitro_service client) throws Exception
	{
		snmp_user resource = new snmp_user();
		resource.validate("get");
		return (snmp_user[]) resource.get_resources(client);
	}
11507
public static snmp_manager add(nitro_service client, snmp_manager resource) throws Exception
	{
		resource.validate("add");
		return ((snmp_manager[]) resource.perform_operation(client, "add"))[0];
	}
68881
def _add(self, hostport):
        """"""
        peer = self.peer_class(
            tchannel=self.tchannel,
            hostport=hostport,
            on_conn_change=self._update_heap,
        )
        peer.rank = self.rank_calculator.get_rank(peer)
        self._peers[peer.hostport] = peer

        self.peer_heap.add_and_shuffle(peer)