Examples of AlertDefinition


Examples of org.rhq.core.domain.alert.AlertDefinition

        }

        int modified = 0;

        for (Integer groupAlertDefinitionId : groupAlertDefinitionIds) {
            AlertDefinition groupAlertDefinition = entityManager.find(AlertDefinition.class, groupAlertDefinitionId);
            if (null == groupAlertDefinition || groupAlertDefinition.getEnabled() || groupAlertDefinition.getDeleted()) {
                continue;
            }

            // enable the template
            groupAlertDefinition.setEnabled(true);
            ++modified;

            // enable the child resource-level defs
            List<Integer> childDefinitionIds = getChildrenAlertDefinitionIds(groupAlertDefinitionId);
            if (childDefinitionIds.isEmpty()) {
View Full Code Here

Examples of org.rhq.modules.integrationTests.restApi.d.AlertDefinition

    @Test
    public void testCreateDeleteBasicAlertDefinitionNoneDampening() throws Exception {

        int definitionId=0;
        try {
            AlertDefinition alertDefinition = new AlertDefinition();
            alertDefinition.setName("-x-test-definition");
            alertDefinition.setEnabled(false);
            alertDefinition.setPriority("LOW");
            alertDefinition.setDampeningCategory("NONE");

            AlertDefinition result =
            given()
                .header(acceptJson)
                .contentType(ContentType.JSON)
                .body(alertDefinition)
                .queryParam("resourceId",_platformId)
            .expect()
                .statusCode(201)
                .body("dampeningCategory",is("NONE"))
                .body("dampeningCount",is(0))
                .body("dampeningPeriod",is(0))
            .when()
                .post("/alert/definitions")
            .as(AlertDefinition.class);

            definitionId = result.getId();

        } finally {
            cleanupDefinition(definitionId);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.