diff --git a/src/main/java/eu/h2020/symbiote/cloud/sla/model/Violation.java b/src/main/java/eu/h2020/symbiote/cloud/sla/model/Violation.java new file mode 100755 index 0000000..280f60a --- /dev/null +++ b/src/main/java/eu/h2020/symbiote/cloud/sla/model/Violation.java @@ -0,0 +1,62 @@ +/** + * Copyright 2017 Atos + * Contact: Atos + * + * 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; + } +} diff --git a/src/main/java/eu/h2020/symbiote/cloud/sla/model/ViolationNotification.java b/src/main/java/eu/h2020/symbiote/cloud/sla/model/ViolationNotification.java new file mode 100755 index 0000000..7b688b5 --- /dev/null +++ b/src/main/java/eu/h2020/symbiote/cloud/sla/model/ViolationNotification.java @@ -0,0 +1,43 @@ +/** + * Copyright 2017 Atos + * Contact: Atos + * + * 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 violations = new ArrayList<>(); + + public String getFederationId() { + return federationId; + } + + public void setFederationId(String federationId) { + this.federationId = federationId; + } + + public List getViolations() { + return violations; + } + + public void setViolations(List violations) { + this.violations = violations; + } +} diff --git a/src/main/java/eu/h2020/symbiote/util/RabbitConstants.java b/src/main/java/eu/h2020/symbiote/util/RabbitConstants.java index 1e13d1f..bb5129b 100644 --- a/src/main/java/eu/h2020/symbiote/util/RabbitConstants.java +++ b/src/main/java/eu/h2020/symbiote/util/RabbitConstants.java @@ -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"; @@ -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"; }