diff options
author | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-05-17 18:44:59 -0400 |
---|---|---|
committer | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-05-21 05:33:46 -0700 |
commit | 591296a888ee6d659170604cd4d91ea7b58d55d1 (patch) | |
tree | 50088b1d8d535b7694523586edfd0af6512435df | |
parent | c281f6244a3c3585ee03643c5d3d5642183a1c1b (diff) |
Publish mdsal-resource OSGi services
Added Aries blueprint to advertise OSGi services. Updated
to use release 1.0.2 version of CCSDK parent poms.
Change-Id: I92fb652b975c4fd59e173c103350934b94d190d3
Issue-ID: CCSDK-289
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
37 files changed, 354 insertions, 30 deletions
diff --git a/aai-service/features/ccsdk-aai-service/pom.xml b/aai-service/features/ccsdk-aai-service/pom.xml index 2415b975..a8daa7c1 100644 --- a/aai-service/features/ccsdk-aai-service/pom.xml +++ b/aai-service/features/ccsdk-aai-service/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath/> </parent> diff --git a/aai-service/features/features-aai-service/pom.xml b/aai-service/features/features-aai-service/pom.xml index 7b010ba0..13624d14 100755 --- a/aai-service/features/features-aai-service/pom.xml +++ b/aai-service/features/features-aai-service/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath/> </parent> diff --git a/aai-service/features/pom.xml b/aai-service/features/pom.xml index 52a36db1..f1c1cb28 100755 --- a/aai-service/features/pom.xml +++ b/aai-service/features/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/aai-service/installer/pom.xml b/aai-service/installer/pom.xml index c9f48b95..24b5b2db 100755 --- a/aai-service/installer/pom.xml +++ b/aai-service/installer/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/aai-service/pom.xml b/aai-service/pom.xml index e284d044..deeb88c3 100755 --- a/aai-service/pom.xml +++ b/aai-service/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/aai-service/provider/pom.xml b/aai-service/provider/pom.xml index c7f6817d..0cbd7c32 100755 --- a/aai-service/provider/pom.xml +++ b/aai-service/provider/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/ansible-adapter/.pydevproject b/ansible-adapter/.pydevproject new file mode 100644 index 00000000..d001f0ae --- /dev/null +++ b/ansible-adapter/.pydevproject @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?eclipse-pydev version="1.0"?><pydev_project> +<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> +<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property> +</pydev_project> diff --git a/ansible-adapter/ansible-adapter-bundle/pom.xml b/ansible-adapter/ansible-adapter-bundle/pom.xml index f87606ac..a0f102ec 100644 --- a/ansible-adapter/ansible-adapter-bundle/pom.xml +++ b/ansible-adapter/ansible-adapter-bundle/pom.xml @@ -18,7 +18,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath/> </parent> diff --git a/ansible-adapter/ansible-adapter-features/ccsdk-ansible-adapter/pom.xml b/ansible-adapter/ansible-adapter-features/ccsdk-ansible-adapter/pom.xml index aa5f9636..040a3fc0 100644 --- a/ansible-adapter/ansible-adapter-features/ccsdk-ansible-adapter/pom.xml +++ b/ansible-adapter/ansible-adapter-features/ccsdk-ansible-adapter/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/ansible-adapter/ansible-adapter-features/features-ansible-adapter/pom.xml b/ansible-adapter/ansible-adapter-features/features-ansible-adapter/pom.xml index d90ec09f..5ea71f8a 100755 --- a/ansible-adapter/ansible-adapter-features/features-ansible-adapter/pom.xml +++ b/ansible-adapter/ansible-adapter-features/features-ansible-adapter/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/ansible-adapter/ansible-adapter-features/pom.xml b/ansible-adapter/ansible-adapter-features/pom.xml index 9df26ffc..15f1c730 100644 --- a/ansible-adapter/ansible-adapter-features/pom.xml +++ b/ansible-adapter/ansible-adapter-features/pom.xml @@ -17,7 +17,7 @@ <parent> <artifactId>odlparent-lite</artifactId> <groupId>org.onap.ccsdk.parent</groupId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.adaptors</groupId> diff --git a/ansible-adapter/ansible-adapter-installer/pom.xml b/ansible-adapter/ansible-adapter-installer/pom.xml index ecd0d6b7..5a914f97 100644 --- a/ansible-adapter/ansible-adapter-installer/pom.xml +++ b/ansible-adapter/ansible-adapter-installer/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath/> </parent> <groupId>org.onap.ccsdk.sli.adaptors</groupId> diff --git a/ansible-adapter/pom.xml b/ansible-adapter/pom.xml index 79b3b389..b3da820c 100644 --- a/ansible-adapter/pom.xml +++ b/ansible-adapter/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath/> </parent> diff --git a/mdsal-resource/features/ccsdk-mdsal-resource/pom.xml b/mdsal-resource/features/ccsdk-mdsal-resource/pom.xml index 58f26d75..902e0d14 100644 --- a/mdsal-resource/features/ccsdk-mdsal-resource/pom.xml +++ b/mdsal-resource/features/ccsdk-mdsal-resource/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/mdsal-resource/features/features-mdsal-resource/pom.xml b/mdsal-resource/features/features-mdsal-resource/pom.xml index 49a644ea..40231ed8 100755 --- a/mdsal-resource/features/features-mdsal-resource/pom.xml +++ b/mdsal-resource/features/features-mdsal-resource/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/mdsal-resource/features/pom.xml b/mdsal-resource/features/pom.xml index b4ae2d19..11a59771 100755 --- a/mdsal-resource/features/pom.xml +++ b/mdsal-resource/features/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/mdsal-resource/installer/pom.xml b/mdsal-resource/installer/pom.xml index 50b18832..a8d92d0b 100755 --- a/mdsal-resource/installer/pom.xml +++ b/mdsal-resource/installer/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/mdsal-resource/pom.xml b/mdsal-resource/pom.xml index f81e973e..1b4e458a 100755 --- a/mdsal-resource/pom.xml +++ b/mdsal-resource/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/mdsal-resource/provider/pom.xml b/mdsal-resource/provider/pom.xml index b528442b..84801c03 100755 --- a/mdsal-resource/provider/pom.xml +++ b/mdsal-resource/provider/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResource.java b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResource.java index d02530fe..66604468 100644 --- a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResource.java +++ b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/ConfigResource.java @@ -22,6 +22,7 @@ package org.onap.ccsdk.sli.adaptors.resource.mdsal; import java.util.Map; +import java.util.Properties; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; @@ -37,6 +38,20 @@ public class ConfigResource implements SvcLogicResource { private RestService restService; + public ConfigResource(MdsalResourcePropertiesProvider propProvider) { + LOG.info("Loading ConfigResource using property provider"); + Properties props = propProvider.getProperties(); + + String sdncUser = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-user", "admin"); + String sdncPasswd = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-passwd", "admin"); + String sdncHost = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-host", "localhost"); + String sdncProtocol = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-protocol", "https"); + String sdncPort = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-port", "8443"); + + restService = new RestService(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd, RestService.PayloadType.XML); + + } + public ConfigResource(String sdncProtocol, String sdncHost, String sdncPort, String sdncUser, String sdncPasswd) { restService = new RestService(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd, RestService.PayloadType.XML); diff --git a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProvider.java b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProvider.java new file mode 100755 index 00000000..e433a4c1 --- /dev/null +++ b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProvider.java @@ -0,0 +1,28 @@ +/*- + * ============LICENSE_START======================================================= + * onap + * ================================================================================ + * Copyright (C) 2016 - 2017 ONAP + * ================================================================================ + * 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.resource.mdsal; + +import java.util.Properties; + +public interface MdsalResourcePropertiesProvider { + + public Properties getProperties(); +} diff --git a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProviderImpl.java b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProviderImpl.java new file mode 100755 index 00000000..e9e006f1 --- /dev/null +++ b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/MdsalResourcePropertiesProviderImpl.java @@ -0,0 +1,186 @@ +/*- + * ============LICENSE_START======================================================= + * onap + * ================================================================================ + * Copyright (C) 2016 - 2017 ONAP + * ================================================================================ + * 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.resource.mdsal; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Optional; +import java.util.Properties; +import java.util.Vector; + +import org.onap.ccsdk.sli.core.sli.ConfigurationException; +import org.onap.ccsdk.sli.core.utils.JREFileResolver; +import org.onap.ccsdk.sli.core.utils.KarafRootFileResolver; +import org.onap.ccsdk.sli.core.utils.PropertiesFileResolver; +import org.onap.ccsdk.sli.core.utils.common.CoreDefaultFileResolver; +import org.onap.ccsdk.sli.core.utils.common.SdncConfigEnvVarFileResolver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Responsible for determining the properties file to use and instantiating the + * <code>SqlResource</code> Service. The priority for properties file + * resolution is as follows: + * + * <ol> + * <li>A directory identified by the system environment variable + * <code>SDNC_CONFIG_DIR</code></li> + * <li>The default directory <code>DEFAULT_DBLIB_PROP_DIR</code></li> + * <li>A directory identified by the JRE argument + * <code>sql-resource.properties</code></li> + * <li>A <code>sql-resource.properties</code> file located in the karaf root + * directory</li> + * </ol> + */ +public class MdsalResourcePropertiesProviderImpl implements MdsalResourcePropertiesProvider { + + private static final Logger LOG = LoggerFactory.getLogger(MdsalResourcePropertiesProviderImpl.class); + + /** + * The name of the properties file for database configuration + */ + private static final String MDSALRESOURCE_PROP_FILE_NAME = "mdsal-resource.properties"; + + /** + * A prioritized list of strategies for resolving sql-resource properties files. + */ + private Vector<PropertiesFileResolver> mdsalResourcePropertiesFileResolvers = new Vector<>(); + + /** + * The configuration properties for the db connection. + */ + private Properties properties; + + /** + * Set up the prioritized list of strategies for resolving dblib properties + * files. + */ + public MdsalResourcePropertiesProviderImpl() { + mdsalResourcePropertiesFileResolvers + .add(new SdncConfigEnvVarFileResolver("Using property file (1) from environment variable")); + mdsalResourcePropertiesFileResolvers.add(new CoreDefaultFileResolver("Using property file (2) from default directory")); + + mdsalResourcePropertiesFileResolvers.add( + new JREFileResolver("Using property file (3) from JRE argument", MdsalResourcePropertiesProviderImpl.class)); + mdsalResourcePropertiesFileResolvers.add(new KarafRootFileResolver("Using property file (4) from karaf root", this)); + + // determines properties file as according to the priority described in the + // class header comment + final File propertiesFile = determinePropertiesFile(this); + if (propertiesFile != null) { + try (FileInputStream fileInputStream = new FileInputStream(propertiesFile)) { + properties = new Properties(); + properties.load(fileInputStream); + } catch (final IOException e) { + LOG.error("Failed to load properties for file: {}", propertiesFile.toString(), + new ConfigurationException("Failed to load properties for file: " + propertiesFile.toString(), + e)); + } + } else { + // Try to read properties as resource + + InputStream propStr = getClass().getResourceAsStream("/" + MDSALRESOURCE_PROP_FILE_NAME); + if (propStr != null) { + properties = new Properties(); + try { + properties.load(propStr); + propStr.close(); + } catch (IOException e) { + properties = null; + } + } + + } + + if (properties == null) { + reportFailure("Missing configuration properties resource(3)", new ConfigurationException( + "Missing configuration properties resource(3): " + MDSALRESOURCE_PROP_FILE_NAME)); + } + } + + /** + * Extract svclogic config properties. + * + * @return the svclogic config properties + */ + public Properties getProperties() { + return properties; + } + + /** + * Reports the method chosen for properties resolution to the + * <code>Logger</code>. + * + * @param message + * Some user friendly message + * @param fileOptional + * The file location of the chosen properties file + * @return the file location of the chosen properties file + */ + private static File reportSuccess(final String message, final Optional<File> fileOptional) { + if (fileOptional.isPresent()) { + final File file = fileOptional.get(); + LOG.info("{} {}", message, file.getPath()); + return file; + } + return null; + } + + /** + * Reports fatal errors. This is the case in which no properties file could be + * found. + * + * @param message + * An appropriate fatal error message + * @param configurationException + * An exception describing what went wrong during resolution + */ + private static void reportFailure(final String message, final ConfigurationException configurationException) { + + LOG.error("{}", message, configurationException); + } + + /** + * Determines the sql-resource properties file to use based on the following priority: + * <ol> + * <li>A directory identified by the system environment variable + * <code>SDNC_CONFIG_DIR</code></li> + * <li>The default directory <code>DEFAULT_DBLIB_PROP_DIR</code></li> + * <li>A directory identified by the JRE argument + * <code>mdsal-resource.properties</code></li> + * <li>A <code>sql-resource.properties</code> file located in the karaf root + * directory</li> + * </ol> + */ + File determinePropertiesFile(final MdsalResourcePropertiesProviderImpl resourceProvider) { + + for (final PropertiesFileResolver sliPropertiesFileResolver : mdsalResourcePropertiesFileResolvers) { + final Optional<File> fileOptional = sliPropertiesFileResolver.resolveFile(MDSALRESOURCE_PROP_FILE_NAME); + if (fileOptional.isPresent()) { + return reportSuccess(sliPropertiesFileResolver.getSuccessfulResolutionMessage(), fileOptional); + } + } + + return null; + } +} diff --git a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/OperationalResource.java b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/OperationalResource.java index 63fe8c6a..7cd8a80a 100644 --- a/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/OperationalResource.java +++ b/mdsal-resource/provider/src/main/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/OperationalResource.java @@ -22,6 +22,7 @@ package org.onap.ccsdk.sli.adaptors.resource.mdsal; import java.util.Map; +import java.util.Properties; import org.onap.ccsdk.sli.core.sli.SvcLogicContext; import org.onap.ccsdk.sli.core.sli.SvcLogicException; @@ -37,6 +38,19 @@ public class OperationalResource implements SvcLogicResource { private RestService restService; + public OperationalResource(MdsalResourcePropertiesProvider propProvider) { + Properties props = propProvider.getProperties(); + + String sdncUser = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-user", "admin"); + String sdncPasswd = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-passwd", "admin"); + String sdncHost = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-host", "localhost"); + String sdncProtocol = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-protocol", "https"); + String sdncPort = props.getProperty("org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-port", "8443"); + + restService = new RestService(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd, RestService.PayloadType.XML); + + } + public OperationalResource(String sdncProtocol, String sdncHost, String sdncPort, String sdncUser, String sdncPasswd) { restService = new RestService(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd, RestService.PayloadType.XML); diff --git a/mdsal-resource/provider/src/main/resources/mdsal-resource.properties b/mdsal-resource/provider/src/main/resources/mdsal-resource.properties new file mode 100644 index 00000000..47c8ebf7 --- /dev/null +++ b/mdsal-resource/provider/src/main/resources/mdsal-resource.properties @@ -0,0 +1,27 @@ +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-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========================================================= +### + +org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-user=admin +org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-passwd=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U +org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-host=localhost +org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-protocol=http +org.onap.ccsdk.sli.adaptors.resource.mdsal.sdnc-port=8181 + diff --git a/mdsal-resource/provider/src/main/resources/org/opendaylight/blueprint/mdsal-resource-blueprint.xml b/mdsal-resource/provider/src/main/resources/org/opendaylight/blueprint/mdsal-resource-blueprint.xml new file mode 100755 index 00000000..9c691263 --- /dev/null +++ b/mdsal-resource/provider/src/main/resources/org/opendaylight/blueprint/mdsal-resource-blueprint.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + openECOMP : SDN-C + ================================================================================ + Copyright (C) 2017 - 2018 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========================================================= + --> + +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" + xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0" + odl:use-default-for-reference-types="true"> + + <bean id="propProvider" class="org.onap.ccsdk.sli.adaptors.resource.mdsal.MdsalResourcePropertiesProviderImpl" /> + + + <bean id="configResourceInstance" class="org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource"> + <argument ref="propProvider"/> + </bean> + + <bean id="operResourceInstance" class="org.onap.ccsdk.sli.adaptors.resource.mdsal.OperationalResource"> + <argument ref="propProvider"/> + </bean> + + <service ref="configResourceInstance"> + <interfaces> + <value>org.onap.ccsdk.sli.adaptors.resource.mdsal.ConfigResource</value> + </interfaces> + </service> + + <service ref="operResourceInstance"> + <interfaces> + <value>org.onap.ccsdk.sli.adaptors.resource.mdsal.OperationalResource</value> + </interfaces> + </service> +</blueprint> diff --git a/resource-assignment/features/ccsdk-resource-assignment/pom.xml b/resource-assignment/features/ccsdk-resource-assignment/pom.xml index 72cc9ef6..78523eb5 100644 --- a/resource-assignment/features/ccsdk-resource-assignment/pom.xml +++ b/resource-assignment/features/ccsdk-resource-assignment/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/resource-assignment/features/features-resource-assignment/pom.xml b/resource-assignment/features/features-resource-assignment/pom.xml index f6a7cf36..5eda6043 100755 --- a/resource-assignment/features/features-resource-assignment/pom.xml +++ b/resource-assignment/features/features-resource-assignment/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/resource-assignment/features/pom.xml b/resource-assignment/features/pom.xml index 32b423d7..81d7b05c 100755 --- a/resource-assignment/features/pom.xml +++ b/resource-assignment/features/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/resource-assignment/installer/pom.xml b/resource-assignment/installer/pom.xml index eda60843..087ed8b9 100755 --- a/resource-assignment/installer/pom.xml +++ b/resource-assignment/installer/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/resource-assignment/pom.xml b/resource-assignment/pom.xml index 26c95f38..9d91a413 100755 --- a/resource-assignment/pom.xml +++ b/resource-assignment/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/resource-assignment/provider/pom.xml b/resource-assignment/provider/pom.xml index 0d62d99e..058d50eb 100755 --- a/resource-assignment/provider/pom.xml +++ b/resource-assignment/provider/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/sql-resource/features/ccsdk-sql-resource/pom.xml b/sql-resource/features/ccsdk-sql-resource/pom.xml index 9dfe859e..0431e920 100644 --- a/sql-resource/features/ccsdk-sql-resource/pom.xml +++ b/sql-resource/features/ccsdk-sql-resource/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/sql-resource/features/features-sql-resource/pom.xml b/sql-resource/features/features-sql-resource/pom.xml index 7a353068..7efb508a 100755 --- a/sql-resource/features/features-sql-resource/pom.xml +++ b/sql-resource/features/features-sql-resource/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>feature-repo-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/sql-resource/features/pom.xml b/sql-resource/features/pom.xml index 8bb7d0de..244aac1c 100755 --- a/sql-resource/features/pom.xml +++ b/sql-resource/features/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/sql-resource/installer/pom.xml b/sql-resource/installer/pom.xml index 1437a7ff..504e1f7d 100755 --- a/sql-resource/installer/pom.xml +++ b/sql-resource/installer/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/sql-resource/pom.xml b/sql-resource/pom.xml index 3b33d2e9..c69c9bd8 100755 --- a/sql-resource/pom.xml +++ b/sql-resource/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> diff --git a/sql-resource/provider/pom.xml b/sql-resource/provider/pom.xml index 20807260..c1aaa28e 100755 --- a/sql-resource/provider/pom.xml +++ b/sql-resource/provider/pom.xml @@ -6,7 +6,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>1.0.2-SNAPSHOT</version> + <version>1.0.2</version> <relativePath /> </parent> |