diff options
-rw-r--r-- | INFO.yaml | 35 | ||||
-rw-r--r-- | huawei/vnfmadapter/VnfmadapterService/service/pom.xml | 6 | ||||
-rw-r--r-- | huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties | 30 | ||||
-rw-r--r-- | huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java | 12 | ||||
-rw-r--r-- | huawei/vnfmadapter/pom.xml | 31 | ||||
-rw-r--r-- | nokiav2/driver/pom.xml | 27 | ||||
-rw-r--r-- | nokiav2/generatedapis/pom.xml | 28 | ||||
-rwxr-xr-x | zte/vmanager/docker/docker-entrypoint.sh | 6 | ||||
-rwxr-xr-x | zte/vmanager/docker/instance_config.sh | 5 | ||||
-rw-r--r-- | zte/vmanager/driver/pub/config/config.py | 4 | ||||
-rw-r--r-- | zte/vmanager/driver/pub/utils/restcall.py | 5 | ||||
-rw-r--r-- | zte/vmanager/pom.xml | 2 |
12 files changed, 151 insertions, 40 deletions
@@ -22,26 +22,15 @@ realtime_discussion: '' meetings: - type: 'zoom' agenda: 'https://wiki.onap.org/pages/viewpage.action?pageId=6590138' - url: https://wiki.onap.org/display/DW/Virtual+Function+Controller+Project + url: 'https://wiki.onap.org/display/DW/Virtual+Function+Controller+ + Project' server: 'n/a' channel: 'n/a' repeats: 'weekly' time: '09:00 UTC/China 17:00' repositories: - - 'vfc-gvnfm-vnflcm' - - 'vfc-gvnfm-vnfmgr' - - 'vfc-gvnfm-vnfres' - - 'vfc-nfvo-catalog' - - 'vfc-nfvo-db' - - 'vfc-nfvo-driver-ems' - - 'vfc-nfvo-driver-sfc' - - 'vfc-nfvo-driver-vnfm-gvnfm' - - 'vfc-nfvo-driver-vnfm-svnfm' - - 'vfc-nfvo-lcm' - - 'vfc-nfvo-multivimproxy' - - 'vfc-nfvo-resmanagement' - - 'vfc-nfvo-wfengine' - - 'vfc-oom' + - 'vfc/nfvo/driver/vnfm/svnfm' + committers: - <<: *onap_releng_ptl - name: 'Anatoly Andrianov' @@ -144,6 +133,16 @@ committers: company: 'Intel' id: 'Ruoyu' timezone: 'Asia/ShangHai' + - name: 'Yuanhong Deng' + email: 'dengyuanhong@chinamobile.com' + company: 'China Mobile' + id: 'dengyh' + timezone: 'Asia/ShangHai' + - name: 'Hongyu Zhao' + email: 'zhao.hongyu@zte.com.cn' + company: 'ZTE' + id: 'hongyuzhao' + timezone: 'Asia/ShangHai' tsc: approval: 'https://lists.onap.org/pipermail/onap-tsc' @@ -154,3 +153,9 @@ tsc: - type: 'Addition' name: 'Haibin Huang' link: 'https://lists.onap.org/g/ONAP-TSC/message/3269' + - type: 'Addition' + name: 'Yuanhong Deng' + link: 'https://lists.onap.org/g/onap-tsc/message/5890' + - type: 'Addition' + name: 'Hongyu Zhao' + link: 'https://lists.onap.org/g/onap-tsc/message/5890' diff --git a/huawei/vnfmadapter/VnfmadapterService/service/pom.xml b/huawei/vnfmadapter/VnfmadapterService/service/pom.xml index 9a181b7c..39eecb1e 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/pom.xml +++ b/huawei/vnfmadapter/VnfmadapterService/service/pom.xml @@ -91,9 +91,9 @@ </exclusions> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.6.1</version> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <version>2.13.0</version> </dependency> <dependency> <groupId>org.eclipse.jetty.orbit</groupId> diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties index 635bcc51..58e5d2fd 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties @@ -13,17 +13,25 @@ # See the License for the specific language governing permissions and # limitations under the License. ############################################################################### -log4j.rootLogger=INFO,root -log4j.appender.root.Append=true +#log4j.rootLogger=INFO,root +rootLogger.level=INFO +rootLogger.appenderRefs=file +rootLogger.appenderRef.root.ref=RollingFile #Log Directory -logDir=/var/log/onap -componentName=vfc -subComponentName=huaweivnfmdriver -log4j.appender.root.File=${logDir}/${componentName}/${subComponentName}/vnfmadapterservice.log +property.logDir=/var/log/onap +property.componentName=vfc +property.subComponentName=huaweivnfmdriver -log4j.appender.root.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n -log4j.appender.root.layout=org.apache.log4j.PatternLayout -log4j.appender.root.MaxBackupIndex=50 -log4j.appender.root.MaxFileSize=20MB -log4j.appender.root=org.apache.log4j.RollingFileAppender
\ No newline at end of file +appender.root.type = RollingFile +appender.root.name = RollingFile +appender.root.append=true +appender.root.fileName=${logDir}/${componentName}/${subComponentName}/vnfmadapterservice.log +appender.root.filePattern=${logDir}/${componentName}/${subComponentName}/vnfmadapterservice.%d{dd-MMM}.log +appender.root.policies.type=Policies +appender.root.policies.size.type=SizeBasedTriggeringPolicy +appender.root.policies.size.size=20MB +appender.root.strategy.type=DefaultRolloverStrategy +appender.root.strategy.max=50 +appender.root.layout.type=PatternLayout +appender.root.layout.pattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
\ No newline at end of file diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java index ec03ea75..cf28a5c8 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java @@ -30,8 +30,8 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.zip.GZIPInputStream; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; import org.eclipse.jetty.client.Address; import org.eclipse.jetty.client.CachedExchange; import org.eclipse.jetty.client.HttpDestination; @@ -111,7 +111,7 @@ public class TestRestHttpContentExchange { */ @After public void tearDown() throws Exception { - LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.ERROR); + LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.ERROR); } /** @@ -128,7 +128,7 @@ public class TestRestHttpContentExchange { exchange.setRequestURI("/the/request/uri"); exchange.onRequestCommitted(); - LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.DEBUG); + LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.DEBUG); exchange.onRequestCommitted(); } @@ -146,7 +146,7 @@ public class TestRestHttpContentExchange { exchange.setRequestURI("/the/request/uri"); exchange.onRequestComplete(); - LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.DEBUG); + LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.DEBUG); exchange.onRequestComplete(); } @@ -164,7 +164,7 @@ public class TestRestHttpContentExchange { exchange.setRequestURI("/the/request/uri"); exchange.onResponseComplete(); - LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.DEBUG); + LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.DEBUG); exchange.onResponseComplete(); final AtomicInteger isCallback = new AtomicInteger(0); diff --git a/huawei/vnfmadapter/pom.xml b/huawei/vnfmadapter/pom.xml index 7824513c..f3f82b44 100644 --- a/huawei/vnfmadapter/pom.xml +++ b/huawei/vnfmadapter/pom.xml @@ -27,6 +27,14 @@ <packaging>pom</packaging> <name>vfc-nfvo-driver-vnfm-svnfm</name> <description>nfvo vnfmadapter</description> + <properties> + <packagename>VnfmadapterService</packagename> + <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath> + <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> + <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero> + <sonar.projectVersion>${project.version}</sonar.projectVersion> + <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> + </properties> <modules> <module>VnfmadapterService</module> </modules> @@ -67,6 +75,29 @@ </instrumentation> </configuration> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <goals> + <goal>report</goal> + </goals> + <configuration> + <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile> + <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> </build> diff --git a/nokiav2/driver/pom.xml b/nokiav2/driver/pom.xml index a82fefaf..d0d06f91 100644 --- a/nokiav2/driver/pom.xml +++ b/nokiav2/driver/pom.xml @@ -30,6 +30,11 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> + <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath> + <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> + <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero> + <sonar.projectVersion>${project.version}</sonar.projectVersion> + <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> </properties> <dependencies> <dependency> @@ -124,6 +129,28 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <goals> + <goal>report</goal> + </goals> + <configuration> + <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile> + <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> </project> diff --git a/nokiav2/generatedapis/pom.xml b/nokiav2/generatedapis/pom.xml index 909fefd8..afa784a9 100644 --- a/nokiav2/generatedapis/pom.xml +++ b/nokiav2/generatedapis/pom.xml @@ -33,6 +33,11 @@ <threetenbp-version>1.3.5</threetenbp-version> <oltu-version>1.0.1</oltu-version> <swagger-core-version>1.5.15</swagger-core-version> + <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath> + <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> + <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero> + <sonar.projectVersion>${project.version}</sonar.projectVersion> + <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> </properties> <build> <plugins> @@ -309,6 +314,29 @@ Release AAI <target>1.8</target> </configuration> </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <goals> + <goal>report</goal> + </goals> + <configuration> + <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile> + <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> </build> <dependencies> diff --git a/zte/vmanager/docker/docker-entrypoint.sh b/zte/vmanager/docker/docker-entrypoint.sh index 38eb4666..0081696d 100755 --- a/zte/vmanager/docker/docker-entrypoint.sh +++ b/zte/vmanager/docker/docker-entrypoint.sh @@ -17,7 +17,11 @@ echo "MSB_ADDR=$MSB_ADDR" # Wait for MSB initialization echo "Wait for MSB initialization" for i in {1..5}; do - curl -sS -m 1 $MSB_ADDR > /dev/null && break + curl -sS -m 1 $MSB_PROTO:$MSB_ADDR/msb -k > /dev/null + res=$i? + if [ $res -ne 0 ]; then + break + fi sleep $i done diff --git a/zte/vmanager/docker/instance_config.sh b/zte/vmanager/docker/instance_config.sh index 4995e5ec..fdddff02 100755 --- a/zte/vmanager/docker/instance_config.sh +++ b/zte/vmanager/docker/instance_config.sh @@ -1,8 +1,13 @@ #!/bin/bash +MSB_PROTO=`echo $MSB_PROTO` MSB_IP=`echo $MSB_ADDR | cut -d: -f 1` MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2` +if [ $MSB_PROTO ]; then + sed -i "s|MSB_SERVICE_PROTOCOL = .*|MSB_SERVICE_PROTOCOL = '$MSB_PROTO'|" vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/driver/pub/config/config.py +fi + if [ $MSB_IP ]; then sed -i "s|MSB_SERVICE_IP.*|MSB_SERVICE_IP = '$MSB_IP'|" vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/driver/pub/config/config.py fi diff --git a/zte/vmanager/driver/pub/config/config.py b/zte/vmanager/driver/pub/config/config.py index a8988801..2eeff668 100644 --- a/zte/vmanager/driver/pub/config/config.py +++ b/zte/vmanager/driver/pub/config/config.py @@ -16,8 +16,10 @@ VNF_FTP = "ftp://VMVNFM:Vnfm_1g3T@127.0.0.1:21/" # [MSB] +MSB_SERVICE_PROTOCOL = 'http' MSB_SERVICE_IP = '127.0.0.1' -MSB_SERVICE_PORT = '80' +MSB_SERVICE_PORT = '443' +MSB_BASE_URL = "%s://%s:%s" % (MSB_SERVICE_PROTOCOL, MSB_SERVICE_IP, MSB_SERVICE_PORT) # [MDC] SERVICE_NAME = "ztevnfmdriver" diff --git a/zte/vmanager/driver/pub/utils/restcall.py b/zte/vmanager/driver/pub/utils/restcall.py index 74724e16..eff7c4c7 100644 --- a/zte/vmanager/driver/pub/utils/restcall.py +++ b/zte/vmanager/driver/pub/utils/restcall.py @@ -21,7 +21,8 @@ import uuid import httplib2 -from driver.pub.config.config import MSB_SERVICE_IP, MSB_SERVICE_PORT + +from driver.pub.config.config import MSB_BASE_URL rest_no_auth, rest_oneway_auth, rest_bothway_auth = 0, 1, 2 HTTP_200_OK, HTTP_201_CREATED, HTTP_204_NO_CONTENT, HTTP_202_ACCEPTED = '200', '201', '204', '202' @@ -82,7 +83,7 @@ def call_req(base_url, user, passwd, auth_type, resource, method, content=''): def req_by_msb(resource, method, content=''): - base_url = "http://%s:%s/" % (MSB_SERVICE_IP, MSB_SERVICE_PORT) + base_url = MSB_BASE_URL return call_req(base_url, "", "", rest_no_auth, resource, method, content) diff --git a/zte/vmanager/pom.xml b/zte/vmanager/pom.xml index 24431f4b..4b175623 100644 --- a/zte/vmanager/pom.xml +++ b/zte/vmanager/pom.xml @@ -30,7 +30,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <sonar.sources>.</sonar.sources> <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath> - <sonar.python.coverage.reportPath>coverage.xml</sonar.python.coverage.reportPath> + <sonar.python.coverage.reportPaths>coverage.xml</sonar.python.coverage.reportPaths> <sonar.language>py</sonar.language> <sonar.pluginname>python</sonar.pluginname> <sonar.inclusions>**/**.py</sonar.inclusions> |