summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMurali-P <murali.p@huawei.com>2017-02-16 17:49:33 +0530
committerMurali-P <murali.p@huawei.com>2017-02-16 17:49:33 +0530
commite8f5a9430b375fe8d62fb7498dbe61fb74043704 (patch)
treedd854940a25c5b77ac5ee9dc5783cfe6e9dfcdb4
parent06841e7e140a54cea172980690a15787a4145a72 (diff)
Update License
Resolved:VNFSDK-21 VNF SDK Function test Change-Id: Ic1f9e91270170f18c40fdfdeae9b6c1479388c18 Signed-off-by: Murali-P <murali.p@huawei.com>
-rw-r--r--distribution/pom.xml15
-rw-r--r--distribution/standalone/pom.xml15
-rw-r--r--distribution/standalone/src/main/assembly/find_kill_process.bat15
-rw-r--r--distribution/standalone/src/main/assembly/run.bat17
-rw-r--r--distribution/standalone/src/main/assembly/run.sh16
-rw-r--r--distribution/standalone/src/main/assembly/stop.bat15
-rw-r--r--distribution/standalone/src/main/assembly/stop.sh15
-rw-r--r--pom.xml15
-rw-r--r--vnf-sdk-function-test/pom.xml15
-rw-r--r--vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java12
-rw-r--r--vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java24
-rw-r--r--vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java2
-rw-r--r--vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java2
-rw-r--r--vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java1
-rw-r--r--vnf-sdk-function-test/src/test/resources/59d1e651-df9f-4008-902f-e3b377e6ec30/output.xml15
15 files changed, 175 insertions, 19 deletions
diff --git a/distribution/pom.xml b/distribution/pom.xml
index 09361ae..535f3e3 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -1,4 +1,19 @@
<?xml version="1.0"?>
+<!--
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ 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.
+ -->
<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">
<parent>
<groupId>org.openo.vnf-sdk.function-test</groupId>
diff --git a/distribution/standalone/pom.xml b/distribution/standalone/pom.xml
index 12c0432..c5e1fa4 100644
--- a/distribution/standalone/pom.xml
+++ b/distribution/standalone/pom.xml
@@ -1,4 +1,19 @@
<?xml version="1.0"?>
+<!--
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ 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.
+ -->
<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">
<parent>
<groupId>org.openo.vnf-sdk.function-test</groupId>
diff --git a/distribution/standalone/src/main/assembly/find_kill_process.bat b/distribution/standalone/src/main/assembly/find_kill_process.bat
index 4a4baaf..f64eb62 100644
--- a/distribution/standalone/src/main/assembly/find_kill_process.bat
+++ b/distribution/standalone/src/main/assembly/find_kill_process.bat
@@ -1,3 +1,18 @@
+::==============================================================================
+:: Copyright 2017 Huawei Technologies Co., Ltd.
+
+:: 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.
+::==============================================================================
echo %1 | findstr %2 >NUL
echo ERRORLEVEL=%ERRORLEVEL%
diff --git a/distribution/standalone/src/main/assembly/run.bat b/distribution/standalone/src/main/assembly/run.bat
index 3ce5172..1fda07c 100644
--- a/distribution/standalone/src/main/assembly/run.bat
+++ b/distribution/standalone/src/main/assembly/run.bat
@@ -1,4 +1,19 @@
-
+::==============================================================================
+:: Copyright 2017 Huawei Technologies Co., Ltd.
+
+:: 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.
+::==============================================================================
+
@echo off
title vnfsdk-functest
diff --git a/distribution/standalone/src/main/assembly/run.sh b/distribution/standalone/src/main/assembly/run.sh
index 021a843..f8e294a 100644
--- a/distribution/standalone/src/main/assembly/run.sh
+++ b/distribution/standalone/src/main/assembly/run.sh
@@ -1,3 +1,19 @@
+<<COPY RIGHT AND LICENSE
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ 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.
+COPY RIGHT AND LICENSE
+
DIRNAME=`dirname $0`
RUNHOME=`cd $DIRNAME/; pwd`
echo @RUNHOME@ $RUNHOME
diff --git a/distribution/standalone/src/main/assembly/stop.bat b/distribution/standalone/src/main/assembly/stop.bat
index c075ac1..ed702ff 100644
--- a/distribution/standalone/src/main/assembly/stop.bat
+++ b/distribution/standalone/src/main/assembly/stop.bat
@@ -1,3 +1,18 @@
+::==============================================================================
+:: Copyright 2017 Huawei Technologies Co., Ltd.
+
+:: 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.
+::==============================================================================
@echo off
title stopping vnfsdk-functest
diff --git a/distribution/standalone/src/main/assembly/stop.sh b/distribution/standalone/src/main/assembly/stop.sh
index 0080d41..014a8e6 100644
--- a/distribution/standalone/src/main/assembly/stop.sh
+++ b/distribution/standalone/src/main/assembly/stop.sh
@@ -1,3 +1,18 @@
+<<COPY RIGHT AND LICENSE
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ 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.
+COPY RIGHT AND LICENSE
DIRNAME=`dirname $0`
HOME=`cd $DIRNAME/; pwd`
diff --git a/pom.xml b/pom.xml
index 0440ce2..d1ef225 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,19 @@
<?xml version="1.0"?>
+<!--
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ 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.
+ -->
<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">
<parent>
diff --git a/vnf-sdk-function-test/pom.xml b/vnf-sdk-function-test/pom.xml
index a42e36b..a1aa46e 100644
--- a/vnf-sdk-function-test/pom.xml
+++ b/vnf-sdk-function-test/pom.xml
@@ -1,4 +1,19 @@
<?xml version="1.0"?>
+<!--
+ Copyright 2017 Huawei Technologies Co., Ltd.
+
+ 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.
+ -->
<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">
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java
index 28ae31e..0d38f06 100644
--- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java
+++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceNode.java
@@ -27,6 +27,12 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class ServiceNode {
+
+ private String ip;
+
+ private String port;
+
+ private int ttl;
public String getIp() {
return ip;
@@ -52,9 +58,5 @@ public class ServiceNode {
this.ttl = ttl;
}
- private String ip;
-
- private String port;
-
- private int ttl;
+
}
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java
index d32e2af..c6d885a 100644
--- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java
+++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/externalservice/entity/ServiceRegisterEntity.java
@@ -30,6 +30,18 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class ServiceRegisterEntity {
+
+ private String serviceName;
+
+ private String version;
+
+ private String url;
+
+ private String protocol;
+
+ private String visualRange;
+
+ private List<ServiceNode> nodes = new ArrayList<ServiceNode>();
public String getServiceName() {
return serviceName;
@@ -79,17 +91,7 @@ public class ServiceRegisterEntity {
this.nodes = nodes;
}
- private String serviceName;
-
- private String version;
-
- private String url;
-
- private String protocol;
-
- private String visualRange;
-
- private List<ServiceNode> nodes = new ArrayList<ServiceNode>();
+
public void setSingleNode(String ip, String port, int ttl) {
ServiceNode node = new ServiceNode();
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java
index 6dc161c..5d36aa4 100644
--- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java
+++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/resource/CommonManager.java
@@ -80,7 +80,7 @@ public class CommonManager {
FileUtil.unzip(filePath, tempDir);
LOGGER.info("File path=" + filePath);
- String directories[] = FileUtil.getDirectory(tempDir);
+ String[] directories = FileUtil.getDirectory(tempDir);
if(null != directories) {
filePath = tempDir + File.separator + directories[0];
}
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java
index 0ab292c..94773b3 100644
--- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java
+++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java
@@ -92,7 +92,7 @@ public class ZipCompressor {
}
try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file))) {
- byte data[] = new byte[BUFFER];
+ byte[] data = new byte[BUFFER];
ZipEntry entry = new ZipEntry(basedir + file.getName());
out.putNextEntry(entry);
diff --git a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java
index 14db973..c14d47e 100644
--- a/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java
+++ b/vnf-sdk-function-test/src/test/java/org/openo/vnfsdk/functests/FileUtilTest.java
@@ -34,6 +34,7 @@ public class FileUtilTest {
@Test
public void testCreateDirectory() {
+
assertTrue(FileUtil.createDirectory(createDirPath));
}
diff --git a/vnf-sdk-function-test/src/test/resources/59d1e651-df9f-4008-902f-e3b377e6ec30/output.xml b/vnf-sdk-function-test/src/test/resources/59d1e651-df9f-4008-902f-e3b377e6ec30/output.xml
index eaeb63e..b526a09 100644
--- a/vnf-sdk-function-test/src/test/resources/59d1e651-df9f-4008-902f-e3b377e6ec30/output.xml
+++ b/vnf-sdk-function-test/src/test/resources/59d1e651-df9f-4008-902f-e3b377e6ec30/output.xml
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2016 Huawei Technologies Co., Ltd. and others. 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.
+-->
<robot generated="20170208 17:49:26.030" generator="Robot 3.0 (Python 2.7.12 on linux2)">
<suite source="/home/root1/test/RobotScript/Sample.robot" id="s1" name="Sample">
<test id="s1-t1" name="Hello World">