aboutsummaryrefslogtreecommitdiffstats
path: root/sli/common
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-08-11 15:57:21 -0400
committerDan Timoney <dtimoney@att.com>2017-08-11 15:57:21 -0400
commit68eeb041f3bec6548e94978dce2e6795c8a399e7 (patch)
tree88ece21f8f4cea0b09fb79f4ab7750f1324131d1 /sli/common
parent41cdaaa91806e520905d6238cb5479b2bb219e44 (diff)
Remove remaining references to openecomp
Remove remaining references to openecomp from properties and sample files Change-Id: I985bae5e80ae130ffb512c9574f13172252bf6f8 Issue-ID: CCSDK-11 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'sli/common')
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicDblibStore.java7
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicJdbcStore.java312
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java6
-rw-r--r--sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicStoreFactory.java18
-rwxr-xr-xsli/common/src/main/resources/svclogic.xsd2
-rw-r--r--sli/common/src/test/resources/EvcActivateSvcLogic_v100.xml8
-rw-r--r--sli/common/src/test/resources/EvcPortSvcLogic_v100.xml26
-rw-r--r--sli/common/src/test/resources/ReleasePortSvcLogic_v101.xml12
-rw-r--r--sli/common/src/test/resources/bad_neutron_logic_v11.xml4
-rw-r--r--sli/common/src/test/resources/mergetest.xml2
-rw-r--r--sli/common/src/test/resources/neutron_logic_v10.xml4
-rw-r--r--sli/common/src/test/resources/simplelogger.properties6
-rw-r--r--sli/common/src/test/resources/svclogic.properties14
-rw-r--r--sli/common/src/test/resources/svclogic.sh6
-rwxr-xr-xsli/common/src/test/resources/svclogic.xsd2
15 files changed, 214 insertions, 215 deletions
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicDblibStore.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicDblibStore.java
index ac656ffa..4673f968 100644
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicDblibStore.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicDblibStore.java
@@ -7,9 +7,9 @@
* 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.
@@ -54,8 +54,7 @@ public class SvcLogicDblibStore implements SvcLogicStore {
.getLogger(SvcLogicDblibStore.class);
private static final String DBLIB_SERVICE =
- // "org.openecomp.sdnc.sli.resource.dblib.DBLibService";
- "org.openecomp.sdnc.sli.resource.dblib.DBResourceManager";
+ "org.onap.ccsdk.sli.core.dblib.DBResourceManager";
Properties props = null;
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicJdbcStore.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicJdbcStore.java
index 9aa0ddfb..1b9c6274 100644
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicJdbcStore.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicJdbcStore.java
@@ -7,9 +7,9 @@
* 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.
@@ -49,7 +49,7 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
private String dbUser = null;
private String dbPasswd = null;
private String dbDriver = null;
-
+
private Connection dbConn;
private PreparedStatement hasActiveGraphStmt = null;
private PreparedStatement hasVersionGraphStmt = null;
@@ -57,22 +57,22 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
private PreparedStatement fetchVersionGraphStmt = null;
private PreparedStatement storeGraphStmt = null;
private PreparedStatement deleteGraphStmt = null;
-
+
private PreparedStatement deactivateStmt = null;
private PreparedStatement activateStmt = null;
-
+
private PreparedStatement registerNodeStmt = null;
private PreparedStatement unregisterNodeStmt = null;
private PreparedStatement validateNodeStmt = null;
-
+
private void getConnection() throws ConfigurationException
{
Properties jdbcProps = new Properties();
-
+
jdbcProps.setProperty("user", dbUser);
jdbcProps.setProperty("password", dbPasswd);
-
+
try {
Driver dvr = new com.mysql.jdbc.Driver();
if (dvr.acceptsURL(dbUrl))
@@ -88,8 +88,8 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
}
-
-
+
+
try
{
this.dbConn = DriverManager.getConnection(dbUrl, jdbcProps);
@@ -97,17 +97,17 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
catch (Exception e)
{
throw new ConfigurationException("failed to get database connection ["+dbUrl+"]", e);
- }
-
+ }
+
}
-
+
private void createTable() throws ConfigurationException
{
DatabaseMetaData dbm = null;
-
-
+
+
try {
dbm = dbConn.getMetaData();
} catch (SQLException e) {
@@ -164,9 +164,9 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
{
throw new ConfigurationException("could not create SVC_LOGIC table", e);
}
-
+
// See if NODE_TYPES table exists and, if not, create it
-
+
try
{
@@ -211,14 +211,14 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
throw new ConfigurationException("could not create SVC_LOGIC table", e);
}
}
-
+
private void prepStatements() throws ConfigurationException
{
// Prepare statements
String hasVersionGraphSql = "SELECT count(*) FROM "+dbName+".SVC_LOGIC"
+ " WHERE module = ? AND rpc = ? AND mode = ? AND version = ?";
-
+
try
{
hasVersionGraphStmt = dbConn.prepareStatement(hasVersionGraphSql);
@@ -226,12 +226,12 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
catch (Exception e)
{
throw new ConfigurationException("could not prepare statement "+hasVersionGraphSql, e);
-
+
}
-
+
String hasActiveGraphSql = "SELECT count(*) FROM "+dbName+".SVC_LOGIC"
+ " WHERE module = ? AND rpc = ? AND mode = ? AND active = 'Y'";
-
+
try
{
hasActiveGraphStmt = dbConn.prepareStatement(hasActiveGraphSql);
@@ -239,12 +239,12 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
catch (Exception e)
{
throw new ConfigurationException("could not prepare statement "+hasVersionGraphSql, e);
-
+
}
-
+
String fetchVersionGraphSql = "SELECT graph FROM "+dbName+".SVC_LOGIC"
+ " WHERE module = ? AND rpc = ? AND mode = ? AND version = ?";
-
+
try
{
fetchVersionGraphStmt = dbConn.prepareStatement(fetchVersionGraphSql);
@@ -252,12 +252,12 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
catch (Exception e)
{
throw new ConfigurationException("could not prepare statement "+fetchVersionGraphSql, e);
-
+
}
-
+
String fetchActiveGraphSql = "SELECT graph FROM "+dbName+".SVC_LOGIC"
+ " WHERE module = ? AND rpc = ? AND mode = ? AND active = 'Y'";
-
+
try
{
fetchActiveGraphStmt = dbConn.prepareStatement(fetchActiveGraphSql);
@@ -265,12 +265,12 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
catch (Exception e)
{
throw new ConfigurationException("could not prepare statement "+fetchVersionGraphSql, e);
-
+
}
-
+
String storeGraphSql = "INSERT INTO "+dbName+".SVC_LOGIC (module, rpc, version, mode, active, graph)"
+ " VALUES(?, ?, ?, ?, ?, ?)";
-
+
try
{
storeGraphStmt = dbConn.prepareStatement(storeGraphSql);
@@ -279,9 +279,9 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
{
throw new ConfigurationException("could not prepare statement "+storeGraphSql, e);
}
-
+
String deleteGraphSql = "DELETE FROM "+dbName+".SVC_LOGIC WHERE module = ? AND rpc = ? AND version = ? AND mode = ?";
-
+
try
{
deleteGraphStmt = dbConn.prepareStatement(deleteGraphSql);
@@ -290,9 +290,9 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
{
throw new ConfigurationException("could not prepare statement "+deleteGraphSql, e);
}
-
+
String deactivateSql = "UPDATE "+dbName+".SVC_LOGIC SET active = 'N' WHERE module = ? AND rpc = ? AND mode = ?";
-
+
try
{
deactivateStmt = dbConn.prepareStatement(deactivateSql);
@@ -301,9 +301,9 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
{
throw new ConfigurationException("could not prepare statement "+deactivateSql, e);
}
-
+
String activateSql = "UPDATE "+dbName+".SVC_LOGIC SET active = 'Y' WHERE module = ? AND rpc = ? AND version = ? AND mode = ?";
-
+
try
{
activateStmt = dbConn.prepareStatement(activateSql);
@@ -312,7 +312,7 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
{
throw new ConfigurationException("could not prepare statement "+activateSql, e);
}
-
+
String registerNodeSql = "INSERT INTO "+dbName+".NODE_TYPES (nodetype) VALUES(?)";
try
{
@@ -322,7 +322,7 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
{
throw new ConfigurationException("could not prepare statement "+registerNodeSql, e);
}
-
+
String unregisterNodeSql = "DELETE FROM "+dbName+".NODE_TYPES WHERE nodetype = ?";
try
{
@@ -332,7 +332,7 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
{
throw new ConfigurationException("could not prepare statement "+unregisterNodeSql, e);
}
-
+
String validateNodeSql = "SELECT count(*) FROM "+dbName+".NODE_TYPES WHERE nodetype = ?";
try
{
@@ -343,12 +343,12 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
throw new ConfigurationException("could not prepare statement "+validateNodeSql, e);
}
}
-
+
private void initDbResources() throws ConfigurationException
{
if ((dbDriver != null) && (dbDriver.length() > 0))
{
-
+
try
{
Class.forName(dbDriver);
@@ -362,48 +362,48 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
createTable();
prepStatements();
}
-
+
public void init(Properties props) throws ConfigurationException {
-
-
- dbUrl = props.getProperty("org.openecomp.sdnc.sli.jdbc.url");
+
+
+ dbUrl = props.getProperty("org.onap.ccsdk.sli.jdbc.url");
if ((dbUrl == null) || (dbUrl.length() == 0))
{
- throw new ConfigurationException("property org.openecomp.sdnc.sli.jdbc.url unset");
+ throw new ConfigurationException("property org.onap.ccsdk.sli.jdbc.url unset");
}
-
- dbName = props.getProperty("org.openecomp.sdnc.sli.jdbc.database");
+
+ dbName = props.getProperty("org.onap.ccsdk.sli.jdbc.database");
if ((dbName == null) || (dbName.length() == 0))
{
- throw new ConfigurationException("property org.openecomp.sdnc.sli.jdbc.database unset");
+ throw new ConfigurationException("property org.onap.ccsdk.sli.jdbc.database unset");
}
-
- dbUser = props.getProperty("org.openecomp.sdnc.sli.jdbc.user");
+
+ dbUser = props.getProperty("org.onap.ccsdk.sli.jdbc.user");
if ((dbUser == null) || (dbUser.length() == 0))
{
- throw new ConfigurationException("property org.openecomp.sdnc.sli.jdbc.user unset");
+ throw new ConfigurationException("property org.onap.ccsdk.sli.jdbc.user unset");
}
-
- dbPasswd = props.getProperty("org.openecomp.sdnc.sli.jdbc.password");
+
+ dbPasswd = props.getProperty("org.onap.ccsdk.sli.jdbc.password");
if ((dbPasswd == null) || (dbPasswd.length() == 0))
{
- throw new ConfigurationException("property org.openecomp.sdnc.sli.jdbc.password unset");
+ throw new ConfigurationException("property org.onap.ccsdk.sli.jdbc.password unset");
}
-
- dbDriver = props.getProperty("org.openecomp.sdnc.sli.jdbc.driver");
-
+ dbDriver = props.getProperty("org.onap.ccsdk.sli.jdbc.driver");
+
+
initDbResources();
-
+
}
-
+
private boolean isDbConnValid()
{
boolean isValid = false;
-
+
try
{
if (dbConn != null)
@@ -413,31 +413,31 @@ public class SvcLogicJdbcStore implements SvcLogicStore {
}
catch (SQLException e)
{}
-
+
return(isValid);
}
public boolean hasGraph(String module, String rpc, String version, String mode) throws SvcLogicException {
-
-
+
+
if (!isDbConnValid())
{
-
+
// Try reinitializing
initDbResources();
-
+
if (!isDbConnValid())
{
throw new ConfigurationException("no jdbc connection");
}
}
-
-
+
+
boolean retval = false;
ResultSet results = null;
-
+
PreparedStatement hasGraphStmt = null;
if (version == null)
{
@@ -447,16 +447,16 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
{
hasGraphStmt = hasVersionGraphStmt;
}
-
-
+
+
try
{
hasGraphStmt.setString(1, module);
hasGraphStmt.setString(2, rpc);
hasGraphStmt.setString(3, mode);
-
+
if (version != null)
{
hasGraphStmt.setString(4, version);
@@ -466,11 +466,11 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
results = hasGraphStmt.executeQuery();
dbConn.commit();
dbConn.setAutoCommit(oldAutoCommit);
-
+
if (results.next())
{
int cnt = results.getInt(1);
-
+
if (cnt > 0)
{
retval = true;
@@ -488,43 +488,43 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
{
try
{
-
+
results.close();
}
catch (SQLException x)
{}
}
-
+
}
-
-
+
+
return(retval);
-
-
+
+
}
public SvcLogicGraph fetch(String module, String rpc, String version, String mode) throws SvcLogicException {
-
-
+
+
if (!isDbConnValid())
{
-
+
// Try reinitializing
initDbResources();
-
+
if (!isDbConnValid())
{
throw new ConfigurationException("no jdbc connection");
}
}
-
-
+
+
SvcLogicGraph retval = null;
ResultSet results = null;
-
+
PreparedStatement fetchGraphStmt = null;
if (version == null)
{
@@ -540,7 +540,7 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
fetchGraphStmt.setString(2, rpc);
fetchGraphStmt.setString(3, mode);
-
+
if (version != null)
{
fetchGraphStmt.setString(4, version);
@@ -550,16 +550,16 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
results = fetchGraphStmt.executeQuery();
dbConn.commit();
dbConn.setAutoCommit(oldAutoCommit);
-
+
if (results.next())
{
Blob graphBlob = results.getBlob("graph");
-
+
ObjectInputStream gStream = new ObjectInputStream(graphBlob.getBinaryStream());
-
+
Object graphObj = gStream.readObject();
gStream.close();
-
+
if (graphObj instanceof SvcLogicGraph)
{
retval = (SvcLogicGraph) graphObj;
@@ -567,9 +567,9 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
else
{
throw new ConfigurationException("invalid type for graph ("+graphObj.getClass().getName());
-
+
}
-
+
}
else
{
@@ -591,24 +591,24 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
catch (SQLException x)
{}
}
-
+
}
-
-
+
+
return(retval);
-
-
+
+
}
public void store(SvcLogicGraph graph) throws SvcLogicException {
-
-
+
+
if (!isDbConnValid())
{
-
+
// Try reinitializing
initDbResources();
-
+
if (!isDbConnValid())
{
throw new ConfigurationException("no jdbc connection");
@@ -619,20 +619,20 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
{
throw new SvcLogicException("graph cannot be null");
}
-
+
byte[] graphBytes = null;
-
+
ByteArrayOutputStream byteStr = null;
ObjectOutputStream goutStr = null;
-
+
try
{
byteStr = new ByteArrayOutputStream();
goutStr = new ObjectOutputStream(byteStr);
goutStr.writeObject(graph);
-
+
graphBytes = byteStr.toByteArray();
-
+
}
catch (Exception e)
{
@@ -640,33 +640,33 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
}
finally
{
-
+
if (goutStr != null)
{
try {
goutStr.close();
} catch (IOException e) {
-
+
}
}
-
+
if (byteStr != null)
{
try {
byteStr.close();
} catch (IOException e) {
-
+
}
}
}
-
-
+
+
// If object already stored in database, delete it
if (hasGraph(graph.getModule(), graph.getRpc(), graph.getVersion(), graph.getMode()))
{
delete(graph.getModule(), graph.getRpc(), graph.getVersion(), graph.getMode());
}
-
+
try
{
boolean oldAutoCommit = dbConn.getAutoCommit();
@@ -677,26 +677,26 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
storeGraphStmt.setString(4, graph.getMode());
storeGraphStmt.setString(5, "N");
storeGraphStmt.setBlob(6, new ByteArrayInputStream(graphBytes));
-
+
storeGraphStmt.executeUpdate();
dbConn.commit();
-
+
dbConn.setAutoCommit(oldAutoCommit);
}
catch (Exception e)
{
throw new SvcLogicException("Could not write object to database", e);
- }
+ }
}
-
+
public void delete(String module, String rpc, String version, String mode) throws SvcLogicException
- {
+ {
if (!isDbConnValid())
{
-
+
// Try reinitializing
initDbResources();
-
+
if (!isDbConnValid())
{
throw new ConfigurationException("no jdbc connection");
@@ -712,7 +712,7 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
deleteGraphStmt.setString(3, version);
deleteGraphStmt.setString(4, mode);
-
+
deleteGraphStmt.executeUpdate();
dbConn.commit();
dbConn.setAutoCommit(oldAutoCommit);
@@ -720,7 +720,7 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
catch (Exception e)
{
throw new SvcLogicException("Could not delete object from database", e);
- }
+ }
}
public void activate(SvcLogicGraph graph) throws SvcLogicException
@@ -728,26 +728,26 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
try
{
boolean oldAutoCommit = dbConn.getAutoCommit();
-
+
dbConn.setAutoCommit(false);
-
+
// Deactivate any current active version
deactivateStmt.setString(1, graph.getModule());
deactivateStmt.setString(2, graph.getRpc());
deactivateStmt.setString(3, graph.getMode());
deactivateStmt.executeUpdate();
-
+
// Activate this version
activateStmt.setString(1, graph.getModule());
activateStmt.setString(2, graph.getRpc());
activateStmt.setString(3, graph.getVersion());
activateStmt.setString(4, graph.getMode());
activateStmt.executeUpdate();
-
+
dbConn.commit();
-
+
dbConn.setAutoCommit(oldAutoCommit);
-
+
}
catch (Exception e)
{
@@ -757,24 +757,24 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
@Override
public void registerNodeType(String nodeType) throws SvcLogicException {
-
+
if (isValidNodeType(nodeType))
{
return;
}
-
+
if (!isDbConnValid())
{
-
+
// Try reinitializing
initDbResources();
-
+
if (!isDbConnValid())
{
throw new ConfigurationException("no jdbc connection");
}
}
-
+
try
{
boolean oldAutoCommit = dbConn.getAutoCommit();
@@ -788,29 +788,29 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
{
throw new SvcLogicException("Could not add node type to database", e);
}
-
+
}
@Override
public void unregisterNodeType(String nodeType) throws SvcLogicException {
-
+
if (!isValidNodeType(nodeType))
{
return;
}
-
+
if (!isDbConnValid())
{
-
+
// Try reinitializing
initDbResources();
-
+
if (!isDbConnValid())
{
throw new ConfigurationException("no jdbc connection");
}
}
-
+
try
{
boolean oldAutoCommit = dbConn.getAutoCommit();
@@ -824,50 +824,50 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
{
throw new SvcLogicException("Could not delete node type from database", e);
}
-
+
}
@Override
public boolean isValidNodeType(String nodeType) throws SvcLogicException {
-
+
boolean isValid = false;
-
+
if (!isDbConnValid())
{
-
+
// Try reinitializing
initDbResources();
-
+
if (!isDbConnValid())
{
throw new ConfigurationException("no jdbc connection");
}
}
-
+
ResultSet results = null;
try
{
validateNodeStmt.setString(1, nodeType);
-
+
boolean oldAutoCommit = dbConn.getAutoCommit();
dbConn.setAutoCommit(false);
results = validateNodeStmt.executeQuery();
dbConn.commit();
dbConn.setAutoCommit(oldAutoCommit);
-
+
if (results != null)
{
if (results.next())
{
int cnt = results.getInt(1);
-
+
if (cnt > 0)
{
isValid = true;
}
}
}
-
+
}
catch (Exception e)
{
@@ -884,11 +884,11 @@ public boolean hasGraph(String module, String rpc, String version, String mode)
catch (SQLException x)
{}
}
-
+
}
-
+
return(isValid);
}
-
-
+
+
}
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java
index 9ba50266..3a60001f 100644
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicParser.java
@@ -7,9 +7,9 @@
* 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.
@@ -60,7 +60,7 @@ public class SvcLogicParser {
private static final String SVC_LOGIC_STORE_ERROR = "Could not get service logic store";
private static final Logger LOGGER = LoggerFactory.getLogger(SvcLogicParser.class);
- private static final String SLI_VALIDATING_PARSER = "org.openecomp.sdnc.sli.parser.validate";
+ private static final String SLI_VALIDATING_PARSER = "org.onap.ccsdk.sli.parser.validate";
private static final String SVCLOGIC_XSD = "/svclogic.xsd";
private class SvcLogicHandler extends DefaultHandler {
diff --git a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicStoreFactory.java b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicStoreFactory.java
index 38b5b69d..22e27735 100644
--- a/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicStoreFactory.java
+++ b/sli/common/src/main/java/org/onap/ccsdk/sli/core/sli/SvcLogicStoreFactory.java
@@ -7,9 +7,9 @@
* 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.
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
public class SvcLogicStoreFactory {
private static final Logger LOG = LoggerFactory.getLogger(SvcLogicStoreFactory.class);
-
+
public static SvcLogicStore getSvcLogicStore(String propfile)
throws SvcLogicException {
File propFile = new File(propfile);
@@ -54,27 +54,27 @@ public class SvcLogicStoreFactory {
public static SvcLogicStore getSvcLogicStore(InputStream inStr) throws SvcLogicException
{
Properties props = new Properties();
-
+
try {
props.load(inStr);
} catch (Exception e) {
throw new ConfigurationException("Could not get load properties from input stream", e);
}
-
+
return(getSvcLogicStore(props));
}
public static SvcLogicStore getSvcLogicStore(Properties props)
throws SvcLogicException {
- String storeType = props.getProperty("org.openecomp.sdnc.sli.dbtype");
+ String storeType = props.getProperty("org.onap.ccsdk.sli.dbtype");
if ((storeType == null) || (storeType.length() == 0)) {
throw new ConfigurationException(
- "property org.openecomp.sdnc.sli.dbtype unset");
+ "property org.onap.ccsdk.sli.dbtype unset");
}
SvcLogicStore retval = null;
- LOG.debug(String.format("Using org.openecomp.sdnc.sli.dbtype=%s", storeType));
+ LOG.debug(String.format("Using org.onap.ccsdk.sli.dbtype=%s", storeType));
if ("jdbc".equalsIgnoreCase(storeType)) {
retval = new SvcLogicJdbcStore();
@@ -87,7 +87,7 @@ public class SvcLogicStoreFactory {
}
-
+
retval.init(props);
return (retval);
}
diff --git a/sli/common/src/main/resources/svclogic.xsd b/sli/common/src/main/resources/svclogic.xsd
index f74bd5dc..2704de88 100755
--- a/sli/common/src/main/resources/svclogic.xsd
+++ b/sli/common/src/main/resources/svclogic.xsd
@@ -1,5 +1,5 @@
<?xml version = "1.0" encoding = "UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.openecomp.org/sdnc/svclogic" xmlns="http://www.openecomp.org/sdnc/svclogic">
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.onap.org/sdnc/svclogic" xmlns="http://www.onap.org/sdnc/svclogic">
<xsd:simpleType name="modeType">
<xsd:restriction base="xsd:string">
diff --git a/sli/common/src/test/resources/EvcActivateSvcLogic_v100.xml b/sli/common/src/test/resources/EvcActivateSvcLogic_v100.xml
index 308bda1e..de1f316e 100644
--- a/sli/common/src/test/resources/EvcActivateSvcLogic_v100.xml
+++ b/sli/common/src/test/resources/EvcActivateSvcLogic_v100.xml
@@ -18,14 +18,14 @@
-->
-<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd"
+ xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd"
module="ase" version="1.0.0">
<method rpc="ase-evc-activation" mode="sync">
- <configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
+ <configure adaptor="org.onap.ccsdl.sli.adaptors.emt.EmtAdaptor"
key="$evc-name" activate="true">
<parameter name="circuit.name" value="$evc-name" />
<parameter name="topology" value="$topology" />
@@ -50,7 +50,7 @@
</method>
<method rpc="ase-evc-disconnect-request" mode="sync">
- <configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
+ <configure adaptor="org.onap.ccsdk.sli.adaptors.emt.EmtAdaptor"
key="$evc-name" activate="false">
<outcome value="success">
<return status="success" />
diff --git a/sli/common/src/test/resources/EvcPortSvcLogic_v100.xml b/sli/common/src/test/resources/EvcPortSvcLogic_v100.xml
index 8a9578bb..268fc312 100644
--- a/sli/common/src/test/resources/EvcPortSvcLogic_v100.xml
+++ b/sli/common/src/test/resources/EvcPortSvcLogic_v100.xml
@@ -18,16 +18,16 @@
-->
-<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd"
+ xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd"
module="ase" version="1.0.0">
<!-- Reserve a port. Returns uni-circuit-id of reserved ase-port -->
<method rpc="ase-port-reserve" mode="sync">
<switch test="$uni-cir-units">
<outcome value="Mbps">
- <reserve plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <reserve plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-port"
key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
pfx="asePort">
@@ -35,7 +35,7 @@
<outcome value="success">
<block>
- <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
<parameter name="file" value="/tmp/sample_r1.log" />
<parameter name="field1" value="__TIMESTAMP__"/>
<parameter name="field2" value="RESERVED"/>
@@ -66,7 +66,7 @@
</reserve>
</outcome>
<outcome value="Gbps">
- <reserve plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <reserve plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-port"
key="resource-emt-clli == $edge-device-clli and speed >= 1000 * $uni-cir-value"
pfx="asePort">
@@ -74,7 +74,7 @@
<outcome value="success">
<block>
- <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
<parameter name="file" value="/tmp/sample_r1.log" />
<parameter name="field1" value="__TIMESTAMP__"/>
<parameter name="field2" value="RESERVED"/>
@@ -115,11 +115,11 @@
then configures it on device -->
<method rpc="ase-port-activate-request" mode="sync">
- <allocate plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <allocate plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-port" key="uni-circuit-id == $uni-circuit-id" pfx="asePort">
<outcome value="success">
- <configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
+ <configure adaptor="org.onap.ccsdk.sli.adaptors.emt.EmtAdaptor"
key="$uni-circuit-id" activate="true">
<parameter name="circuit.id" value="$uni-circuit-id" />
<parameter name="subscriber.name" value="$subscriber-name" />
@@ -134,7 +134,7 @@
<parameter name="mtu" value="$asePort.resource-mtu" />
<outcome value="success">
<block>
- <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
<parameter name="file" value="/tmp/sample_r1.log" />
<parameter name="field1" value="__TIMESTAMP__"/>
<parameter name="field2" value="ACTIVE"/>
@@ -183,7 +183,7 @@
<!-- Change provisioning w/o activation -->
<method rpc="ase-change-port-prov-request" mode="sync">
- <allocate plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <allocate plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-port" key="uni-circuit-id == $uni-circuit-id" pfx="asePort">
<outcome value="success">
@@ -214,7 +214,7 @@
<!-- Release port -->
<method rpc="ase-release-port-request" mode="sync">
- <exists plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <exists plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-evc" key="uni-circuit-id == $uni-circuit-id">
<outcome value="true">
@@ -225,11 +225,11 @@
</return>
</outcome>
<outcome value="false">
- <release plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <release plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-port" key="uni-circuit-id == $uni-circuit-id">
<outcome value="success">
<block>
- <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
<parameter name="file" value="/tmp/sample_r1.log" />
<parameter name="field1" value="__TIMESTAMP__"/>
<parameter name="field2" value="RELEASED"/>
diff --git a/sli/common/src/test/resources/ReleasePortSvcLogic_v101.xml b/sli/common/src/test/resources/ReleasePortSvcLogic_v101.xml
index 1cc6274d..863b7f8d 100644
--- a/sli/common/src/test/resources/ReleasePortSvcLogic_v101.xml
+++ b/sli/common/src/test/resources/ReleasePortSvcLogic_v101.xml
@@ -18,14 +18,14 @@
-->
-<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd"
+ xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd"
module="ase" version="1.0.1">
<!-- Updated release port logic : deactivate the released port on the EMT -->
<method rpc="ase-release-port-request" mode="sync">
- <exists plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <exists plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-evc" key="uni-circuit-id == $uni-circuit-id">
<outcome value="true">
@@ -36,15 +36,15 @@
</return>
</outcome>
<outcome value="false">
- <release plugin="org.openecomp.sdnc.sli.resource.sample.SampleResource"
+ <release plugin="org.onap.ccsdk.sli.adaptors.sample.SampleResource"
resource="ase-port" key="uni-circuit-id == $uni-circuit-id">
<outcome value="success">
- <configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
+ <configure adaptor="org.onap.ccsdk.sli.adaptors.emt.EmtAdaptor"
key="$uni-circuit-id" activate="false">
<outcome value="success">
<block>
- <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.FileRecorder">
<parameter name="file" value="/tmp/sample_r1.log" />
<parameter name="field1" value="__TIMESTAMP__" />
<parameter name="field2" value="RELEASED" />
diff --git a/sli/common/src/test/resources/bad_neutron_logic_v11.xml b/sli/common/src/test/resources/bad_neutron_logic_v11.xml
index f3455388..3219310b 100644
--- a/sli/common/src/test/resources/bad_neutron_logic_v11.xml
+++ b/sli/common/src/test/resources/bad_neutron_logic_v11.xml
@@ -18,9 +18,9 @@
-->
-<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd"
+ xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd"
module="neutron" version="1.0.0">
<method rpc="canCreateNetwork" mode="sync">
diff --git a/sli/common/src/test/resources/mergetest.xml b/sli/common/src/test/resources/mergetest.xml
index 37874413..91164bee 100644
--- a/sli/common/src/test/resources/mergetest.xml
+++ b/sli/common/src/test/resources/mergetest.xml
@@ -16,7 +16,7 @@
============LICENSE_END=========================================================
-->
-<multicast-parameters xmlns="org.openecomp.sdnc:test">
+<multicast-parameters xmlns="org.onap.sdnc:test">
<vpn-v4-multicast-enabled>Y</vpn-v4-multicast-enabled>
<v4-multicast>
<v4-pim-ssm-default-range>Y</v4-pim-ssm-default-range>
diff --git a/sli/common/src/test/resources/neutron_logic_v10.xml b/sli/common/src/test/resources/neutron_logic_v10.xml
index 730ebc21..73d14201 100644
--- a/sli/common/src/test/resources/neutron_logic_v10.xml
+++ b/sli/common/src/test/resources/neutron_logic_v10.xml
@@ -18,9 +18,9 @@
-->
-<service-logic xmlns="http://www.openecomp.org/sdnc/svclogic"
+<service-logic xmlns="http://www.onap.org/sdnc/svclogic"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.openecomp.org/sdnc/svclogic ./svclogic.xsd"
+ xsi:schemaLocation="http://www.onap.org/sdnc/svclogic ./svclogic.xsd"
module="neutron" version="1.0.0">
<method rpc="canCreateNetwork" mode="sync">
diff --git a/sli/common/src/test/resources/simplelogger.properties b/sli/common/src/test/resources/simplelogger.properties
index d88e59eb..05f72cd7 100644
--- a/sli/common/src/test/resources/simplelogger.properties
+++ b/sli/common/src/test/resources/simplelogger.properties
@@ -7,9 +7,9 @@
# 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.
@@ -19,5 +19,5 @@
###
org.slf4j.simpleLogger.defaultLogLevel=info
-org.slf4j.simplelogger.log.org.openecomp.sdnc.sli.SvcLogicContext=debug
+org.slf4j.simplelogger.log.org.onap.ccsdk.sli.core.sli.SvcLogicContext=debug
org.slf4j.simplelogger.log.SvcLogicContext=debug
diff --git a/sli/common/src/test/resources/svclogic.properties b/sli/common/src/test/resources/svclogic.properties
index fa7a2041..df814e01 100644
--- a/sli/common/src/test/resources/svclogic.properties
+++ b/sli/common/src/test/resources/svclogic.properties
@@ -7,9 +7,9 @@
# 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.
@@ -18,8 +18,8 @@
# ============LICENSE_END=========================================================
###
-org.openecomp.sdnc.sli.dbtype = jdbc
-org.openecomp.sdnc.sli.jdbc.url = jdbc:mysql://localhost:3306/sdnctl
-org.openecomp.sdnc.sli.jdbc.database = sdnctl
-org.openecomp.sdnc.sli.jdbc.user = sdnctl
-org.openecomp.sdnc.sli.jdbc.password = gamma
+org.onap.ccsdk.sli.dbtype = jdbc
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://localhost:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.database = sdnctl
+org.onap.ccsdk.sli.jdbc.user = sdnctl
+org.onap.ccsdk.sli.jdbc.password = gamma
diff --git a/sli/common/src/test/resources/svclogic.sh b/sli/common/src/test/resources/svclogic.sh
index f6c6f4b6..601e94f6 100644
--- a/sli/common/src/test/resources/svclogic.sh
+++ b/sli/common/src/test/resources/svclogic.sh
@@ -9,9 +9,9 @@
# 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.
@@ -28,4 +28,4 @@ SLI_COMMON_JAR=${SLI_COMMON_JAR:=${SLI_COMMON_TARGETDIR}/sli-common-${SLI_VERSIO
echo SLI_COMMON_JAR is $SLI_COMMON_JAR
-java -cp ${CLASSPATH}:${MYSQL_JDBC_DRIVER}:${SLI_COMMON_JAR} org.openecomp.sdnc.sli.SvcLogicParser $*
+java -cp ${CLASSPATH}:${MYSQL_JDBC_DRIVER}:${SLI_COMMON_JAR} org.onap.ccsdk.sli.core.sli.SvcLogicParser $*
diff --git a/sli/common/src/test/resources/svclogic.xsd b/sli/common/src/test/resources/svclogic.xsd
index 07430891..a63758f7 100755
--- a/sli/common/src/test/resources/svclogic.xsd
+++ b/sli/common/src/test/resources/svclogic.xsd
@@ -1,5 +1,5 @@
<?xml version = "1.0" encoding = "UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.openecomp.org/sdnc/svclogic" xmlns="http://www.openecomp.org/sdnc/svclogic">
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.onap.org/sdnc/svclogic" xmlns="http://www.onap.org/sdnc/svclogic">
<xsd:simpleType name="modeType">
<xsd:restriction base="xsd:string">