diff options
author | 2019-08-29 10:49:50 -0400 | |
---|---|---|
committer | 2019-08-29 10:53:46 -0400 | |
commit | 116667df3977935f02206b3ce16e8d117ffa7545 (patch) | |
tree | 6f1f94ee933d508ae98a2a4bab4460d13cd4c628 /ccsdk-adaptors-lighty | |
parent | e82381b841584a4d4f94ade8ddf5a881353742bf (diff) |
Revert "Proposal to remove OSGi dependencies from the CCSDK project"
This reverts commit b1dd81ede363508f83c86ed497b8c0815045f8e5.
This commit contains a significant amount of new code with no
jUnit testing, which drives our code coverage for this repo
below mandatory 55% line coverage. Thus, this is not acceptable.
Change-Id: I8a3196df31d0c86747bdb3facd963983276a66e2
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'ccsdk-adaptors-lighty')
-rwxr-xr-x | ccsdk-adaptors-lighty/pom.xml | 59 | ||||
-rw-r--r-- | ccsdk-adaptors-lighty/src/main/java/org/onap/ccsdk/sli/adaptors/lighty/CcsdkAdaptorsLightyModule.java | 175 |
2 files changed, 0 insertions, 234 deletions
diff --git a/ccsdk-adaptors-lighty/pom.xml b/ccsdk-adaptors-lighty/pom.xml deleted file mode 100755 index 8e6a70ce..00000000 --- a/ccsdk-adaptors-lighty/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>odlparent-lite</artifactId> - <version>1.4.1-SNAPSHOT</version> - <relativePath/> - </parent> - - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>ccsdk-adaptors-lighty</artifactId> - <version>0.6.1-SNAPSHOT</version> - <packaging>jar</packaging> - - <dependencies> - <dependency> - <groupId>org.onap.ccsdk.sli.core</groupId> - <artifactId>ccsdk-core-lighty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>aai-service-lighty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>ansible-adapter-lighty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>mdsal-resource-lighty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>netbox-client-lighty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>resource-assignment-lighty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>saltstack-adapter-lighty</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.ccsdk.sli.adaptors</groupId> - <artifactId>sql-resource-lighty</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> -</project> diff --git a/ccsdk-adaptors-lighty/src/main/java/org/onap/ccsdk/sli/adaptors/lighty/CcsdkAdaptorsLightyModule.java b/ccsdk-adaptors-lighty/src/main/java/org/onap/ccsdk/sli/adaptors/lighty/CcsdkAdaptorsLightyModule.java deleted file mode 100644 index 102c01c7..00000000 --- a/ccsdk-adaptors-lighty/src/main/java/org/onap/ccsdk/sli/adaptors/lighty/CcsdkAdaptorsLightyModule.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * ============LICENSE_START========================================== - * Copyright (c) 2019 PANTHEON.tech s.r.o. - * =================================================================== - * 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. - * ============LICENSE_END============================================ - * - */ -package org.onap.ccsdk.sli.adaptors.lighty; - -import io.lighty.core.controller.api.AbstractLightyModule; -import org.onap.ccsdk.sli.adaptors.aai.lighty.AaaServiceModule; -import org.onap.ccsdk.sli.adaptors.ansible.lighty.AnsibleAdapterModule; -import org.onap.ccsdk.sli.adaptors.netbox.lighty.NetboxClientModule; -import org.onap.ccsdk.sli.adaptors.resource.lighty.ResourceModule; -import org.onap.ccsdk.sli.adaptors.resource.mdsal.lighty.MdsalResourceModule; -import org.onap.ccsdk.sli.adaptors.resource.sql.lighty.SqlModule; -import org.onap.ccsdk.sli.adaptors.saltstack.lighty.SaltstackAdapterModule; -import org.onap.ccsdk.sli.core.dblib.DbLibService; -import org.onap.ccsdk.sli.core.lighty.common.CcsdkLightyUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The implementation of the {@link io.lighty.core.controller.api.LightyModule} that groups all other LightyModules - * from the ccsdk-sli-adaptors repository so they can be all treated as one component (for example started/stopped - * at once). - * For more information about the lighty.io visit the website https://lighty.io. - */ -public class CcsdkAdaptorsLightyModule extends AbstractLightyModule { - - private static final Logger LOG = LoggerFactory.getLogger(CcsdkAdaptorsLightyModule.class); - - private DbLibService dbLibService; - - private AaaServiceModule aaaServiceModule; - private AnsibleAdapterModule ansibleAdapterModule; - private MdsalResourceModule mdsalResourceModule; - private NetboxClientModule netboxClientModule; - private ResourceModule resourceModule; - private SaltstackAdapterModule saltstackAdapterModule; - private SqlModule sqlModule; - - public CcsdkAdaptorsLightyModule(DbLibService dbLibService) { - this.dbLibService = dbLibService; - } - - @Override - protected boolean initProcedure() { - LOG.debug("Initializing CCSDK Adaptors Lighty module..."); - - this.aaaServiceModule = new AaaServiceModule(); - if (!CcsdkLightyUtils.startLightyModule(aaaServiceModule)) { - LOG.error("Unable to start AaaServiceModule in CCSDK Adaptors Lighty module!"); - return false; - } - - this.ansibleAdapterModule = new AnsibleAdapterModule(); - if (!CcsdkLightyUtils.startLightyModule(ansibleAdapterModule)) { - LOG.error("Unable to start AnsibleAdapterModule in CCSDK Adaptors Lighty module!"); - return false; - } - - this.mdsalResourceModule = new MdsalResourceModule(); - if (!CcsdkLightyUtils.startLightyModule(mdsalResourceModule)) { - LOG.error("Unable to start MdsalResourceModule in CCSDK Adaptors Lighty module!"); - return false; - } - - this.netboxClientModule = new NetboxClientModule(dbLibService); - if (!CcsdkLightyUtils.startLightyModule(netboxClientModule)) { - LOG.error("Unable to start NetboxClientModule in CCSDK Adaptors Lighty module!"); - return false; - } - - this.resourceModule = new ResourceModule(dbLibService); - if (!CcsdkLightyUtils.startLightyModule(resourceModule)) { - LOG.error("Unable to start ResourceModule in CCSDK Adaptors Lighty module!"); - return false; - } - - this.saltstackAdapterModule = new SaltstackAdapterModule(); - if (!CcsdkLightyUtils.startLightyModule(saltstackAdapterModule)) { - LOG.error("Unable to start SaltstackAdapterModule in CCSDK Adaptors Lighty module!"); - return false; - } - - this.sqlModule = new SqlModule(dbLibService); - if (!CcsdkLightyUtils.startLightyModule(sqlModule)) { - LOG.error("Unable to start SqlModule in CCSDK Adaptors Lighty module!"); - return false; - } - - LOG.debug("CCSDK Adaptors Lighty module was initialized successfully"); - return true; - } - - @Override - protected boolean stopProcedure() { - LOG.debug("Stopping CCSDK Adaptors Lighty module..."); - - boolean stopSuccessful = true; - - if (!CcsdkLightyUtils.stopLightyModule(sqlModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(saltstackAdapterModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(resourceModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(netboxClientModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(mdsalResourceModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(ansibleAdapterModule)) { - stopSuccessful = false; - } - - if (!CcsdkLightyUtils.stopLightyModule(aaaServiceModule)) { - stopSuccessful = false; - } - - if (stopSuccessful) { - LOG.debug("CCSDK Adaptors Lighty module was stopped successfully"); - } else { - LOG.error("CCSDK Adaptors Lighty module was not stopped successfully!"); - } - return stopSuccessful; - } - - public AaaServiceModule getAaaServiceModule() { - return aaaServiceModule; - } - - public AnsibleAdapterModule getAnsibleAdapterModule() { - return ansibleAdapterModule; - } - - public MdsalResourceModule getMdsalResourceModule() { - return mdsalResourceModule; - } - - public NetboxClientModule getNetboxClientModule() { - return netboxClientModule; - } - - public ResourceModule getResourceModule() { - return resourceModule; - } - - public SaltstackAdapterModule getSaltstackAdapterModule() { - return saltstackAdapterModule; - } - - public SqlModule getSqlModule() { - return sqlModule; - } -} |