Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
	build.gradle
	cli/build.gradle
	fault-correlator/build.gradle
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/ConfigurationBeans.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/NFVORequestorWrapperWrapper.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/OpenbatonEvent.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/OpenbatonEventReceiver.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/RecoveryAction.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/RecoveryActionStatus.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/RecoveryActionType.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/RestEventReceiver.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/droolsconfig/DroolsAutoConfiguration.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/droolsconfig/KieSessionGlobalConfigurationImpl.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/exceptions/FaultCorrelatorException.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/exceptions/FaultManagementPolicyException.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/exceptions/NFVORequestorException.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/interfaces/EventNfvoReceiver.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/interfaces/EventReceiver.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/interfaces/FaultCorrelatorManager.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/interfaces/KieSessionGlobalConfiguration.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/interfaces/NFVORequestorWrapper.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/policymanagement/MonitoringManagerImpl.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/policymanagement/PolicyManagerImpl.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/policymanagement/catalogue/NetworkServiceRecordShort.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/policymanagement/catalogue/VNFCInstanceShort.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/policymanagement/catalogue/VirtualDeploymentUnitShort.java
	fault-correlator/src/main/java/org.openbaton.faultmanagement.fc/policymanagement/catalogue/VirtualNetworkFunctionRecordShort.java
	fault-correlator/src/main/resources/rules/fault_resolution.drl
	fault-correlator/src/main/resources/rules/pre_rules.drl
	fault-correlator/src/main/resources/rules/vnfm_fault_correlator.drl
	gradle/application.java.gradle
	gradle/run.application.java.gradle
	high-availability/build.gradle
	high-availability/src/main/java/org/openbaton/faultmanagement/ha/HighAvailabilityManager.java
	high-availability/src/main/java/org/openbaton/faultmanagement/ha/HighAvailabilityManagerImpl.java
	high-availability/src/main/java/org/openbaton/faultmanagement/ha/exceptions/HighAvailabilityException.java
	openbaton-fm.sh
	settings.gradle
	src/main/java/org/openbaton/faultmanagement/Application.java
	src/main/java/org/openbaton/faultmanagement/system/SystemStartup.java
	src/main/resources/application.properties
  • Loading branch information
marcellom committed May 19, 2016
2 parents d43cb43 + 7903c8f commit ce53742
Show file tree
Hide file tree
Showing 51 changed files with 1,110 additions and 797 deletions.
Binary file modified README.md
Binary file not shown.
31 changes: 16 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/*
* Copyright (c) 2015 Fraunhofer FOKUS
* 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.
*/
* Copyright (c) 2015-2016 Fraunhofer FOKUS
* 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.
*/

apply plugin: 'java'
apply from: 'gradle/application.java.gradle'

Expand Down Expand Up @@ -84,9 +85,9 @@ allprojects{
compile 'org.springframework.boot:spring-boot:' + springBootVersion
compile 'org.springframework.boot:spring-boot-starter-logging:' + springBootVersion

//Openbaton sdk
//Openbaton
compile 'org.openbaton:monitoring:2.0.1'

compile 'org.openbaton:monitoring:2.0.0'
testCompile 'org.springframework:spring-test:' + springVersion
//Gson
compile 'com.google.code.gson:gson:2.4'
Expand Down
29 changes: 14 additions & 15 deletions cli/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
/*
* Copyright (c) 2015 Fraunhofer FOKUS
* 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.
*/
group 'org.openbaton'
version '1.0-SNAPSHOT'
* Copyright (c) 2015-2016 Fraunhofer FOKUS
* 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.
*/

group 'org.openbaton'
apply plugin: 'java'

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) 2015-2016 Fraunhofer FOKUS
* 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 org.openbaton.faultmanagement.cli;

import jline.console.ConsoleReader;
Expand Down
77 changes: 77 additions & 0 deletions etc/fms.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copyright (c) 2015-2016 Fraunhofer FOKUS
# 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.

###################################################
####### Open Baton FM Related properties ##########
###################################################

# period time to check the VNF to monitor (in seconds)
fms.monitoringcheck=60
# period time to check the redundancy of a VNF (in seconds)
fms.redundancycheck=60
# Open Baton FM port
server.port=9000

#########################################
########## Logging properties ###########
#########################################

logging.level.org.springframework=INFO
logging.level.org.hibernate=INFO
logging.level.org.openbaton=INFO

logging.file=/var/log/openbaton/openbaton-fm.log

################################################
####### Open Baton Related properties ##########
################################################
nfvo.ip=
# nfvo.port=8080
nfvo-usr=
nfvo-pwd=

################################################
####### Rabbit MQ Related properties ##########
################################################
spring.rabbitmq.host=${nfvo.ip}
spring.rabbitmq.port=15672
spring.rabbitmq.username=admin
spring.rabbitmq.password=openbaton

##############################################
####### Database Related properties ##########
##############################################

# DB properties
spring.datasource.username=admin
spring.datasource.password=changeme

