From a5577ac18e488ed1870994b2d8f63ad01f38414d Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 20 Apr 2017 17:02:24 -0400 Subject: [PATCH] [SDNC-5] Boron port and bug fixes Changes to support Boron as well as bug fixes discovered during initial testing. Change-Id: Ic6c156c8fe884a6a3bccc19d0676da312be8a4c2 Signed-off-by: Dan Timoney --- .../sdnc/sli/resource/dblib/CachedDataSource.java | 4 +- .../dblib/jdbc/JdbcDBCachedDataSource.java | 7 +- .../resource/dblib/jdbc/MySQLCachedDataSource.java | 3 - filters/provider/pom.xml | 2 +- pom.xml | 9 +- rootpom/pom.xml | 1025 +++++------ rootpom/src/site/site.xml | 2 +- rootpom/src/site/site_en.xml | 2 +- .../org/openecomp/sdnc/sli/SvcLogicDblibStore.java | 40 +- sli/common/src/main/resources/svclogic.xsd | 635 +++---- sli/common/src/test/resources/svclogic.xsd | 635 +++---- sliPluginUtils/installer/pom.xml | 3 +- sliPluginUtils/provider/pom.xml | 2 +- .../SliPluginUtils_StaticFunctions.java | 221 --- sliapi/installer/pom.xml | 3 +- sliapi/pom.xml | 3 +- sliapi/provider/pom.xml | 4 +- src/site/apt/nodes.apt | 1890 ++++++++++---------- 18 files changed, 2142 insertions(+), 2348 deletions(-) mode change 100755 => 100644 sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java delete mode 100644 sliPluginUtils/provider/src/test/java/org/openecomp/sdnc/sli/SliPluginUtils/SliPluginUtils_StaticFunctions.java diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java b/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java index ee01c1b..58a0aeb 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java +++ b/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/CachedDataSource.java @@ -182,7 +182,7 @@ public abstract class CachedDataSource implements DataSource, SQLExecutionMonito data.populate(rs); // Point the rowset Cursor to the start if(LOGGER.isDebugEnabled()){ - LOGGER.debug("SQL SUCCESS. count=" + data.size()+ ", time(ms): "+ (System.currentTimeMillis() - time)); } + LOGGER.debug("SQL SUCCESS. rows returned: " + data.size()+ ", time(ms): "+ (System.currentTimeMillis() - time)); } } catch(SQLException exc){ if(LOGGER.isDebugEnabled()){ LOGGER.debug("SQL FAILURE. time(ms): "+ (System.currentTimeMillis() - time)); @@ -257,7 +257,7 @@ public abstract class CachedDataSource implements DataSource, SQLExecutionMonito rs = ps.executeUpdate(); // Point the rowset Cursor to the start if(LOGGER.isDebugEnabled()){ - LOGGER.debug("SQL SUCCESS. count=" + data.size()+ ", time(ms): "+ (System.currentTimeMillis() - time)); + LOGGER.debug("SQL SUCCESS. rows returned: " + data.size()+ ", time(ms): "+ (System.currentTimeMillis() - time)); } } catch(SQLException exc){ if(LOGGER.isDebugEnabled()){ diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java b/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java index 42c3447..90c76f6 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.java +++ b/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/JdbcDBCachedDataSource.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. @@ -61,9 +61,6 @@ public class JdbcDBCachedDataSource extends CachedDataSource /** * @param jdbcElem - * @param alarmLog - * @param occManager - * @throws Exception */ public JdbcDBCachedDataSource(BaseDBConfiguration jdbcElem) { diff --git a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java b/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java index ebfd473..a5482d0 100644 --- a/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java +++ b/dblib/provider/src/main/java/org/openecomp/sdnc/sli/resource/dblib/jdbc/MySQLCachedDataSource.java @@ -59,9 +59,6 @@ public class MySQLCachedDataSource extends CachedDataSource /** * @param jdbcElem - * @param alarmLog - * @param occManager - * @throws Exception */ public MySQLCachedDataSource(BaseDBConfiguration jdbcElem) { diff --git a/filters/provider/pom.xml b/filters/provider/pom.xml index 6afa2d2..3113b24 100755 --- a/filters/provider/pom.xml +++ b/filters/provider/pom.xml @@ -52,7 +52,7 @@ org.openecomp.sdnc.core sli-common - ${sdnctl.sli.version} + ${project.version} - 1.1.0-SNAPSHOT - 1.1.0-SNAPSHOT - 1.1.0-SNAPSHOT - 1.1.0-SNAPSHOT - 1.1.0-SNAPSHOT + (1.0.999,1.1.999) + (1.0.999,1.1.999) + (1.0.999,1.1.999) + (1.0.999,1.1.999) + (1.0.999,1.1.999) ${sdnc.core.version} ${sdnc.adaptors.version} ${sdnc.core.version} @@ -156,399 +157,79 @@ pom org.openecomp.sdnc.core root - 1.1.1-SNAPSHOT - - - - - - org.opendaylight.controller - opendaylight-karaf-empty - ${odl.karaf.empty.distro.version} - zip - - - - - org.openecomp.sdnc.core - sli-common - ${sdnctl.sli.version} - - - - org.openecomp.sdnc.core - sli-provider - ${sdnctl.sli.version} - - - - org.openecomp.sdnc.core - aai-service-provider - ${sdnctl.aai.service.version} - - - - org.openecomp.sdnc.core - dblib-provider - ${sdnctl.dblib.version} - - - - - - - SDNC Root - http://wiki.onap.org - Root POM to be used for all SDNC projects - - - - JIRA - https://jira.onap.org/ - - - - - - maven-javadoc-plugin - 2.10.4 - - false - org.umlgraph.doclet.UmlGraphDoc - - org.umlgraph - umlgraph - 5.6 - - -views - true - org.opendaylight.* - - - org.opendaylight.odlparent - odlparent - 1.7.1-Boron-SR1 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.antlr - antlr4 - ${antlr.version} - - - org.antlr - antlr4-runtime - ${antlr.version} - - - - com.sun.jersey - jersey-client - ${jersey.json.version} - - - com.sun.jersey - jersey-core - ${jersey.json.version} - - - org.apache.httpcomponents - httpcore-osgi - ${apache.httpcomponents.version} - - - org.apache.httpcomponents - httpclient-osgi - ${apache.httpcomponents.version} - - - com.fasterxml.jackson.core - jackson-databind - ${fasterxml.jackson.version} - - - com.fasterxml.jackson.core - jackson-annotations - ${fasterxml.jackson.version} - - - com.fasterxml.jackson.core - jackson-core - ${fasterxml.jackson.version} - - - commons-lang - commons-lang - ${commons.lang.version} - - - org.opendaylight.mdsal - yang-binding - ${odl.mdsal.yang.binding.version} - - - org.opendaylight.yangtools - yang-common - ${odl.yangtools.version} - - - org.opendaylight.mdsal.model - ietf-inet-types - ${odl.ietf-inet-types.version} - - - org.opendaylight.mdsal.model - ietf-yang-types - ${odl.ietf-yang-types.version} - - - - - - - javadoc-no-fork - test-javadoc-no-fork - - - - aggregate - - aggregate - test-aggregate - - - - - - org.apache.maven.plugins - maven-jxr-plugin - 2.3 - - - aggregate - - aggregate - test-aggregate - - - - - - - maven-surefire-plugin - 2.17 - - - org.apache.maven.plugins - maven-changelog-plugin - 2.3 - - - dual-report - - range - 30 - - - changelog - file-activity - - - - - - org.codehaus.mojo - taglist-maven-plugin - 2.4 - - - - - - - - openecomp-public - ${openecomp.nexus.public-url} - - true - - - true - - - - opendaylight-mirror - opendaylight-mirror - ${opendaylight.nexus.public-url} - - true - never - - - false - - - - opendaylight-snapshot - opendaylight-snapshot - ${opendaylight.nexus.snapshot-url} - - false - - - true - - - - - JCenter - JCenter Repository - http://jcenter.bintray.com - - - - Restlet - Restlet Repository - http://maven.restlet.com - - - - - - - openecomp-public - ${openecomp.nexus.public-url} - - true - - never - - - true - always - - - - - openecomp-release - openecomp-repository-releases - ${openecomp.nexus.release-url} - - true - never - - - false - - - - openecomp-snapshot - openecomp-repository-snapshots - ${openecomp.nexus.snapshot-url} - - false - - - true - - - - opendaylight-mirror - opendaylight-mirror - ${opendaylight.nexus.public-url} - - true - never - - - false - - - - opendaylight-snapshot - opendaylight-snapshot - ${opendaylight.nexus.snapshot-url} - - false - - - true - - - - - - - - ecomp-site - dav:https://${openecomp.nexus.host}/content/sites/site/org/onap/sdnc/${project.version} - - - ecomp-releases - openecomp-repository-releases - ${openecomp.nexus.release-url} - - - ecomp-snapshots - openecomp-repository-snapshots - ${openecomp.nexus.snapshot-url} - - - - - + 1.1.0-SNAPSHOT + + + + + + org.opendaylight.controller + opendaylight-karaf-empty + ${odl.karaf.empty.distro.version} + zip + + + + + org.openecomp.sdnc.core + sli-common + ${sdnctl.sli.version} + + + + org.openecomp.sdnc.core + sli-provider + ${sdnctl.sli.version} + + + + org.openecomp.sdnc.core + aai-service-provider + ${sdnctl.aai.service.version} + + + + org.openecomp.sdnc.core + dblib-provider + ${sdnctl.dblib.version} + + + + + + + SDNC Root + http://wiki.onap.org + Root POM to be used for all SDNC projects + + + + JIRA + https://jira.onap.org/ + + + - org.apache.maven.plugins - maven-site-plugin - 3.6 - - - org.apache.maven.wagon - wagon-ssh - 1.0 - - - org.apache.maven.wagon - wagon-webdav-jackrabbit - 2.10 - - - - - attach-descriptor - - attach-descriptor - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compile.plugin.version} - - ${java.version.source} - ${java.version.target} - - - - org.codehaus.mojo - sonar-maven-plugin - 3.2 - - - org.apache.maven.plugins maven-javadoc-plugin - 2.10 + 2.10.4 + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + org.opendaylight.* + + org.opendaylight.odlparent + odlparent + 1.7.1-Boron-SR1 + org.slf4j slf4j-api @@ -568,12 +249,12 @@ com.sun.jersey jersey-client - ${jersey.client.version} + ${jersey.json.version} com.sun.jersey jersey-core - ${jersey.version} + ${jersey.json.version} org.apache.httpcomponents @@ -588,17 +269,17 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} + ${fasterxml.jackson.version} com.fasterxml.jackson.core jackson-annotations - ${jackson.version} + ${fasterxml.jackson.version} com.fasterxml.jackson.core jackson-core - ${jackson.version} + ${fasterxml.jackson.version} commons-lang @@ -627,155 +308,475 @@ - - - + + + + javadoc-no-fork + test-javadoc-no-fork + + + aggregate - - aggregate - - site - - - + + aggregate + test-aggregate + + + - maven-source-plugin - 2.1.1 - - - bundle-sources - package - - - jar-no-fork - - - test-jar-no-fork - - - + org.apache.maven.plugins + maven-jxr-plugin + 2.3 + + + aggregate + + aggregate + test-aggregate + + + - + + maven-surefire-plugin + 2.17 + + + org.apache.maven.plugins + maven-changelog-plugin + 2.3 + + + dual-report + + range + 30 + + + changelog + file-activity + + + + + + org.codehaus.mojo + taglist-maven-plugin + 2.4 + + + + + + + openecomp-public + ${openecomp.nexus.public-url} + + true + + + true + + + + opendaylight-mirror + opendaylight-mirror + ${opendaylight.nexus.public-url} + + true + never + + + false + + + + opendaylight-snapshot + opendaylight-snapshot + ${opendaylight.nexus.snapshot-url} + + false + + + true + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + openecomp-public + ${openecomp.nexus.public-url} + + true + + never + + + true + always + + + + + openecomp-release + openecomp-repository-releases + ${openecomp.nexus.release-url} + + true + never + + + false + + + + openecomp-snapshot + openecomp-repository-snapshots + ${openecomp.nexus.snapshot-url} + + false + + + true + + + + opendaylight-mirror + opendaylight-mirror + ${opendaylight.nexus.public-url} + + true + never + + + false + + + + opendaylight-snapshot + opendaylight-snapshot + ${opendaylight.nexus.snapshot-url} + + false + + + true + + + + + + + + ecomp-site + dav:https://${openecomp.nexus.host}/content/sites/site/org/onap/sdnc/${project.version} + + + ecomp-releases + openecomp-repository-releases + ${openecomp.nexus.release-url} + + + ecomp-snapshots + openecomp-repository-snapshots + ${openecomp.nexus.snapshot-url} + + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-ssh + 1.0 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + attach-descriptor + + attach-descriptor + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compile.plugin.version} + + ${java.version.source} + ${java.version.target} + + + + org.codehaus.mojo + sonar-maven-plugin + 3.2 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10 + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.antlr + antlr4 + ${antlr.version} + + + org.antlr + antlr4-runtime + ${antlr.version} + + + + com.sun.jersey + jersey-client + ${jersey.client.version} + + + com.sun.jersey + jersey-core + ${jersey.version} + + + org.apache.httpcomponents + httpcore-osgi + ${apache.httpcomponents.version} + + + org.apache.httpcomponents + httpclient-osgi + ${apache.httpcomponents.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + commons-lang + commons-lang + ${commons.lang.version} + + + org.opendaylight.mdsal + yang-binding + ${odl.mdsal.yang.binding.version} + + + org.opendaylight.yangtools + yang-common + ${odl.yangtools.version} + + + org.opendaylight.mdsal.model + ietf-inet-types + ${odl.ietf-inet-types.version} + + + org.opendaylight.mdsal.model + ietf-yang-types + ${odl.ietf-yang-types.version} + + + - + + + aggregate + + aggregate + + site + + + + + + maven-source-plugin + 2.1.1 + + + bundle-sources + package + + + jar-no-fork + + + test-jar-no-fork + + + + + + + + + - - + + - + - org.codehaus.mojo + org.codehaus.mojo - license-maven-plugin + license-maven-plugin - 1.10 + 1.10 - + - false + false - ============LICENSE_START======================================================= + ============LICENSE_START======================================================= - ============LICENSE_END========================================================= + ============LICENSE_END========================================================= - ================================================================================ + ================================================================================ - apache_v2 + apache_v2 - 2017 + 2017 - AT&T Intellectual Property. All rights - reserved. + AT&T Intellectual Property. All rights + reserved. - openECOMP : SDN-C + openECOMP : SDN-C - true + true - true + true - true + true - true - - **/*.png - **/*.json - + true + + **/*.png + **/*.json + - + - + - + - first + first - + - update-file-header + update-file-header - + - process-sources + process-sources - + - + - + - - org.codehaus.mojo - properties-maven-plugin - 1.0.0 - - - - set-system-properties - - - - - maven.wagon.http.ssl.allowall - ${ssl.allowall} - - - maven.wagon.http.ssl.insecure - ${ssl.insecure} - - - - - - - - org.codehaus.mojo - versions-maven-plugin - 2.3 - - - maven-scm-plugin - 1.8.1 - - ${project.artifactId}-${project.version} - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - https://${openecomp.nexus.host} - ${openecomp.nexus.staging.profile-id} - ${openecomp.nexus.staging.server-id} - - - - - - OpenECOMP - + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + + set-system-properties + + + + + maven.wagon.http.ssl.allowall + ${ssl.allowall} + + + maven.wagon.http.ssl.insecure + ${ssl.insecure} + + + + + + + + org.codehaus.mojo + versions-maven-plugin + 2.3 + + + maven-scm-plugin + 1.8.1 + + ${project.artifactId}-${project.version} + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + https://${openecomp.nexus.host} + ${openecomp.nexus.staging.profile-id} + ${openecomp.nexus.staging.server-id} + + + + + + OpenECOMP + diff --git a/rootpom/src/site/site.xml b/rootpom/src/site/site.xml index cd1f1c9..497b146 100644 --- a/rootpom/src/site/site.xml +++ b/rootpom/src/site/site.xml @@ -4,7 +4,7 @@ openECOMP : SDN-C ================================================================================ Copyright (C) 2017 AT&T Intellectual Property. All rights - reserved. + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rootpom/src/site/site_en.xml b/rootpom/src/site/site_en.xml index cd1f1c9..497b146 100644 --- a/rootpom/src/site/site_en.xml +++ b/rootpom/src/site/site_en.xml @@ -4,7 +4,7 @@ openECOMP : SDN-C ================================================================================ Copyright (C) 2017 AT&T Intellectual Property. All rights - reserved. + reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java b/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java old mode 100755 new mode 100644 index e3bd099..d494eaa --- a/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java +++ b/sli/common/src/main/java/org/openecomp/sdnc/sli/SvcLogicDblibStore.java @@ -50,14 +50,14 @@ import org.slf4j.LoggerFactory; public class SvcLogicDblibStore implements SvcLogicStore { private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR"; - + private static final Logger LOG = LoggerFactory .getLogger(SvcLogicDblibStore.class); private static final String DBLIB_SERVICE = // "org.openecomp.sdnc.sli.resource.dblib.DBLibService"; "org.openecomp.sdnc.sli.resource.dblib.DBResourceManager"; - + Properties props = null; public void init(Properties props) throws ConfigurationException { @@ -148,7 +148,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { try { dbConn = ((DBResourceManager) dbSvc).getConnection(); PreparedStatement fetchGraphStmt; - + ArrayList args = new ArrayList(); args.add(module); args.add(rpc); @@ -159,7 +159,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { } else { fetchGraphStmt = dbConn.prepareStatement(fetchVersionGraphSql); } - + fetchGraphStmt.setString(1, module); fetchGraphStmt.setString(2, rpc); fetchGraphStmt.setString(3, mode); @@ -168,7 +168,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { } results = fetchGraphStmt.executeQuery(); - + if (results.next()) { Blob graphBlob = results.getBlob("graph"); @@ -442,12 +442,12 @@ public class SvcLogicDblibStore implements SvcLogicStore { DbLibService dblibSvc = null; ServiceReference sref = null; BundleContext bctx = null; - + Bundle bundle = FrameworkUtil.getBundle(SvcLogicDblibStore.class); - + if (bundle != null) { bctx = bundle.getBundleContext(); - + if (bctx != null) { sref = bctx.getServiceReference(DBLIB_SERVICE); } @@ -458,7 +458,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { } else { dblibSvc = (DbLibService) bctx.getService(sref); if (dblibSvc == null) { - + LOG.warn("Could not find service reference for DBLIB service (" + DBLIB_SERVICE + ")"); } @@ -470,34 +470,34 @@ public class SvcLogicDblibStore implements SvcLogicStore { // Try to create a DbLibService object from dblib properties if(JavaSingleton.getInstance() == null){ Properties dblibProps = new Properties(); - + String propDir = System.getenv(SDNC_CONFIG_DIR); if (propDir == null) { - + propDir = "/opt/sdnc/data/properties"; } String propPath = propDir + "/dblib.properties"; - + File propFile = new File(propPath); - + if (!propFile.exists()) { - + LOG.warn( "Missing configuration properties file : " + propFile); return(null); } - + try { - + dblibProps.load(new FileInputStream(propFile)); } catch (Exception e) { LOG.warn( "Could not load properties file " + propPath, e); return(null); - + } - + try { dblibSvc = DBResourceManager.create(dblibProps); JavaSingleton.setInstance(dblibSvc); @@ -511,7 +511,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { return (dblibSvc); } - + static class JavaSingleton { /* Private constructor */ private JavaSingleton() { @@ -525,7 +525,7 @@ public class SvcLogicDblibStore implements SvcLogicStore { public static DbLibService getInstance() { return INSTANCE; } - + public static void setInstance(DbLibService dbresource) { INSTANCE = dbresource; } diff --git a/sli/common/src/main/resources/svclogic.xsd b/sli/common/src/main/resources/svclogic.xsd index 614a118..0743089 100755 --- a/sli/common/src/main/resources/svclogic.xsd +++ b/sli/common/src/main/resources/svclogic.xsd @@ -1,312 +1,323 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sli/common/src/test/resources/svclogic.xsd b/sli/common/src/test/resources/svclogic.xsd index 614a118..0743089 100755 --- a/sli/common/src/test/resources/svclogic.xsd +++ b/sli/common/src/test/resources/svclogic.xsd @@ -1,312 +1,323 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sliPluginUtils/installer/pom.xml b/sliPluginUtils/installer/pom.xml index 22bf1e7..cae4261 100755 --- a/sliPluginUtils/installer/pom.xml +++ b/sliPluginUtils/installer/pom.xml @@ -1,6 +1,5 @@ - + 4.0.0 sliPluginUtils diff --git a/sliPluginUtils/provider/pom.xml b/sliPluginUtils/provider/pom.xml index 739f89d..d7e2042 100755 --- a/sliPluginUtils/provider/pom.xml +++ b/sliPluginUtils/provider/pom.xml @@ -28,7 +28,7 @@ org.openecomp.sdnc.core sli-common - ${sdnctl.sli.version} + ${project.version} compile diff --git a/sliPluginUtils/provider/src/test/java/org/openecomp/sdnc/sli/SliPluginUtils/SliPluginUtils_StaticFunctions.java b/sliPluginUtils/provider/src/test/java/org/openecomp/sdnc/sli/SliPluginUtils/SliPluginUtils_StaticFunctions.java deleted file mode 100644 index c9cbb1f..0000000 --- a/sliPluginUtils/provider/src/test/java/org/openecomp/sdnc/sli/SliPluginUtils/SliPluginUtils_StaticFunctions.java +++ /dev/null @@ -1,221 +0,0 @@ -/*- - * ============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========================================================= - */ - -package org.openecomp.sdnc.sli.SliPluginUtils; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; - -import java.util.HashMap; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; -import org.openecomp.sdnc.sli.SvcLogicContext; -import org.openecomp.sdnc.sli.SvcLogicException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SliPluginUtils_StaticFunctions { - private static final Logger LOG = LoggerFactory.getLogger(SliPluginUtils_StaticFunctions.class); - SliPluginUtils utils = new SliPluginUtils(); - private SvcLogicContext ctx; - private HashMap parameters; - - - @Before - public void setUp() throws Exception { - this.ctx = new SvcLogicContext(); - parameters = new HashMap<>(); - } - - // TODO: javadoc - @Test - public final void testCtxGetBeginsWith() { - ctx.setAttribute("service-data.oper-status.order-status", "InProgress"); - ctx.setAttribute("service-data.service-information.service-instance-id", "USOSTCDALTX0101UJZZ01"); - ctx.setAttribute("service-data.service-information.service-type", "VMS"); - - Map entries = SliPluginUtils.ctxGetBeginsWith(ctx, "service-data.service-information"); - - assertEquals( "USOSTCDALTX0101UJZZ01", entries.get("service-data.service-information.service-instance-id") ); - assertEquals( "VMS", entries.get("service-data.service-information.service-type") ); - assertFalse( entries.containsKey("service-data.oper-status.order-status") ); - } - - // TODO: javadoc - @Test - public final void testCtxListRemove_index() throws SvcLogicException { - LOG.trace("=== testCtxListRemove_index ==="); - ctx.setAttribute("service-data.vnf-l3[0].vnf-host-name", "vnf-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[0].device-host-name", "device-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[1].vnf-host-name", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[1].device-host-name", "device-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[2].vnf-host-name", "vnf-host-name_2"); - ctx.setAttribute("service-data.vnf-l3[2].device-host-name", "device-host-name_2"); - ctx.setAttribute("service-data.vnf-l3_length", "3"); - - parameters.put("index", "1"); - parameters.put("list_pfx", "service-data.vnf-l3"); - - utils.ctxListRemove( parameters, ctx ); - SliPluginUtils.logContextMemory(ctx, LOG, SliPluginUtils.LogLevel.TRACE); - - assertEquals("2", ctx.getAttribute("service-data.vnf-l3_length")); - assertEquals("vnf-host-name_0", ctx.getAttribute("service-data.vnf-l3[0].vnf-host-name")); - assertEquals("device-host-name_0", ctx.getAttribute("service-data.vnf-l3[0].device-host-name")); - assertEquals("vnf-host-name_2", ctx.getAttribute("service-data.vnf-l3[1].vnf-host-name")); - assertEquals("device-host-name_2", ctx.getAttribute("service-data.vnf-l3[1].device-host-name")); - } - - // TODO: javadoc - @Test - public final void textCtxListRemove_keyValue() throws SvcLogicException { - LOG.trace("=== textCtxListRemove_keyValue ==="); - ctx.setAttribute("service-data.vnf-l3[0].vnf-host-name", "vnf-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[0].device-host-name", "device-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[1].vnf-host-name", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[1].device-host-name", "device-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[2].vnf-host-name", "vnf-host-name_2"); - ctx.setAttribute("service-data.vnf-l3[2].device-host-name", "device-host-name_2"); - // 2nd entry - ctx.setAttribute("service-data.vnf-l3[3].vnf-host-name", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[3].device-host-name", "device-host-name_1"); - ctx.setAttribute("service-data.vnf-l3_length", "4"); - - parameters.put("list_pfx", "service-data.vnf-l3"); - parameters.put("key", "vnf-host-name"); - parameters.put("value", "vnf-host-name_1"); - - utils.ctxListRemove( parameters, ctx ); - SliPluginUtils.logContextMemory(ctx, LOG, SliPluginUtils.LogLevel.TRACE); - - assertEquals("2", ctx.getAttribute("service-data.vnf-l3_length")); - assertEquals("vnf-host-name_0", ctx.getAttribute("service-data.vnf-l3[0].vnf-host-name")); - assertEquals("device-host-name_0", ctx.getAttribute("service-data.vnf-l3[0].device-host-name")); - assertEquals("vnf-host-name_2", ctx.getAttribute("service-data.vnf-l3[1].vnf-host-name")); - assertEquals("device-host-name_2", ctx.getAttribute("service-data.vnf-l3[1].device-host-name")); - } - - // TODO: javadoc - @Test - public final void textCtxListRemove_keyValue_nullkey() throws SvcLogicException { - LOG.trace("=== textCtxListRemove_keyValue_nullkey ==="); - ctx.setAttribute("service-data.vnf-l3[0]", "vnf-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[1]", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[2]", "vnf-host-name_2"); - ctx.setAttribute("service-data.vnf-l3_length", "3"); - - parameters.put("list_pfx", "service-data.vnf-l3"); - parameters.put("value", "vnf-host-name_1"); - - utils.ctxListRemove( parameters, ctx ); - SliPluginUtils.logContextMemory(ctx, LOG, SliPluginUtils.LogLevel.TRACE); - - assertEquals("2", ctx.getAttribute("service-data.vnf-l3_length")); - assertEquals("vnf-host-name_0", ctx.getAttribute("service-data.vnf-l3[0]")); - assertEquals("vnf-host-name_2", ctx.getAttribute("service-data.vnf-l3[1]")); - } - - // TODO: javadoc - @Test - public final void textCtxListRemove_keyValueList() throws SvcLogicException { - LOG.trace("=== textCtxListRemove_keyValueList ==="); - ctx.setAttribute("service-data.vnf-l3[0].vnf-host-name", "vnf-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[0].device-host-name", "device-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[1].vnf-host-name", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[1].device-host-name", "device-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[2].vnf-host-name", "vnf-host-name_2"); - ctx.setAttribute("service-data.vnf-l3[2].device-host-name", "device-host-name_2"); - // 2nd entry - ctx.setAttribute("service-data.vnf-l3[3].vnf-host-name", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[3].device-host-name", "device-host-name_1"); - // entries with only 1 of 2 key-value pairs matching - ctx.setAttribute("service-data.vnf-l3[4].vnf-host-name", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[4].device-host-name", "device-host-name_4"); - ctx.setAttribute("service-data.vnf-l3[5].vnf-host-name", "vnf-host-name_5"); - ctx.setAttribute("service-data.vnf-l3[5].device-host-name", "device-host-name_1"); - ctx.setAttribute("service-data.vnf-l3_length", "6"); - - parameters.put("list_pfx", "service-data.vnf-l3"); - parameters.put("keys_length", "2"); - parameters.put("keys[0].key", "vnf-host-name"); - parameters.put("keys[0].value", "vnf-host-name_1"); - parameters.put("keys[1].key", "device-host-name"); - parameters.put("keys[1].value", "device-host-name_1"); - - utils.ctxListRemove( parameters, ctx ); - SliPluginUtils.logContextMemory(ctx, LOG, SliPluginUtils.LogLevel.TRACE); - - assertEquals("4", ctx.getAttribute("service-data.vnf-l3_length")); - assertEquals("vnf-host-name_0", ctx.getAttribute("service-data.vnf-l3[0].vnf-host-name")); - assertEquals("device-host-name_0", ctx.getAttribute("service-data.vnf-l3[0].device-host-name")); - assertEquals("vnf-host-name_2", ctx.getAttribute("service-data.vnf-l3[1].vnf-host-name")); - assertEquals("device-host-name_2", ctx.getAttribute("service-data.vnf-l3[1].device-host-name")); - assertEquals("vnf-host-name_1", ctx.getAttribute("service-data.vnf-l3[2].vnf-host-name")); - assertEquals("device-host-name_4", ctx.getAttribute("service-data.vnf-l3[2].device-host-name")); - assertEquals("vnf-host-name_5", ctx.getAttribute("service-data.vnf-l3[3].vnf-host-name")); - assertEquals("device-host-name_1", ctx.getAttribute("service-data.vnf-l3[3].device-host-name")); - } - - // TODO: javadoc - @Test(expected=SvcLogicException.class) - public final void testCtxListRemove_nullListLength() throws SvcLogicException { - LOG.trace("=== testCtxListRemove_nullListLength ==="); - ctx.setAttribute("service-data.vnf-l3[0].vnf-host-name", "vnf-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[0].device-host-name", "device-host-name_0"); - ctx.setAttribute("service-data.vnf-l3[1].vnf-host-name", "vnf-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[1].device-host-name", "device-host-name_1"); - ctx.setAttribute("service-data.vnf-l3[2].vnf-host-name", "vnf-host-name_2"); - ctx.setAttribute("service-data.vnf-l3[2].device-host-name", "device-host-name_2"); - - - parameters.put("index", "1"); - parameters.put("list_pfx", "service-data.vnf-l3"); - - utils.ctxListRemove( parameters, ctx ); - } - - // TODO: javadoc - @Test - public final void testCtxPutAll() { - HashMap entries = new HashMap<>(); - entries.put("service-data.oper-status.order-status", "InProgress"); - entries.put("service-data.service-information.service-instance-id", "USOSTCDALTX0101UJZZ01"); - entries.put("service-data.request-information.order-number", 1234); - entries.put("service-data.request-information.request-id", null); - - SliPluginUtils.ctxPutAll(ctx, entries); - - assertEquals( "InProgress", ctx.getAttribute("service-data.oper-status.order-status") ); - assertEquals( "USOSTCDALTX0101UJZZ01", ctx.getAttribute("service-data.service-information.service-instance-id") ); - assertEquals( "1234", ctx.getAttribute("service-data.request-information.order-number") ); - assertFalse( ctx.getAttributeKeySet().contains("service-data.request-information.request-id") ); - } - - // TODO: javadoc - @Test - public final void testCtxSetAttribute_LOG() { - LOG.debug("=== testCtxSetAttribute_LOG ==="); - Integer i = new Integer(3); - SliPluginUtils.ctxSetAttribute(ctx, "test", i, LOG, SliPluginUtils.LogLevel.TRACE); - } -} diff --git a/sliapi/installer/pom.xml b/sliapi/installer/pom.xml index 51a956a..e8f21eb 100755 --- a/sliapi/installer/pom.xml +++ b/sliapi/installer/pom.xml @@ -1,6 +1,5 @@ - + 4.0.0 sliapi diff --git a/sliapi/pom.xml b/sliapi/pom.xml index 86874b9..e613b95 100755 --- a/sliapi/pom.xml +++ b/sliapi/pom.xml @@ -1,6 +1,5 @@ - + 4.0.0 diff --git a/sliapi/provider/pom.xml b/sliapi/provider/pom.xml index 62d9cb0..d942912 100755 --- a/sliapi/provider/pom.xml +++ b/sliapi/provider/pom.xml @@ -123,12 +123,12 @@ org.openecomp.sdnc.core sli-common - ${sdnctl.sli.version} + ${project.version} org.openecomp.sdnc.core sli-provider - ${sdnctl.sli.version} + ${project.version} org.opendaylight.controller diff --git a/src/site/apt/nodes.apt b/src/site/apt/nodes.apt index d005b5f..f49ca00 100644 --- a/src/site/apt/nodes.apt +++ b/src/site/apt/nodes.apt @@ -1,951 +1,953 @@ -~~~ +~~~ ~~ ============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 +~~ 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========================================================= -~~~ - - --- - Service Logic Interpreter - --- - Dan Timoney - --- - 2014-11-12 - --- - -Supported node types - - The following built-in node types are currently supported: - - * Flow Control - - * {{{Block node}<>}} - - * {{{Call node}<>}} - - * {{{For node}<>}} - - * {{{Return node}<>}} - - * {{{Set node}<>}} - - * {{{Switch node}<>}} - - * Device Management - - * {{{Configure node}<>}} - - * Java Plugin Support - - * {{{Execute node}<>}} - - * Recording - - * {{{Record node}<>}} - - * Resource Management - - * {{{Delete node}<>}} - - * {{{Exists node}<>}} - - * {{{Get-resource node}<>}} - - * {{{Is-available node}<>}} - - * {{{Notify node}<>}} - - * {{{Release node}<>}} - - * {{{Reserve node}<>}} - - * {{{Save node}<>}} - - * {{{Update node}<>}} - - -* Flow Control - -** Block node - -*** Description - - A <> node is used to executes a set of nodes. - -*** Attributes - -*--------------*--------------------------------------------+ -| <> | if , then if a node returns failure, subsequent nodes will not be executed and nodes already executed will be backed out. -*--------------*--------------------------------------------+ - -*** Parameters - - None - -*** Outcomes - - None - -*** Example - -+-----------------+ - - - - - - - - - - - -+-----------------+ - - - -**Call node - -*** Description - - A <> node is used to call another graph - -*** Attributes - -*--------------*-------+ -| <> | Module of directed graph to call. If unset, defaults to that of calling graph -*--------------*-------+ -| <> | rpc of directed graph to call. -*--------------*-------+ -| <> | version of graph to call, If unset, uses active version. -*--------------*-------+ -| <> | mode (sync/async) of graph to call. If unset, defaults to that of calling graph. -*--------------*-------+ - - - -*** Parameters - - Not applicable - -*** Outcomes - -*----------*---------+ -| <> | Sub graph returned success -*----------*---------+ -| <> | Graph not found -*----------*---------+ -| <> | Subgraph returned success -*----------*---------+ - . - -*** Example - -+-------------------+ - -+-------------------+ - -**For node - -*** Description - - A <> node provides a fixed iteration looping mechanism, similar to the Java for loop - -*** Attributes - -*--------------*-------+ -| <> | index variable -*--------------*-------+ -| <> | initial value -*--------------*-------+ -| <> | maximum value -*--------------*-------+ - - -*** Parameters - - Not applicable. - -*** Outcomes - - Not applicable. The <> node has no outcomes. - -*** Example - -+-------------------+ - - - - - -+-------------------+ - -**Return node - -*** Description - - A <> node is used to return a status to the invoking MD-SAL application - -*** Attributes - -*--------------*-------+ -| <> | Status value to return ( or ) -*--------------*-------+ - - -*** Parameters - - The following optional parameters may be passed to convey more - detailed status information. - -*------------*-----------+ -| <> | A brief, usually numeric, code indicating the error condition -*------------*-----------+ -| <> | A more detailed error message -*------------*-----------+ - -*** Outcomes - - Not applicable. The <> node has no outcomes. - -*** Example - -+-------------------+ - - - - -+-------------------+ - -**Set node - -*** Description - - A <> node is used to set one or more values in the execution context - -*** Attributes - -*--------------*-------+ -| <> | If true the set node will only execute if the current value of the target is null -*--------------*-------+ - -*** Parameters - - Values to be set are passed as parameters - -*** Outcomes - - Not applicable. The <> node has no outcomes. - -*** Example - -+-------------------+ - - - -+-------------------+ - -**Switch node - -*** Description - - A <> node is used to make a decision based on its <> attribute. - -*** Attributes - -*--------------*-------+ -| <> | Condition to test -*--------------*-------+ - - -*** Parameters - - None - - -*** Outcomes - - Depends on the <> condition - -*** Example - -+-------------------+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+-------------------+ - -* Device Management - -**Configure node - -*** Description - - A <> node is used to configure a device. - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <> | Activate device/interface, for devices that support a separate activation step. -*--------------*-------+ -| <> | SQL-like string specifying criteria for item to configure -*--------------*-------+ - -*** Parameters - - Specific to device adaptor. - -*** Outcomes - -*-----------*-------+ -| <> | Device successfully configured -*-----------*-------+ -| <> | Element to be configured does not exist. -*-----------*--------+ -| <> | Element is not in a state where it can be configured/activated -*-----------*-------+ -| <> | Attempt to activate element that is already active -*-----------*-------+ -| <> | Configure failed for some other reason -*-----------*-------+ - -*** Example - -+-------------------+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+-------------------+ - -* Java Plugin Support - -**Execute node - -*** Description - - An <> node is used to execute Java code supplied as a plugin - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class of plugin to be used -*--------------*-------+ -| <> | Name of method in the plugin class to execute. Method must return void, and take 2 arguments: a Map (for parameters) and a SvcLogicContext (to allow plugin read/write access to context memory) -*--------------*-------+ - -*** Parameters - - Specific to plugin / method - -*** Outcomes - -*-----------*-------+ -| <> | Device successfully configured -*-----------*-------+ -| <> | Plugin class could not be loaded -*-----------*--------+ -| <> | Named method taking (Map, SvcLogicContext) could not be found -*-----------*-------+ -| <> | Configure failed for some other reason -*-----------*-------+ - -*** Example - -+-------------------+ - - - - - - - - - - - - - - - - - - -+-------------------+ - -* Recording - -** Record node - -*** Description - - A <> node is used to record an event. For example, this might be used - to log provisioning events. - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class to handle recording. -*--------------*-------+ - - -*** Parameters - - Parameters will depend on the plugin being used. For the FileRecorder class, - the parameters are as follows - -*------------*-----------+ -| <> | The file to which the record should be written -*------------*-----------+ -| <> | First field to write. There will be <> parameters for each field to write, from <> through <>. A special value __TIMESTAMP__ may be assigned to a field to insert the current timestamp -*------------*-----------+ - - -*** Outcomes - -*----------*---------+ -| <> | Record successfully written -*----------*---------+ -| <> | Record could not be successfully written -*----------*---------+ - -*** Example - -+-------------------+ - - - - - - -+-------------------+ - -* Resource Management - -** Delete node - -*** Description - - A <> node is used to delete a resource from the local resource inventory. - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <> | Type of resource to delete -*--------------*-------+ -| <> | SQL-like string specifying key to delete -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <> | Resource specified deleted successfully. -*-----------*-------+ -| > | Resource specified was not deleted -*-----------*-------+ - -*** Example - -+-------------------+ - - - - - - - - -+-------------------+ - - -** Exists node - -*** Description - - An <> node is used to determine whether a particular - instance of a resource exists. For example, this might be - used to test whether a particular switch CLLI is provisioned. - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <> | Type of resource to check -*--------------*-------+ -| <> | SQL-like string specifying key to check for -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <> | Resource specified exists. -*-----------*-------+ -| <> | Resource specified is unknown -*-----------*-------+ - -*** Example - -+-------------------+ - - - - - - - - -+-------------------+ - -** Get-resource node - -*** Description - - A <> node is used to retrieve information about a - particular resource and make it available to other nodes in the - service logic tree. For example, this might be used to - retrieve information about a particular uni-port. - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <> | Type of resource to retrieve -*--------------*-------+ -| <> | SQL-like string specifying criteria for retrieval -*--------------*-------+ -| <> | Prefix to add to context variable names set for data retrieved -*--------------*-------+ -| <> | String to specify, if <> matches multiple entries, which entry should take precedence -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <> | Resource requested was successfully reserved -*-----------*-------+ -| <> | Resource requested was not successfully reserved -*-----------*-------+ - -*** Example - -+-------------------+ - - - - - - - - -+-------------------+ - -** Save node - -*** Description - - A <> node is used to save information about a - particular resource to persistent storage. For example, this might be used to - save information about a particular uni-port. - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <> | Type of resource to save -*--------------*-------+ -| <> | SQL-like string specifying criteria for retrieval -*--------------*-------+ -| <> | If "true", save resource even if this resource is already stored in persistent storage -*--------------*-------+ -| <> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext -*--------------*-------+ - -*** Parameters - - Values to save (columns) are specified as parameters, with each name - corresponding to a column name and each value corresponding to the - value to set. - -*** Outcomes - -*-----------*-------+ -| <> | Resource successfully saved -*-----------*-------+ -| <> | Resource save failed -*-----------*-------+ - -*** Example - -+-------------------+ - - - - - - - - -+-------------------+ - -** Update node - -*** Description - - An <> node is used to update information about a - particular resource to persistent storage. - -*** Attributes - -*--------------*-------+ -| <> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <> | Type of resource to update -*--------------*-------+ -| <> | SQL-like string specifying criteria for retrieval -*--------------*-------+ -| <> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext -*--------------*-------+ - -*** Parameters - - Values to save (columns) are specified as parameters, with each name - corresponding to a column name and each value corresponding to the - value to set. - -*** Outcomes - -*-----------*-------+ -| <> | Resource successfully saved -*-----------*-------+ -| <> | Resource save failed -*-----------*-------+ - -*** Example - -+-------------------+ - - - - - - - - -+-------------------+ - +~~ ============LICENSE_END========================================================= +~~~ + + --- + Service Logic Interpreter + --- + Dan Timoney + --- + 2014-11-12 + --- + +Supported node types + + The following built-in node types are currently supported: + + * Flow Control + + * {{{Block node}<>}} + + * {{{Call node}<>}} + + * {{{For node}<>}} + + * {{{Return node}<>}} + + * {{{Set node}<>}} + + * {{{Switch node}<>}} + + * Device Management + + * {{{Configure node}<>}} + + * Java Plugin Support + + * {{{Execute node}<>}} + + * Recording + + * {{{Record node}<>}} + + * Resource Management + + * {{{Delete node}<>}} + + * {{{Exists node}<>}} + + * {{{Get-resource node}<>}} + + * {{{Is-available node}<>}} + + * {{{Notify node}<>}} + + * {{{Release node}<>}} + + * {{{Reserve node}<>}} + + * {{{Save node}<>}} + + * {{{Update node}<>}} + + +* Flow Control + +** Block node + +*** Description + + A <> node is used to executes a set of nodes. + +*** Attributes + +*--------------*--------------------------------------------+ +| <> | if , then if a node returns failure, subsequent nodes will not be executed and nodes already executed will be backed out. +*--------------*--------------------------------------------+ + +*** Parameters + + None + +*** Outcomes + + None + +*** Example + ++-----------------+ + + + + + + + + + + + ++-----------------+ + + + +**Call node + +*** Description + + A <> node is used to call another graph + +*** Attributes + +*--------------*-------+ +| <> | Module of directed graph to call. If unset, defaults to that of calling graph +*--------------*-------+ +| <> | rpc of directed graph to call. +*--------------*-------+ +| <> | version of graph to call, If unset, uses active version. +*--------------*-------+ +| <> | mode (sync/async) of graph to call. If unset, defaults to that of calling graph. +*--------------*-------+ + + + +*** Parameters + + Not applicable + +*** Outcomes + +*----------*---------+ +| <> | Sub graph returned success +*----------*---------+ +| <> | Graph not found +*----------*---------+ +| <> | Subgraph returned success +*----------*---------+ + . + +*** Example + ++-------------------+ + ++-------------------+ + +**For node + +*** Description + + A <> node provides a fixed iteration looping mechanism, similar to the Java for loop + +*** Attributes + +*--------------*-------+ +| <> | index variable +*--------------*-------+ +| <> | initial value +*--------------*-------+ +| <> | maximum value +*--------------*-------+ + + +*** Parameters + + Not applicable. + +*** Outcomes + + Not applicable. The <> node has no outcomes. + +*** Example + ++-------------------+ + + + + + + + ++-------------------+ + +**Return node + +*** Description + + A <> node is used to return a status to the invoking MD-SAL application + +*** Attributes + +*--------------*-------+ +| <> | Status value to return ( or ) +*--------------*-------+ + + +*** Parameters + + The following optional parameters may be passed to convey more + detailed status information. + +*------------*-----------+ +| <> | A brief, usually numeric, code indicating the error condition +*------------*-----------+ +| <> | A more detailed error message +*------------*-----------+ + +*** Outcomes + + Not applicable. The <> node has no outcomes. + +*** Example + ++-------------------+ + + + + ++-------------------+ + +**Set node + +*** Description + + A <> node is used to set one or more values in the execution context + +*** Attributes + +*--------------*-------+ +| <> | If true the set node will only execute if the current value of the target is null +*--------------*-------+ + +*** Parameters + + Values to be set are passed as parameters + +*** Outcomes + + Not applicable. The <> node has no outcomes. + +*** Example + ++-------------------+ + + + ++-------------------+ + +**Switch node + +*** Description + + A <> node is used to make a decision based on its <> attribute. + +*** Attributes + +*--------------*-------+ +| <> | Condition to test +*--------------*-------+ + + +*** Parameters + + None + + +*** Outcomes + + Depends on the <> condition + +*** Example + ++-------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++-------------------+ + +* Device Management + +**Configure node + +*** Description + + A <> node is used to configure a device. + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class of resource adaptor to be used +*--------------*-------+ +| <> | Activate device/interface, for devices that support a separate activation step. +*--------------*-------+ +| <> | SQL-like string specifying criteria for item to configure +*--------------*-------+ + +*** Parameters + + Specific to device adaptor. + +*** Outcomes + +*-----------*-------+ +| <> | Device successfully configured +*-----------*-------+ +| <> | Element to be configured does not exist. +*-----------*--------+ +| <> | Element is not in a state where it can be configured/activated +*-----------*-------+ +| <> | Attempt to activate element that is already active +*-----------*-------+ +| <> | Configure failed for some other reason +*-----------*-------+ + +*** Example + ++-------------------+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ++-------------------+ + +* Java Plugin Support + +**Execute node + +*** Description + + An <> node is used to execute Java code supplied as a plugin + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class of plugin to be used +*--------------*-------+ +| <> | Name of method in the plugin class to execute. Method must return void, and take 2 arguments: a Map (for parameters) and a SvcLogicContext (to allow plugin read/write access to context memory) +*--------------*-------+ + +*** Parameters + + Specific to plugin / method + +*** Outcomes + +*-----------*-------+ +| <> | Device successfully configured +*-----------*-------+ +| <> | Plugin class could not be loaded +*-----------*--------+ +| <> | Named method taking (Map, SvcLogicContext) could not be found +*-----------*-------+ +| <> | Configure failed for some other reason +*-----------*-------+ + +*** Example + ++-------------------+ + + + + + + + + + + + + + + + + + + ++-------------------+ + +* Recording + +** Record node + +*** Description + + A <> node is used to record an event. For example, this might be used + to log provisioning events. + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class to handle recording. +*--------------*-------+ + + +*** Parameters + + Parameters will depend on the plugin being used. For the FileRecorder class, + the parameters are as follows + +*------------*-----------+ +| <> | The file to which the record should be written +*------------*-----------+ +| <> | First field to write. There will be <> parameters for each field to write, from <> through <>. A special value __TIMESTAMP__ may be assigned to a field to insert the current timestamp +*------------*-----------+ + + +*** Outcomes + +*----------*---------+ +| <> | Record successfully written +*----------*---------+ +| <> | Record could not be successfully written +*----------*---------+ + +*** Example + ++-------------------+ + + + + + + ++-------------------+ + +* Resource Management + +** Delete node + +*** Description + + A <> node is used to delete a resource from the local resource inventory. + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class of resource adaptor to be used +*--------------*-------+ +| <> | Type of resource to delete +*--------------*-------+ +| <> | SQL-like string specifying key to delete +*--------------*-------+ + +*** Parameters + + None + +*** Outcomes + +*-----------*-------+ +| <> | Resource specified deleted successfully. +*-----------*-------+ +| > | Resource specified was not deleted +*-----------*-------+ + +*** Example + ++-------------------+ + + + + + + + + ++-------------------+ + + +** Exists node + +*** Description + + An <> node is used to determine whether a particular + instance of a resource exists. For example, this might be + used to test whether a particular switch CLLI is provisioned. + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class of resource adaptor to be used +*--------------*-------+ +| <> | Type of resource to check +*--------------*-------+ +| <> | SQL-like string specifying key to check for +*--------------*-------+ + +*** Parameters + + None + +*** Outcomes + +*-----------*-------+ +| <> | Resource specified exists. +*-----------*-------+ +| <> | Resource specified is unknown +*-----------*-------+ + +*** Example + ++-------------------+ + + + + + + + + ++-------------------+ + +** Get-resource node + +*** Description + + A <> node is used to retrieve information about a + particular resource and make it available to other nodes in the + service logic tree. For example, this might be used to + retrieve information about a particular uni-port. + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class of resource adaptor to be used +*--------------*-------+ +| <> | Type of resource to retrieve +*--------------*-------+ +| <> | SQL-like string specifying criteria for retrieval +*--------------*-------+ +| <> | Prefix to add to context variable names set for data retrieved +*--------------*-------+ +| <> | String to specify, if <> matches multiple entries, which entry should take precedence +*--------------*-------+ + +*** Parameters + + None + +*** Outcomes + +*-----------*-------+ +| <> | Resource requested was successfully reserved +*-----------*-------+ +| <> | Resource requested was not successfully reserved +*-----------*-------+ + +*** Example + ++-------------------+ + + + + + + + + ++-------------------+ + +** Save node + +*** Description + + A <> node is used to save information about a + particular resource to persistent storage. For example, this might be used to + save information about a particular uni-port. + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class of resource adaptor to be used +*--------------*-------+ +| <> | Type of resource to save +*--------------*-------+ +| <> | SQL-like string specifying criteria for retrieval +*--------------*-------+ +| <> | If "true", save resource even if this resource is already stored in persistent storage +*--------------*-------+ +| <> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext +*--------------*-------+ + +*** Parameters + + Values to save (columns) are specified as parameters, with each name + corresponding to a column name and each value corresponding to the + value to set. + +*** Outcomes + +*-----------*-------+ +| <> | Resource successfully saved +*-----------*-------+ +| <> | Resource save failed +*-----------*-------+ + +*** Example + ++-------------------+ + + + + + + + + ++-------------------+ + +** Update node + +*** Description + + An <> node is used to update information about a + particular resource to persistent storage. + +*** Attributes + +*--------------*-------+ +| <> | Fully qualified Java class of resource adaptor to be used +*--------------*-------+ +| <> | Type of resource to update +*--------------*-------+ +| <> | SQL-like string specifying criteria for retrieval +*--------------*-------+ +| <> | Prefix to be prepended to variable names, when attributes are set in SvcLogicContext +*--------------*-------+ + +*** Parameters + + Values to save (columns) are specified as parameters, with each name + corresponding to a column name and each value corresponding to the + value to set. + +*** Outcomes + +*-----------*-------+ +| <> | Resource successfully saved +*-----------*-------+ +| <> | Resource save failed +*-----------*-------+ + +*** Example + ++-------------------+ + + + + + + + + ++-------------------+ + -- 2.16.6