diff options
18 files changed, 2142 insertions, 2348 deletions
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 @@ <dependency> <groupId>org.openecomp.sdnc.core</groupId> <artifactId>sli-common</artifactId> - <version>${sdnctl.sli.version}</version> + <version>${project.version}</version> </dependency> <!-- <dependency> @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> @@ -15,7 +14,7 @@ <parent> <groupId>org.openecomp.sdnc.core</groupId> <artifactId>root</artifactId> - <version>1.1.1-SNAPSHOT</version> + <version>1.1.0-SNAPSHOT</version> <relativePath>rootpom/pom.xml</relativePath> </parent> @@ -30,7 +29,7 @@ <connection>scm:git:ssh://git@${openecomp.git.host}/sdnc-code.git</connection> <developerConnection>scm:git:ssh://${openecomp.git.host}:${openecomp.git.port}/${openecomp.git.project}/sdnc-core.git</developerConnection> <url>${openecomp.git.protocol}://${openecomp.git.host}/projects/${openecomp.git.project}/repos/sdnc-core/browse</url> - <tag>HEAD</tag> + <tag>sdnc-core-1.1.0</tag> </scm> <ciManagement> @@ -174,8 +173,8 @@ <modules> <module>rootpom</module> <module>dblib</module> - <module>filters</module> <module>sli</module> + <module>filters</module> <module>sliPluginUtils</module> <module>sliapi</module> </modules> diff --git a/rootpom/pom.xml b/rootpom/pom.xml index 7e1d06e..8bc3855 100755 --- a/rootpom/pom.xml +++ b/rootpom/pom.xml @@ -39,6 +39,7 @@ <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath> <checkstyle.skip>true</checkstyle.skip> + <sonar.language>java</sonar.language> <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin> <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath> @@ -68,11 +69,11 @@ <!-- SDN-C component versions --> - <sdnc.core.version>1.1.0-SNAPSHOT</sdnc.core.version> - <sdnc.adaptors.version>1.1.0-SNAPSHOT</sdnc.adaptors.version> - <sdnc.northbound.version>1.1.0-SNAPSHOT</sdnc.northbound.version> - <sdnc.oam.version>1.1.0-SNAPSHOT</sdnc.oam.version> - <sdnc.plugins.version>1.1.0-SNAPSHOT</sdnc.plugins.version> + <sdnc.core.version>(1.0.999,1.1.999)</sdnc.core.version> + <sdnc.adaptors.version>(1.0.999,1.1.999)</sdnc.adaptors.version> + <sdnc.northbound.version>(1.0.999,1.1.999)</sdnc.northbound.version> + <sdnc.oam.version>(1.0.999,1.1.999)</sdnc.oam.version> + <sdnc.plugins.version>(1.0.999,1.1.999)</sdnc.plugins.version> <sdnctl.sli.version>${sdnc.core.version}</sdnctl.sli.version> <sdnctl.aai.service.version>${sdnc.adaptors.version}</sdnctl.aai.service.version> <sdnctl.dblib.version>${sdnc.core.version}</sdnctl.dblib.version> @@ -156,400 +157,80 @@ <packaging>pom</packaging> <groupId>org.openecomp.sdnc.core</groupId> <artifactId>root</artifactId> - <version>1.1.1-SNAPSHOT</version> - - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.controller</groupId> - <artifactId>opendaylight-karaf-empty</artifactId> - <version>${odl.karaf.empty.distro.version}</version> - <type>zip</type> - </dependency> - - - <dependency> - <groupId>org.openecomp.sdnc.core</groupId> - <artifactId>sli-common</artifactId> - <version>${sdnctl.sli.version}</version> - </dependency> - - <dependency> - <groupId>org.openecomp.sdnc.core</groupId> - <artifactId>sli-provider</artifactId> - <version>${sdnctl.sli.version}</version> - </dependency> - - <dependency> - <groupId>org.openecomp.sdnc.core</groupId> - <artifactId>aai-service-provider</artifactId> - <version>${sdnctl.aai.service.version}</version> - </dependency> - - <dependency> - <groupId>org.openecomp.sdnc.core</groupId> - <artifactId>dblib-provider</artifactId> - <version>${sdnctl.dblib.version}</version> - </dependency> - </dependencies> - - </dependencyManagement> - - - <name>SDNC Root</name> - <url>http://wiki.onap.org</url> - <description>Root POM to be used for all SDNC projects</description> - - - <issueManagement> - <system>JIRA</system> - <url>https://jira.onap.org/</url> - </issueManagement> - - <reporting> - <plugins> - <plugin> - <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> - <configuration> - <failOnError>false</failOnError> - <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> - <docletArtifact> - <groupId>org.umlgraph</groupId> - <artifactId>umlgraph</artifactId> - <version>5.6</version> - </docletArtifact> - <additionalparam>-views</additionalparam> - <useStandardDocletOptions>true</useStandardDocletOptions> - <excludePackageNames>org.opendaylight.*</excludePackageNames> - <additionalDependencies> - <additionalDependency> - <groupId>org.opendaylight.odlparent</groupId> - <artifactId>odlparent</artifactId> - <version>1.7.1-Boron-SR1</version> - </additionalDependency> - <additionalDependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${slf4j.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.antlr</groupId> - <artifactId>antlr4</artifactId> - <version>${antlr.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.antlr</groupId> - <artifactId>antlr4-runtime</artifactId> - <version>${antlr.version}</version> - </additionalDependency> - - <additionalDependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-client</artifactId> - <version>${jersey.json.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-core</artifactId> - <version>${jersey.json.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore-osgi</artifactId> - <version>${apache.httpcomponents.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient-osgi</artifactId> - <version>${apache.httpcomponents.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>${fasterxml.jackson.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - <version>${fasterxml.jackson.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - <version>${fasterxml.jackson.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>${commons.lang.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.opendaylight.mdsal</groupId> - <artifactId>yang-binding</artifactId> - <version>${odl.mdsal.yang.binding.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.opendaylight.yangtools</groupId> - <artifactId>yang-common</artifactId> - <version>${odl.yangtools.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>ietf-inet-types</artifactId> - <version>${odl.ietf-inet-types.version}</version> - </additionalDependency> - <additionalDependency> - <groupId>org.opendaylight.mdsal.model</groupId> - <artifactId>ietf-yang-types</artifactId> - <version>${odl.ietf-yang-types.version}</version> - </additionalDependency> - </additionalDependencies> - </configuration> - <reportSets> - <reportSet> - <reports> - <report>javadoc-no-fork</report> - <report>test-javadoc-no-fork</report> - </reports> - </reportSet> - <reportSet> - <id>aggregate</id> - <reports> - <report>aggregate</report> - <report>test-aggregate</report> - </reports> - </reportSet> - </reportSets> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jxr-plugin</artifactId> - <version>2.3</version> - <reportSets> - <reportSet> - <id>aggregate</id> - <reports> - <report>aggregate</report> - <report>test-aggregate</report> - </reports> - </reportSet> - </reportSets> - </plugin> - - <plugin> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.17</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-changelog-plugin</artifactId> - <version>2.3</version> - <reportSets> - <reportSet> - <id>dual-report</id> - <configuration> - <type>range</type> - <range>30</range> - </configuration> - <reports> - <report>changelog</report> - <report>file-activity</report> - </reports> - </reportSet> - </reportSets> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>taglist-maven-plugin</artifactId> - <version>2.4</version> - </plugin> - </plugins> - </reporting> - - - <pluginRepositories> - <pluginRepository> - <id>openecomp-public</id> - <url>${openecomp.nexus.public-url}</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - <pluginRepository> - <id>opendaylight-mirror</id> - <name>opendaylight-mirror</name> - <url>${opendaylight.nexus.public-url}</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - <pluginRepository> - <id>opendaylight-snapshot</id> - <name>opendaylight-snapshot</name> - <url>${opendaylight.nexus.snapshot-url}</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - <!-- Black Duck plugin dependencies --> - <pluginRepository> - <id>JCenter</id> - <name>JCenter Repository</name> - <url>http://jcenter.bintray.com</url> - </pluginRepository> - - <pluginRepository> - <id>Restlet</id> - <name>Restlet Repository</name> - <url>http://maven.restlet.com</url> - </pluginRepository> - </pluginRepositories> - - - <repositories> - <repository> - <id>openecomp-public</id> - <url>${openecomp.nexus.public-url}</url> - <releases> - <enabled>true</enabled> - <!-- <updatePolicy>always</updatePolicy> <updatePolicy>never</updatePolicy> - <updatePolicy>daily</updatePolicy> <updatePolicy>interval:in minutes</updatePolicy> --> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>true</enabled> - <updatePolicy>always</updatePolicy> - <!-- <updatePolicy>always</updatePolicy> <updatePolicy>never</updatePolicy> - <updatePolicy>daily</updatePolicy> <updatePolicy>interval:30</updatePolicy> --> - </snapshots> - </repository> - <repository> - <id>openecomp-release</id> - <name>openecomp-repository-releases</name> - <url>${openecomp.nexus.release-url}</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>openecomp-snapshot</id> - <name>openecomp-repository-snapshots</name> - <url>${openecomp.nexus.snapshot-url}</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - <repository> - <id>opendaylight-mirror</id> - <name>opendaylight-mirror</name> - <url>${opendaylight.nexus.public-url}</url> - <releases> - <enabled>true</enabled> - <updatePolicy>never</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>opendaylight-snapshot</id> - <name>opendaylight-snapshot</name> - <url>${opendaylight.nexus.snapshot-url}</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - - </repositories> - - <distributionManagement> - <site> - <id>ecomp-site</id> - <url>dav:https://${openecomp.nexus.host}/content/sites/site/org/onap/sdnc/${project.version}</url> - </site> - <repository> - <id>ecomp-releases</id> - <name>openecomp-repository-releases</name> - <url>${openecomp.nexus.release-url}</url> - </repository> - <snapshotRepository> - <id>ecomp-snapshots</id> - <name>openecomp-repository-snapshots</name> - <url>${openecomp.nexus.snapshot-url}</url> - </snapshotRepository> - </distributionManagement> - - <build> - <pluginManagement> + <version>1.1.0-SNAPSHOT</version> + + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.opendaylight.controller</groupId> + <artifactId>opendaylight-karaf-empty</artifactId> + <version>${odl.karaf.empty.distro.version}</version> + <type>zip</type> + </dependency> + + + <dependency> + <groupId>org.openecomp.sdnc.core</groupId> + <artifactId>sli-common</artifactId> + <version>${sdnctl.sli.version}</version> + </dependency> + + <dependency> + <groupId>org.openecomp.sdnc.core</groupId> + <artifactId>sli-provider</artifactId> + <version>${sdnctl.sli.version}</version> + </dependency> + + <dependency> + <groupId>org.openecomp.sdnc.core</groupId> + <artifactId>aai-service-provider</artifactId> + <version>${sdnctl.aai.service.version}</version> + </dependency> + + <dependency> + <groupId>org.openecomp.sdnc.core</groupId> + <artifactId>dblib-provider</artifactId> + <version>${sdnctl.dblib.version}</version> + </dependency> + </dependencies> + + </dependencyManagement> + + + <name>SDNC Root</name> + <url>http://wiki.onap.org</url> + <description>Root POM to be used for all SDNC projects</description> + + + <issueManagement> + <system>JIRA</system> + <url>https://jira.onap.org/</url> + </issueManagement> + + <reporting> <plugins> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-site-plugin</artifactId> - <version>3.6</version> - <dependencies> - <dependency><!-- add support for ssh/scp --> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-ssh</artifactId> - <version>1.0</version> - </dependency> - <dependency> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-webdav-jackrabbit</artifactId> - <version>2.10</version> - </dependency> - </dependencies> - <executions> - <execution> - <id>attach-descriptor</id> - <goals> - <goal>attach-descriptor</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>${maven.compile.plugin.version}</version> - <configuration> - <source>${java.version.source}</source> - <target>${java.version.target}</target> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>sonar-maven-plugin</artifactId> - <version>3.2</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10</version> + <version>2.10.4</version> <configuration> + <failOnError>false</failOnError> + <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> + <docletArtifact> + <groupId>org.umlgraph</groupId> + <artifactId>umlgraph</artifactId> + <version>5.6</version> + </docletArtifact> + <additionalparam>-views</additionalparam> + <useStandardDocletOptions>true</useStandardDocletOptions> + <excludePackageNames>org.opendaylight.*</excludePackageNames> <additionalDependencies> <additionalDependency> + <groupId>org.opendaylight.odlparent</groupId> + <artifactId>odlparent</artifactId> + <version>1.7.1-Boron-SR1</version> + </additionalDependency> + <additionalDependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j.version}</version> @@ -568,12 +249,12 @@ <additionalDependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> - <version>${jersey.client.version}</version> + <version>${jersey.json.version}</version> </additionalDependency> <additionalDependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-core</artifactId> - <version>${jersey.version}</version> + <version>${jersey.json.version}</version> </additionalDependency> <additionalDependency> <groupId>org.apache.httpcomponents</groupId> @@ -588,17 +269,17 @@ <additionalDependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>${jackson.version}</version> + <version>${fasterxml.jackson.version}</version> </additionalDependency> <additionalDependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> - <version>${jackson.version}</version> + <version>${fasterxml.jackson.version}</version> </additionalDependency> <additionalDependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> - <version>${jackson.version}</version> + <version>${fasterxml.jackson.version}</version> </additionalDependency> <additionalDependency> <groupId>commons-lang</groupId> @@ -627,155 +308,475 @@ </additionalDependency> </additionalDependencies> </configuration> - - <executions> - <execution> + <reportSets> + <reportSet> + <reports> + <report>javadoc-no-fork</report> + <report>test-javadoc-no-fork</report> + </reports> + </reportSet> + <reportSet> <id>aggregate</id> - <goals> - <goal>aggregate</goal> - </goals> - <phase>site</phase> - - </execution> - </executions> + <reports> + <report>aggregate</report> + <report>test-aggregate</report> + </reports> + </reportSet> + </reportSets> </plugin> <plugin> - <artifactId>maven-source-plugin</artifactId> - <version>2.1.1</version> - <executions> - <execution> - <id>bundle-sources</id> - <phase>package</phase> - <goals> - <!-- produce source artifact for main project sources --> - <goal>jar-no-fork</goal> - - <!-- produce source artifact for project test sources --> - <goal>test-jar-no-fork</goal> - </goals> - </execution> - </executions> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jxr-plugin</artifactId> + <version>2.3</version> + <reportSets> + <reportSet> + <id>aggregate</id> + <reports> + <report>aggregate</report> + <report>test-aggregate</report> + </reports> + </reportSet> + </reportSets> </plugin> - + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.17</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-changelog-plugin</artifactId> + <version>2.3</version> + <reportSets> + <reportSet> + <id>dual-report</id> + <configuration> + <type>range</type> + <range>30</range> + </configuration> + <reports> + <report>changelog</report> + <report>file-activity</report> + </reports> + </reportSet> + </reportSets> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>taglist-maven-plugin</artifactId> + <version>2.4</version> + </plugin> </plugins> + </reporting> + + + <pluginRepositories> + <pluginRepository> + <id>openecomp-public</id> + <url>${openecomp.nexus.public-url}</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + <pluginRepository> + <id>opendaylight-mirror</id> + <name>opendaylight-mirror</name> + <url>${opendaylight.nexus.public-url}</url> + <releases> + <enabled>true</enabled> + <updatePolicy>never</updatePolicy> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + <pluginRepository> + <id>opendaylight-snapshot</id> + <name>opendaylight-snapshot</name> + <url>${opendaylight.nexus.snapshot-url}</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + <!-- Black Duck plugin dependencies --> + <pluginRepository> + <id>JCenter</id> + <name>JCenter Repository</name> + <url>http://jcenter.bintray.com</url> + </pluginRepository> + + <pluginRepository> + <id>Restlet</id> + <name>Restlet Repository</name> + <url>http://maven.restlet.com</url> + </pluginRepository> + </pluginRepositories> + + + <repositories> + <repository> + <id>openecomp-public</id> + <url>${openecomp.nexus.public-url}</url> + <releases> + <enabled>true</enabled> + <!-- <updatePolicy>always</updatePolicy> <updatePolicy>never</updatePolicy> + <updatePolicy>daily</updatePolicy> <updatePolicy>interval:in minutes</updatePolicy> --> + <updatePolicy>never</updatePolicy> + </releases> + <snapshots> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + <!-- <updatePolicy>always</updatePolicy> <updatePolicy>never</updatePolicy> + <updatePolicy>daily</updatePolicy> <updatePolicy>interval:30</updatePolicy> --> + </snapshots> + </repository> + <repository> + <id>openecomp-release</id> + <name>openecomp-repository-releases</name> + <url>${openecomp.nexus.release-url}</url> + <releases> + <enabled>true</enabled> + <updatePolicy>never</updatePolicy> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>openecomp-snapshot</id> + <name>openecomp-repository-snapshots</name> + <url>${openecomp.nexus.snapshot-url}</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + <repository> + <id>opendaylight-mirror</id> + <name>opendaylight-mirror</name> + <url>${opendaylight.nexus.public-url}</url> + <releases> + <enabled>true</enabled> + <updatePolicy>never</updatePolicy> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>opendaylight-snapshot</id> + <name>opendaylight-snapshot</name> + <url>${opendaylight.nexus.snapshot-url}</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + + </repositories> + + <distributionManagement> + <site> + <id>ecomp-site</id> + <url>dav:https://${openecomp.nexus.host}/content/sites/site/org/onap/sdnc/${project.version}</url> + </site> + <repository> + <id>ecomp-releases</id> + <name>openecomp-repository-releases</name> + <url>${openecomp.nexus.release-url}</url> + </repository> + <snapshotRepository> + <id>ecomp-snapshots</id> + <name>openecomp-repository-snapshots</name> + <url>${openecomp.nexus.snapshot-url}</url> + </snapshotRepository> + </distributionManagement> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.6</version> + <dependencies> + <dependency><!-- add support for ssh/scp --> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-ssh</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav-jackrabbit</artifactId> + <version>2.10</version> + </dependency> + </dependencies> + <executions> + <execution> + <id>attach-descriptor</id> + <goals> + <goal>attach-descriptor</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compile.plugin.version}</version> + <configuration> + <source>${java.version.source}</source> + <target>${java.version.target}</target> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>sonar-maven-plugin</artifactId> + <version>3.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10</version> + <configuration> + <additionalDependencies> + <additionalDependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.antlr</groupId> + <artifactId>antlr4</artifactId> + <version>${antlr.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.antlr</groupId> + <artifactId>antlr4-runtime</artifactId> + <version>${antlr.version}</version> + </additionalDependency> + + <additionalDependency> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-client</artifactId> + <version>${jersey.client.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>com.sun.jersey</groupId> + <artifactId>jersey-core</artifactId> + <version>${jersey.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore-osgi</artifactId> + <version>${apache.httpcomponents.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient-osgi</artifactId> + <version>${apache.httpcomponents.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>${jackson.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>${jackson.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>${jackson.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>${commons.lang.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>yang-binding</artifactId> + <version>${odl.mdsal.yang.binding.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.opendaylight.yangtools</groupId> + <artifactId>yang-common</artifactId> + <version>${odl.yangtools.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>ietf-inet-types</artifactId> + <version>${odl.ietf-inet-types.version}</version> + </additionalDependency> + <additionalDependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>ietf-yang-types</artifactId> + <version>${odl.ietf-yang-types.version}</version> + </additionalDependency> + </additionalDependencies> + </configuration> - </pluginManagement> + <executions> + <execution> + <id>aggregate</id> + <goals> + <goal>aggregate</goal> + </goals> + <phase>site</phase> + + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-source-plugin</artifactId> + <version>2.1.1</version> + <executions> + <execution> + <id>bundle-sources</id> + <phase>package</phase> + <goals> + <!-- produce source artifact for main project sources --> + <goal>jar-no-fork</goal> + + <!-- produce source artifact for project test sources --> + <goal>test-jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + + + </plugins> + + </pluginManagement> - <plugins> - <!-- license plugin --> + <plugins> + <!-- license plugin --> - <plugin> + <plugin> - <groupId>org.codehaus.mojo</groupId> + <groupId>org.codehaus.mojo</groupId> - <artifactId>license-maven-plugin</artifactId> + <artifactId>license-maven-plugin</artifactId> - <version>1.10</version> + <version>1.10</version> - <configuration> + <configuration> - <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> + <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> - <processStartTag>============LICENSE_START=======================================================</processStartTag> + <processStartTag>============LICENSE_START=======================================================</processStartTag> - <processEndTag>============LICENSE_END=========================================================</processEndTag> + <processEndTag>============LICENSE_END=========================================================</processEndTag> - <sectionDelimiter>================================================================================</sectionDelimiter> + <sectionDelimiter>================================================================================</sectionDelimiter> - <licenseName>apache_v2</licenseName> + <licenseName>apache_v2</licenseName> - <inceptionYear>2017</inceptionYear> + <inceptionYear>2017</inceptionYear> - <organizationName>AT&T Intellectual Property. All rights - reserved.</organizationName> + <organizationName>AT&T Intellectual Property. All rights + reserved.</organizationName> - <projectName>openECOMP : SDN-C</projectName> + <projectName>openECOMP : SDN-C</projectName> - <canUpdateCopyright>true</canUpdateCopyright> + <canUpdateCopyright>true</canUpdateCopyright> - <canUpdateDescription>true</canUpdateDescription> + <canUpdateDescription>true</canUpdateDescription> - <canUpdateLicense>true</canUpdateLicense> + <canUpdateLicense>true</canUpdateLicense> - <emptyLineAfterHeader>true</emptyLineAfterHeader> - <excludes> - <exclude>**/*.png</exclude> - <exclude>**/*.json</exclude> - </excludes> + <emptyLineAfterHeader>true</emptyLineAfterHeader> + <excludes> + <exclude>**/*.png</exclude> + <exclude>**/*.json</exclude> + </excludes> - </configuration> + </configuration> - <executions> + <executions> - <execution> + <execution> - <id>first</id> + <id>first</id> - <goals> + <goals> - <goal>update-file-header</goal> + <goal>update-file-header</goal> - </goals> + </goals> - <phase>process-sources</phase> + <phase>process-sources</phase> - </execution> + </execution> - </executions> + </executions> - </plugin> + </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>properties-maven-plugin</artifactId> - <version>1.0.0</version> - <executions> - <execution> - <goals> - <goal>set-system-properties</goal> - </goals> - <configuration> - <properties> - <property> - <name>maven.wagon.http.ssl.allowall</name> - <value>${ssl.allowall}</value> - </property> - <property> - <name>maven.wagon.http.ssl.insecure</name> - <value>${ssl.insecure}</value> - </property> - </properties> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>versions-maven-plugin</artifactId> - <version>2.3</version> - </plugin> - <plugin> - <artifactId>maven-scm-plugin</artifactId> - <version>1.8.1</version> - <configuration> - <tag>${project.artifactId}-${project.version}</tag> - </configuration> - </plugin> - <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> - <version>1.6.7</version> - <extensions>true</extensions> - <configuration> - <nexusUrl>https://${openecomp.nexus.host}</nexusUrl> - <stagingProfileId>${openecomp.nexus.staging.profile-id}</stagingProfileId> - <serverId>${openecomp.nexus.staging.server-id}</serverId> - </configuration> - </plugin> - </plugins> - </build> - <organization> - <name>OpenECOMP</name> - </organization> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>properties-maven-plugin</artifactId> + <version>1.0.0</version> + <executions> + <execution> + <goals> + <goal>set-system-properties</goal> + </goals> + <configuration> + <properties> + <property> + <name>maven.wagon.http.ssl.allowall</name> + <value>${ssl.allowall}</value> + </property> + <property> + <name>maven.wagon.http.ssl.insecure</name> + <value>${ssl.insecure}</value> + </property> + </properties> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>versions-maven-plugin</artifactId> + <version>2.3</version> + </plugin> + <plugin> + <artifactId>maven-scm-plugin</artifactId> + <version>1.8.1</version> + <configuration> + <tag>${project.artifactId}-${project.version}</tag> + </configuration> + </plugin> + <plugin> + <groupId>org.sonatype.plugins</groupId> + <artifactId>nexus-staging-maven-plugin</artifactId> + <version>1.6.7</version> + <extensions>true</extensions> + <configuration> + <nexusUrl>https://${openecomp.nexus.host}</nexusUrl> + <stagingProfileId>${openecomp.nexus.staging.profile-id}</stagingProfileId> + <serverId>${openecomp.nexus.staging.server-id}</serverId> + </configuration> + </plugin> + </plugins> + </build> + <organization> + <name>OpenECOMP</name> + </organization> </project> 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 index e3bd099..d494eaa 100755..100644 --- 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<String> args = new ArrayList<String>(); 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 @@ -<?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:simpleType name="modeType"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="sync" /> - <xsd:enumeration value="async" /> - </xsd:restriction> - </xsd:simpleType> - - <xsd:group name="node"> - <xsd:choice> - <xsd:element ref="block" /> - <xsd:element ref="is-available" /> - <xsd:element ref="exists" /> - <xsd:element ref="reserve" /> - <xsd:element ref="release" /> - <xsd:element ref="allocate" /> - <xsd:element ref="get-resource" /> - <xsd:element ref="configure" /> - <xsd:element ref="return" /> - <xsd:element ref="switch" /> - <xsd:element ref="record" /> - <xsd:element ref="save" /> - <xsd:element ref="for" /> - <xsd:element ref="set" /> - <xsd:element ref="execute" /> - <xsd:element ref="delete" /> - <xsd:element ref="update" /> - <xsd:element ref="call" /> - <xsd:element ref="notify" /> - </xsd:choice> - </xsd:group> - - <xsd:element name="service-logic"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="method"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="mode" use="optional" type="modeType" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="block"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="is-available"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="exists"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="outcome"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="ref" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="reserve"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="select" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="release"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="record"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="allocate"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="pfx" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="get-resource"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="order-by" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="configure"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="adaptor" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="activate" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="parameter"> - <xsd:complexType> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="return"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="status" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="switch"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="test" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="save"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="delete"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - <!-- local-only is retired and does not do anything --> - <xsd:attribute name="local-only" use="optional" type="xsd:string" /> - <!-- pfx is retired and does not do anything --> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="for"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - <xsd:attribute name="index" use="required" type="xsd:string" /> - <xsd:attribute name="start" use="required" type="xsd:string" /> - <xsd:attribute name="end" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="set"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="only-if-unset" use="optional" - type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="execute"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="method" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="update"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="call"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="optional" type="xsd:string" /> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="optional" type="xsd:string" /> - <xsd:attribute name="mode" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="notify"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="optional" type="xsd:string" /> - <xsd:attribute name="resource" use="optional" type="xsd:string" /> - <xsd:attribute name="action" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - -</xsd:schema> +<?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:simpleType name="modeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="sync" />
+ <xsd:enumeration value="async" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="node">
+ <xsd:choice>
+ <xsd:element ref="block" />
+ <xsd:element ref="is-available" />
+ <xsd:element ref="exists" />
+ <xsd:element ref="reserve" />
+ <xsd:element ref="release" />
+ <xsd:element ref="allocate" />
+ <xsd:element ref="get-resource" />
+ <xsd:element ref="configure" />
+ <xsd:element ref="return" />
+ <xsd:element ref="switch" />
+ <xsd:element ref="record" />
+ <xsd:element ref="save" />
+ <xsd:element ref="for" />
+ <xsd:element ref="set" />
+ <xsd:element ref="execute" />
+ <xsd:element ref="delete" />
+ <xsd:element ref="update" />
+ <xsd:element ref="call" />
+ <xsd:element ref="notify" />
+ <xsd:element ref="break" />
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:element name="service-logic">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="method">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="mode" use="optional" type="modeType" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="block">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="is-available">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="exists">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="outcome">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="ref" use="optional" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="reserve">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="select" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="release">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="record">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="allocate">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="pfx" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="get-resource">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="order-by" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="configure">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="adaptor" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="activate" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="parameter">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="return">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="status" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="switch">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="test" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="save">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="delete">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ <!-- local-only is retired and does not do anything -->
+ <xsd:attribute name="local-only" use="optional" type="xsd:string" />
+ <!-- pfx is retired and does not do anything -->
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="for">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="index" use="required" type="xsd:string" />
+ <xsd:attribute name="start" use="required" type="xsd:string" />
+ <xsd:attribute name="end" use="required" type="xsd:string" />
+ <xsd:attribute name="silentFailure" use="optional" type="xsd:boolean" default="false" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="set">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="only-if-unset" use="optional"
+ type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="execute">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="method" use="required" type="xsd:string" />
+ <xsd:attribute name="emitsOutcome" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="update">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="call">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="optional" type="xsd:string" />
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="optional" type="xsd:string" />
+ <xsd:attribute name="mode" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="notify">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="optional" type="xsd:string" />
+ <xsd:attribute name="resource" use="optional" type="xsd:string" />
+ <xsd:attribute name="action" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="break">
+ <xsd:complexType />
+ </xsd:element>
+
+</xsd:schema>
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 @@ -<?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:simpleType name="modeType"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="sync" /> - <xsd:enumeration value="async" /> - </xsd:restriction> - </xsd:simpleType> - - <xsd:group name="node"> - <xsd:choice> - <xsd:element ref="block" /> - <xsd:element ref="is-available" /> - <xsd:element ref="exists" /> - <xsd:element ref="reserve" /> - <xsd:element ref="release" /> - <xsd:element ref="allocate" /> - <xsd:element ref="get-resource" /> - <xsd:element ref="configure" /> - <xsd:element ref="return" /> - <xsd:element ref="switch" /> - <xsd:element ref="record" /> - <xsd:element ref="save" /> - <xsd:element ref="for" /> - <xsd:element ref="set" /> - <xsd:element ref="execute" /> - <xsd:element ref="delete" /> - <xsd:element ref="update" /> - <xsd:element ref="call" /> - <xsd:element ref="notify" /> - </xsd:choice> - </xsd:group> - - <xsd:element name="service-logic"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="method"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="mode" use="optional" type="modeType" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="block"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="is-available"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="exists"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="outcome"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="ref" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="reserve"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="select" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="release"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="record"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="allocate"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="pfx" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="get-resource"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="order-by" use="optional" type="xsd:string" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="configure"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="adaptor" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="required" type="xsd:string" /> - <xsd:attribute name="activate" use="optional" type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="parameter"> - <xsd:complexType> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="value" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - - <xsd:element name="return"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="status" use="optional" type="xsd:string" /> - <xsd:attribute name="value" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="switch"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="test" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="save"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="delete"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - <!-- local-only is retired and does not do anything --> - <xsd:attribute name="local-only" use="optional" type="xsd:string" /> - <!-- pfx is retired and does not do anything --> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="for"> - <xsd:complexType> - <xsd:sequence> - <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="atomic" use="optional" type="xsd:boolean" /> - <xsd:attribute name="index" use="required" type="xsd:string" /> - <xsd:attribute name="start" use="required" type="xsd:string" /> - <xsd:attribute name="end" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="set"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="only-if-unset" use="optional" - type="xsd:boolean" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="execute"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="method" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="update"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="required" type="xsd:string" /> - <xsd:attribute name="resource" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <xsd:attribute name="force" use="optional" type="xsd:boolean" /> - <xsd:attribute name="local-only" use="optional" type="xsd:boolean" /> - <xsd:attribute name="pfx" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="call"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" /> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="module" use="optional" type="xsd:string" /> - <xsd:attribute name="rpc" use="required" type="xsd:string" /> - <xsd:attribute name="version" use="optional" type="xsd:string" /> - <xsd:attribute name="mode" use="required" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - - <xsd:element name="notify"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" /> - </xsd:sequence> - <xsd:attribute name="plugin" use="optional" type="xsd:string" /> - <xsd:attribute name="resource" use="optional" type="xsd:string" /> - <xsd:attribute name="action" use="required" type="xsd:string" /> - <xsd:attribute name="key" use="optional" type="xsd:string" /> - <!-- force is retired and does not do anything --> - <xsd:attribute name="force" use="optional" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - -</xsd:schema> +<?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:simpleType name="modeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="sync" />
+ <xsd:enumeration value="async" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:group name="node">
+ <xsd:choice>
+ <xsd:element ref="block" />
+ <xsd:element ref="is-available" />
+ <xsd:element ref="exists" />
+ <xsd:element ref="reserve" />
+ <xsd:element ref="release" />
+ <xsd:element ref="allocate" />
+ <xsd:element ref="get-resource" />
+ <xsd:element ref="configure" />
+ <xsd:element ref="return" />
+ <xsd:element ref="switch" />
+ <xsd:element ref="record" />
+ <xsd:element ref="save" />
+ <xsd:element ref="for" />
+ <xsd:element ref="set" />
+ <xsd:element ref="execute" />
+ <xsd:element ref="delete" />
+ <xsd:element ref="update" />
+ <xsd:element ref="call" />
+ <xsd:element ref="notify" />
+ <xsd:element ref="break" />
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:element name="service-logic">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="method" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="method">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="mode" use="optional" type="modeType" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="block">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="is-available">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="exists">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="outcome">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="ref" use="optional" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="reserve">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="select" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="release">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="record">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="allocate">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="pfx" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="get-resource">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="order-by" use="optional" type="xsd:string" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="configure">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="adaptor" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="required" type="xsd:string" />
+ <xsd:attribute name="activate" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="parameter">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="value" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+
+ <xsd:element name="return">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="status" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="switch">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="test" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="save">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="delete">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ <!-- local-only is retired and does not do anything -->
+ <xsd:attribute name="local-only" use="optional" type="xsd:string" />
+ <!-- pfx is retired and does not do anything -->
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="for">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:group ref="node" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="atomic" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="index" use="required" type="xsd:string" />
+ <xsd:attribute name="start" use="required" type="xsd:string" />
+ <xsd:attribute name="end" use="required" type="xsd:string" />
+ <xsd:attribute name="silentFailure" use="optional" type="xsd:boolean" default="false" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="set">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="only-if-unset" use="optional"
+ type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="execute">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="method" use="required" type="xsd:string" />
+ <xsd:attribute name="emitsOutcome" use="optional" type="xsd:boolean" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="update">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="required" type="xsd:string" />
+ <xsd:attribute name="resource" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <xsd:attribute name="force" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="local-only" use="optional" type="xsd:boolean" />
+ <xsd:attribute name="pfx" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="call">
+ <xsd:complexType>
+ <xsd:sequence>
+ <!-- This node does not actually read from parameters -->
+ <xsd:element ref="parameter" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="module" use="optional" type="xsd:string" />
+ <xsd:attribute name="rpc" use="required" type="xsd:string" />
+ <xsd:attribute name="version" use="optional" type="xsd:string" />
+ <xsd:attribute name="mode" use="required" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="notify">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="outcome" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="plugin" use="optional" type="xsd:string" />
+ <xsd:attribute name="resource" use="optional" type="xsd:string" />
+ <xsd:attribute name="action" use="required" type="xsd:string" />
+ <xsd:attribute name="key" use="optional" type="xsd:string" />
+ <!-- force is retired and does not do anything -->
+ <xsd:attribute name="force" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="break">
+ <xsd:complexType />
+ </xsd:element>
+
+</xsd:schema>
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 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>sliPluginUtils</artifactId> 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 @@ <dependency> <groupId>org.openecomp.sdnc.core</groupId> <artifactId>sli-common</artifactId> - <version>${sdnctl.sli.version}</version> + <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> 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<String,String> 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<String, String> 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<String, Object> 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>sliapi</artifactId> 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 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> 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 @@ <dependency> <groupId>org.openecomp.sdnc.core</groupId> <artifactId>sli-common</artifactId> - <version>${sdnctl.sli.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.openecomp.sdnc.core</groupId> <artifactId>sli-provider</artifactId> - <version>${sdnctl.sli.version}</version> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> 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}<<block>>}} - - * {{{Call node}<<call>>}} - - * {{{For node}<<for>>}} - - * {{{Return node}<<return>>}} - - * {{{Set node}<<set>>}} - - * {{{Switch node}<<switch>>}} - - * Device Management - - * {{{Configure node}<<configure>>}} - - * Java Plugin Support - - * {{{Execute node}<<execute>>}} - - * Recording - - * {{{Record node}<<record>>}} - - * Resource Management - - * {{{Delete node}<<delete>>}} - - * {{{Exists node}<<exists>>}} - - * {{{Get-resource node}<<get-resource>>}} - - * {{{Is-available node}<<is-available>>}} - - * {{{Notify node}<<notify>>}} - - * {{{Release node}<<release>>}} - - * {{{Reserve node}<<reserve>>}} - - * {{{Save node}<<save>>}} - - * {{{Update node}<<update>>}} - - -* Flow Control - -** Block node - -*** Description - - A <<block>> node is used to executes a set of nodes. - -*** Attributes - -*--------------*--------------------------------------------+ -| <<atomic>> | if <true>, 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 - -+-----------------+ -<block> - <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder"> - <parameter name="file" value="/tmp/sample_r1.log" /> - <parameter name="field1" value="__TIMESTAMP__"/> - <parameter name="field2" value="RESERVED"/> - <parameter name="field3" value="$asePort.uni_circuit_id"/> - </record> - <return status="success"> - <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" /> - </return> -</block> -+-----------------+ - - - -**Call node - -*** Description - - A <<call>> node is used to call another graph - -*** Attributes - -*--------------*-------+ -| <<module>> | Module of directed graph to call. If unset, defaults to that of calling graph -*--------------*-------+ -| <<rpc>> | rpc of directed graph to call. -*--------------*-------+ -| <<version>> | version of graph to call, If unset, uses active version. -*--------------*-------+ -| <<mode>> | mode (sync/async) of graph to call. If unset, defaults to that of calling graph. -*--------------*-------+ - - - -*** Parameters - - Not applicable - -*** Outcomes - -*----------*---------+ -| <<success>> | Sub graph returned success -*----------*---------+ -| <<not-found>> | Graph not found -*----------*---------+ -| <<failure>> | Subgraph returned success -*----------*---------+ - . - -*** Example - -+-------------------+ -<call rpc="svc-topology-reserve" mode="sync" /> -+-------------------+ - -**For node - -*** Description - - A <<for>> node provides a fixed iteration looping mechanism, similar to the Java for loop - -*** Attributes - -*--------------*-------+ -| <<index>> | index variable -*--------------*-------+ -| <<start>> | initial value -*--------------*-------+ -| <<end>> | maximum value -*--------------*-------+ - - -*** Parameters - - Not applicable. - -*** Outcomes - - Not applicable. The <<status>> node has no outcomes. - -*** Example - -+-------------------+ -<for index="i" start="0" end="$network.num-segments"> - <set> - <parameter name="$vlanlist" value="eval($vlanlist+','+$network.segment[i].provider-segmentation-id)"/> - </set> -</for> -+-------------------+ - -**Return node - -*** Description - - A <<return>> node is used to return a status to the invoking MD-SAL application - -*** Attributes - -*--------------*-------+ -| <<status>> | Status value to return (<success> or <failure>) -*--------------*-------+ - - -*** Parameters - - The following optional parameters may be passed to convey more - detailed status information. - -*------------*-----------+ -| <<error-code>> | A brief, usually numeric, code indicating the error condition -*------------*-----------+ -| <<error-message>> | A more detailed error message -*------------*-----------+ - -*** Outcomes - - Not applicable. The <<status>> node has no outcomes. - -*** Example - -+-------------------+ -<return status="failure"> - <parameter name="error-code" value="1542" /> - <parameter name="error-message" value="Activation failure" /> -</return> -+-------------------+ - -**Set node - -*** Description - - A <<set>> node is used to set one or more values in the execution context - -*** Attributes - -*--------------*-------+ -| <<only-if-unset>> | 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 <<set>> node has no outcomes. - -*** Example - -+-------------------+ -<set> - <parameter name="vlan" value="$network.provider-segmentation-id" /> -</set> -+-------------------+ - -**Switch node - -*** Description - - A <<switch>> node is used to make a decision based on its <<test>> attribute. - -*** Attributes - -*--------------*-------+ -| <<test>> | Condition to test -*--------------*-------+ - - -*** Parameters - - None - - -*** Outcomes - - Depends on the <<test>> condition - -*** Example - -+-------------------+ -<switch test="$uni-cir-units"> - <outcome value="Mbps"> - <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value" - pfx="asePort"> - - <outcome value="success"> - <return status="success"> - <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" /> - </return> - </outcome> - <outcome value="Other"> - <return status="failure"> - <parameter name="error-code" value="1010" /> - <parameter name="error-message" value="No ports found that match criteria" /> - </return> - </outcome> - </reserve> - </outcome> - <outcome value="Gbps"> - <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value*1000" - pfx="asePort"> - - <outcome value="success"> - <return status="success"> - <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" /> - </return> - </outcome> - <outcome value="Other"> - <return status="failure"> - <parameter name="error-code" value="1010" /> - <parameter name="error-message" value="No ports found that match criteria" /> - </return> - </outcome> - </reserve> - </outcome> -</switch> -+-------------------+ - -* Device Management - -**Configure node - -*** Description - - A <<configure>> node is used to configure a device. - -*** Attributes - -*--------------*-------+ -| <<adaptor>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<activate>> | Activate device/interface, for devices that support a separate activation step. -*--------------*-------+ -| <<key>> | SQL-like string specifying criteria for item to configure -*--------------*-------+ - -*** Parameters - - Specific to device adaptor. - -*** Outcomes - -*-----------*-------+ -| <<success>> | Device successfully configured -*-----------*-------+ -| <<not-found>> | Element to be configured does not exist. -*-----------*--------+ -| <<not-ready>> | Element is not in a state where it can be configured/activated -*-----------*-------+ -| <<already-active>> | Attempt to activate element that is already active -*-----------*-------+ -| <<failure>> | Configure failed for some other reason -*-----------*-------+ - -*** Example - -+-------------------+ -<configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor" - key="$uni-circuit-id" activate="true"> - <parameter name="circuit.id" value="$uni-circuit-id" /> - <parameter name="subscriber.name" value="$subscriber-name" /> - <parameter name="emt.clli" value="$edge-device-clli" /> - <parameter name="port.tagging" value="$port-tagging" /> - <parameter name="port.mediaSpeed" value="$media-speed" /> - <parameter name="location.state" value="$uni-location-state" /> - <parameter name="location.city" value="$uni-location-city" /> - <parameter name="cosCategory" value="$cos-category" /> - <parameter name="gosProfile" value="$gos-profile" /> - <parameter name="lldp" value="$asePort.resource-lldp" /> - <parameter name="mtu" value="$asePort.resource-mtu" /> - <outcome value="success"> - <block> - <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder"> - <parameter name="file" value="/tmp/sample_r1.log" /> - <parameter name="field1" value="__TIMESTAMP__"/> - <parameter name="field2" value="ACTIVE"/> - <parameter name="field3" value="$uni-circuit-id"/> - </record> - <return status="success"> - <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" /> - </return> - </block> - </outcome> - <outcome value="already-active"> - <return status="failure"> - <parameter name="error-code" value="1590" /> - <parameter name="error-message" value="Port already active" /> - </return> - </outcome> - <outcome value="Other"> - <return status="failure"> - <parameter name="error-code" value="1542" /> - <parameter name="error-message" value="Activation failure" /> - </return> - </outcome> -</configure> -+-------------------+ - -* Java Plugin Support - -**Execute node - -*** Description - - An <<execute>> node is used to execute Java code supplied as a plugin - -*** Attributes - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of plugin to be used -*--------------*-------+ -| <<method>> | 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 - -*-----------*-------+ -| <<success>> | Device successfully configured -*-----------*-------+ -| <<not-found>> | Plugin class could not be loaded -*-----------*--------+ -| <<unsupported-method>> | Named method taking (Map, SvcLogicContext) could not be found -*-----------*-------+ -| <<failure>> | Configure failed for some other reason -*-----------*-------+ - -*** Example - -+-------------------+ -<execute plugin="org.openecomp.sdnc.sli.plugin.HelloWorld" - method="log"> - <parameter name="message" value="Hello, world!" /> - <outcome value="success"> - <return status="success"/> - </outcome> - <outcome value="not-found"> - <return status="failure"> - <parameter name="error-code" value="1590" /> - <parameter name="error-message" value="Could not locate plugin" /> - </return> - </outcome> - <outcome value="Other"> - <return status="failure"> - <parameter name="error-code" value="1542" /> - <parameter name="error-message" value="Internal error" /> - </return> - </outcome> -</execute> -+-------------------+ - -* Recording - -** Record node - -*** Description - - A <<record>> node is used to record an event. For example, this might be used - to log provisioning events. - -*** Attributes - -*--------------*-------+ -| <<plugin>> | 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 - -*------------*-----------+ -| <<file>> | The file to which the record should be written -*------------*-----------+ -| <<field1>> | First field to write. There will be <<field>> parameters for each field to write, from <<field1>> through <<fieldN>>. A special value __TIMESTAMP__ may be assigned to a field to insert the current timestamp -*------------*-----------+ - - -*** Outcomes - -*----------*---------+ -| <<success>> | Record successfully written -*----------*---------+ -| <<failure>> | Record could not be successfully written -*----------*---------+ - -*** Example - -+-------------------+ -<record plugin="org.openecomp.sdnc.sli.recording.FileRecorder"> - <parameter name="file" value="/tmp/sample_r1.log" /> - <parameter name="field1" value="__TIMESTAMP__"/> - <parameter name="field2" value="ACTIVE"/> - <parameter name="field3" value="$uni-circuit-id"/> -</record> -+-------------------+ - -* Resource Management - -** Delete node - -*** Description - - A <<delete>> node is used to delete a resource from the local resource inventory. - -*** Attributes - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to delete -*--------------*-------+ -| <<key>> | SQL-like string specifying key to delete -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <<success>> | Resource specified deleted successfully. -*-----------*-------+ -| <failure>> | Resource specified was not deleted -*-----------*-------+ - -*** Example - -+-------------------+ -<delete plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="uni_circuit_id == $uni-circuit-id"> - <outcome value="true"> - <return status="success"/> - </outcome> - <outcome value="false"> - <return status="failure"/> - </outcome> -</delete> -+-------------------+ - - -** Exists node - -*** Description - - An <<exists>> 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 - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to check -*--------------*-------+ -| <<key>> | SQL-like string specifying key to check for -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <<true>> | Resource specified exists. -*-----------*-------+ -| <<false>> | Resource specified is unknown -*-----------*-------+ - -*** Example - -+-------------------+ -<exists plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="uni_circuit_id == $uni-circuit-id"> - <outcome value="true"> - <return status="success"/> - </outcome> - <outcome value="false"> - <return status="failure"/> - </outcome> -</exists> -+-------------------+ - -** Get-resource node - -*** Description - - A <<get-resource>> 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 - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to retrieve -*--------------*-------+ -| <<key>> | SQL-like string specifying criteria for retrieval -*--------------*-------+ -| <<pfx>> | Prefix to add to context variable names set for data retrieved -*--------------*-------+ -| <<select>> | String to specify, if key matches multiple entries, which entry should take precedence -*--------------*-------+ -| <<order-by>> | Prefix to add to context variable names set for data retrieved -*--------------*-------+ - -*** Parameters - - None - - -*** Outcomes - -*-----------*-------+ -| <<success>> | Resource successfully retrieved -*-----------*-------+ -| <<not-found>> | Resource referenced does not exist -*-----------*-------+ -| <<failure>> | Resource retrieve failed for some other reason -*-----------*-------+ - -*** Example - -+-------------------+ -<get-resource plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="uni_circuit_id == $uni-circuit-id" - pfx="current-port"> - <outcome value="success"> - <return status="success"/> - </outcome> - <outcome value="not-found"> - <return status="failure"/> - </outcome> - <outcome value="failure"> - <return status="failure"/> - </outcome> -</get-resource> -+-------------------+ - -** Is-available node - -*** Description - - An <<is-available>> node is used to determine whether a particular - type of resource is available. For example, this might be used to - test whether any ports are available for assignment on a particular switch. - -*** Attributes - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to check -*--------------*-------+ -| <<key>> | SQL-like string specifying key to check for -*--------------*-------+ -| <<pfx>> | Prefix to add to context variable names set for data retrieved -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <<true>> | Resource requested is available -*-----------*-------+ -| <<false>> | Resource requested is not available -*-----------*-------+ - -*** Example - -+-------------------+ -<is-available plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"> - <outcome value="true"> - <return status="success"/> - </outcome> - <outcome value="false"> - <return status="failure"/> - </outcome> -</is-available> -+-------------------+ - -** Notify node - -*** Description - - A <<notify>> node is used to inform an external application (e.g. A&AI) that a resource was - updated. - -*** Attributes - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Identifies resource that was updated -*--------------*-------+ -| <<action>> | Action that triggered notification to be sent (ADD/UPDATE/DELETE) -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <<success>> | Notification was successful -*-----------*-------+ -| <<failure>> | Notification failed is not available -*-----------*-------+ - -*** Example - -+-------------------+ -<notify plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - action="ADD"> - <outcome value="success"> - <return status="success"/> - </outcome> - <outcome value="Other"> - <return status="failure"/> - </outcome> -</notify> -+-------------------+ - -** Release node - -*** Description - - A <<release>> node is used to mark a resource as no longer in use, and thus - available for assignment. - -*** Attributes - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to release -*--------------*-------+ -| <<key>> | SQL-like string specifying key to check of resource to release -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <<success>> | Resource successfully released -*-----------*-------+ -| <<not-found>> | Resource referenced does not exist -*-----------*-------+ -| <<failure>> | Resource release failed for some other reason -*-----------*-------+ - -*** Example - -+-------------------+ -<release plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="uni_circuit_id == $uni-circuit-id"> - <outcome value="success"> - <return status="success"/> - </outcome> - <outcome value="not-found"> - <return status="failure"/> - </outcome> - <outcome value="failure"> - <return status="failure"/> - </outcome> -</release> -+-------------------+ - - -** Reserve node - -*** Description - - A <<reserve>> node is used to reserve a particular - type of resource.. For example, this might be used to - reserve a port on a particular switch. - -*** Attributes - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to reserve -*--------------*-------+ -| <<key>> | SQL-like string specifying criteria for reservation -*--------------*-------+ -| <<select>> | String to specify, if <<key>> matches multiple entries, which entry should take precedence -*--------------*-------+ - -*** Parameters - - None - -*** Outcomes - -*-----------*-------+ -| <<success>> | Resource requested was successfully reserved -*-----------*-------+ -| <<failure>> | Resource requested was not successfully reserved -*-----------*-------+ - -*** Example - -+-------------------+ -<reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource" - resource="ase-port" - key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value" - select="min(speed)"> - <outcome value="success"> - <return status="success"/> - </outcome> - <outcome value="failure"> - <return status="failure"/> - </outcome> -</reserve> -+-------------------+ - -** Save node - -*** Description - - A <<save>> 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 - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to save -*--------------*-------+ -| <<key>> | SQL-like string specifying criteria for retrieval -*--------------*-------+ -| <<force>> | If "true", save resource even if this resource is already stored in persistent storage -*--------------*-------+ -| <<pfx>> | 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 - -*-----------*-------+ -| <<success>> | Resource successfully saved -*-----------*-------+ -| <<failure>> | Resource save failed -*-----------*-------+ - -*** Example - -+-------------------+ -<save plugin="`$sample-resource-plugin`" resource="vnf" - key="vnf-name = $requests.vnf.vnf-name" force="true" - pfx="requests.vnf"> - <parameter name="vnf-name" - value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" /> - <parameter name="vnf-type" value="vce" /> - <parameter name="orchestration-status" value="pending-create" /> - <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" /> - <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" /> - <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" /> -</save> -+-------------------+ - -** Update node - -*** Description - - An <<update>> node is used to update information about a - particular resource to persistent storage. - -*** Attributes - -*--------------*-------+ -| <<plugin>> | Fully qualified Java class of resource adaptor to be used -*--------------*-------+ -| <<resource>> | Type of resource to update -*--------------*-------+ -| <<key>> | SQL-like string specifying criteria for retrieval -*--------------*-------+ -| <<pfx>> | 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 - -*-----------*-------+ -| <<success>> | Resource successfully saved -*-----------*-------+ -| <<failure>> | Resource save failed -*-----------*-------+ - -*** Example - -+-------------------+ -<update plugin="`$sample-resource-plugin`" resource="vnf" - key="vnf-name = $requests.vnf.vnf-name" - pfx="requests.vnf"> - <parameter name="vnf-name" - value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" /> - <parameter name="vnf-type" value="vce" /> - <parameter name="orchestration-status" value="pending-create" /> - <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" /> - <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" /> - <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" /> -</update> -+-------------------+ - +~~ ============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}<<block>>}}
+
+ * {{{Call node}<<call>>}}
+
+ * {{{For node}<<for>>}}
+
+ * {{{Return node}<<return>>}}
+
+ * {{{Set node}<<set>>}}
+
+ * {{{Switch node}<<switch>>}}
+
+ * Device Management
+
+ * {{{Configure node}<<configure>>}}
+
+ * Java Plugin Support
+
+ * {{{Execute node}<<execute>>}}
+
+ * Recording
+
+ * {{{Record node}<<record>>}}
+
+ * Resource Management
+
+ * {{{Delete node}<<delete>>}}
+
+ * {{{Exists node}<<exists>>}}
+
+ * {{{Get-resource node}<<get-resource>>}}
+
+ * {{{Is-available node}<<is-available>>}}
+
+ * {{{Notify node}<<notify>>}}
+
+ * {{{Release node}<<release>>}}
+
+ * {{{Reserve node}<<reserve>>}}
+
+ * {{{Save node}<<save>>}}
+
+ * {{{Update node}<<update>>}}
+
+
+* Flow Control
+
+** Block node
+
+*** Description
+
+ A <<block>> node is used to executes a set of nodes.
+
+*** Attributes
+
+*--------------*--------------------------------------------+
+| <<atomic>> | if <true>, 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
+
++-----------------+
+<block>
+ <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/sample_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="RESERVED"/>
+ <parameter name="field3" value="$asePort.uni_circuit_id"/>
+ </record>
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+</block>
++-----------------+
+
+
+
+**Call node
+
+*** Description
+
+ A <<call>> node is used to call another graph
+
+*** Attributes
+
+*--------------*-------+
+| <<module>> | Module of directed graph to call. If unset, defaults to that of calling graph
+*--------------*-------+
+| <<rpc>> | rpc of directed graph to call.
+*--------------*-------+
+| <<version>> | version of graph to call, If unset, uses active version.
+*--------------*-------+
+| <<mode>> | mode (sync/async) of graph to call. If unset, defaults to that of calling graph.
+*--------------*-------+
+
+
+
+*** Parameters
+
+ Not applicable
+
+*** Outcomes
+
+*----------*---------+
+| <<success>> | Sub graph returned success
+*----------*---------+
+| <<not-found>> | Graph not found
+*----------*---------+
+| <<failure>> | Subgraph returned success
+*----------*---------+
+ .
+
+*** Example
+
++-------------------+
+<call rpc="svc-topology-reserve" mode="sync" />
++-------------------+
+
+**For node
+
+*** Description
+
+ A <<for>> node provides a fixed iteration looping mechanism, similar to the Java for loop
+
+*** Attributes
+
+*--------------*-------+
+| <<index>> | index variable
+*--------------*-------+
+| <<start>> | initial value
+*--------------*-------+
+| <<end>> | maximum value
+*--------------*-------+
+
+
+*** Parameters
+
+ Not applicable.
+
+*** Outcomes
+
+ Not applicable. The <<status>> node has no outcomes.
+
+*** Example
+
++-------------------+
+<for index="i" start="0" end="`$service-data.universal-cpe-ft.l2-switch-interfaces_length`">
+ <record plugin="org.openecomp.sdnc.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="level" value="info"/>
+ <parameter name="field1" value="`'current l2-switch-interface name is ' + $service-data.universal-cpe-ft.l2-switch-interfaces[$i].name`"/>
+ </record>
+</for>
++-------------------+
+
+**Return node
+
+*** Description
+
+ A <<return>> node is used to return a status to the invoking MD-SAL application
+
+*** Attributes
+
+*--------------*-------+
+| <<status>> | Status value to return (<success> or <failure>)
+*--------------*-------+
+
+
+*** Parameters
+
+ The following optional parameters may be passed to convey more
+ detailed status information.
+
+*------------*-----------+
+| <<error-code>> | A brief, usually numeric, code indicating the error condition
+*------------*-----------+
+| <<error-message>> | A more detailed error message
+*------------*-----------+
+
+*** Outcomes
+
+ Not applicable. The <<status>> node has no outcomes.
+
+*** Example
+
++-------------------+
+<return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Activation failure" />
+</return>
++-------------------+
+
+**Set node
+
+*** Description
+
+ A <<set>> node is used to set one or more values in the execution context
+
+*** Attributes
+
+*--------------*-------+
+| <<only-if-unset>> | 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 <<set>> node has no outcomes.
+
+*** Example
+
++-------------------+
+<set>
+ <parameter name="vlan" value="$network.provider-segmentation-id" />
+</set>
++-------------------+
+
+**Switch node
+
+*** Description
+
+ A <<switch>> node is used to make a decision based on its <<test>> attribute.
+
+*** Attributes
+
+*--------------*-------+
+| <<test>> | Condition to test
+*--------------*-------+
+
+
+*** Parameters
+
+ None
+
+
+*** Outcomes
+
+ Depends on the <<test>> condition
+
+*** Example
+
++-------------------+
+<switch test="$uni-cir-units">
+ <outcome value="Mbps">
+ <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
+ pfx="asePort">
+
+ <outcome value="success">
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1010" />
+ <parameter name="error-message" value="No ports found that match criteria" />
+ </return>
+ </outcome>
+ </reserve>
+ </outcome>
+ <outcome value="Gbps">
+ <reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value*1000"
+ pfx="asePort">
+
+ <outcome value="success">
+ <return status="success">
+ <parameter name="uni-circuit-id" value="$asePort.uni_circuit_id" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1010" />
+ <parameter name="error-message" value="No ports found that match criteria" />
+ </return>
+ </outcome>
+ </reserve>
+ </outcome>
+</switch>
++-------------------+
+
+* Device Management
+
+**Configure node
+
+*** Description
+
+ A <<configure>> node is used to configure a device.
+
+*** Attributes
+
+*--------------*-------+
+| <<adaptor>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<activate>> | Activate device/interface, for devices that support a separate activation step.
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for item to configure
+*--------------*-------+
+
+*** Parameters
+
+ Specific to device adaptor.
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Device successfully configured
+*-----------*-------+
+| <<not-found>> | Element to be configured does not exist.
+*-----------*--------+
+| <<not-ready>> | Element is not in a state where it can be configured/activated
+*-----------*-------+
+| <<already-active>> | Attempt to activate element that is already active
+*-----------*-------+
+| <<failure>> | Configure failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<configure adaptor="org.openecomp.sdnc.sli.adaptor.emt.EmtAdaptor"
+ key="$uni-circuit-id" activate="true">
+ <parameter name="circuit.id" value="$uni-circuit-id" />
+ <parameter name="subscriber.name" value="$subscriber-name" />
+ <parameter name="emt.clli" value="$edge-device-clli" />
+ <parameter name="port.tagging" value="$port-tagging" />
+ <parameter name="port.mediaSpeed" value="$media-speed" />
+ <parameter name="location.state" value="$uni-location-state" />
+ <parameter name="location.city" value="$uni-location-city" />
+ <parameter name="cosCategory" value="$cos-category" />
+ <parameter name="gosProfile" value="$gos-profile" />
+ <parameter name="lldp" value="$asePort.resource-lldp" />
+ <parameter name="mtu" value="$asePort.resource-mtu" />
+ <outcome value="success">
+ <block>
+ <record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/sample_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="ACTIVE"/>
+ <parameter name="field3" value="$uni-circuit-id"/>
+ </record>
+ <return status="success">
+ <parameter name="edge-device-clli" value="$asePort.resource-emt-clli" />
+ </return>
+ </block>
+ </outcome>
+ <outcome value="already-active">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Port already active" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Activation failure" />
+ </return>
+ </outcome>
+</configure>
++-------------------+
+
+* Java Plugin Support
+
+**Execute node
+
+*** Description
+
+ An <<execute>> node is used to execute Java code supplied as a plugin
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of plugin to be used
+*--------------*-------+
+| <<method>> | 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
+
+*-----------*-------+
+| <<success>> | Device successfully configured
+*-----------*-------+
+| <<not-found>> | Plugin class could not be loaded
+*-----------*--------+
+| <<unsupported-method>> | Named method taking (Map, SvcLogicContext) could not be found
+*-----------*-------+
+| <<failure>> | Configure failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<execute plugin="org.openecomp.sdnc.sli.plugin.HelloWorld"
+ method="log">
+ <parameter name="message" value="Hello, world!" />
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure">
+ <parameter name="error-code" value="1590" />
+ <parameter name="error-message" value="Could not locate plugin" />
+ </return>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure">
+ <parameter name="error-code" value="1542" />
+ <parameter name="error-message" value="Internal error" />
+ </return>
+ </outcome>
+</execute>
++-------------------+
+
+* Recording
+
+** Record node
+
+*** Description
+
+ A <<record>> node is used to record an event. For example, this might be used
+ to log provisioning events.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | 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
+
+*------------*-----------+
+| <<file>> | The file to which the record should be written
+*------------*-----------+
+| <<field1>> | First field to write. There will be <<field>> parameters for each field to write, from <<field1>> through <<fieldN>>. A special value __TIMESTAMP__ may be assigned to a field to insert the current timestamp
+*------------*-----------+
+
+
+*** Outcomes
+
+*----------*---------+
+| <<success>> | Record successfully written
+*----------*---------+
+| <<failure>> | Record could not be successfully written
+*----------*---------+
+
+*** Example
+
++-------------------+
+<record plugin="org.openecomp.sdnc.sli.recording.FileRecorder">
+ <parameter name="file" value="/tmp/sample_r1.log" />
+ <parameter name="field1" value="__TIMESTAMP__"/>
+ <parameter name="field2" value="ACTIVE"/>
+ <parameter name="field3" value="$uni-circuit-id"/>
+</record>
++-------------------+
+
+* Resource Management
+
+** Delete node
+
+*** Description
+
+ A <<delete>> node is used to delete a resource from the local resource inventory.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to delete
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to delete
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource specified deleted successfully.
+*-----------*-------+
+| <failure>> | Resource specified was not deleted
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<delete plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</delete>
++-------------------+
+
+
+** Exists node
+
+*** Description
+
+ An <<exists>> 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
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to check
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to check for
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<true>> | Resource specified exists.
+*-----------*-------+
+| <<false>> | Resource specified is unknown
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<exists plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</exists>
++-------------------+
+
+** Get-resource node
+
+*** Description
+
+ A <<get-resource>> 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
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to retrieve
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for retrieval
+*--------------*-------+
+| <<pfx>> | Prefix to add to context variable names set for data retrieved
+*--------------*-------+
+| <<select>> | String to specify, if key matches multiple entries, which entry should take precedence
+*--------------*-------+
+| <<order-by>> | Prefix to add to context variable names set for data retrieved
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource successfully retrieved
+*-----------*-------+
+| <<not-found>> | Resource referenced does not exist
+*-----------*-------+
+| <<failure>> | Resource retrieve failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<get-resource plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id"
+ pfx="current-port">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</get-resource>
++-------------------+
+
+** Is-available node
+
+*** Description
+
+ An <<is-available>> node is used to determine whether a particular
+ type of resource is available. For example, this might be used to
+ test whether any ports are available for assignment on a particular switch.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to check
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to check for
+*--------------*-------+
+| <<pfx>> | Prefix to add to context variable names set for data retrieved
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<true>> | Resource requested is available
+*-----------*-------+
+| <<false>> | Resource requested is not available
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<is-available plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value">
+ <outcome value="true">
+ <return status="success"/>
+ </outcome>
+ <outcome value="false">
+ <return status="failure"/>
+ </outcome>
+</is-available>
++-------------------+
+
+** Notify node
+
+*** Description
+
+ A <<notify>> node is used to inform an external application (e.g. A&AI) that a resource was
+ updated.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Identifies resource that was updated
+*--------------*-------+
+| <<action>> | Action that triggered notification to be sent (ADD/UPDATE/DELETE)
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Notification was successful
+*-----------*-------+
+| <<failure>> | Notification failed is not available
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<notify plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ action="ADD">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="Other">
+ <return status="failure"/>
+ </outcome>
+</notify>
++-------------------+
+
+** Release node
+
+*** Description
+
+ A <<release>> node is used to mark a resource as no longer in use, and thus
+ available for assignment.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to release
+*--------------*-------+
+| <<key>> | SQL-like string specifying key to check of resource to release
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource successfully released
+*-----------*-------+
+| <<not-found>> | Resource referenced does not exist
+*-----------*-------+
+| <<failure>> | Resource release failed for some other reason
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<release plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="uni_circuit_id == $uni-circuit-id">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="not-found">
+ <return status="failure"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</release>
++-------------------+
+
+
+** Reserve node
+
+*** Description
+
+ A <<reserve>> node is used to reserve a particular
+ type of resource.. For example, this might be used to
+ reserve a port on a particular switch.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to reserve
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for reservation
+*--------------*-------+
+| <<select>> | String to specify, if <<key>> matches multiple entries, which entry should take precedence
+*--------------*-------+
+
+*** Parameters
+
+ None
+
+*** Outcomes
+
+*-----------*-------+
+| <<success>> | Resource requested was successfully reserved
+*-----------*-------+
+| <<failure>> | Resource requested was not successfully reserved
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<reserve plugin="org.openecomp.sdnc.sli.resource.samplesvc.SampleServiceResource"
+ resource="ase-port"
+ key="resource-emt-clli == $edge-device-clli and speed >= $uni-cir-value"
+ select="min(speed)">
+ <outcome value="success">
+ <return status="success"/>
+ </outcome>
+ <outcome value="failure">
+ <return status="failure"/>
+ </outcome>
+</reserve>
++-------------------+
+
+** Save node
+
+*** Description
+
+ A <<save>> 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
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to save
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for retrieval
+*--------------*-------+
+| <<force>> | If "true", save resource even if this resource is already stored in persistent storage
+*--------------*-------+
+| <<pfx>> | 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
+
+*-----------*-------+
+| <<success>> | Resource successfully saved
+*-----------*-------+
+| <<failure>> | Resource save failed
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<save plugin="`$sample-resource-plugin`" resource="vnf"
+ key="vnf-name = $requests.vnf.vnf-name" force="true"
+ pfx="requests.vnf">
+ <parameter name="vnf-name"
+ value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />
+ <parameter name="vnf-type" value="vce" />
+ <parameter name="orchestration-status" value="pending-create" />
+ <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />
+ <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />
+ <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />
+</save>
++-------------------+
+
+** Update node
+
+*** Description
+
+ An <<update>> node is used to update information about a
+ particular resource to persistent storage.
+
+*** Attributes
+
+*--------------*-------+
+| <<plugin>> | Fully qualified Java class of resource adaptor to be used
+*--------------*-------+
+| <<resource>> | Type of resource to update
+*--------------*-------+
+| <<key>> | SQL-like string specifying criteria for retrieval
+*--------------*-------+
+| <<pfx>> | 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
+
+*-----------*-------+
+| <<success>> | Resource successfully saved
+*-----------*-------+
+| <<failure>> | Resource save failed
+*-----------*-------+
+
+*** Example
+
++-------------------+
+<update plugin="`$sample-resource-plugin`" resource="vnf"
+ key="vnf-name = $requests.vnf.vnf-name"
+ pfx="requests.vnf">
+ <parameter name="vnf-name"
+ value="`$requests.cust-country-code + $requests.cust-id + $requests.cust-city + $requests.cust-state + '001VCE'`" />
+ <parameter name="vnf-type" value="vce" />
+ <parameter name="orchestration-status" value="pending-create" />
+ <parameter name="heat-stack-id" value="`$requests.heat-stack-id`" />
+ <parameter name="mso-catalog-key" value="`$requests.mso-catalog-key`" />
+ <parameter name="oam-ipv4-address" value="`$vce-ipv4-oam-addr.ipv4-addr`" />
+</update>
++-------------------+
+
|