# mysql jdbc
spring.datasource.url=jdbc:mysql://localhost:3306/faultmanagement
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect

spring.datasource.validationQuery=SELECT 1
spring.datasource.testOnBorrow=true

# hibernate properties
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=update


#########################################
############### GSON ####################
#########################################

spring.http.converters.preferred-json-mapper=gson

39 changes: 19 additions & 20 deletions fault-correlator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
/*
* Copyright (c) 2015 Fraunhofer FOKUS
* 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.
*/
group 'org.openbaton'
version '1.0-SNAPSHOT'
* Copyright (c) 2015-2016 Fraunhofer FOKUS
* 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.
*/

group 'org.openbaton'
apply plugin: 'java'


repositories {
mavenCentral()
maven {
Expand All @@ -30,9 +28,6 @@ repositories {

dependencies {

//Alarm entity
//compile project (':monitoring')
//compile project (':catalogue')
compile project (':high-availability')

//Rest Annotation in AlarmReceiverImpl
Expand All @@ -48,6 +43,10 @@ dependencies {
compile 'org.springframework:spring-jdbc'
compile 'org.springframework.boot:spring-boot-starter-jdbc:1.3.3.RELEASE'

//NFVO Requestor
compile 'org.openbaton:sdk:2.0.1' /*{
exclude module: 'catalogue'
}*/

//RABBIT
compile 'org.springframework.boot:spring-boot-starter-amqp:1.3.3.RELEASE'
Expand All @@ -57,4 +56,4 @@ dependencies {

testCompile 'org.mockito:mockito-all:1.10.19'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/*
* Copyright (c) 2015 Fraunhofer FOKUS
* 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.
*/
* Copyright (c) 2015-2016 Fraunhofer FOKUS
* 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 org.openbaton.faultmanagement.fc;

import com.google.gson.Gson;
Expand Down Expand Up @@ -42,6 +43,7 @@
public class ConfigurationBeans {
public static final String queueName_eventInstatiateFinish = "nfvo.fm.nsr.create";
public static final String queueName_eventResourcesReleaseFinish = "nfvo.fm.nsr.delete";
public static final String queueName_vnfEvents = "nfvo.fm.vnf.events";
private Logger logger;

@PostConstruct
Expand Down Expand Up @@ -74,6 +76,11 @@ public Queue getCreationQueue(){
logger.debug("Created Queue for NSR Create event");
return new Queue(queueName_eventInstatiateFinish,false,false,true);
}
@Bean
public Queue getVnfEventsQueue(){
logger.debug("Created Queue for VNF events");
return new Queue(queueName_vnfEvents,false,false,true);
}

@Bean
public Queue getDeletionQueue(){
Expand All @@ -87,6 +94,12 @@ public Binding setCreationBinding(@Qualifier("getCreationQueue") Queue queue, To
return BindingBuilder.bind(queue).to(topicExchange).with("ns-creation");
}

@Bean
public Binding setVnfEventsBinding(@Qualifier("getVnfEventsQueue") Queue queue, TopicExchange topicExchange){
logger.debug("Created Binding for VNF events");
return BindingBuilder.bind(queue).to(topicExchange).with("vnf-events");
}

@Bean
public Binding setDeletionBinding(@Qualifier("getDeletionQueue") Queue queue, TopicExchange topicExchange){
logger.debug("Created Binding for NSR Deletion event");
Expand All @@ -98,6 +111,11 @@ public MessageListenerAdapter setCreationMessageListenerAdapter(OpenbatonEventRe
return new MessageListenerAdapter(receiver,"receiveNewNsr");
}

@Bean
public MessageListenerAdapter setVnfEventsMessageListenerAdapter(OpenbatonEventReceiver receiver){
return new MessageListenerAdapter(receiver,"vnfEvent");
}

@Bean
public MessageListenerAdapter setDeletionMessageListenerAdapter(OpenbatonEventReceiver receiver){
return new MessageListenerAdapter(receiver,"deleteNsr");
Expand All @@ -112,6 +130,16 @@ public SimpleMessageListenerContainer setCreationMessageContainer(ConnectionFact
res.setMessageListener(adapter);
return res;
}
@Bean
public SimpleMessageListenerContainer setVnfEventsMessageContainer(ConnectionFactory connectionFactory, @Qualifier("getVnfEventsQueue") Queue queue, @Qualifier("setVnfEventsMessageListenerAdapter") MessageListenerAdapter adapter){
logger.debug("Created MessageContainer for VNF events");
SimpleMessageListenerContainer res = new SimpleMessageListenerContainer();
res.setConnectionFactory(connectionFactory);
res.setQueues(queue);
res.setMessageListener(adapter);
return res;
}


@Bean
public SimpleMessageListenerContainer setDeletionMessageContainer(ConnectionFactory connectionFactory, @Qualifier("getDeletionQueue") Queue queue, @Qualifier("setDeletionMessageListenerAdapter") MessageListenerAdapter messageListenerAdapter){
Expand Down
Loading

0 comments on commit ce53742

Please sign in to comment.