Skip to content

Commit

Permalink
Add SLA classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Antonio Sanchez committed Jul 31, 2018
1 parent 4a4f19c commit b406386
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
62 changes: 62 additions & 0 deletions src/main/java/eu/h2020/symbiote/cloud/sla/model/Violation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**
* Copyright 2017 Atos
* Contact: Atos <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package eu.h2020.symbiote.cloud.sla.model;

import java.util.Date;

public class Violation {

private String constraint;

private String actualValue;

private String deviceId;

private Date date;

public String getConstraint() {
return constraint;
}

public void setConstraint(String constraint) {
this.constraint = constraint;
}

public String getActualValue() {
return actualValue;
}

public void setActualValue(String actualValue) {
this.actualValue = actualValue;
}

public String getDeviceId() {
return deviceId;
}

public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}

public Date getDate() {
return date;
}

public void setDate(Date date) {
this.date = date;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Copyright 2017 Atos
* Contact: Atos <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package eu.h2020.symbiote.cloud.sla.model;

import java.util.ArrayList;
import java.util.List;

public class ViolationNotification {

private String federationId;

private List<Violation> violations = new ArrayList<>();

public String getFederationId() {
return federationId;
}

public void setFederationId(String federationId) {
this.federationId = federationId;
}

public List<Violation> getViolations() {
return violations;
}

public void setViolations(List<Violation> violations) {
this.violations = violations;
}
}
8 changes: 8 additions & 0 deletions src/main/java/eu/h2020/symbiote/util/RabbitConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public interface RabbitConstants {
String EXCHANGE_PLATFORM_REGISTRY_AUTODELETE_PROPERTY = "rabbit.exchange.platformRegistry.autodelete";
String EXCHANGE_PLATFORM_REGISTRY_INTERNAL_PROPERTY = "rabbit.exchange.platformRegistry.constants";

String EXCHANGE_SLA_NAME_PROPERTY = "rabbit.exchange.sla.name";
String EXCHANGE_SLA_TYPE_PROPERTY = "rabbit.exchange.sla.type";
String EXCHANGE_SLA_DURABLE_PROPERTY = "rabbit.exchange.sla.durable";
String EXCHANGE_SLA_AUTODELETE_PROPERTY = "rabbit.exchange.sla.autodelete";
String EXCHANGE_SLA_INTERNAL_PROPERTY = "rabbit.exchange.sla.constants";

String ROUTING_KEY_RH_REGISTER_PROPERTY = "rabbit.routingKey.rh.core.register";
String ROUTING_KEY_RH_UPDATE_PROPERTY = "rabbit.routingKey.rh.core.update";
String ROUTING_KEY_RH_DELETE_PROPERTY = "rabbit.routingKey.rh.core.delete";
Expand All @@ -45,4 +51,6 @@ public interface RabbitConstants {
String ROUTING_KEY_TRUST_RESOURCE_UPDATED = "rabbit.routingKey.trust.resourceUpdated";
String ROUTING_KEY_TRUST_PLATFORM_UPDATED = "rabbit.routingKey.trust.platformUpdated";
String ROUTING_KEY_TRUST_ADAPTIVE_RESOURCE_UPDATED = "rabbit.routingKey.trust.adaptiveResourceUpdated";

String ROUTING_KEY_SLA_VIOLATION_PROPERTY = "rabbit.routingKey.sla.violation";
}

0 comments on commit b406386

Please sign in to comment.