From 1c192d2dd68724e292b6a30f463085a262e1e813 Mon Sep 17 00:00:00 2001 From: Patrick Brady Date: Wed, 15 Feb 2017 23:11:26 -0800 Subject: Moving all files to root directory Change-Id: Ica5535fd6ec85f350fe1640b42137b49f83f10f0 Signed-off-by: Patrick Brady --- appc-dispatcher/appc-license-manager/.gitignore | 1 + .../org.eclipse.wst.common.project.facet.core.xml | 4 + .../appc-license-manager-api/.gitignore | 1 + .../org.eclipse.wst.common.project.facet.core.xml | 4 + .../appc-license-manager-api/pom.xml | 47 ++++++ .../java/org/openecomp/appc/licmgr/Constants.java | 109 +++++++++++++ .../appc/licmgr/LicenseDataAccessService.java | 54 +++++++ .../org/openecomp/appc/licmgr/LicenseManager.java | 58 +++++++ .../appc/licmgr/exception/DataAccessException.java | 45 ++++++ .../appc/licmgr/objects/LicenseModel.java | 45 ++++++ .../appc-license-manager-core/.gitignore | 1 + .../org.eclipse.wst.common.project.facet.core.xml | 4 + .../appc-license-manager-core/pom.xml | 71 +++++++++ .../licmgr/impl/LicenseDataAccessServiceImpl.java | 177 +++++++++++++++++++++ .../appc/licmgr/impl/LicenseManagerImpl.java | 100 ++++++++++++ .../resources/OSGI-INF/blueprint/blueprint.xml | 33 ++++ .../org/openecomp/appc/default.properties | 49 ++++++ .../appc/licmgr/LicenseManagerImplTest.java | 22 +++ .../openecomp/appc/licmgr/LicenseManagerMock.java | 57 +++++++ .../appc/licmgr/LicenseManagerPluginImplTest.java | 22 +++ .../openecomp/appc/licmgr/LicenseServiceMock.java | 56 +++++++ .../appc/licmgr/TestVfLicenseModelConvert.java | 61 +++++++ .../appc-license-manager-features/.gitignore | 3 + .../appc-license-manager-features/pom.xml | 107 +++++++++++++ .../src/main/resources/features.xml | 34 ++++ appc-dispatcher/appc-license-manager/pom.xml | 22 +++ 26 files changed, 1187 insertions(+) create mode 100644 appc-dispatcher/appc-license-manager/.gitignore create mode 100644 appc-dispatcher/appc-license-manager/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/.gitignore create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/pom.xml create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseDataAccessService.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseManager.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/exception/DataAccessException.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/objects/LicenseModel.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/.gitignore create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/pom.xml create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/OSGI-INF/blueprint/blueprint.xml create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/org/openecomp/appc/default.properties create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerImplTest.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerMock.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerPluginImplTest.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseServiceMock.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/TestVfLicenseModelConvert.java create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-features/.gitignore create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-features/pom.xml create mode 100644 appc-dispatcher/appc-license-manager/appc-license-manager-features/src/main/resources/features.xml create mode 100644 appc-dispatcher/appc-license-manager/pom.xml (limited to 'appc-dispatcher/appc-license-manager') diff --git a/appc-dispatcher/appc-license-manager/.gitignore b/appc-dispatcher/appc-license-manager/.gitignore new file mode 100644 index 000000000..b83d22266 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/appc-dispatcher/appc-license-manager/.settings/org.eclipse.wst.common.project.facet.core.xml b/appc-dispatcher/appc-license-manager/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 000000000..f4ef8aa0a --- /dev/null +++ b/appc-dispatcher/appc-license-manager/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,4 @@ + + + + diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/.gitignore b/appc-dispatcher/appc-license-manager/appc-license-manager-api/.gitignore new file mode 100644 index 000000000..b83d22266 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/.settings/org.eclipse.wst.common.project.facet.core.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-api/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 000000000..f4ef8aa0a --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,4 @@ + + + + diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/pom.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-api/pom.xml new file mode 100644 index 000000000..5bf4457a6 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/pom.xml @@ -0,0 +1,47 @@ + + 4.0.0 + + org.openecomp.appc + appc-license-manager + 1.0.0 + + appc-license-manager-api + bundle + + appc-license-manager-api + http://maven.apache.org + + + UTF-8 + + + + + org.openecomp.appc + appc-common + ${project.version} + + + org.openecomp.sdnc.core + dblib-provider + + + + + + org.apache.felix + maven-bundle-plugin + + + ${project.artifactId} + ${project.version} + org.openecomp.appc.licmgr,org.openecomp.appc.licmgr.exception,org.openecomp.appc.licmgr.objects + !dblib-provider,appc-common,eelf-core,logback-core,logback-classic;scope=compile|runtime;inline=false + true + !groovy.lang,!javax.*,!org.apache.log,!org.apache.log4j.*,!org.codehaus.jackson.*,!org.codehaus.jackson.map.*,!org.codehaus.commons.compiler,!org.codehaus.groovy.*,!org.codehaus.janino,!org.jasypt.*,!com.ibm.icu.*,!com.sun.faces.*,* + + + + + + diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java new file mode 100644 index 000000000..81ce0e713 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java @@ -0,0 +1,109 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; + +public class Constants { + + private Constants(){} + + public static final String CONFIGURE_PATH = "/restconf/config/opendaylight-inventory:nodes/node/"; + public static final String CONNECT_PATH = "/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules"; + public static final String CHECK_CONNECTION_PATH = "/restconf/operational/opendaylight-inventory:nodes/node/"; + public static final String DISCONNECT_PATH = "/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/"; + + public static final String CONTROLLER_IP = "127.0.0.1"; + public static final int CONTROLLER_PORT = 8181; + public static final String PROTOCOL = "http"; + + public static final String VF_LICENSE = "VF_LICENSE"; + + // tables and fields + public static final String NETCONF_SCHEMA = "sdnctl"; + public static final String SDNCTL_SCHEMA = "sdnctl"; + public static final String DEVICE_AUTHENTICATION_TABLE_NAME = "DEVICE_AUTHENTICATION"; + public static final String CONFIGFILES_TABLE_NAME = "CONFIGFILES"; + public static final String DEVICE_INTERFACE_LOG_TABLE_NAME = "DEVICE_INTERFACE_LOG"; + public static final String FILE_CONTENT_TABLE_FIELD_NAME = "FILE_CONTENT"; + public static final String FILE_NAME_TABLE_FIELD_NAME = "FILE_NAME"; + public static final String USER_NAME_TABLE_FIELD_NAME = "USER_NAME"; + public static final String PASSWORD_TABLE_FIELD_NAME = "PASSWORD"; + public static final String PORT_NUMBER_TABLE_FIELD_NAME = "PORT_NUMBER"; + public static final String VNF_TYPE_TABLE_FIELD_NAME = "VNF_TYPE"; + public static final String SERVICE_INSTANCE_ID_FIELD_NAME = "SERVICE_INSTANCE_ID"; + public static final String REQUEST_ID_FIELD_NAME = "REQUEST_ID"; + public static final String CREATION_DATE_FIELD_NAME = "CREATION_DATE"; + public static final String LOG_FIELD_NAME = "LOG"; + public static final String ASDC_ARTIFACTS_TABLE_NAME = "ASDC_ARTIFACTS"; + + // input fields names + public static final String PAYLOAD = "payload"; + + // constants fo DG + public static final String VNF_TYPE_FIELD_NAME = "org.openecomp.appc.vftype"; + public static final String VNF_VERSION_FIELD_NAME = "org.openecomp.appc.vfversion"; + public static final String VNF_RESOURCE_VERSION_FIELD_NAME = "org.openecomp.appc.resource-version"; + public static final String TARGET_VNF_TYPE = "target-vnf-type"; + public static final String FILE_CONTENT_FIELD_NAME = "file-content"; + public static final String CONNECTION_DETAILS_FIELD_NAME = "connection-details"; + public static final String CONFIGURATION_FILE_FIELD_NAME = "configuration-file-name"; + public static final String VNF_HOST_IP_ADDRESS_FIELD_NAME = "vnf-host-ip-address"; + public static final String UPGRADE_VERSION = "upgrade-version"; + public static final String DG_ERROR_FIELD_NAME = "org.openecomp.appc.dg.error"; + public static final String DG_OUTPUT_STATUS_MESSAGE = "output.status.message"; + public static final String RESOURCEKEY = "resourceKey"; + public static final String REQ_ID_FIELD_NAME = "org.openecomp.appc.reqid"; + public static final String API_VERSION_FIELD_NAME = "org.openecomp.appc.apiversion"; + public static final String MODEL_ENTITLMENT_POOL_UUID_NAME = "model.entitlement.pool.uuid"; + public static final String MODEL_LICENSE_KEY_UUID_NAME = "model.license.key.uuid"; + public static final String ENTITLMENT_POOL_UUID_NAME = "entitlement.pool.uuid"; + public static final String LICENSE_KEY_UUID_NAME = "license.key.uuid"; + public static final String IS_ACQUIRE_LICENSE_REQUIRE ="is.acquire-license.require"; + public static final String IS_RELEASE_LICENSE_REQUIRE ="is.release-license.require"; + + public static final String AAI_ENTITLMENT_POOL_UUID_NAME = "aai.input.data.entitlement-assignment-group-uuid"; + public static final String AAI_LICENSE_KEY_UUID_NAME = "aai.input.data.license-assignment-group-uuid"; + public static final String AAI_LICENSE_KEY_VALUE = "aai.input.data.license-key"; + public static final String IS_AAI_ENTITLEMENT_UPDATE_REQUIRE = "is.aai-entitlement-update.require"; + public static final String IS_AAI_LICENSE_UPDATE_REQUIRE = "is.aai-license-update.require"; + public static final String IS_ACQUIRE_ENTITLEMENT_REQUIRE ="is.acquire-entitlement.require"; + public static final String IS_RELEASE_ENTITLEMENT_REQUIRE ="is.release-entitlement.require"; + + public enum ASDC_ARTIFACTS_FIELDS { + SERVICE_UUID, + DISTRIBUTION_ID, + SERVICE_NAME, + SERVICE_DESCRIPTION, + RESOURCE_UUID, + RESOURCE_INSTANCE_NAME, + RESOURCE_NAME, + RESOURCE_VERSION, + RESOURCE_TYPE, + ARTIFACT_UUID, + ARTIFACT_TYPE, + ARTIFACT_VERSION, + ARTIFACT_DESCRIPTION, + INTERNAL_VERSION, + CREATION_DATE, + ARTIFACT_NAME, + ARTIFACT_CONTENT + } +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseDataAccessService.java b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseDataAccessService.java new file mode 100644 index 000000000..34936f859 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseDataAccessService.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; + +import java.util.Map; + +import org.openecomp.appc.licmgr.exception.DataAccessException; +import org.openecomp.sdnc.sli.resource.dblib.DbLibService; + + +@SuppressWarnings("JavaDoc") +public interface LicenseDataAccessService { + + /** + * + * @param schema + */ + void setSchema(String schema); + + /** + * + * @param vnfType resource name + * @param vnfVersion resource version + * @return map contains requested fields as Strings + * @throws RuntimeException + */ + Map retrieveLicenseModelData(String vnfType, String vnfVersion, String... fields) throws DataAccessException; + + /** + * + * @param parameters parameters to store in artifacts table + * @throws RuntimeException + */ + void storeArtifactPayload(Map parameters) throws RuntimeException; +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseManager.java b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseManager.java new file mode 100644 index 000000000..40c7d8bb6 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/LicenseManager.java @@ -0,0 +1,58 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; + +import java.util.Map; + +import org.openecomp.appc.licmgr.exception.DataAccessException; +import org.openecomp.appc.licmgr.objects.LicenseModel; + + +public interface LicenseManager { + + /** + * + * @param vnfType + * @param vnfVersion + * @return pojo object represented license model + * @throws DataAccessException + */ + LicenseModel retrieveLicenseModel(String vnfType, String vnfVersion) throws DataAccessException; + + /** + * + * @param vnfType resource name + * @param vnfVersion resource version + * @return map contains requested fields as Strings + * @throws RuntimeException + */ + Map retrieveLicenseModelData(String vnfType, String vnfVersion, String... fields) throws + DataAccessException; + + /** + * + * @param parameters parameters to store in artifacts table + * @throws RuntimeException + */ + void storeArtifactPayload(Map parameters) throws RuntimeException; + +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/exception/DataAccessException.java b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/exception/DataAccessException.java new file mode 100644 index 000000000..a7e3a084a --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/exception/DataAccessException.java @@ -0,0 +1,45 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr.exception; + + + +public class DataAccessException extends RuntimeException { + + private static final long serialVersionUID = -155423437162622414L; + + public DataAccessException(){ + } + + public DataAccessException(String message){ + super(message); + } + + public DataAccessException(Throwable cause){ + super(cause); + } + + public DataAccessException(String message , Throwable cause){ + super(message , cause); + } + +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/objects/LicenseModel.java b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/objects/LicenseModel.java new file mode 100644 index 000000000..c3c886d77 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/objects/LicenseModel.java @@ -0,0 +1,45 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr.objects; + +public class LicenseModel { + + private String entitlementPoolUuid; + + private String licenseKeyGroupUuid; + + public String getEntitlementPoolUuid() { + return entitlementPoolUuid; + } + + public void setEntitlementPoolUuid(String entitlementPoolUuid) { + this.entitlementPoolUuid = entitlementPoolUuid; + } + + public String getLicenseKeyGroupUuid() { + return licenseKeyGroupUuid; + } + + public void setLicenseKeyGroupUuid(String licenseKeyGroupUuid) { + this.licenseKeyGroupUuid = licenseKeyGroupUuid; + } +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/.gitignore b/appc-dispatcher/appc-license-manager/appc-license-manager-core/.gitignore new file mode 100644 index 000000000..b83d22266 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/.settings/org.eclipse.wst.common.project.facet.core.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-core/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 000000000..f4ef8aa0a --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,4 @@ + + + + diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/pom.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-core/pom.xml new file mode 100644 index 000000000..1b209f1e0 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/pom.xml @@ -0,0 +1,71 @@ + + + + 4.0.0 + + org.openecomp.appc + appc-license-manager + 1.0.0 + + appc-license-manager-core + bundle + + APPC License Manager Bundle + appc-license-manager-core OSGi bundle project. + + + + org.openecomp.appc + appc-common + ${project.version} + + + org.openecomp.appc + appc-license-manager-api + ${project.version} + + + com.sun.mail + javax.mail + 1.5.0 + + + org.openecomp.sdnc.core + sli-common + compile + + + junit + junit + test + + + org.openecomp.sdnc.core + sli-provider + + + org.openecomp.sdnc.core + dblib-provider + + + + + + + org.apache.felix + maven-bundle-plugin + + + ${project.artifactId} + ${project.version} + !dblib-provider,appc-common,eelf-core,logback-core,logback-classic,javax.mail;scope=compile|runtime;inline=false + true + org.openecomp.appc.licmgr.LicenseManager + org.openecomp.appc.licmgr,org.openecomp.appc.licmgr.exception,org.openecomp.appc.licmgr.objects,javax.mail.internet,!javax.mail,!groovy.lang,!javax.jms,!org.apache.log,!org.apache.log4j.*,!org.codehaus.jackson.*,!org.codehaus.jackson.map.*,!org.codehaus.commons.compiler,!org.codehaus.groovy.*,!org.codehaus.janino,!org.jasypt.*,!com.ibm.icu.*,!com.sun.faces.*,* + + + + + + + diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java new file mode 100644 index 000000000..2aff1ffb9 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java @@ -0,0 +1,177 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr.impl; + +import org.openecomp.appc.licmgr.Constants; +import org.openecomp.appc.licmgr.LicenseDataAccessService; +import org.openecomp.appc.licmgr.exception.DataAccessException; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; +import org.openecomp.sdnc.sli.resource.dblib.DbLibService; +import org.osgi.framework.BundleContext; +import org.osgi.framework.FrameworkUtil; +import org.osgi.framework.ServiceReference; + +import javax.sql.rowset.CachedRowSet; + +import static org.openecomp.appc.licmgr.Constants.ASDC_ARTIFACTS_FIELDS; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + + +@SuppressWarnings("JavaDoc") +class LicenseDataAccessServiceImpl implements LicenseDataAccessService { + + private static EELFLogger logger = EELFManager.getInstance().getLogger(LicenseDataAccessServiceImpl.class); + + public void setSchema(String schema) { + this.schema = schema; + } + + private String schema; + + private DbLibService dbLibService; + + private void checkDbLibService() throws DataAccessException { + if (null != dbLibService) {return;} + + //get dblib service and send it to DAService + BundleContext bctx = FrameworkUtil.getBundle(LicenseManagerImpl.class).getBundleContext(); + ServiceReference sref = bctx.getServiceReference(DbLibService.class.getName()); + dbLibService = (DbLibService)bctx.getService(sref); + + } + + /** + * empty constructor + */ + public LicenseDataAccessServiceImpl(){} + + @Override + public Map retrieveLicenseModelData(String vnfType, String vnfVersion, String... fields) throws + DataAccessException { + + checkDbLibService(); + + Map result = new HashMap<>(); + if (null == fields || 0 == fields.length) fields = new String[]{ASDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT.name()}; + + String queryString = buildQueryStatement(); + + ArrayList argList = new ArrayList<>(); + argList.add(vnfType); + argList.add(vnfVersion); + argList.add(Constants.VF_LICENSE); + + try { + + final CachedRowSet data = dbLibService.getData(queryString, argList, Constants.NETCONF_SCHEMA); + + if (data.first()) { + for (String field : fields) { + result.put(field, data.getString(field)); + } + } else { + String msg = "Missing license model for VNF_TYPE: " + vnfType + " and VNF_VERSION: " + vnfVersion + " in table " + Constants.ASDC_ARTIFACTS_TABLE_NAME; + logger.info(msg); + } + } catch (SQLException e) { + logger.error("Error Accessing Database " + e); + throw new DataAccessException(e); + } + + return result; + } + + private String buildQueryStatement() { + return "select * " + "from " + Constants.ASDC_ARTIFACTS_TABLE_NAME + " " + + "where " + ASDC_ARTIFACTS_FIELDS.RESOURCE_NAME.name() + " = ?" + + " AND " + ASDC_ARTIFACTS_FIELDS.RESOURCE_VERSION.name() + " = ?" + + " AND " + ASDC_ARTIFACTS_FIELDS.ARTIFACT_TYPE.name() + " = ?"; + } + + /** + * Implementation of storeArtifactPayload() + * @see LicenseDataAccessService + */ + @Override + public void storeArtifactPayload(Map parameters) throws RuntimeException { + + checkDbLibService(); + + if(parameters == null || parameters.isEmpty()) { + throw new RuntimeException("No parameters for insert are provided"); + } + + String insertStr = "INSERT INTO " + Constants.ASDC_ARTIFACTS_TABLE_NAME + "("; + String valuesStr = "VALUES("; + String insertStatementStr; + + ArrayList params = new ArrayList<>(); + boolean firstTime = true; + for(Map.Entry entry : parameters.entrySet()) { + if(!firstTime) { + insertStr += ","; + valuesStr += ","; + } + else { + firstTime = false; + } + insertStr += entry.getKey(); + valuesStr += "?"; + + params.add(entry.getValue()); + } + + insertStr += ")"; + valuesStr += ")"; + insertStatementStr = insertStr + " " + valuesStr; + + executeStoreArtifactPayload(insertStatementStr, params); + } + + /** + * Exexutes insert statement for artifact payload + * @param insertStatementStr + * @param params + * @throws RuntimeException + */ + private void executeStoreArtifactPayload(String insertStatementStr, ArrayList params) throws RuntimeException { + + try { + logger.info("used schema=" + this.schema); + logger.info("insert statement=" + insertStatementStr); + + dbLibService.writeData(insertStatementStr, params, this.schema); + + logger.info("finished to execute insert"); + + } catch (SQLException e) { + logger.error("Storing Artifact payload failed - " + insertStatementStr); + throw new RuntimeException("Storing Artifact payload failed - " + insertStatementStr); + } + } + +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java new file mode 100644 index 000000000..815bb02ab --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java @@ -0,0 +1,100 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr.impl; + +import static org.openecomp.appc.licmgr.Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT; + +import java.util.Map; + +import org.openecomp.appc.licmgr.Constants; +import org.openecomp.appc.licmgr.LicenseDataAccessService; +import org.openecomp.appc.licmgr.LicenseManager; +import org.openecomp.appc.licmgr.exception.DataAccessException; +import org.openecomp.appc.licmgr.objects.LicenseModel; + + +@SuppressWarnings("all") +public class LicenseManagerImpl implements LicenseManager { + + private LicenseDataAccessService DAService; + + public void setDAService(LicenseDataAccessService daSrv){ + DAService = daSrv; + } + + public LicenseManagerImpl() { + DAService = new LicenseDataAccessServiceImpl(); + DAService.setSchema(Constants.SDNCTL_SCHEMA); + } + + @Override + public LicenseModel retrieveLicenseModel(String vnfType, String vnfVersion) throws DataAccessException { + + LicenseModel licenseModel; + try { + Map resultMap = DAService.retrieveLicenseModelData(vnfType, vnfVersion); + if (resultMap.isEmpty()) { + throw new DataAccessException(String.format("License model not found for vnfType='%s' and vnfVersion='%s'", vnfType, vnfVersion)); + } + String licenseModelXML = resultMap.get(ARTIFACT_CONTENT.name()); + licenseModel = convert(licenseModelXML); // JAXBUtil.toObject(licenseModelXML, VfLicenseModel.class); + } catch (DataAccessException le) { + throw le; + } catch (Exception e) { + throw new DataAccessException(e); + } + return licenseModel; + } + + @Override + public Map retrieveLicenseModelData(String vnfType, String vnfVersion, String... fields) throws DataAccessException { + + Map resultMap = DAService.retrieveLicenseModelData(vnfType, vnfVersion, fields); + return resultMap; + } + + @Override + public void storeArtifactPayload(Map parameters) throws RuntimeException { + + DAService.storeArtifactPayload(parameters); + } + + private static LicenseModel convert(String xml) { + + LicenseModel licenseModel = new LicenseModel(); + + int posEntitlementStart = xml.indexOf(""); + int posEntitlementEnd = xml.indexOf("", posEntitlementStart); + if (-1 != posEntitlementStart) { + licenseModel.setEntitlementPoolUuid(xml.substring(posEntitlementStart + "".length(), posEntitlementEnd)); + } + + int posLicenseStart = xml.indexOf(""); + int posLicenseEnd = xml.indexOf("", posEntitlementStart); + if (-1 != posLicenseStart) { + licenseModel.setLicenseKeyGroupUuid(xml.substring(posLicenseStart + "".length(), posLicenseEnd)); + } + + return licenseModel; + } + +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/OSGI-INF/blueprint/blueprint.xml new file mode 100644 index 000000000..c8efb8390 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -0,0 +1,33 @@ + + + + + + + + + + diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/org/openecomp/appc/default.properties b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/org/openecomp/appc/default.properties new file mode 100644 index 000000000..9d9e1d787 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/resources/org/openecomp/appc/default.properties @@ -0,0 +1,49 @@ +### +# ============LICENSE_START======================================================= +# openECOMP : APP-C +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property. All rights +# reserved. +# ================================================================================ +# 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========================================================= +### + +# Define the name and path of any user-provided configuration (bootstrap) file that can be loaded +# to supply configuration options +org.openecomp.appc.bootstrap.file=appc.properties +org.openecomp.appc.bootstrap.path=/opt/openecomp/appc/data/properties,${user.home},. + + +#Property below provided by appc.properties +#dmaap.poolMembers=:3904 + +dmaap.topic.read=APPC-TEST2 +dmaap.topic.write=APPC-TEST2 +#dmaap.topic.read.filter={"class":"Assigned","field":"request"} +dmaap.topic.read.filter={"class": "And","filters": [{"class": "Assigned","field": "request"},{"class": "Unassigned","field": "response"}]} +dmaap.client.name=APPC-TEST-CLIENT-LIC-MGR-MAIN +dmaap.client.name.id=0 +#dmaap.client.key=random +#dmaap.client.secret=random + +dmaap.threads.queuesize.min=1 +dmaap.threads.queuesize.max=1000 +dmaap.threads.poolsize.min=2 +dmaap.threads.poolsize.max=2 + +# +# This needs to be changed so that the action can be appended to the end of the URL path +# +#provider.urls.topology=https://admin:password@:8443/restconf/operations/appc-provider:topology-service +#provider.urls.topology=https://admin:password@:8443/restconf/operations/appc-provider: diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerImplTest.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerImplTest.java new file mode 100644 index 000000000..41bc7cadf --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerImplTest.java @@ -0,0 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerMock.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerMock.java new file mode 100644 index 000000000..ca7c1f2e9 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerMock.java @@ -0,0 +1,57 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; + +import java.util.Map; + +import org.openecomp.appc.licmgr.LicenseManager; +import org.openecomp.appc.licmgr.exception.DataAccessException; +import org.openecomp.appc.licmgr.objects.LicenseModel; + + +public class LicenseManagerMock implements LicenseManager { + + LicenseModel licenseModel; + @Override + public LicenseModel retrieveLicenseModel(String vnfType, String vnfVersion) throws DataAccessException { + if (vnfType == "VSCP" && vnfVersion == "123"){ + return licenseModel; + } + else { + return null; + } + } + + @Override public Map retrieveLicenseModelData(String vnfType, String vnfVersion, String... fields) + throws DataAccessException { + return null; + } + + @Override public void storeArtifactPayload(Map parameters) throws RuntimeException { + + } + + public void storeLicenseModel(LicenseModel licenseModel){ + this.licenseModel = licenseModel; + + } +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerPluginImplTest.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerPluginImplTest.java new file mode 100644 index 000000000..41bc7cadf --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseManagerPluginImplTest.java @@ -0,0 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseServiceMock.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseServiceMock.java new file mode 100644 index 000000000..e496da7b5 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/LicenseServiceMock.java @@ -0,0 +1,56 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; + +import java.util.HashMap; +import java.util.Map; + +import org.openecomp.appc.licmgr.LicenseDataAccessService; +import org.openecomp.appc.licmgr.exception.DataAccessException; +import org.openecomp.sdnc.sli.resource.dblib.DbLibService; + +class LicenseServiceMock implements LicenseDataAccessService { + + private String configFile; + private HashMap backupConf; + + @Override + public void setSchema(String schema) { + } + + void setConfigFile(String configFile) { + this.configFile = configFile; + } + + public HashMap getBackupConf() { + return backupConf; + } + + @Override + public Map retrieveLicenseModelData(String vnfType, String vnfVersion, String... fields) throws DataAccessException { + return null; + } + + @Override + public void storeArtifactPayload(Map parameters) throws DataAccessException { + } +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/TestVfLicenseModelConvert.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/TestVfLicenseModelConvert.java new file mode 100644 index 000000000..26482a1dc --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/test/java/org/openecomp/appc/licmgr/TestVfLicenseModelConvert.java @@ -0,0 +1,61 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : APP-C + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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.openecomp.appc.licmgr; + +/* +import org.openecomp.appc.licmgr.objects.VfLicenseModel; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Unmarshaller; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +*/ + +public class TestVfLicenseModelConvert { +/* + public static void main(String args[]) { + + try { + + //create JAXB context + JAXBContext context = JAXBContext.newInstance(VfLicenseModel.class); + + //Create Unmarshaller using JAXB context + Unmarshaller unmarshaller = context.createUnmarshaller(); + + Path xmlPath = Paths.get("src/test/resources/xml/vf-license-model.xml"); + InputStream xmlInputStream = Files.newInputStream(xmlPath); + + VfLicenseModel licenseModel = (VfLicenseModel) unmarshaller.unmarshal(xmlInputStream); + + String vnfId = licenseModel.getVnfId(); + String vendorName = licenseModel.getVendorName(); + + } catch (Exception e) { + e.printStackTrace(); + } + } +*/ +} diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-features/.gitignore b/appc-dispatcher/appc-license-manager/appc-license-manager-features/.gitignore new file mode 100644 index 000000000..2992ae832 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-features/.gitignore @@ -0,0 +1,3 @@ +/target/ +/bin/ +/.settings/ diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-features/pom.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-features/pom.xml new file mode 100644 index 000000000..3adbcf5e2 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-features/pom.xml @@ -0,0 +1,107 @@ + + + 4.0.0 + + appc-license-manager + org.openecomp.appc + 1.0.0 + + appc-license-manager-features + appc-license-manager-features + + jar + + + + org.openecomp.appc + appc-license-manager-api + ${project.version} + + + org.openecomp.appc + appc-license-manager-core + ${project.version} + + + + + + + true + src/main/resources + + + + + org.apache.maven.plugins + maven-resources-plugin + + + filter + + resources + + generate-resources + + + + + + + + + + + + + + + + + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + + attach-artifact + + package + + + + ${project.build.directory}/classes/${features.file} + xml + features + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-features/src/main/resources/features.xml b/appc-dispatcher/appc-license-manager/appc-license-manager-features/src/main/resources/features.xml new file mode 100644 index 000000000..34635b839 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/appc-license-manager-features/src/main/resources/features.xml @@ -0,0 +1,34 @@ + + + + + + + + mvn:com.sun.mail/javax.mail/1.5.0 + mvn:org.openecomp.appc/appc-license-manager-api/${project.version} + mvn:org.openecomp.appc/appc-license-manager-core/${project.version} + + + diff --git a/appc-dispatcher/appc-license-manager/pom.xml b/appc-dispatcher/appc-license-manager/pom.xml new file mode 100644 index 000000000..f590f42b5 --- /dev/null +++ b/appc-dispatcher/appc-license-manager/pom.xml @@ -0,0 +1,22 @@ + + 4.0.0 + + org.openecomp.appc + appc-dispatcher + 1.0.0 + + appc-license-manager + pom + APPC License Manager + APPC License Manager + + + + + + appc-license-manager-api + appc-license-manager-core + appc-license-manager-features + + + -- cgit 1.2.3-korg