summaryrefslogtreecommitdiffstats
path: root/huawei
diff options
context:
space:
mode:
Diffstat (limited to 'huawei')
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json76
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java1
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java7
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java1
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java1
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml52
6 files changed, 67 insertions, 71 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json b/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
index 432889d0..82fcb480 100644
--- a/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
+++ b/huawei/vnfmadapter/VnfmadapterService/deployment/src/main/release/etc/vnfpkginfo/vnfpkginfo.json
@@ -1,40 +1,42 @@
{
- "1": {
- "template": {
- "name": "vCPE",
- "ftp_server_ip": "192.168.237.179",
- "ftp_server_port": "21",
- "ftp_username": "ftpsuser",
- "ftp_password": "ftpsuser",
- "csar_file_path": "/home/ftpsuser/files/",
- "csar_file_name": "VCPE_VNF.csar",
- "vnfd_file_path": "/files/SoftwareImages/",
- "vnfd_file_name": "vCPE.zip",
- "image_file_path": "/files/SoftwareImages/",
- "image_file_name": "ar_img.zip",
- "software_file_path": "",
- "software_file_name": "",
- "catalog": "",
- "vim_id": "NE=34603199"
- }
- },
- "2": {
- "template": {
- "name": "vCPE",
- "ftp_server_ip": "192.168.237.179",
- "ftp_server_port": "21",
- "ftp_username": "ftpsuser",
- "ftp_password": "ftpsuser",
- "csar_file_path": "/home/ftpsuser/files/",
- "csar_file_name": "VCPE_VNF.csar",
- "vnfd_file_path": "/files/SoftwareImages/",
- "vnfd_file_name": "vCPE.zip",
- "image_file_path": "/files/SoftwareImages/",
- "image_file_name": "ar_img.zip",
- "software_file_path": "",
- "software_file_name": "",
- "catalog": "",
- "vim_id": "NE=34603199"
- }
+ "1": {
+ "template": {
+ "name": "vCPE",
+ "ftp_server_ip": "192.168.237.179",
+ "ftp_server_port": "21",
+ "ftp_username": "ftpsuser",
+ "ftp_password": "ftpsuser",
+ "csar_file_path": "/home/ftpsuser/files/",
+ "csar_file_name": "VCPE_VNF.csar",
+ "vnfd_file_path": "/files/SoftwareImages/",
+ "vnfd_file_name": "vCPE.zip",
+ "image_file_path": "/files/SoftwareImages/",
+ "image_file_name": "ar_img.zip",
+ "software_file_path": "",
+ "software_file_name": "",
+ "catalog": "",
+ "vim_id": "NE=34603199"
}
+ },
+ "2": {
+ "template": {
+ "name": "vCPE",
+ "ftp_server_ip": "192.168.237.179",
+ "ftp_server_port": "21",
+ "ftp_username": "ftpsuser",
+ "ftp_password": "ftpsuser",
+ "csar_file_path": "/home/ftpsuser/files/",
+ "csar_file_name": "VCPE_VNF.csar",
+ "vnfd_file_path": "/files/SoftwareImages/",
+ "vnfd_file_name": "vCPE.zip",
+ "image_file_path": "/files/SoftwareImages/",
+ "image_file_name": "ar_img.zip",
+ "software_file_path": "",
+ "software_file_name": "",
+ "catalog": "",
+ "vim_id": "NE=34603199"
+ }
+ },
+ "vnfmid": "",
+ "vimid": ""
} \ No newline at end of file
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java
index d0a06a25..1a93f281 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgr.java
@@ -47,7 +47,6 @@ public class AuthMgr {
restJson.put(Constant.RETCODE, Constant.REST_FAIL);
try {
String userName = params.getString(Constant.USERNAME);
-
restJson = getStatusResult(userName);
} catch(JSONException e) {
LOG.error("function=login, msg=Params error occurs, e={}.", e);
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
index 2e7e28ca..f90126c8 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/AuthRoa.java
@@ -46,7 +46,7 @@ import net.sf.json.JSONObject;
* auth tokens interface is provided by platform
* not in nfvo for vnfm
* differences from other interface
- * </p>
+ * </p>
*
* @author
* @version VFC 1.0 Aug 24, 2016
@@ -91,16 +91,13 @@ public class AuthRoa {
LOG.warn("authResult: {}", authResult);
if(authResult.getInt(Constant.RETCODE) == Constant.REST_SUCCESS) {
JSONObject data = authResult.getJSONObject("data");
-
resp.setStatus(Constant.HTTP_OK);
return data.toString();
} else if(authResult.getInt(Constant.RETCODE) == Constant.HTTP_INNERERROR) {
Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(authResult.getString("data")).build();
-
return String.format(ParamConstants.GET_TOKEN_FAIL_RESP, authResult.getString("data"));
} else {
Response.status(Response.Status.UNAUTHORIZED).entity(authResult.getString("data")).build();
-
return String.format(ParamConstants.GET_TOKEN_FAIL_RESP, authResult.getString("data"));
}
}
@@ -109,7 +106,6 @@ public class AuthRoa {
* Provide interface for delete authInfo
* <br/>
*
- * @param context
* @param userName
* @param roarand
* @return
@@ -132,7 +128,6 @@ public class AuthRoa {
* Provide interface for handshake authInfo
* <br/>
*
- * @param context
* @param roattr
* @return
* @since VFC 1.0
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java
index 27a5ae3e..f0934c91 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/SwaggerRoa.java
@@ -38,7 +38,6 @@ public class SwaggerRoa {
/**
* API doc.
*
- * @param filename
* @return
* @throws IOException
*/
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java
index fe9f9530..6ad35f6a 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/rest/VnfAdapterResourceRoa.java
@@ -46,7 +46,6 @@ public class VnfAdapterResourceRoa {
* Provide function of grant resource.
* <br/>
*
- * @param context
* @return
* @since VFC 1.0
*/
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml
index 972d2210..e14a37f4 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/spring/Vnfmadapter/services.xml
@@ -16,11 +16,12 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
- xmlns:ctx="http://www.springframework.org/schema/context"
- xmlns:jaxrs="http://cxf.apache.org/jaxrs"
- xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
- xsi:schemaLocation="
+ xmlns:osgi="http://www.springframework.org/schema/osgi"
+ xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
+ xmlns:ctx="http://www.springframework.org/schema/context"
+ xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+ xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
+ xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
@@ -37,37 +38,38 @@
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd ">
<!-- these are included in the dependency jar -->
- <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
- <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
+ <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
- <bean id="source" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+ <bean id="source" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<!-- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://localhost:3306/vnfmdb"/> -->
+ <property name="url" value="jdbc:mysql://localhost:3306/vnfmdb"/>
+ Change mysql-connector to mariadb -->
<property name="driverClassName" value="org.mariadb.jdbc.Driver"/>
<property name="url" value="jdbc:mariadb://localhost:3306/vnfmdb"/>
<property name="username" value="root"/>
<property name="password" value="rootpass"/>
</bean>
- <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="source" />
- <property name="mapperLocations" value="classpath*:mybatis/mysql/*.xml" />
+ <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+ <property name="dataSource" ref="source"/>
+ <property name="mapperLocations" value="classpath*:mybatis/mysql/*.xml"/>
<!-- <property name="configLocation" value="classpath:mybatis-config.xml" /> -->
</bean>
<bean id="session" class="org.mybatis.spring.SqlSessionTemplate">
- <constructor-arg index="0" ref="sessionFactory" />
+ <constructor-arg index="0" ref="sessionFactory"/>
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="source" />
+ <property name="dataSource" ref="source"/>
</bean>
<bean id="vnfmDao"
- class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.impl.VnfmDaoImpl">
+ class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.dao.impl.VnfmDaoImpl">
<property name="session" ref="session"></property>
</bean>
@@ -80,14 +82,14 @@
</bean>
<bean id="vnfResourceMgr"
- class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfResourceMgr">
+ class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.VnfResourceMgr">
</bean>
<bean id="VnfResourceRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.VnfResourceRoa">
<property name="vnfResourceMgr" ref="vnfResourceMgr"></property>
</bean>
- <bean id="authMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.AuthMgr" />
+ <bean id="authMgr" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.process.AuthMgr"/>
<bean id="AuthRoa" class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.AuthRoa">
<property name="authMgr" ref="authMgr"></property>
@@ -104,16 +106,16 @@
<jaxrs:server id="restContainer" address="/">
<jaxrs:serviceBeans>
- <ref bean="AuthRoa" />
- <ref bean="VnfResourceRoa" />
- <ref bean="VnfRoa" />
- <ref bean="VnfAdaResRoa" />
- <ref bean="SwaggerRoa" />
+ <ref bean="AuthRoa"/>
+ <ref bean="VnfResourceRoa"/>
+ <ref bean="VnfRoa"/>
+ <ref bean="VnfAdaResRoa"/>
+ <ref bean="SwaggerRoa"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
- <ref bean="jsonProvider" />
- <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper" />
- <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper" />
+ <ref bean="jsonProvider"/>
+ <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.ServiceExceptionMapper"/>
+ <bean class="org.onap.vfc.nfvo.vnfm.svnfm.vnfmadapter.service.rest.exceptionmapper.GenericExceptionMapper"/>
</jaxrs:providers>
</jaxrs:server>
</beans>