Use this API to add dospolicy.
426704
public static base_response add(nitro_service client, dospolicy resource) throws Exception {
		dospolicy addresource = new dospolicy();
		addresource.name = resource.name;
		addresource.qdepth = resource.qdepth;
		addresource.cltdetectrate = resource.cltdetectrate;
		return addresource.add_resource(client);
	}
183792
def add_webhook(self, policy, name, metadata=None):
        
        return self.manager.add_webhook(self, policy, name, metadata=metadata)
433040
def _put_bucket_policy(self):
        """"""
        if self.s3props['bucket_policy']:
            policy_str = json.dumps(self.s3props['bucket_policy'])
            _response = self.s3client.put_bucket_policy(Bucket=self.bucket, Policy=policy_str)
        else:
            _response = self.s3client.delete_bucket_policy(Bucket=self.bucket)
        LOG.debug('Response adding bucket policy: %s', _response)
        LOG.info('S3 Bucket Policy Attached')
433268
public static base_response add(nitro_service client, pqpolicy resource) throws Exception {
		pqpolicy addresource = new pqpolicy();
		addresource.policyname = resource.policyname;
		addresource.rule = resource.rule;
		addresource.priority = resource.priority;
		addresource.weight = resource.weight;
		addresource.qdepth = resource.qdepth;
		addresource.polqdepth = resource.polqdepth;
		return addresource.add_resource(client);
	}
739982
public void loadPolicy() {
        model.clearPolicy();
        adapter.loadPolicy(model);

        model.printPolicy();
        if (autoBuildRoleLinks) {
            buildRoleLinks();
        }
    }
224969
def addApplication(self, name, version=None, path=None, disk_num=0, soft=-1):
        """"""

        fapp = Features()
        fapp.features.append(Feature("name", "=", name))
        if version:
            fapp.features.append(Feature("version", "=", version))
        if path:
            fapp.features.append(Feature("path", "=", path))
        self.features.append(Feature("disk.%d.applications" % disk_num, "contains", fapp, soft > 0))
335589
def add_basic_info(self, run_id, timestamp):
    """"""
    datetime = time.strftime('%A %b %d, %Y %H:%M:%S', time.localtime(timestamp))
    user = getpass.getuser()
    machine = socket.gethostname()
    buildroot = get_buildroot()
    # TODO: Get rid of the redundant 'path' key once everyone is off it.
    self.add_infos(('id', run_id), ('timestamp', timestamp), ('datetime', datetime),
                   ('user', user), ('machine', machine), ('path', buildroot),
                   ('buildroot', buildroot), ('version', version.VERSION))
1241736
@Override
    public String addPolicy(String name, String document)
    throws PolicyIndexException {
        writeLock.lock();
        try {
            logger.debug("Adding policy named: " + name);
            return doAdd(name, document);
        } finally {
            writeLock.unlock();
        }
    }
1183176
def add_stream(self, policy):
        
        _srtp_assert(lib.srtp_add_stream(self._srtp[0], policy._policy))
1302598
public static base_response add(nitro_service client, policydataset resource) throws Exception {
		policydataset addresource = new policydataset();
		addresource.name = resource.name;
		addresource.type = resource.type;
		addresource.indextype = resource.indextype;
		return addresource.add_resource(client);
	}
112159
def add_pape(resp, policies = [], nist_auth_level = 0, auth_time = nil)
      if papereq = OpenID::PAPE::Request.from_openid_request(openid_request)
        paperesp = OpenID::PAPE::Response.new
        policies.each { |p| paperesp.add_policy_uri(p) }
        paperesp.nist_auth_level = nist_auth_level
        paperesp.auth_time = auth_time.utc.iso8601
        resp.add_extension(paperesp)
      end
      resp
    end
631391
private void addPolicy(String pid, InputStream dsContent) throws GeneralException {
        LOG.info("Adding policy " + pid);

        String policy;

        try {
            policy = IOUtils.toString(dsContent);
            dsContent.close();
            m_policyIndex.addPolicy(pid, policy);
        } catch (IOException e) {
            throw new GeneralException("Error adding policy " + pid + " to policy index: " + e.getMessage(), e);
        } catch (PolicyIndexException e) {
            throw new GeneralException("Error adding policy " + pid + " to policy index: " + e.getMessage(), e);
        }


    }
161182
public static base_response add(nitro_service client, scpolicy resource) throws Exception {
		scpolicy addresource = new scpolicy();
		addresource.name = resource.name;
		addresource.url = resource.url;
		addresource.rule = resource.rule;
		addresource.delay = resource.delay;
		addresource.maxconn = resource.maxconn;
		addresource.action = resource.action;
		addresource.altcontentsvcname = resource.altcontentsvcname;
		addresource.altcontentpath = resource.altcontentpath;
		return addresource.add_resource(client);
	}
606830
def add(config, username, filename):
        """"""
        try:
            client = Client()
            client.prepare_connection()
            user_api = UserApi(client)
            key_api = API(client)
            key_api.add(username, user_api, filename)
        except (ldap3.core.exceptions.LDAPNoSuchAttributeResult,
                ldap_tools.exceptions.InvalidResult,
                ldap3.core.exceptions.LDAPAttributeOrValueExistsResult
                ) as err:  # pragma: no cover
            print('{}: {}'.format(type(err), err.args[0]))
        except Exception as err:  # pragma: no cover
            raise err from None
687348
@Override
	public void applyPolicy(String repositoryId, String policyId, String objectId, ExtensionsData extension) {
		policyService.applyPolicy(repositoryId, policyId, objectId, extension);
	}
720644
function addDerivedInfo(coverage) {
    Object.keys(coverage).forEach(function (k) {
      addDerivedInfoForFile(coverage[k]);
    });
  }
1217757
public static dospolicy_stats get(nitro_service service, String name) throws Exception{
		dospolicy_stats obj = new dospolicy_stats();
		obj.set_name(name);
		dospolicy_stats response = (dospolicy_stats) obj.stat_resource(service);
		return response;
	}