diff options
5 files changed, 140 insertions, 36 deletions
@@ -1,6 +1,8 @@ -/target/ +target .project -.settings/ +.settings .checkstyle .classpath -coverage-report/ +coverage-report +.idea +*.iml diff --git a/INFO.yaml b/INFO.yaml new file mode 100644 index 0000000..07f4c32 --- /dev/null +++ b/INFO.yaml @@ -0,0 +1,127 @@ +--- +project: 'vfc-nfvo-resmanagement' +project_creation_date: '2017-06-28' +lifecycle_state: 'Incubation' +project_lead: &onap_releng_ptl + name: 'Yan Yang' + email: 'yangyanyj@chinamobile.com' + id: 'yangyan' + company: 'China Mobile' + timezone: 'Asia/Shanghai' +primary_contact: *onap_releng_ptl +issue_tracking: + type: 'jira' + url: 'https://jira.onap.org/projects/VFC' + key: 'VFC' +meetings: + - type: 'zoom' + agenda: 'https://wiki.onap.org/pages/viewpage.action?pageId=6590138' + url: 'https://wiki.onap.org/display/DW/Virtual+Function+Controller+Project' + server: 'n/a' + channel: 'n/a' + repeats: 'weekly' + time: '09:00 UTC' +committers: + - <<: *onap_releng_ptl + - name: 'Anatoly Andrianov' + email: 'anatoly.andrianov@nokia.com' + company: 'Nokia' + id: 'caa028' + timezone: 'America/Chicago' + - name: 'Fu Jinhua' + email: 'fu.jinhua@zte.com.cn' + company: 'ZTE' + id: 'fujinhua' + timezone: 'Asia/Shanghai' + - name: 'Victor Gao' + email: 'victor.gao@huawei.com' + company: 'Huawei' + id: 'g310497' + timezone: 'Asia/Shanghai' + - name: 'han yanan' + email: 'hanyanan@raisecom.com' + company: 'Raisecom' + id: 'hanyanan' + timezone: 'Asia/Shanghai' + - name: 'lu xin' + email: 'luxin7@huawei.com' + company: 'Huawei' + id: 'l345485' + timezone: 'Asia/Shanghai' + - name: 'maopeng zhang' + email: 'zhang.maopeng1@zte.com.cn' + company: 'ZTE' + id: 'maopengzhang' + timezone: 'Asia/Shanghai' + - name: 'Kanagaraj Manickam' + email: 'kanagaraj.manickam@huawei.com' + company: 'Huawei' + id: 'mkr1481' + timezone: 'Asia/Kolkata' + - name: 'yunlong ying' + email: 'ying.yunlong@zte.com.cn' + company: 'ZTE' + id: 'ying.yunlong' + timezone: 'Asia/Shanghai' + - name: 'Yog Vashishth' + email: 'yog.vashishth@ril.com' + company: 'Ril' + id: 'yogvashishth' + timezone: 'Asia/Kolkata' + - name: 'Lingli Deng' + email: 'denglingli@chinamobile.com' + company: 'China Mobile' + id: 'denglingli' + timezone: 'Asia/Shanghai' + - name: 'Nagesha Subramanya' + email: 'nagesha.subramanya@nokia.com' + company: 'Nokia' + id: 'hsnagesh' + timezone: 'Asia/Kolkata' + - name: 'Xinhui Li' + email: 'lxinhui@vmware.com' + company: 'VMWare' + id: 'xinhuili' + timezone: 'Asia/Shanghai' + - name: 'Guirong Wang' + email: 'wangguirong@boco.com.cn' + company: 'Boco' + id: 'Wang_Guirong' + timezone: 'Asia/Shanghai' + - name: 'Xiaodong Ning' + email: 'ningxiaodong2017@boco.com.cn' + company: 'Boco' + id: 'ningxiaodong2017' + timezone: 'Asia/Shanghai' + - name: 'Adityakar Jha' + email: 'Adityakar.Jha@ril.com' + company: 'Ril' + id: 'adityakar.jha' + timezone: 'Asia/Kolkata' + - name: 'Hu Dong' + email: 'donghu@raisecom.com' + company: 'Raisecom' + id: 'donghu1102' + timezone: 'Asia/Shanghai' + - name: 'Yufei Zhou' + email: 'yufei.zhou@nokia-sbell.com' + company: 'Nokia' + id: 'yufei_zhou' + timezone: 'Asia/Shanghai' + - name: 'Denes Nemeth' + email: 'denes.nemeth@nokia.com' + company: 'Nokia' + id: 'thelittlemouse' + timezone: 'Europe/Budapest' + - name: 'Haibin Huang' + email: 'haibin.huang@intel.com' + company: 'Intel' + id: 'haibin' + timezone: 'Asia/Shanghai' +tsc: + approval: 'https://lists.onap.org/pipermail/onap-tsc' + changes: + - type: 'Addition' + name: 'Denes Nemeth' + name: 'Haibin Huang' + link: 'https://lists.onap.org/g/ONAP-TSC/message/3269' diff --git a/ResmanagementService/docker/Dockerfile b/ResmanagementService/docker/Dockerfile index c1c99b3..e2097cc 100644 --- a/ResmanagementService/docker/Dockerfile +++ b/ResmanagementService/docker/Dockerfile @@ -32,7 +32,7 @@ COPY init-mysql.sh . # 30-tomcat.txt - AUTOGENERATED, DO NOT MODIFY MANUALLY # Set up tomcat -RUN wget -q http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.30.tar.gz && rm -f apache-tomcat-8.5.30.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT +RUN wget -q https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.30.tar.gz && rm -f apache-tomcat-8.5.30.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh ENV CATALINA_HOME /service diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/util/restclient/RestHttpContentExchange.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/util/restclient/RestHttpContentExchange.java index fa01516..0d8ec94 100644 --- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/util/restclient/RestHttpContentExchange.java +++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/common/util/restclient/RestHttpContentExchange.java @@ -79,40 +79,15 @@ public class RestHttpContentExchange extends ContentExchange { if(data == null) { return ""; } - ByteArrayInputStream input = null; - GZIPInputStream gzis = null; - InputStreamReader reader = null; + final StringBuilder out = new StringBuilder(); - try { - input = new ByteArrayInputStream(data); - gzis = new GZIPInputStream(input); - reader = new InputStreamReader(gzis, Charset.forName(RestfulClientConst.ENCODING)); + try(ByteArrayInputStream input = new ByteArrayInputStream(data); + GZIPInputStream gzis = new GZIPInputStream(input); + InputStreamReader reader = new InputStreamReader(gzis, Charset.forName(RestfulClientConst.ENCODING))) { final char[] buff = new char[1024]; for(int n; (n = reader.read(buff)) != -1;) { out.append(new String(buff, 0, n)); } - } finally { - if(reader != null) { - try { - reader.close(); - } catch(final IOException e) { - LOGGER.error("decompress Gzip reader exception:", e); - } - } - if(gzis != null) { - try { - gzis.close(); - } catch(final IOException e) { - LOGGER.error("decompress Gzip exception:", e); - } - } - if(input != null) { - try { - input.close(); - } catch(final IOException e) { - LOGGER.error("decompress Gzip input exception:", e); - } - } } return out.toString(); diff --git a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/group/impl/GrantResServiceImpl.java b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/group/impl/GrantResServiceImpl.java index c379571..a2a82fd 100644 --- a/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/group/impl/GrantResServiceImpl.java +++ b/ResmanagementService/service/src/main/java/org/onap/vfc/nfvo/resmanagement/service/group/impl/GrantResServiceImpl.java @@ -61,11 +61,11 @@ public class GrantResServiceImpl implements GrantResService { String vimId = additionalparam.getString(ParamConstant.PARAM_VIMID); JSONObject vimJson = VimUtil.getVimById(vimId); String tenant = vimJson.getString(ParamConstant.PARAM_TENANT); - JSONObject accessinfo = new JSONObject(); - accessinfo.put(ParamConstant.PARAM_TENANT, tenant); + JSONObject accessInfo = new JSONObject(); + accessInfo.put(ParamConstant.PARAM_TENANT, tenant); JSONObject vim = new JSONObject(); vim.put(ParamConstant.PARAM_VIMID, vimId); - vim.put("accessinfo", accessinfo); + vim.put("accessInfo", accessInfo); LOGGER.info("function=grantResource; vim: {}", vim.toString()); JSONObject result = new JSONObject(); result.put("vim", vim); |