revert changes and update version 01/21601/1 1.0.0-Amsterdam 1.0.0-ONAP v1.1.1
authorMichael Lando <ml636r@att.com>
Wed, 1 Nov 2017 10:32:22 +0000 (12:32 +0200)
committerMichael Lando <ml636r@att.com>
Wed, 1 Nov 2017 10:32:22 +0000 (12:32 +0200)
Change-Id: I4fa696c7a20adfcce6733ac004c2457528d626a4
Issue-Id: SDC-569
Signed-off-by: Michael Lando <ml636r@att.com>
pom.xml
src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java
src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java
src/main/java/org/openecomp/sdc/toscaparser/api/extensions/ExtTools.java
src/main/java/org/openecomp/sdc/toscaparser/api/functions/Function.java
src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetProperty.java
version.properties

diff --git a/pom.xml b/pom.xml
index 2fae095..6af670b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-\r
-       <groupId>org.openecomp.sdc.jtosca</groupId>\r
-       <artifactId>jtosca</artifactId>\r
-       <version>1.1.3-SNAPSHOT</version>\r
-        <name>sdc-jtosca</name>\r
-       <properties>\r
-\r
-               <!-- ==================== -->\r
-               <!-- Generic properties -->\r
-               <!-- ==================== -->\r
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
-\r
-               <!-- ==================== -->\r
-               <!-- Versions -->\r
-               <!-- ==================== -->\r
-               <!-- Global project version -->\r
-\r
-               <!-- Dependencies projects version -->\r
-               <sonar.skipDesign>true</sonar.skipDesign>\r
-               <sonar.projectBaseDir>${project.basedir}</sonar.projectBaseDir>\r
-               <sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>\r
-               <nexus.proxy>https://nexus.onap.org</nexus.proxy>\r
-               <sitePath>/content/sites/site/org/openecomp/sdc/jtosca/${project.version}</sitePath>\r
-               <snapshots.path>snapshots</snapshots.path>\r
-               <releases.path>releases</releases.path>\r
-               <staging.profile.id>176c31dfe190a</staging.profile.id>\r
-\r
-       </properties>\r
-\r
-       <dependencies>\r
-               <!-- YAML parser -->\r
-               <dependency>\r
-                       <groupId>org.yaml</groupId>\r
-                       <artifactId>snakeyaml</artifactId>\r
-                       <version>1.14</version>\r
-                       <scope>compile</scope>\r
-               </dependency>\r
-\r
-               <dependency>\r
-                       <groupId>org.slf4j</groupId>\r
-                       <artifactId>slf4j-api</artifactId>\r
-                       <version>1.7.25</version>\r
-               </dependency>\r
-\r
-               <!-- <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> \r
-                       <version>1.1.2</version> <scope>test</scope> </dependency> -->\r
-\r
-               <dependency>\r
-                       <groupId>junit</groupId>\r
-                       <artifactId>junit</artifactId>\r
-                       <version>4.12</version>\r
-               </dependency>\r
-       </dependencies>\r
-\r
-       <reporting>\r
-               <plugins>\r
-                       <plugin>\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-javadoc-plugin</artifactId>\r
-                               <version>2.10.4</version>\r
-                               <configuration>\r
-                                       <failOnError>false</failOnError>\r
-                                       <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>\r
-                                       <docletArtifact>\r
-                                               <groupId>org.umlgraph</groupId>\r
-                                               <artifactId>umlgraph</artifactId>\r
-                                               <version>5.6</version>\r
-                                       </docletArtifact>\r
-                                       <additionalparam>-views</additionalparam>\r
-                                       <useStandardDocletOptions>true</useStandardDocletOptions>\r
-                               </configuration>\r
-                       </plugin>\r
-               </plugins>\r
-       </reporting>\r
-\r
-       <build>\r
-               <plugins>\r
-                       <plugin>\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-site-plugin</artifactId>\r
-                               <version>3.4</version>\r
-                               <dependencies>\r
-                                       <dependency>\r
-                                               <groupId>org.apache.maven.wagon</groupId>\r
-                                               <artifactId>wagon-webdav-jackrabbit</artifactId>\r
-                                               <version>2.10</version>\r
-                                       </dependency>\r
-                               </dependencies>\r
-                       </plugin>\r
-\r
-                       <plugin>\r
-                               <groupId>org.jacoco</groupId>\r
-                               <artifactId>jacoco-maven-plugin</artifactId>\r
-                               <version>0.7.8</version>\r
-                               <executions>\r
-                                       <!-- Unit-Tests -->\r
-                                       <execution>\r
-                                               <id>prepare-agent</id>\r
-                                               <goals>\r
-                                                       <goal>prepare-agent</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <destFile>${sonar.jacoco.reportPath}</destFile>\r
-                                               </configuration>\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
-\r
-                       <!-- Staging Plugin -->\r
-                       <plugin>\r
-                               <groupId>org.sonatype.plugins</groupId>\r
-                               <artifactId>nexus-staging-maven-plugin</artifactId>\r
-                               <version>1.6.7</version>\r
-                               <extensions>true</extensions>\r
-                               <configuration>\r
-                                       <nexusUrl>${nexus.proxy}</nexusUrl>\r
-                                       <stagingProfileId>${staging.profile.id}</stagingProfileId>\r
-                                       <serverId>ecomp-staging</serverId>\r
-                               </configuration>\r
-                       </plugin>\r
-\r
-                       <plugin>\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-compiler-plugin</artifactId>\r
-                               <version>2.5.1</version>\r
-                               <inherited>true</inherited>\r
-                               <configuration>\r
-                                       <source>1.8</source>\r
-                                       <target>1.8</target>\r
-                               </configuration>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-javadoc-plugin</artifactId>\r
-                               <version>2.10.3</version>\r
-                               <configuration />\r
-                       </plugin>\r
-                       <plugin>\r
-                               <groupId>org.codehaus.mojo</groupId>\r
-                               <artifactId>license-maven-plugin</artifactId>\r
-                               <version>1.10</version>\r
-                               <configuration>\r
-                                       <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>\r
-                                       <processStartTag>============LICENSE_START=======================================================</processStartTag>\r
-                                       <processEndTag>============LICENSE_END=========================================================</processEndTag>\r
-                                       <sectionDelimiter>================================================================================</sectionDelimiter>\r
-                                       <licenseName>apache_v2</licenseName>\r
-                                       <inceptionYear>2017</inceptionYear>\r
-                                       <organizationName>AT&amp;T Intellectual Property. All rights\r
-                                               reserved.</organizationName>\r
-                                       <projectName>jtosca</projectName>\r
-                                       <canUpdateCopyright>true</canUpdateCopyright>\r
-                                       <canUpdateDescription>true</canUpdateDescription>\r
-                                       <canUpdateLicense>true</canUpdateLicense>\r
-                                       <emptyLineAfterHeader>true</emptyLineAfterHeader>\r
-                                       <verbose>false</verbose>\r
-                                       <includes>\r
-                                               <include>**/*.java</include>\r
-                                       </includes>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>first</id>\r
-                                               <goals>\r
-                                                       <goal>update-file-header</goal>\r
-                                               </goals>\r
-                                               <!--phase>process-sources</phase -->\r
-                                       </execution>\r
-                               </executions>\r
-                       </plugin>\r
-               </plugins>\r
-       </build>\r
-\r
-       <repositories>\r
-               <repository>\r
-                       <id>central</id>\r
-                       <name>Official Maven repository</name>\r
-                       <url>http://repo2.maven.org/maven2/</url>\r
-               </repository>\r
-               <repository>\r
-                       <id>ecomp-releases</id>\r
-                       <name>Release Repository</name>\r
-                       <url>${nexus.proxy}/content/repositories/releases/</url>\r
-               </repository>\r
-               <repository>\r
-                       <id>ecomp-staging</id>\r
-                       <name>Staging Repository</name>\r
-                       <url>${nexus.proxy}/content/repositories/staging/</url>\r
-               </repository>\r
-       </repositories>\r
-\r
-       <distributionManagement>\r
-               <repository>\r
-                       <id>ecomp-releases</id>\r
-                       <name>Release Repository</name>\r
-                       <url>${nexus.proxy}/content/repositories/${releases.path}/</url>\r
-               </repository>\r
-               <snapshotRepository>\r
-                       <id>ecomp-snapshots</id>\r
-                       <name>Snapshot Repository</name>\r
-                       <url>${nexus.proxy}/content/repositories/${snapshots.path}/</url>\r
-               </snapshotRepository>\r
-               <site>\r
-                       <id>ecomp-site</id>\r
-                       <url>dav:${nexus.proxy}${sitePath}</url>\r
-               </site>\r
-       </distributionManagement>\r
-\r
-</project>\r
+<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>
+
+       <groupId>org.openecomp.sdc.jtosca</groupId>
+       <artifactId>jtosca</artifactId>
+       <version>1.1.1-SNAPSHOT</version>
+        <name>sdc-jtosca</name>
+       <properties>
+
+               <!-- ==================== -->
+               <!-- Generic properties -->
+               <!-- ==================== -->
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+               <!-- ==================== -->
+               <!-- Versions -->
+               <!-- ==================== -->
+               <!-- Global project version -->
+
+               <!-- Dependencies projects version -->
+               <sonar.skipDesign>true</sonar.skipDesign>
+               <sonar.projectBaseDir>${project.basedir}</sonar.projectBaseDir>
+               <sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
+               <nexus.proxy>https://nexus.onap.org</nexus.proxy>
+               <sitePath>/content/sites/site/org/openecomp/sdc/jtosca/${project.version}</sitePath>
+               <snapshots.path>snapshots</snapshots.path>
+               <releases.path>releases</releases.path>
+               <staging.profile.id>176c31dfe190a</staging.profile.id>
+
+       </properties>
+
+       <dependencies>
+               <!-- YAML parser -->
+               <dependency>
+                       <groupId>org.yaml</groupId>
+                       <artifactId>snakeyaml</artifactId>
+                       <version>1.14</version>
+                       <scope>compile</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.slf4j</groupId>
+                       <artifactId>slf4j-api</artifactId>
+                       <version>1.7.25</version>
+               </dependency>
+
+               <!-- <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> 
+                       <version>1.1.2</version> <scope>test</scope> </dependency> -->
+
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.12</version>
+               </dependency>
+       </dependencies>
+
+       <reporting>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <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>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </reporting>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-site-plugin</artifactId>
+                               <version>3.4</version>
+                               <dependencies>
+                                       <dependency>
+                                               <groupId>org.apache.maven.wagon</groupId>
+                                               <artifactId>wagon-webdav-jackrabbit</artifactId>
+                                               <version>2.10</version>
+                                       </dependency>
+                               </dependencies>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>0.7.8</version>
+                               <executions>
+                                       <!-- Unit-Tests -->
+                                       <execution>
+                                               <id>prepare-agent</id>
+                                               <goals>
+                                                       <goal>prepare-agent</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <destFile>${sonar.jacoco.reportPath}</destFile>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+
+                       <!-- Staging Plugin -->
+                       <plugin>
+                               <groupId>org.sonatype.plugins</groupId>
+                               <artifactId>nexus-staging-maven-plugin</artifactId>
+                               <version>1.6.7</version>
+                               <extensions>true</extensions>
+                               <configuration>
+                                       <nexusUrl>${nexus.proxy}</nexusUrl>
+                                       <stagingProfileId>${staging.profile.id}</stagingProfileId>
+                                       <serverId>ecomp-staging</serverId>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>2.5.1</version>
+                               <inherited>true</inherited>
+                               <configuration>
+                                       <source>1.8</source>
+                                       <target>1.8</target>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-javadoc-plugin</artifactId>
+                               <version>2.10.3</version>
+                               <configuration />
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>license-maven-plugin</artifactId>
+                               <version>1.10</version>
+                               <configuration>
+                                       <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
+                                       <processStartTag>============LICENSE_START=======================================================</processStartTag>
+                                       <processEndTag>============LICENSE_END=========================================================</processEndTag>
+                                       <sectionDelimiter>================================================================================</sectionDelimiter>
+                                       <licenseName>apache_v2</licenseName>
+                                       <inceptionYear>2017</inceptionYear>
+                                       <organizationName>AT&amp;T Intellectual Property. All rights
+                                               reserved.</organizationName>
+                                       <projectName>jtosca</projectName>
+                                       <canUpdateCopyright>true</canUpdateCopyright>
+                                       <canUpdateDescription>true</canUpdateDescription>
+                                       <canUpdateLicense>true</canUpdateLicense>
+                                       <emptyLineAfterHeader>true</emptyLineAfterHeader>
+                                       <verbose>false</verbose>
+                                       <includes>
+                                               <include>**/*.java</include>
+                                       </includes>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>first</id>
+                                               <goals>
+                                                       <goal>update-file-header</goal>
+                                               </goals>
+                                               <!--phase>process-sources</phase -->
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <repositories>
+               <repository>
+                       <id>central</id>
+                       <name>Official Maven repository</name>
+                       <url>http://repo2.maven.org/maven2/</url>
+               </repository>
+               <repository>
+                       <id>ecomp-releases</id>
+                       <name>Release Repository</name>
+                       <url>${nexus.proxy}/content/repositories/releases/</url>
+               </repository>
+               <repository>
+                       <id>ecomp-staging</id>
+                       <name>Staging Repository</name>
+                       <url>${nexus.proxy}/content/repositories/staging/</url>
+               </repository>
+       </repositories>
+
+       <distributionManagement>
+               <repository>
+                       <id>ecomp-releases</id>
+                       <name>Release Repository</name>
+                       <url>${nexus.proxy}/content/repositories/${releases.path}/</url>
+               </repository>
+               <snapshotRepository>
+                       <id>ecomp-snapshots</id>
+                       <name>Snapshot Repository</name>
+                       <url>${nexus.proxy}/content/repositories/${snapshots.path}/</url>
+               </snapshotRepository>
+               <site>
+                       <id>ecomp-site</id>
+                       <url>dav:${nexus.proxy}${sitePath}</url>
+               </site>
+       </distributionManagement>
+
+</project>
index 709dc81..25f118b 100644 (file)
@@ -48,15 +48,13 @@ public class TopologyTemplate {
     private String description;
     private ToscaGraph graph;
     private SubstitutionMappings substitutionMappings;
-       private boolean resolveGetInput;
        
        public TopologyTemplate(
                        LinkedHashMap<String,Object> _template, 
                        LinkedHashMap<String,Object> _customDefs,
                        LinkedHashMap<String,Object> _relTypes,//TYPE
             LinkedHashMap<String, Object> _parsedParams,
-            NodeTemplate  _subMappedNodeTemplate,
-                       boolean _resolveGetInput) {
+            NodeTemplate  _subMappedNodeTemplate) {
 
                tpl = _template;
                if(tpl != null) {
@@ -65,7 +63,6 @@ public class TopologyTemplate {
                        customDefs = _customDefs;
                        relTypes = _relTypes;
                        parsedParams = _parsedParams;
-                       resolveGetInput = _resolveGetInput;
                        _validateField();
                        description = _tplDescription();
                        inputs = _inputs();
@@ -403,14 +400,14 @@ public class TopologyTemplate {
        if(nodeTemplates != null) {
                for(NodeTemplate nt: nodeTemplates) {
                        for(Property prop: nt.getPropertiesObjects()) {
-                               prop.setValue(Function.getFunction(this,nt,prop.getValue(), resolveGetInput));
+                               prop.setValue(Function.getFunction(this,nt,prop.getValue()));
                        }
                        for(InterfacesDef ifd: nt.getInterfaces()) {
                                LinkedHashMap<String,Object> ifin = ifd.getInputs();
                                if(ifin != null) {
                                        for(Map.Entry<String,Object> me: ifin.entrySet()) {
                                                String name = me.getKey();
-                                               Object value = Function.getFunction(this,nt,me.getValue(), resolveGetInput);
+                                               Object value = Function.getFunction(this,nt,me.getValue());
                                                ifd.setInput(name,value);
                                        }
                                }
@@ -441,7 +438,7 @@ public class TopologyTemplate {
                                                                (LinkedHashMap<String,Object>)rel.get("properties");
                                                for(String key: relprops.keySet()) {
                                                        Object value = relprops.get(key);
-                                                       Object func = Function.getFunction(this,req,value, resolveGetInput);
+                                                       Object func = Function.getFunction(this,req,value);
                                                        relprops.put(key,func);
                                                }
                                        }
@@ -451,7 +448,7 @@ public class TopologyTemplate {
                                for(Capability cap: nt.getCapabilitiesObjects()) {
                                        if(cap.getPropertiesObjects() != null) {
                                                for(Property prop: cap.getPropertiesObjects()) {
-                                                       Object propvalue = Function.getFunction(this,nt,prop.getValue(), resolveGetInput);
+                                                       Object propvalue = Function.getFunction(this,nt,prop.getValue());
                                                        if(propvalue instanceof GetInput) {
                                                                propvalue = ((GetInput)propvalue).result();
                                                                for(String p: cap.getProperties().keySet()) {
@@ -478,8 +475,7 @@ public class TopologyTemplate {
                                                                        Object func = Function.getFunction(
                                                                                        this,
                                                                                        relTpl,
-                                                                                       value,
-                                                                                               resolveGetInput);
+                                                                                       value);
                                                                        iface.setInput(name,func);
                                                                }
                                                        }
@@ -490,7 +486,7 @@ public class TopologyTemplate {
                }
        }
        for(Output output: outputs) {
-               Object func = Function.getFunction(this,outputs,output.getValue(), resolveGetInput);
+               Object func = Function.getFunction(this,outputs,output.getValue());
                if(func instanceof GetAttribute) {
                        output.setAttr(Output.VALUE,func);
                }
@@ -546,10 +542,6 @@ public class TopologyTemplate {
        public LinkedHashMap<String,Object> getParsedParams() {
                return parsedParams;
        }
-
-       public boolean getResolveGetInput() {
-               return resolveGetInput;
-       }
 }
 
 /*python
index 5d5cb87..76b86f5 100644 (file)
@@ -69,7 +69,6 @@ public class ToscaTemplate extends Object {
        private String path;
        private String inputPath;
        private LinkedHashMap<String,Object> parsedParams;
-       private boolean resolveGetInput;
        private LinkedHashMap<String,Object> tpl;
     private String version;
     private ArrayList<Object> imports;
@@ -90,25 +89,11 @@ public class ToscaTemplate extends Object {
     private int nestingLoopCounter;
        private LinkedHashMap<String, LinkedHashMap<String, Object>> metaProperties;
 
+       @SuppressWarnings("unchecked")
        public ToscaTemplate(String _path,
-                                               LinkedHashMap<String,Object> _parsedParams,
-                                               boolean aFile,
-                                               LinkedHashMap<String,Object> yamlDictTpl) throws JToscaException {
-               init(_path, _parsedParams, aFile, yamlDictTpl, true);
-       }
-
-       public ToscaTemplate(String _path,
-                                                LinkedHashMap<String,Object> _parsedParams,
+                                                LinkedHashMap<String,Object> _parsedParams,
                                                 boolean aFile,
-                                                LinkedHashMap<String,Object> yamlDictTpl, boolean resolveGetInput) throws JToscaException {
-               init(_path, _parsedParams, aFile, yamlDictTpl, resolveGetInput);
-       }
-
-       @SuppressWarnings("unchecked")
-       private void init(String _path,
-                                         LinkedHashMap<String, Object> _parsedParams,
-                                         boolean aFile,
-                                         LinkedHashMap<String, Object> yamlDictTpl, boolean _resolveGetInput) throws JToscaException {
+                                                LinkedHashMap<String,Object> yamlDictTpl) throws JToscaException {
 
                ThreadLocalsHolder.setCollector(new ExceptionCollector(_path));
 
@@ -131,7 +116,6 @@ public class ToscaTemplate extends Object {
                csarTempDir = null;
                nestedToscaTplsWithTopology = new ConcurrentHashMap<>();
                nestedToscaTemplatesWithTopology = new ArrayList<TopologyTemplate>();
-               resolveGetInput = _resolveGetInput;
 
                if(_path != null && !_path.isEmpty()) {
                        // save the original input path
@@ -222,8 +206,7 @@ public class ToscaTemplate extends Object {
                                _getAllCustomDefs(imports),
                                relationshipTypes,
                                parsedParams,
-                               null,
-                               resolveGetInput);
+                               null);
        }
 
        private ArrayList<Input> _inputs() {
@@ -401,8 +384,7 @@ public class ToscaTemplate extends Object {
                                                                                         _getAllCustomDefs(alim),
                                                                                         relationshipTypes, 
                                                                                         parsedParams,
-                                                                                        nt,
-                                                                                        resolveGetInput);
+                                                                                        nt);
                                        if(topologyWithSubMapping.getSubstitutionMappings() != null) {
                         // Record nested topology templates in top level template
                         //nestedToscaTemplatesWithTopology.add(topologyWithSubMapping);
index 90aa35c..6403d6e 100644 (file)
@@ -37,6 +37,10 @@ public class ExtTools {
            // for all folders in extdir
            File extDir = new File(extdir);
            File extDirList[] = extDir.listFiles();
+           if (extDirList == null)  {
+               String a = "aaaa";
+               
+           }
            if (extDirList != null) {
                    for(File f: extDirList) {
                        if(f.isDirectory()) {
index 7615a00..85fa62e 100644 (file)
@@ -3,7 +3,6 @@ package org.openecomp.sdc.toscaparser.api.functions;
 import java.util.*;
 
 import org.openecomp.sdc.toscaparser.api.TopologyTemplate;
-import org.openecomp.sdc.toscaparser.api.ToscaTemplate;
 
 public abstract class Function {
 
@@ -78,7 +77,7 @@ public abstract class Function {
        }
        
        @SuppressWarnings("unchecked")
-       public static Object getFunction(TopologyTemplate ttpl,Object context,Object rawFunctionObj, boolean resolveGetInput) {
+       public static Object getFunction(TopologyTemplate ttpl,Object context,Object rawFunctionObj) {
            // Gets a Function instance representing the provided template function.
 
            // If the format provided raw_function format is not relevant for template
@@ -99,13 +98,13 @@ public abstract class Function {
         if (rawFunctionObj instanceof LinkedHashMap) { // In map type case
                        LinkedHashMap rawFunction = ((LinkedHashMap) rawFunctionObj);
                        if(rawFunction.size() == 1) { // End point
-                               return getFunctionForObjectItem(ttpl, context, rawFunction, resolveGetInput);
+                               return getFunctionForObjectItem(ttpl, context, rawFunction);
                        } else {
                            // iterate over map nested properties in recursion, convert leaves to function,
                 // and collect them in the same hierarchy as the original map.
                                LinkedHashMap rawFunctionObjMap = new LinkedHashMap();
                                for (Object rawFunctionObjItem: rawFunction.entrySet()) {
-                                       Object itemValue = getFunction(ttpl, context, ((Map.Entry)rawFunctionObjItem).getValue(), resolveGetInput);
+                                       Object itemValue = getFunction(ttpl, context, ((Map.Entry)rawFunctionObjItem).getValue());
                                        rawFunctionObjMap.put(((Map.Entry)rawFunctionObjItem).getKey(), itemValue);
                                }
                                return rawFunctionObjMap;
@@ -115,7 +114,7 @@ public abstract class Function {
             // and collect them in the same hierarchy as the original list.
                        ArrayList<Object> rawFunctionObjList = new ArrayList<>();
                        for (Object rawFunctionObjItem: (ArrayList) rawFunctionObj) {
-                               rawFunctionObjList.add(getFunction(ttpl, context, rawFunctionObjItem, resolveGetInput));
+                               rawFunctionObjList.add(getFunction(ttpl, context, rawFunctionObjItem));
                        }
                        return rawFunctionObjList;
                }
@@ -123,7 +122,7 @@ public abstract class Function {
            return rawFunctionObj;
        }
 
-       private static Object getFunctionForObjectItem(TopologyTemplate ttpl, Object context, Object rawFunctionObjItem, boolean resolveGetInput) {
+       private static Object getFunctionForObjectItem(TopologyTemplate ttpl, Object context, Object rawFunctionObjItem) {
                if(isFunction(rawFunctionObjItem)) {
                        LinkedHashMap<String, Object> rawFunction = (LinkedHashMap<String, Object>) rawFunctionObjItem;
                        String funcName = (new ArrayList<String>(rawFunction.keySet())).get(0);
@@ -138,23 +137,18 @@ public abstract class Function {
                                        funcArgs.add(oargs);
                                }
 
-                               switch (funcType) {
-                                       case "GetInput":
-                                               if (resolveGetInput) {
-                                                       GetInput input = new GetInput(ttpl, context, funcName, funcArgs);
-                                                       return input.result();
-                                               }
-                                               return new GetInput(ttpl, context, funcName, funcArgs);
-                                       case "GetAttribute":
-                                               return new GetAttribute(ttpl, context, funcName, funcArgs);
-                                       case "GetProperty":
-                                               return new GetProperty(ttpl, context, funcName, funcArgs);
-                                       case "GetOperationOutput":
-                                               return new GetOperationOutput(ttpl, context, funcName, funcArgs);
-                                       case "Concat":
-                                               return new Concat(ttpl, context, funcName, funcArgs);
-                                       case "Token":
-                                               return new Token(ttpl, context, funcName, funcArgs);
+                               if (funcType.equals("GetInput")) {
+                                       return new GetInput(ttpl, context, funcName, funcArgs);
+                               } else if (funcType.equals("GetAttribute")) {
+                                       return new GetAttribute(ttpl, context, funcName, funcArgs);
+                               } else if (funcType.equals("GetProperty")) {
+                                       return new GetProperty(ttpl, context, funcName, funcArgs);
+                               } else if (funcType.equals("GetOperationOutput")) {
+                                       return new GetOperationOutput(ttpl, context, funcName, funcArgs);
+                               } else if (funcType.equals("Concat")) {
+                                       return new Concat(ttpl, context, funcName, funcArgs);
+                               } else if (funcType.equals("Token")) {
+                                       return new Token(ttpl, context, funcName, funcArgs);
                                }
                        }
                }
index 71420e8..3550542 100644 (file)
@@ -58,7 +58,7 @@ public class GetProperty extends Function {
                }
                Object prop = foundProp.getValue();
                if(prop instanceof Function) {
-                   Function.getFunction(toscaTpl,context, prop, toscaTpl.getResolveGetInput());
+                   Function.getFunction(toscaTpl,context, prop);
                }
            }
            else if(args.size() >= 3) {
@@ -336,7 +336,7 @@ public class GetProperty extends Function {
         if(propertyValue instanceof Function) {
             return ((Function)propertyValue).result();
         }
-        return Function.getFunction(toscaTpl,context,propertyValue, toscaTpl.getResolveGetInput());
+        return Function.getFunction(toscaTpl,context,propertyValue);
        }
 
        public String getNodeTemplateName() {
index 7921ad4..6608eae 100644 (file)
@@ -5,7 +5,7 @@
 
 major=1
 minor=1
-patch=3
+patch=1
 
 base_version=${major}.${minor}.${patch}