From: thmsdt Date: Tue, 27 Feb 2024 10:06:56 +0000 (+0100) Subject: update link to upper-constraints.txt X-Git-Url: https://gerrit.onap.org/r/gitweb?p=multicloud%2Fframework.git;a=commitdiff_plain;h=HEAD;hp=605a4a9533a8c444bcfdb01d23a254646e56a851 update link to upper-constraints.txt Issue-ID: DOC-823 Change-Id: I892063aaa3e932d2cc75dc7daa3ebbf46d26db35 Signed-off-by: thmsdt --- diff --git a/.gitignore b/.gitignore index a49966f..5abd1e9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,8 @@ target/ logs/*.log *.pyc *.swp - +*_target/ +*.orig # Test related files multivimbroker/.coverage diff --git a/.gitreview b/.gitreview index dbe990d..882cce2 100644 --- a/.gitreview +++ b/.gitreview @@ -2,3 +2,4 @@ host=gerrit.onap.org port=29418 project=multicloud/framework +defaultbranch=master diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..f56b3b7 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,18 @@ +--- +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details +# Required + +version: 2 +build: + os: ubuntu-20.04 + tools: + python: "3.8" + +python: + install: + - requirements: docs/requirements-docs.txt + +sphinx: + configuration: docs/conf.py diff --git a/INFO.yaml b/INFO.yaml index 6715e2e..eaacc12 100644 --- a/INFO.yaml +++ b/INFO.yaml @@ -2,7 +2,7 @@ project: 'multicloud-framework' project_creation_date: '2017-02-21' project_category: '' -lifecycle_state: 'Incubation' +lifecycle_state: 'Mature' project_lead: &onap_multicloud_ptl name: 'Bin Yang' email: 'bin.yang@windriver.com' @@ -28,65 +28,39 @@ meetings: repeats: 'weekly' time: '13:00 UTC' repositories: - - 'multicloud-framework' - - 'multicloud-openstack' - - 'multicloud-openstack-vmware' - - 'multicloud-openstack-windriver' - - 'multicloud-azure' - - 'multicloud-k8s' - - 'multicloud-oom' + - 'multicloud/framework' committers: - <<: *onap_multicloud_ptl - - name: 'Anbing Zhang' - email: 'zhanganbing@chinamobile.com' - company: 'China Mobile' - id: 'zhangab' - timezone: 'Asia/Shanghai' + - name: 'Eric Multanen' + email: 'eric.w.multanen@intel.com' + company: 'Intel' + id: 'ewmulta' + timezone: 'America/Los_Angeles' - name: 'Xinhui Li' - email: 'lxinhui@vmware.com' + email: 'xinhui.li@salesforce.com' id: 'xinhuili' - company: 'VMware' - timezone: 'Asia/Shanghai' - - name: 'Bin Hu' - email: 'bh526r@att.com' - company: 'ATT' - id: 'bh526r' - timezone: 'America/Los_Angeles' - - name: 'Ethan Lynn' - email: 'ethanlynnl@vmware.com' - company: 'VMWare' - id: 'ethanlynnl' + company: 'Salesforce' timezone: 'Asia/Shanghai' - name: 'Huang Haibin' email: 'haibin.huang@intel.com' company: 'Intel' id: 'haibin' timezone: 'Asia/Shanghai' - - name: 'Sudhakar Reddy' - email: 'Sudhakar.Reddy@amdocs.com' - company: 'Amdocs' - id: 'SudhakarReddy' - timezone: 'Asia/Kolkata' - name: 'Xiaohua Zhang' - email: 'Xiaohua.Zhang@windriver.com' - company: 'Wind River' + email: 'xiaohua.zhang@163.com' + company: 'China Mobile' id: 'Xiaohua626' timezone: 'Asia/Shanghai' - - name: 'Kiran Kamineni' - email: 'kiran.k.kamineni@intel.com' - company: 'Intel' - id: 'kirankamineni' - timezone: 'America/Los_Angeles' - name: 'Ritu Sood' email: 'ritu.sood@intel.com' company: 'Intel' id: 'ritusood' timezone: 'America/Los_Angeles' - - name: 'Liexiang Yue' - email: 'yueliexiang@chinamobile.com' - company: 'China Mobile' - id: 'YueLiexiang' - timezone: 'Asia/Shanghai' + - name: 'Konrad Banka' + email: 'k.banka@samsung.com' + company: 'Samsung' + id: 'kbanka' + timezone: 'Europe/Paris' tsc: approval: 'https://lists.onap.org/pipermail/onap-tsc' changes: @@ -118,3 +92,23 @@ tsc: - 'Liexiang Yue' - 'Ritu Sood' link: 'https://lists.onap.org/g/onap-discuss/message/18280' + - type: 'Addition' + name: + - 'Eric Multanen' + link: 'https://lists.onap.org/g/onap-tsc/message/6676' + - type: 'Remove' + name: + - 'Anbing Zhang' + - 'Bin Hu' + - 'Kiran Kamineni' + - 'Ethan Lynn' + - 'Sudhakar Reddy' + link: 'https://lists.onap.org/g/onap-tsc/message/6676' + - type: 'Remove' + name: + - 'Liexiang Yue' + link: 'https://lists.onap.org/g/onap-tsc/message/7962' + - type: 'Addition' + name: + - 'Konrad Banka' + link: 'https://lists.onap.org/g/onap-tsc/message/7962' diff --git a/artifactbroker/forwarding/pom.xml b/artifactbroker/forwarding/pom.xml index b5fb446..3c88efa 100644 --- a/artifactbroker/forwarding/pom.xml +++ b/artifactbroker/forwarding/pom.xml @@ -22,7 +22,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT multicloud-framework-artifactbroker-forwarding @@ -39,13 +39,6 @@ org.onap.sdc.sdc-distribution-client sdc-distribution-client - 1.3.0 - - - org.slf4j - slf4j-log4j12 - - diff --git a/artifactbroker/main/pom.xml b/artifactbroker/main/pom.xml index 2f3ab87..5fa8265 100644 --- a/artifactbroker/main/pom.xml +++ b/artifactbroker/main/pom.xml @@ -21,7 +21,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT 4.0.0 multicloud-framework-artifactbroker-main @@ -35,6 +35,11 @@ multicloud-framework-artifactbroker-reception ${project.version} + + javax.xml.bind + jaxb-api + 2.3.1 + diff --git a/artifactbroker/main/src/main/java/org/onap/policy/distribution/main/parameters/ArtifactForwarderConfigurationParametersJsonAdapter.java b/artifactbroker/main/src/main/java/org/onap/policy/distribution/main/parameters/ArtifactForwarderConfigurationParametersJsonAdapter.java index c63056d..a87ef30 100644 --- a/artifactbroker/main/src/main/java/org/onap/policy/distribution/main/parameters/ArtifactForwarderConfigurationParametersJsonAdapter.java +++ b/artifactbroker/main/src/main/java/org/onap/policy/distribution/main/parameters/ArtifactForwarderConfigurationParametersJsonAdapter.java @@ -27,16 +27,16 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import java.lang.reflect.Type; -import org.slf4j.ext.XLogger; -import org.slf4j.ext.XLoggerFactory; + +import org.onap.policy.common.logging.flexlogger.FlexLogger; +import org.onap.policy.common.logging.flexlogger.Logger; /** * This class deserialises policy forwarder parameters from JSON. */ public class ArtifactForwarderConfigurationParametersJsonAdapter implements JsonDeserializer { - private static final XLogger LOGGER = - XLoggerFactory.getXLogger(ArtifactForwarderConfigurationParametersJsonAdapter.class); + private static final Logger LOGGER = FlexLogger.getLogger(ArtifactForwarderConfigurationParametersJsonAdapter.class); private static final String PARAMETER_CLASS_NAME = "parameterClassName"; private static final String Artifact_FORWARDER_PARAMETERS = "parameters"; diff --git a/artifactbroker/model/pom.xml b/artifactbroker/model/pom.xml index d312715..d60dd10 100644 --- a/artifactbroker/model/pom.xml +++ b/artifactbroker/model/pom.xml @@ -22,7 +22,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT multicloud-framework-artifactbroker-model @@ -33,13 +33,6 @@ org.onap.sdc.sdc-distribution-client sdc-distribution-client - 1.3.0 - - - org.slf4j - slf4j-log4j12 - - diff --git a/artifactbroker/packages/docker/Dockerfile b/artifactbroker/packages/docker/Dockerfile index 364acb9..53f23a7 100644 --- a/artifactbroker/packages/docker/Dockerfile +++ b/artifactbroker/packages/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.9 +FROM nexus3.onap.org:10001/onap/integration-java11:9.0.0 ARG HTTP_PROXY=${HTTP_PROXY} ARG HTTPS_PROXY=${HTTPS_PROXY} @@ -13,13 +13,12 @@ ENV ARTIFACT_LOGS ${ARTIFACT_LOGS} ENV ARTIFACT_HOME=/opt/app/ ENV ARTIFACT_DISTRIBUTION_HOME=${ARTIFACT_HOME}/distribution -EXPOSE 9014 +USER root -RUN apk add --no-cache --update busybox-extras bash nss procps coreutils findutils grep zip unzip \ - curl wget openssh openjdk8 maven jq httpie py-pip +EXPOSE 9014 -RUN addgroup -S onap && \ - adduser -S --shell /bin/bash -G onap onap +RUN apk add --no-cache mlocate zip unzip jq procps \ + curl openssh RUN mkdir -p ${ARTIFACT_DISTRIBUTION_HOME} ${ARTIFACT_LOGS} ${ARTIFACT_HOME}/etc/ssl && \ chown -R onap:onap ${ARTIFACT_HOME} ${ARTIFACT_DISTRIBUTION_HOME} ${ARTIFACT_LOGS} @@ -29,13 +28,14 @@ COPY ./multicloud-framework-artifactbroker-*.zip multicloud-framework-artifactbr RUN unzip -q -o -B multicloud-framework-artifactbroker.zip && \ rm -f multicloud-framework-artifactbroker.zip COPY artifact-dist.sh bin/. -#RUN tar xvfz /packages/policy-distribution.tar.gz --directory ${ARTIFACT_DISTRIBUTION_HOME} -#RUN rm /packages/policy-distribution.tar.gz RUN chmod +x bin/*.sh && \ cp ${ARTIFACT_DISTRIBUTION_HOME}/etc/ssl/* ${ARTIFACT_HOME}/etc/ssl && \ chown onap:onap ${ARTIFACT_HOME}/etc/ssl/* +RUN updatedb + USER onap + WORKDIR ${ARTIFACT_DISTRIBUTION_HOME}/bin -ENTRYPOINT [ "bash", "./artifact-dist.sh" ] +ENTRYPOINT [ "sh", "./artifact-dist.sh" ] diff --git a/artifactbroker/packages/docker/artifact-dist.sh b/artifactbroker/packages/docker/artifact-dist.sh index 94c1dfc..0d21699 100644 --- a/artifactbroker/packages/docker/artifact-dist.sh +++ b/artifactbroker/packages/docker/artifact-dist.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # ============LICENSE_START======================================================= # Copyright (C) 2018 Ericsson. All rights reserved. @@ -19,7 +19,7 @@ # ============LICENSE_END========================================================= # -JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/ +JAVA_HOME=/opt/java/openjdk ARTIFACT_DISTRIBUTION_HOME=/opt/app/distribution KEYSTORE="${ARTIFACT_HOME}/etc/ssl/policy-keystore" KEYSTORE_PASSWD="Pol1cy_0nap" diff --git a/artifactbroker/packages/docker/build_image.sh b/artifactbroker/packages/docker/build_image.sh index 56c3275..bd91f21 100755 --- a/artifactbroker/packages/docker/build_image.sh +++ b/artifactbroker/packages/docker/build_image.sh @@ -17,8 +17,8 @@ cd ${DOCKER_BUILD_DIR} BUILD_ARGS="--no-cache" ORG="onap" -VERSION="1.5.1-SNAPSHOT" -STAGING_VERSION="1.5.1-STAGING" +VERSION="1.9.1-SNAPSHOT" +STAGING_VERSION="1.9.1-STAGING" PROJECT="multicloud" IMAGE="framework-artifactbroker" DOCKER_REPOSITORY="nexus3.onap.org:10003" diff --git a/artifactbroker/packages/pom.xml b/artifactbroker/packages/pom.xml index da618fc..36d2d60 100644 --- a/artifactbroker/packages/pom.xml +++ b/artifactbroker/packages/pom.xml @@ -24,7 +24,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT multicloud-framework-artifactbroker-package @@ -126,7 +126,7 @@ org.apache.maven.plugins maven-antrun-plugin - 1.6 + 3.0.0 install diff --git a/artifactbroker/packages/src/main/resources/etc/defaultConfig.json b/artifactbroker/packages/src/main/resources/etc/defaultConfig.json index 1e9221a..adfcdac 100644 --- a/artifactbroker/packages/src/main/resources/etc/defaultConfig.json +++ b/artifactbroker/packages/src/main/resources/etc/defaultConfig.json @@ -27,10 +27,7 @@ "sdcConfiguration":{ "parameterClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandlerConfigurationParameterGroup", "parameters":{ - "asdcAddress": "sdc-be.onap:8443", - "messageBusAddress": [ - "message-router.onap" - ], + "sdcAddress": "sdc-be.onap:8443", "user": "policy", "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U", "pollingInterval":20, @@ -40,7 +37,8 @@ "TOSCA_CSAR", "HEAT", "HEAT_ENV", - "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT" + "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT", + "HELM" ], "consumerGroup": "policy-group", "environmentName": "AUTO", @@ -48,7 +46,11 @@ "keystorePassword": "null", "activeserverTlsAuth": false, "isFilterinEmptyResources": true, - "isUseHttpsWithDmaap": false + "isUseHttpsWithSDC": true, + "httpsproxyHost": "null", + "httpproxyHost": "null", + "httpsproxyPort": 8181, + "httpproxyPort": 8080 } } }, diff --git a/artifactbroker/packages/src/main/resources/etc/logback.xml b/artifactbroker/packages/src/main/resources/etc/logback.xml index e2d4869..1567a9c 100644 --- a/artifactbroker/packages/src/main/resources/etc/logback.xml +++ b/artifactbroker/packages/src/main/resources/etc/logback.xml @@ -242,6 +242,7 @@ + diff --git a/artifactbroker/plugins/forwarding-plugins/pom.xml b/artifactbroker/plugins/forwarding-plugins/pom.xml index a102eae..d0efd65 100644 --- a/artifactbroker/plugins/forwarding-plugins/pom.xml +++ b/artifactbroker/plugins/forwarding-plugins/pom.xml @@ -22,7 +22,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker-plugins - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT multicloud-framework-artifactbroker-forwarding-plugins diff --git a/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarder.java b/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarder.java index 8ad07df..b63fea0 100644 --- a/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarder.java +++ b/artifactbroker/plugins/forwarding-plugins/src/main/java/org/onap/policy/distribution/forwarding/k8s/K8sArtifactForwarder.java @@ -66,6 +66,7 @@ public class K8sArtifactForwarder implements ArtifactForwarder { private static final Logger LOGGER = FlexLogger.getLogger(K8sArtifactForwarder.class); private static final String BASE_PATH = "http://localhost:9015/v1/rb/definition"; private static final String CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT = "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT"; + private static final String HELM_ARTIFACT = "HELM"; private Map artifactMap; private K8sArtifactForwarderParameterGroup configurationParameters = null; @@ -112,10 +113,11 @@ public class K8sArtifactForwarder implements ArtifactForwarder { Map map = new LinkedHashMap(); map.put("rb-name", vfModule.getVfModuleModelInvariantUUID()); - map.put("rb-version", vfModule.getVfModuleModelUUID()); + map.put("rb-version", vfModule.getVfModuleModelCustomizationUUID()); map.put("descritpion",vfModule.getVfModuleModelDescription()); Map labelMap = new LinkedHashMap(); - labelMap.put("vnf_customization_uuid",vfModule.getVfModuleModelCustomizationUUID()); + labelMap.put("vf_module_model_uuid",vfModule.getVfModuleModelUUID()); + labelMap.put("vf_module_model_name",vfModule.getVfModuleModelName()); map.put("labels", labelMap); String json = gson.toJson(map); @@ -131,7 +133,7 @@ public class K8sArtifactForwarder implements ArtifactForwarder { private boolean uploadArtifact(VfModuleModel vfModule) { String url = BASE_PATH + "/" + vfModule.getVfModuleModelInvariantUUID() + "/" - + vfModule.getVfModuleModelUUID() + "/content"; + + vfModule.getVfModuleModelCustomizationUUID() + "/content"; HttpPost httpPost = new HttpPost(url); httpPost.addHeader("content-type", "application/x-www-form-urlencoded;charset=utf-8"); @@ -154,23 +156,35 @@ public class K8sArtifactForwarder implements ArtifactForwarder { boolean found = false; for (String artifact: artifacts) { - if ( artifactMap.get(artifact) != null - && artifactMap.get(artifact).getArtifactType().equals("CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT")) { - if ( cloudArtifactCount == 0 ) - firstCloudArtifact = artifactMap.get(artifact); - cloudArtifactCount++; - IArtifactInfo tmpArtifact = artifactMap.get(artifact); - if ( tmpArtifact.getArtifactName().toLowerCase().startsWith(vfNamePrefix) ) { - cloudArtifact = tmpArtifact; - found = true; - break; - } + if (artifactMap.get(artifact) != null + && artifactMap.get(artifact).getArtifactType().equals(HELM_ARTIFACT)) { + firstCloudArtifact = artifactMap.get(artifact); + cloudArtifact = firstCloudArtifact; + cloudArtifactCount = 1; + found = true; + break; } } + if ( found == false ) + for (String artifact: artifacts) { + if ( artifactMap.get(artifact) != null + && artifactMap.get(artifact).getArtifactType().equals(CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT)) { + if ( cloudArtifactCount == 0 ) + firstCloudArtifact = artifactMap.get(artifact); + cloudArtifactCount++; + IArtifactInfo tmpArtifact = artifactMap.get(artifact); + if ( tmpArtifact.getArtifactName().toLowerCase().startsWith(vfNamePrefix) ) { + cloudArtifact = tmpArtifact; + found = true; + break; + } + } + } + if ( found == false ) { if ( firstCloudArtifact == null ) { - System.out.println(" meets error , no CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT type found "); + System.out.println(" meets error , no CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT or HELM type found "); return false; } else { if ( cloudArtifactCount == 1 || vfNamePrefix == "" ) { diff --git a/artifactbroker/plugins/pom.xml b/artifactbroker/plugins/pom.xml index 54abc1e..717a612 100644 --- a/artifactbroker/plugins/pom.xml +++ b/artifactbroker/plugins/pom.xml @@ -22,7 +22,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT multicloud-framework-artifactbroker-plugins diff --git a/artifactbroker/plugins/reception-plugins/pom.xml b/artifactbroker/plugins/reception-plugins/pom.xml index b81aeb7..ab2e5fa 100644 --- a/artifactbroker/plugins/reception-plugins/pom.xml +++ b/artifactbroker/plugins/reception-plugins/pom.xml @@ -22,7 +22,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker-plugins - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT multicloud-framework-artifactbroker-reception-plugins @@ -38,13 +38,6 @@ org.onap.sdc.sdc-distribution-client sdc-distribution-client - 1.3.0 - - - org.slf4j - slf4j-log4j12 - - diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java index 04c978b..cc30f40 100644 --- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java +++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcConfiguration.java @@ -41,13 +41,8 @@ public class SdcConfiguration implements IConfiguration { } @Override - public String getAsdcAddress() { - return configParameters.getAsdcAddress(); - } - - @Override - public List getMsgBusAddress() { - return configParameters.getMessageBusAddress(); + public String getSdcAddress() { + return configParameters.getSdcAddress(); } @Override @@ -111,7 +106,27 @@ public class SdcConfiguration implements IConfiguration { } @Override - public Boolean isUseHttpsWithDmaap() { - return configParameters.isUseHttpsWithDmaap(); + public Boolean isUseHttpsWithSDC() { + return configParameters.isUseHttpsWithSDC(); + } + + @Override + public int getHttpsProxyPort() { + return configParameters.getHttpsProxyPort(); + } + + @Override + public String getHttpsProxyHost() { + return configParameters.getHttpsProxyHost(); + } + + @Override + public String getHttpProxyHost() { + return configParameters.getHttpProxyHost(); + } + + @Override + public int getHttpProxyPort() { + return configParameters.getHttpProxyPort(); } } diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java index 65305c1..24a27c9 100644 --- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java +++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterBuilder.java @@ -31,18 +31,21 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { private boolean activeserverTlsAuth; private boolean filterinEmptyResources; - private boolean useHttpsWithDmaap; + private boolean useHttpsWithSDC; private int pollingTimeout; private int pollingInterval; private String user; private String password; private String consumerId; private String consumerGroup; - private String asdcAddress; + private String sdcAddress; private String environmentName; private String keystorePath; private String keystorePassword; - private List messageBusAddress; + private int httpsproxyPort; + private int httpproxyPort; + private String httpsproxyHost; + private String httpproxyHost; private List artifactTypes; private int retryDelay; @@ -67,16 +70,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { return this; } - /** - * Set useHttpsWithDmaap to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. - * - * @param useHttpsWithDmaap the useHttpsWithDmaap - */ - public SdcReceptionHandlerConfigurationParameterBuilder setUseHttpsWithDmaap(final Boolean useHttpsWithDmaap) { - this.useHttpsWithDmaap = useHttpsWithDmaap; - return this; - } - /** * Set pollingInterval to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. * @@ -98,12 +91,12 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { } /** - * Set asdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * Set sdcAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. * - * @param asdcAddress the asdcAddress + * @param sdcAddress the sdcAddress */ - public SdcReceptionHandlerConfigurationParameterBuilder setAsdcAddress(final String asdcAddress) { - this.asdcAddress = asdcAddress; + public SdcReceptionHandlerConfigurationParameterBuilder setSdcAddress(final String sdcAddress) { + this.sdcAddress = sdcAddress; return this; } @@ -177,16 +170,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { return this; } - /** - * Set messageBusAddress to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. - * - * @param messageBusAddress the messageBusAddress - */ - public SdcReceptionHandlerConfigurationParameterBuilder setMessageBusAddress(final List messageBusAddress) { - this.messageBusAddress = messageBusAddress; - return this; - } - /** * Set artifactTypes to this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. * @@ -227,12 +210,12 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { } /** - * Returns the isUseHttpsWithDmaap flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * Returns the isUseHttpsWithSDC flag of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. * - * @return the isUseHttpsWithDmaap + * @return the isUseHttpsWithSDC */ - public Boolean getIsUseHttpsWithDmaap() { - return useHttpsWithDmaap; + public Boolean getIsUseHttpsWithSDC() { + return useHttpsWithSDC; } /** @@ -256,10 +239,10 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { /** * Returns the asdc address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. * - * @return the asdcAddress + * @return the sdcAddress */ - public String getAsdcAddress() { - return asdcAddress; + public String getSdcAddress() { + return sdcAddress; } /** @@ -325,15 +308,6 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { return keystorePassword; } - /** - * Returns the message bus address of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. - * - * @return the messageBusAddress - */ - public List getMessageBusAddress() { - return messageBusAddress; - } - /** * Returns the artifact types of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. * @@ -351,7 +325,38 @@ public class SdcReceptionHandlerConfigurationParameterBuilder { public int getRetryDelay() { return retryDelay; } - + /** + * Returns the https proxy port of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the httpsproxyPort + */ + public int getHttpsProxyPort() { + return httpsproxyPort; + } + /** + * Returns the https proxy host of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the httpsproxyHost + */ + public String getHttpsProxyHost() { + return httpsproxyHost; + } + /** + * Returns the http proxy port of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the httpproxyPort + */ + public int getHttpProxyPort() { + return httpproxyPort; + } + /** + * Returns the http proxy host of this {@link SdcReceptionHandlerConfigurationParameterBuilder} instance. + * + * @return the httpsproxyHost + */ + public String getHttpProxyHost() { + return httpproxyHost; + } } diff --git a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java index 6746dc3..16cb612 100644 --- a/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java +++ b/artifactbroker/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/SdcReceptionHandlerConfigurationParameterGroup.java @@ -33,22 +33,25 @@ import org.onap.policy.distribution.reception.parameters.ReceptionHandlerConfigu */ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHandlerConfigurationParameterGroup { - private String asdcAddress; - private List messageBusAddress; - private String user; - private String password; - private int pollingInterval; - private int pollingTimeout; - private int retryDelay; - private String consumerId; - private List artifactTypes; - private String consumerGroup; - private String environmentName; - private String keyStorePath; - private String keyStorePassword; - private boolean activeServerTlsAuth; - private boolean isFilterInEmptyResources; - private boolean isUseHttpsWithDmaap; + private final String sdcAddress; + private final String user; + private final String password; + private final int pollingInterval; + private final int pollingTimeout; + private final int retryDelay; + private final int httpsProxyPort; + private final int httpProxyPort; + private final String httpsProxyHost; + private final String httpProxyHost; + private final String consumerId; + private final List artifactTypes; + private final String consumerGroup; + private final String environmentName; + private final String keyStorePath; + private final String keyStorePassword; + private final boolean activeServerTlsAuth; + private final boolean isFilterInEmptyResources; + private final boolean isUseHttpsWithSDC; /** * The constructor for instantiating {@link SdcReceptionHandlerConfigurationParameterGroup} class. @@ -57,13 +60,16 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan */ public SdcReceptionHandlerConfigurationParameterGroup( final SdcReceptionHandlerConfigurationParameterBuilder builder) { - asdcAddress = builder.getAsdcAddress(); - messageBusAddress = builder.getMessageBusAddress(); + sdcAddress = builder.getSdcAddress(); user = builder.getUser(); password = builder.getPassword(); pollingInterval = builder.getPollingInterval(); pollingTimeout = builder.getPollingTimeout(); retryDelay = builder.getRetryDelay(); + httpsProxyPort = builder.getHttpsProxyPort(); + httpsProxyHost = builder.getHttpsProxyHost(); + httpProxyPort = builder.getHttpProxyPort(); + httpProxyHost = builder.getHttpProxyHost(); consumerId = builder.getConsumerId(); artifactTypes = builder.getArtifactTypes(); consumerGroup = builder.getConsumerGroup(); @@ -72,16 +78,12 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan keyStorePassword = builder.getKeystorePassword(); activeServerTlsAuth = builder.isActiveserverTlsAuth(); isFilterInEmptyResources = builder.isFilterinEmptyResources(); - isUseHttpsWithDmaap = builder.getIsUseHttpsWithDmaap(); + isUseHttpsWithSDC = builder.getIsUseHttpsWithSDC(); } - public String getAsdcAddress() { - return asdcAddress; - } - - public List getMessageBusAddress() { - return messageBusAddress; + public String getSdcAddress() { + return sdcAddress; } public String getUser() { @@ -136,8 +138,24 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan return isFilterInEmptyResources; } - public boolean isUseHttpsWithDmaap() { - return isUseHttpsWithDmaap; + public boolean isUseHttpsWithSDC() { + return isUseHttpsWithSDC; + } + + public int getHttpsProxyPort() { + return httpsProxyPort; + } + + public String getHttpsProxyHost() { + return httpsProxyHost; + } + + public int getHttpProxyPort() { + return httpProxyPort; + } + + public String getHttpProxyHost() { + return httpProxyHost; } /** @@ -146,7 +164,7 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan @Override public GroupValidationResult validate() { final GroupValidationResult validationResult = new GroupValidationResult(this); - validateStringElement(validationResult, asdcAddress, "asdcAddress"); + validateStringElement(validationResult, sdcAddress, "sdcAddress"); validateStringElement(validationResult, user, "user"); validateStringElement(validationResult, consumerId, "consumerId"); validateStringElement(validationResult, consumerGroup, "consumerGroup"); @@ -155,7 +173,6 @@ public class SdcReceptionHandlerConfigurationParameterGroup extends ReceptionHan validateIntElement(validationResult, pollingInterval, "pollingInterval"); validateIntElement(validationResult, pollingTimeout, "pollingTimeout"); validateIntElement(validationResult, retryDelay, "retryDelay"); - validateStringListElement(validationResult, messageBusAddress, "messageBusAddress"); validateStringListElement(validationResult, artifactTypes, "artifactTypes"); return validationResult; } diff --git a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java index f9a65c5..d4f029f 100644 --- a/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java +++ b/artifactbroker/plugins/reception-plugins/src/test/java/org/onap/policy/distribution/reception/handling/sdc/TestSdcReceptionHandlerConfigurationParameterGroup.java @@ -54,9 +54,8 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup { final GroupValidationResult validationResult = configParameters.validate(); assertTrue(validationResult.isValid()); final SdcConfiguration config = new SdcConfiguration(configParameters); - assertEquals(Arrays.asList("a.com", "b.com", "c.com"), config.getMsgBusAddress()); - assertEquals(Arrays.asList("TOSCA_CSAR", "HEAT"), config.getRelevantArtifactTypes()); - assertEquals("localhost", config.getAsdcAddress()); + assertEquals(Arrays.asList("TOSCA_CSAR", "HEAT", "HELM"), config.getRelevantArtifactTypes()); + assertEquals("localhost", config.getSdcAddress()); assertEquals("policy", config.getUser()); assertEquals("policy", config.getPassword()); assertEquals(20, config.getPollingInterval()); @@ -68,7 +67,6 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup { assertEquals("null", config.getKeyStorePassword()); assertEquals(false, config.activateServerTLSAuth()); assertEquals(true, config.isFilterInEmptyResources()); - assertEquals(false, config.isUseHttpsWithDmaap()); } @Test @@ -89,19 +87,18 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup { public void testSdcConfigurationBuilder() { final SdcReceptionHandlerConfigurationParameterBuilder builder = - new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost") + new SdcReceptionHandlerConfigurationParameterBuilder().setSdcAddress("localhost") .setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST") .setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy") .setPollingInterval(10).setPollingTimeout(20).setRetryDelay(30).setUser("policy") - .setUseHttpsWithDmaap(false).setActiveserverTlsAuth(false).setFilterinEmptyResources(true) - .setArtifactTypes(Arrays.asList("TOSCA_CSAR")).setMessageBusAddress(Arrays.asList("localhost")); + .setActiveserverTlsAuth(false).setFilterinEmptyResources(true) + .setArtifactTypes(Arrays.asList("TOSCA_CSAR")); final SdcReceptionHandlerConfigurationParameterGroup configParameters = new SdcReceptionHandlerConfigurationParameterGroup(builder); configParameters.setName("SDCConfiguration"); - assertEquals(Arrays.asList("localhost"), configParameters.getMessageBusAddress()); assertEquals(Arrays.asList("TOSCA_CSAR"), configParameters.getArtifactTypes()); - assertEquals("localhost", configParameters.getAsdcAddress()); + assertEquals("localhost", configParameters.getSdcAddress()); assertEquals("policy", configParameters.getUser()); assertEquals("policy", configParameters.getPassword()); assertEquals(10, configParameters.getPollingInterval()); @@ -114,41 +111,18 @@ public class TestSdcReceptionHandlerConfigurationParameterGroup { assertEquals("password", configParameters.getKeyStorePassword()); assertEquals(false, configParameters.isActiveServerTlsAuth()); assertEquals(true, configParameters.isFilterInEmptyResources()); - assertEquals(false, configParameters.isUseHttpsWithDmaap()); - } - - @Test - public void testSdcConfigurationWithNullList() { - - final SdcReceptionHandlerConfigurationParameterBuilder builder = - new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost") - .setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST") - .setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy") - .setPollingInterval(10).setPollingTimeout(20).setUser("policy").setUseHttpsWithDmaap(false) - .setActiveserverTlsAuth(false).setFilterinEmptyResources(true) - .setArtifactTypes(Arrays.asList("TOSCA_CSAR")).setMessageBusAddress(null); - final SdcReceptionHandlerConfigurationParameterGroup configParameters = - new SdcReceptionHandlerConfigurationParameterGroup(builder); - configParameters.setName("SDCConfiguration"); - - try { - configParameters.validate(); - fail("Test must throw an exception"); - } catch (final Exception exp) { - assertTrue(exp.getMessage().contains("collection parameter \"messageBusAddress\" is null")); - } } @Test public void testSdcConfigurationWithEmptyStringList() { final SdcReceptionHandlerConfigurationParameterBuilder builder = - new SdcReceptionHandlerConfigurationParameterBuilder().setAsdcAddress("localhost") + new SdcReceptionHandlerConfigurationParameterBuilder().setSdcAddress("localhost") .setConsumerGroup("policy-group").setConsumerId("policy-id").setEnvironmentName("TEST") .setKeystorePassword("password").setKeystorePath("dummyPath").setPassword("policy") - .setPollingInterval(10).setPollingTimeout(20).setUser("policy").setUseHttpsWithDmaap(false) + .setPollingInterval(10).setPollingTimeout(20).setUser("policy") .setActiveserverTlsAuth(false).setFilterinEmptyResources(true) - .setArtifactTypes(Arrays.asList("")).setMessageBusAddress(Arrays.asList("localhost")); + .setArtifactTypes(Arrays.asList("")); final SdcReceptionHandlerConfigurationParameterGroup configParameters = new SdcReceptionHandlerConfigurationParameterGroup(builder); configParameters.setName("SDCConfiguration"); diff --git a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json index 0bb936b..6f0d050 100644 --- a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json +++ b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdc.json @@ -1,11 +1,6 @@ { "name" : "parameterConfig1", - "asdcAddress": "localhost", - "messageBusAddress": [ - "a.com", - "b.com", - "c.com" - ], + "sdcAddress": "localhost", "user": "policy", "password": "policy", "pollingInterval":20, @@ -14,14 +9,14 @@ "consumerId": "policy-id", "artifactTypes": [ "TOSCA_CSAR", - "HEAT" + "HEAT", + "HELM" ], "consumerGroup": "policy-group", "environmentName": "TEST", "keyStorePath": "null", "keyStorePassword": "null", "activeServerTlsAuth": false, - "isFilterInEmptyResources": true, - "isUseHttpsWithDmaap": false + "isFilterInEmptyResources": true } diff --git a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json index 803fc41..2e41017 100644 --- a/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json +++ b/artifactbroker/plugins/reception-plugins/src/test/resources/handling-sdcInvalid.json @@ -1,11 +1,6 @@ { "name" : "parameterConfig1", - "asdcAddress": "", - "messageBusAddress": [ - "a.com", - "b.com", - "c.com" - ], + "sdcAddress": "", "user": "tbdsdc-1480", "password": "tbdsdc-1480", "pollingInterval":-1, @@ -13,14 +8,14 @@ "consumerId": "policy-id", "artifactTypes": [ "TOSCA_CSAR", - "HEAT" + "HEAT", + "HELM" ], "consumerGroup": "policy-group", "environmentName": "environmentName", "keyStorePath": "null", "keyStorePassword": "null", "activeserverTlsAuth": false, - "isFilterInEmptyResources": true, - "isUseHttpsWithDmaap": false + "isFilterInEmptyResources": true } diff --git a/artifactbroker/pom.xml b/artifactbroker/pom.xml index 54983ef..7cd8c94 100644 --- a/artifactbroker/pom.xml +++ b/artifactbroker/pom.xml @@ -17,12 +17,12 @@ org.onap.multicloud.framework multicloud-framework - 1.5.1-SNAPSHOT + 1.8.3-SNAPSHOT 4.0.0 org.onap.multicloud.framework multicloud-framework-artifactbroker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT pom multicloud-framework-artifactbroker artifact broker @@ -34,6 +34,11 @@ 1.2.3 1.3.4 1.3.5 + java + + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml + + 2.0.0 model @@ -43,6 +48,21 @@ plugins packages + + + + org.onap.sdc.sdc-distribution-client + sdc-distribution-client + ${sdc-dist-client-version} + + + org.slf4j + slf4j-log4j12 + + + + + junit @@ -51,14 +71,9 @@ test - org.slf4j - slf4j-ext - 1.8.0-beta2 - - - org.slf4j - slf4j-api - 1.7.25 + org.apache.logging.log4j + log4j-api + 2.16.0 ch.qos.logback @@ -88,7 +103,12 @@ com.fasterxml.jackson.core jackson-databind - 2.9.8 + 2.12.3 + + + com.fasterxml.jackson.core + jackson-core + 2.12.3 org.json @@ -128,6 +148,36 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-versions + + enforce + + + + + 3.0.5 + + + 11 + + + + + + org.jacoco jacoco-maven-plugin @@ -138,7 +188,7 @@ prepare-agent - ${sonar.jacoco.reportPath} + ${sonar.coverage.jacoco.xmlReportPaths} true @@ -149,7 +199,7 @@ report - ${sonar.jacoco.reportPath} + ${sonar.coverage.jacoco.xmlReportPaths} @@ -186,6 +236,13 @@ + + org.codehaus.mojo + versions-maven-plugin + + false + + @@ -208,7 +265,7 @@ prepare-agent - ${sonar.jacoco.reportPath} + ${sonar.coverage.jacoco.xmlReportPaths} @@ -218,7 +275,7 @@ report - ${sonar.jacoco.reportPath} + ${sonar.coverage.jacoco.xmlReportPaths} diff --git a/artifactbroker/reception/pom.xml b/artifactbroker/reception/pom.xml index 81589f1..8fc5683 100644 --- a/artifactbroker/reception/pom.xml +++ b/artifactbroker/reception/pom.xml @@ -22,7 +22,7 @@ org.onap.multicloud.framework multicloud-framework-artifactbroker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT multicloud-framework-artifactbroker-reception diff --git a/artifactbroker/reception/src/main/java/org/onap/policy/distribution/reception/parameters/ReceptionHandlerConfigurationParametersJsonAdapter.java b/artifactbroker/reception/src/main/java/org/onap/policy/distribution/reception/parameters/ReceptionHandlerConfigurationParametersJsonAdapter.java index 0890a2a..08c513c 100644 --- a/artifactbroker/reception/src/main/java/org/onap/policy/distribution/reception/parameters/ReceptionHandlerConfigurationParametersJsonAdapter.java +++ b/artifactbroker/reception/src/main/java/org/onap/policy/distribution/reception/parameters/ReceptionHandlerConfigurationParametersJsonAdapter.java @@ -26,16 +26,16 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import java.lang.reflect.Type; -import org.slf4j.ext.XLogger; -import org.slf4j.ext.XLoggerFactory; + +import org.onap.policy.common.logging.flexlogger.FlexLogger; +import org.onap.policy.common.logging.flexlogger.Logger; /** * This class deserialises reception handler parameters from JSON. */ public class ReceptionHandlerConfigurationParametersJsonAdapter implements JsonDeserializer { - private static final XLogger LOGGER = - XLoggerFactory.getXLogger(ReceptionHandlerConfigurationParametersJsonAdapter.class); + private static final Logger LOGGER = FlexLogger.getLogger(ReceptionHandlerConfigurationParametersJsonAdapter.class); private static final String PARAMETER_CLASS_NAME = "parameterClassName"; private static final String RECEPTION_HANDLER_PARAMETERS = "parameters"; diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..43ca5b6 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,3 @@ +/.tox +/_build/* +/__pycache__/* diff --git a/docs/MultiCloud-APIv0-Specification.rst b/docs/MultiCloud-APIv0-Specification.rst index 244fcd8..57fa3b7 100644 --- a/docs/MultiCloud-APIv0-Specification.rst +++ b/docs/MultiCloud-APIv0-Specification.rst @@ -9,7 +9,7 @@ MultiCloud API v0 Specification API in json swagger =================== -":download:`MultiCloud Broker API v0 `" +`MultiCloud Broker API v0 `__ API Catalog =========== @@ -2657,14 +2657,14 @@ NA 400: failed 13.2. **Get registry status** -------------------------- +------------------------------ +---------------------+----------------------------------------------------------------------------------------------+ | **IF Definition** | **Description** | +=====================+==============================================================================================+ | URI | http://msb.onap.org:80/api/multicloud/v0/{cloud-owner}_{cloud-region}/registry | +---------------------+----------------------------------------------------------------------------------------------+ -| Operation | GET | +| Operation | GET | +---------------------+----------------------------------------------------------------------------------------------+ | Direction | ESR-> MULTICLOUD | +---------------------+----------------------------------------------------------------------------------------------+ diff --git a/docs/MultiCloud-APIv1-Specification.rst b/docs/MultiCloud-APIv1-Specification.rst index e92736c..e68aa59 100644 --- a/docs/MultiCloud-APIv1-Specification.rst +++ b/docs/MultiCloud-APIv1-Specification.rst @@ -2315,7 +2315,7 @@ NA 400: failed 13.2. **Get registry status** -------------------------- +----------------------------- +---------------------+----------------------------------------------------------------------------------------------+ | **IF Definition** | **Description** | diff --git a/docs/MultiCloud-Administrator-Guide.rst b/docs/MultiCloud-Administrator-Guide.rst index ece596b..9a892a7 100644 --- a/docs/MultiCloud-Administrator-Guide.rst +++ b/docs/MultiCloud-Administrator-Guide.rst @@ -1,6 +1,7 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. _MultiCloud-Administrator-Guide: =================================== ONAP MultiCloud Administrator Guide diff --git a/docs/MultiCloud-K8sPlugin-APIv1-Specification.rst b/docs/MultiCloud-K8sPlugin-APIv1-Specification.rst new file mode 100644 index 0000000..24dd1ef --- /dev/null +++ b/docs/MultiCloud-K8sPlugin-APIv1-Specification.rst @@ -0,0 +1,26 @@ +.. + This work is licensed under a Creative Commons Attribution 4.0 + International License. + +========================================= +MultiCloud K8sPlugin API v1 Specification +========================================= + +The is the specification for MultiCloud K8sPlugin API version v1. + +API Swagger +=========== + +The specification of the K8sPlugin v1 API in Swagger format: + +:download:`k8splugin-v1-api-swagger.json ` + +API Catalog +=========== + +.. warning:: + In the used Sphinx plugin `sphinxcontrib-swaggerdoc` some information of the swagger file is not + rendered completely, e.g. the request body. Use your favorite Swagger Editor and paste the swagger file + to get a complete view of the API reference, e.g. on https://editor.swagger.io/. + +.. swaggerv2doc:: k8splugin/k8splugin-v1-api-swagger.json diff --git a/docs/MultiCloud-Test-CSIT.rst b/docs/MultiCloud-Test-CSIT.rst index 145148e..d0ecf65 100644 --- a/docs/MultiCloud-Test-CSIT.rst +++ b/docs/MultiCloud-Test-CSIT.rst @@ -2,6 +2,8 @@ This work is licensed under a Creative Commons Attribution 4.0 International License. +:orphan: + =============================== ONAP MultiCloud CSIT Test Guide =============================== diff --git a/docs/Release Notes.rst b/docs/Release Notes.rst index a45f22a..f08eb5c 100644 --- a/docs/Release Notes.rst +++ b/docs/Release Notes.rst @@ -1,11 +1,310 @@ +.. _Release Notes: + .. This work is licensed under a Creative Commons Attribution 4.0 International License. +:orphan: + ============= Release Notes ============= + +Version: 7.0.0 (Guilin Release) +------------------------------- + +:Release Date: 2020-Nov-19 + +Guilin Release tag - 7.0.0 + +**New Features** + +* Enables CNF orchestration with artifact format of helm charts + +**The MultiCloud services consists of following components:** + +**MultiCloud Broker (version: 1.6.0)** + +* Fix bugs + + +**MultiCloud ArtifactBroker (version: 1.6.0)** + +* Enhanced to support Artifact format of Helm Chart +* Upgrade to Java11 + + +**MultiCloud FCAPS (version: 1.5.5)** + +* None + + +**MultiCloud Plugin for Wind River Titanium Cloud (version: 1.5.5)** + +* None + + +**MultiCloud Plugin for StarlingX (version: 1.5.5)** + +* None + + +**MultiCloud Plugin for OpenStack versions (version: 1.5.5)** + +* None + + + +**MultiCloud Plugin for Kubernetes (version: 0.7.0)** + +* Fix bugs + + +**Bug Fixes** + +- `MULTICLOUD-1195 `_ + Multicloud used wrong MSB URL + +**Known Issues** + +- `MULTICLOUD-359 `_ + MultiCloud OpenStack: image creating API cannot handle large image file + +- `MULTICLOUD-389 `_ + MultiCloud OpenStack: keypair cannot be passed for nova instance creation + +- `MULTICLOUD-421 `_ + MultiCloud OpenStack: API request to multicloud with authorization header will be rejected + +- `MULTICLOUD-601 `_ + MultiCloud k8s: move to sigs yaml from ghodss + +- `MULTICLOUD-661 `_ + MultiCloud k8s: OVN Installation issues + + +**Security Notes** + +*Fixed Security Issues* + + +*Known Security Issues* + + +*Known Vulnerabilities in Used Modules* + + +MULTICLOUD code has been formally scanned during build time using NexusIQ and +all Critical vulnerabilities have been addressed, items that remain open have +been assessed for risk and determined to be false positive. + +The MULTICLOUD open Critical security vulnerabilities and their risk +assessment have been documented as part of the +`project +`_. + + +Quick Links: + - `MULTICLOUD project page `_ + + - `Passing Badge information for MULTICLOUD `_ + + - `Project Vulnerability Review Table for Multicloud `_ + + - `Multicloud K8s Plugin Service APIs `_ + +**Upgrade Notes** + +None + +**Deprecation Notes** + +* The maintenance with regarding to MultiCloud plugin for Azure + has been stopped from Dublin Release. +* The maintenance with regarding to MultiCloud plugin for OpenStack Newton + has been stopped from Casablanca Release. +* The maintenance with regarding to MultiCloud plugin for OpenStack Ocata + has been stopped from El Alto Release. +* The maintenance with regarding to MultiCloud plugin for OpenStack Lenovo + has been stopped from El Alto Release. +* The maintenance with regarding to MultiCloud plugin for VMware VIO + has been stopped from Guilin Release. + +**Other** + +None + + +Version: 6.0.0 (Frankfurt Release) +----------------------------------- + +:Release Date: 2020-May-07 + +**New Features** + +* Enables CNF orchestration to StarlingX 3.0 +* Enables CNF orchestration to WRCP 19.12 +* Decouple OpenStack HPA discovery logic from OpenStack Plugins + + +**The MultiCloud services consists of following components:** + +**MultiCloud Broker (version: 1.5.2)** + +* Fix bugs + + +**MultiCloud ArtifactBroker (version: 1.5.2)** + +* None + + +**MultiCloud FCAPS (version: 1.4.1)** + +* None + + +**MultiCloud Plugin for Wind River Titanium Cloud (version: 1.5.5)** + +* Enables CNF orchestration to WRCP 19.12 + + +**MultiCloud Plugin for StarlingX (version: 1.5.5)** + +* Enables CNF orchestration to StarlingX 3.0 + + +**MultiCloud Plugin for OpenStack versions (version: 1.5.5)** + +* Pike: Decouple OpenStack HPA discovery logic from OpenStack Plugins + + +**MultiCloud Plugin for VIO (version 1.4.1)** + +* None + + +**MultiCloud Plugin for Azure (version 1.2.4)** + +* None + + +**MultiCloud Plugin for Kubernetes (version: 0.6.0)** + +* Replaced usage of vf module "model name/version name" in favor of "vf module model invariant/version uuid" for Resource Bundle naming, thus simplifying instantiation request's content +* Provided functionality of default Profiles allowing for instantiation of Resource Bundles without specifying profile when it's functionality is not needed +* Allowed providing instantiation-time override parameters to be merged into Resource Bundle's variables upon instantiation via oof/user/sdnc directives + + +**Bug Fixes** + +- `MULTICLOUD-602 `_ + MultiCloud WindRiver: Error when registering a cloud after deleting it + +- `MULTICLOUD-846 `_ + MultiCloud Pike: Query stack by infra_workload API returns false status + +- `MULTICLOUD-857 `_ + multicloud azure plugin failed to build due to incompatible with py3 + +- `MULTICLOUD-866 `_ + MultiCloud StarlingX: so openstack adapter not working with starlingx + +- `MULTICLOUD-869 `_ + Wrong distribution of K8s definitions with many vf-modules + +- `MULTICLOUD-968 `_ + the cloud region failed to be registered at second time + +- `MULTICLOUD-970 `_ + parsing of Region name is incorrect + +- `MULTICLOUD-1004 `_ + KUD Multi Vagrant 18.04 issue + +- `MULTICLOUD-1020 `_ + hpa docker failure + +- `MULTICLOUD-1025 `_ + Handle non-typical tar file inside k8splugin properly + +- `MULTICLOUD-1028 `_ + hpa capabilities is not define + +- `MULTICLOUD-1036 `_ + Correct multicloud artifact broker configuration for Frankfurt + +- `MULTICLOUD-1039 `_ + cloud region unregistry API failed to clean related cache entries + + +**Known Issues** + +- `MULTICLOUD-359 `_ + MultiCloud OpenStack: image creating API cannot handle large image file + +- `MULTICLOUD-389 `_ + MultiCloud OpenStack: keypair cannot be passed for nova instance creation + +- `MULTICLOUD-421 `_ + MultiCloud OpenStack: API request to multicloud with authorization header will be rejected + +- `MULTICLOUD-601 `_ + MultiCloud k8s: move to sigs yaml from ghodss + +- `MULTICLOUD-661 `_ + MultiCloud k8s: OVN Installation issues + + +**Security Notes** + +*Fixed Security Issues* + + +*Known Security Issues* + + +*Known Vulnerabilities in Used Modules* + + +MULTICLOUD code has been formally scanned during build time using NexusIQ and +all Critical vulnerabilities have been addressed, items that remain open have +been assessed for risk and determined to be false positive. + +The MULTICLOUD open Critical security vulnerabilities and their risk +assessment have been documented as part of the +`project +`_. + + +Quick Links: + - `MULTICLOUD project page `_ + + - `Passing Badge information for MULTICLOUD `_ + + - `Project Vulnerability Review Table for Multicloud `_ + + - `Multicloud K8s Plugin Service APIs `_ + +**Upgrade Notes** + +None + +**Deprecation Notes** + +* The maintenance with regarding to MultiCloud plugin for OpenStack Newton + has been stopped from Casablanca Release. +* The maintenance with regarding to MultiCloud plugin for OpenStack Ocata + has been stopped from El Alto Release. +* The maintenance with regarding to MultiCloud plugin for OpenStack Lenovo + has been stopped from El Alto Release. + +**Other** + +None + + Version: 5.0.1 (El Alto Release) ----------------------------------- @@ -477,7 +776,7 @@ been assessed for risk and determined to be false positive. The MULTICLOUD open Critical security vulnerabilities and their risk assessment have been documented as part of the -`project `_. +`project `__. Quick Links: @@ -485,9 +784,9 @@ Quick Links: - `Passing Badge information for MULTICLOUD `_ - - `Project Vulnerability Review Table for Multicloud `_ + - `Project Vulnerability Review Table for Multicloud `__ - - `Multicloud K8s Plugin Service APIs `_ + - `Multicloud K8s Plugin Service APIs `__ **Upgrade Notes** @@ -756,16 +1055,16 @@ all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The MULTICLOUD open Critical security vulnerabilities and their risk -assessment have been documented as part of the -`project `_. +assessment have been documented as part of the `project +`__. Quick Links: - `MULTICLOUD project page `_ - - `Passing Badge information for MULTICLOUD `_ + - `Passing Badge information for MULTICLOUD `__ - - `Project Vulnerability Review Table for Multicloud `_ + - `Project Vulnerability Review Table for Multicloud `__ **Upgrade Notes** diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css new file mode 100644 index 0000000..d03a26b --- /dev/null +++ b/docs/_static/css/ribbon.css @@ -0,0 +1,63 @@ +.ribbon { + z-index: 1000; + background-color: #a00; + overflow: hidden; + white-space: nowrap; + position: fixed; + top: 25px; + right: -50px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 0 10px #888; + -moz-box-shadow: 0 0 10px #888; + box-shadow: 0 0 10px #888; + + } + + .ribbon a { + border: 1px solid #faa; + color: #fff; + display: block; + font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 1px 0; + padding: 10px 50px; + text-align: center; + text-decoration: none; + text-shadow: 0 0 5px #444; + transition: 0.5s; + } + + .ribbon a:hover { + background: #c11; + color: #fff; + } + + + /* override table width restrictions */ + @media screen and (min-width: 767px) { + + .wy-table-responsive table td, .wy-table-responsive table th { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } + } + + @media screen and (max-width: 767px) { + .wy-table-responsive table td { + white-space: nowrap; + } + } + + /* fix width of the screen */ + + .wy-nav-content { + max-width: 800px; + } \ No newline at end of file diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100755 index 0000000..cb712eb Binary files /dev/null and b/docs/_static/favicon.ico differ diff --git a/docs/_static/logo_onap_2017.png b/docs/_static/logo_onap_2017.png new file mode 100644 index 0000000..5d064f4 Binary files /dev/null and b/docs/_static/logo_onap_2017.png differ diff --git a/docs/conf.py b/docs/conf.py index bab9649..2248321 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,40 +1,58 @@ -# -*- coding: utf-8 -*- -# 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 +roject = "onap" +release = "master" +version = "master" + +author = "Open Network Automation Platform" +# yamllint disable-line rule:line-length +copyright = "ONAP. Licensed under Creative Commons Attribution 4.0 International License" + +pygments_style = "sphinx" +html_theme = "sphinx_rtd_theme" +html_theme_options = { + "style_nav_header_background": "white", + "sticky_navigation": "False" } +html_logo = "_static/logo_onap_2017.png" +html_favicon = "_static/favicon.ico" +html_static_path = ["_static"] +html_show_sphinx = False + +extensions = [ + 'sphinx.ext.intersphinx', + 'sphinx.ext.graphviz', + 'sphinxcontrib.blockdiag', + 'sphinxcontrib.seqdiag', + 'sphinxcontrib.swaggerdoc', + 'sphinxcontrib.plantuml' +] + # -# http://www.apache.org/licenses/LICENSE-2.0 +# Map to 'latest' if this file is used in 'latest' (master) 'doc' branch. +# Change to {releasename} after you have created the new 'doc' branch. # -# 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. -import os -import sys +branch = 'latest' -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) +intersphinx_mapping = {} +doc_url = 'https://docs.onap.org/projects' +master_doc = 'index' -sys.path.insert(0, ROOT) -sys.path.insert(0, BASE_DIR) +exclude_patterns = ['.tox'] -# -- General configuration ---------------------------------------------------- +spelling_word_list_filename='spelling_wordlist.txt' +spelling_lang = "en_GB" -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = [ - 'sphinx.ext.autodoc', - #'sphinx.ext.intersphinx' -] +# +# Example: +# intersphinx_mapping['onap-aai-aai-common'] = ('{}/onap-aai-aai-common/en/%s'.format(doc_url) % branch, None) +# -# The suffix of source filenames. -source_suffix = '.rst' +html_last_updated_fmt = '%d-%b-%y %H:%M' -# The master toctree document. -master_doc = 'index' +def setup(app): + app.add_css_file("css/ribbon.css") -# General information about the project. -project = u'MultiCloud Framework' +linkcheck_ignore = [ + r'http:\.*', + r'https:\.*' + r'\.*' +] diff --git a/docs/index.rst b/docs/index.rst index f6de790..ae4b821 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,6 +1,7 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. _master_index: .. _index-multicloud: @@ -18,6 +19,7 @@ MultiCloud API MultiCloud-APIv0-Specification MultiCloud-APIv1-Specification + MultiCloud-K8sPlugin-APIv1-Specification MultiCloud Release Notes @@ -25,7 +27,7 @@ MultiCloud Release Notes .. toctree:: :maxdepth: 2 - Release Notes + release-notes MultiCloud Deployment diff --git a/docs/k8splugin/k8splugin-v1-api-swagger.json b/docs/k8splugin/k8splugin-v1-api-swagger.json new file mode 100644 index 0000000..79acd7e --- /dev/null +++ b/docs/k8splugin/k8splugin-v1-api-swagger.json @@ -0,0 +1,951 @@ +{ + "swagger": "2.0", + "info": { + "description": "K8s Plugin v1 API for ONAP Honolulu release", + "version": "0.8.0", + "title": "K8s Plugin v1 API", + "contact": { + "email": "ritu.sood@intel.com" + } + }, + "host": "multicloud-k8s:9015", + "basePath": "/v1", + "tags": [ + { + "name": "definition", + "description": "RB Definition management" + }, + { + "name": "profile", + "description": "RB Definition profile management" + }, + { + "name": "instance", + "description": "RB Instance management" + } + ], + "schemes": [ + "http" + ], + "paths": { + "/rb/definition": { + "post": { + "tags": [ + "definition" + ], + "summary": "Add a new RB Definition", + "description": "", + "operationId": "addRbDefinition", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "RB Definition object to create", + "required": true, + "schema": { + "$ref": "#/definitions/RbDefinition" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RbDefinition" + } + } + }, + "405": { + "description": "Invalid input" + } + } + }, + "get": { + "tags": [ + "definition" + ], + "summary": "Get all RB Definitions", + "description": "Multiple RB Definitions", + "operationId": "getRbDefinitions", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RbDefinition" + } + } + }, + "400": { + "description": "Invalid status value" + } + } + } + }, + "/rb/definition/{rbName}": { + "get": { + "tags": [ + "definition" + ], + "summary": "Get all RB Definitions of specified name", + "description": "Multiple RB Definitions", + "operationId": "getRbDefinitionsByName", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RbDefinition" + } + } + }, + "400": { + "description": "Invalid status value" + } + } + }, + "delete": { + "tags": [ + "definition" + ], + "summary": "Deletes RB Definitions of specified RB Name", + "description": "", + "operationId": "deleteRbDefinitionsByRbName", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + } + ], + "responses": { + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Definition not found" + } + } + } + }, + "/rb/definition/{rbName}/{rbVersion}": { + "get": { + "tags": [ + "definition" + ], + "summary": "Get RB Definition by Name and Version", + "description": "Returns a single RB Definition object", + "operationId": "getRbDefinitionByRbName", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition to return", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/RbDefinition" + } + }, + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Definition not found" + } + } + }, + "delete": { + "tags": [ + "definition" + ], + "summary": "Deletes RB Definition", + "description": "", + "operationId": "deleteRbDefinitionByRbNameAndRbVersion", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition to return", + "required": true, + "type": "string" + } + ], + "responses": { + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Definition not found" + } + } + } + }, + "/rb/definition/{rbName}/{rbVersion}/content": { + "post": { + "tags": [ + "definition" + ], + "summary": "Uploads Helm package associated with RB Definition", + "description": "", + "operationId": "uploadRbDefnitionContent", + "consumes": [ + "application/gzip" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition to return", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/ApiResponse" + } + } + } + } + }, + "/rb/definition/{rbName}/{rbVersion}/profile": { + "post": { + "tags": [ + "profile" + ], + "summary": "Add a new profile for RB Definition", + "description": "", + "operationId": "addProfileForDefinition", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "RB Profile object to create", + "required": true, + "schema": { + "$ref": "#/definitions/RbProfile" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RbProfile" + } + } + }, + "405": { + "description": "Invalid input" + } + } + }, + "get": { + "tags": [ + "profile" + ], + "summary": "Get all RB Profiles for RB Definition", + "description": "Multiple RB Definitions", + "operationId": "getProfilesforRbDefinitions", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition to return", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RbProfile" + } + } + }, + "400": { + "description": "Invalid status value" + } + } + } + }, + "/rb/definition/{rbName}/{rbVersion}/profile/{profileName}": { + "get": { + "tags": [ + "profile" + ], + "summary": "Get RB Profile by Name", + "description": "Returns a single RB Profile object", + "operationId": "getRbProfileForRbDefinition", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition to return", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the RB profile", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/RbProfile" + } + }, + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Profile not found" + } + } + }, + "delete": { + "tags": [ + "profile" + ], + "summary": "Deletes RB Profile", + "description": "", + "operationId": "deleteRbProfileForRbDefinition", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the RB profile", + "required": true, + "type": "string" + } + ], + "responses": { + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Definition of RB profile not found" + } + } + } + }, + "/rb/definition/{rbName}/{rbVersion}/profile/{profileName}/content": { + "post": { + "tags": [ + "profile" + ], + "summary": "Uploads tgz package associated with RB Profile", + "description": "", + "operationId": "uploadRbProfileContent", + "consumes": [ + "application/gzip" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rbName", + "in": "path", + "description": "Name of the RB Definition", + "required": true, + "type": "string" + }, + { + "name": "rbVersion", + "in": "path", + "description": "Version of the RB Definition", + "required": true, + "type": "string" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the RB profile", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/ApiResponse" + } + } + } + } + }, + "/instance": { + "post": { + "tags": [ + "instance" + ], + "summary": "Create new RB Instance", + "description": "", + "operationId": "createRbInstance", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "body", + "description": "RB Instance properties to create", + "required": true, + "schema": { + "$ref": "#/definitions/RbInstanceRequest" + } + } + ], + "responses": { + "405": { + "description": "Invalid input" + } + } + }, + "get": { + "tags": [ + "instance" + ], + "summary": "Get all RB Instances", + "description": "Multiple RB Instances", + "operationId": "getRbInstances", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/RbInstance" + } + } + }, + "400": { + "description": "Invalid status value" + } + } + } + }, + "/instance/{instanceId}": { + "get": { + "tags": [ + "instance" + ], + "summary": "Get RB Instance by ID", + "description": "Returns a single RB Instance object", + "operationId": "getRbInstanceById", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "instanceId", + "in": "path", + "description": "ID of the instance", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/RbInstance" + } + }, + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Definition not found" + } + } + }, + "delete": { + "tags": [ + "instance" + ], + "summary": "Deletes RB Instance", + "description": "", + "operationId": "deleteRbInstanceById", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "instanceId", + "in": "path", + "description": "ID of the instance", + "required": true, + "type": "string" + } + ], + "responses": { + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "Rb Instance not found" + } + } + } + }, + "/instance/{instanceId}/status": { + "get": { + "tags": [ + "instance" + ], + "summary": "Get RB Instance Status", + "description": "Returns status of a single RB Instance object", + "operationId": "getRbInstanceStatus", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "instanceId", + "in": "path", + "description": "ID of the instance", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/RbInstanceStatus" + } + }, + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Instance not found" + } + } + } + }, + "/instance/{instanceId}/query": { + "get": { + "tags": [ + "instance" + ], + "summary": "Get filtered out RB Instance status", + "description": "Returns filtered status of a single RB Instance object", + "operationId": "queryRbInstanceStatus", + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "instanceId", + "in": "path", + "description": "ID of the instance", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "ApiVersion", + "type": "string", + "description": "Resource ApiVersion like 'apps/v1'", + "required": true + }, + { + "in": "query", + "name": "Kind", + "type": "string", + "description": "Resource Kind like 'Deployment'", + "required": true + }, + { + "in": "query", + "name": "Name", + "type": "string", + "description": "Name of Resource like 'my-pod-1'", + "required": false + }, + { + "in": "query", + "name": "Labels", + "type": "string", + "description": "One or many pairs of label name/value data for filtering Resources like 'app=test,version=prod'", + "required": false + } + ], + "responses": { + "200": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/RbInstanceStatus" + } + }, + "400": { + "description": "Invalid identifiers supplied" + }, + "404": { + "description": "RB Instance not found" + } + } + } + } + }, + "definitions": { + "RbDefinition": { + "type": "object", + "properties": { + "rb-name": { + "type": "string" + }, + "rb-version": { + "type": "string" + }, + "chart-name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "example": { + "rb-name": "test", + "rb-version": "v1", + "chart-name": "nginx", + "description": "nginx definition", + "labels": [ + "some label" + ] + } + }, + "RbProfile": { + "type": "object", + "properties": { + "rb-name": { + "type": "string" + }, + "rb-version": { + "type": "string" + }, + "profile-name": { + "type": "string" + }, + "release-name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "kubernetes-version": { + "type": "string" + } + }, + "example": { + "rb-name": "test", + "rb-version": "v1", + "profile-name": "p1", + "release-name": "r1", + "namespace": "default", + "kubernetes-version": "12.0.1" + } + }, + "RbInstance": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "release-name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "request": { + "$ref": "#/definitions/RbInstanceRequest" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/RbInstanceResource" + } + } + } + }, + "RbInstanceStatus": { + "type": "object", + "properties": { + "ready": { + "type": "boolean" + }, + "request": { + "$ref": "#/definitions/RbInstanceRequest" + }, + "resourcesCount": { + "type": "integer" + }, + "resourcesStatus": { + "type": "array", + "items": { + "$ref": "#/definitions/RbInstanceResourceStatus" + } + } + } + }, + "RbInstanceResource": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "GVK": { + "$ref": "#/definitions/GVK" + } + }, + "example": { + "GVK": { + "Group": "apps", + "Kind": "Deployment", + "Version": "v1" + }, + "Name": "test-dep" + } + }, + "RbInstanceResourceStatus": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "GVK": { + "$ref": "#/definitions/GVK" + }, + "status": { + "type": "object" + } + }, + "example": { + "GVK": { + "Group": "apps", + "Kind": "Deployment", + "Version": "v1" + }, + "Name": "test-dep" + } + }, + "GVK": { + "type": "object", + "properties": { + "Group": { + "type": "string" + }, + "Version": { + "type": "string" + }, + "Kind": { + "type": "string" + } + }, + "example": { + "Group": "apps", + "Version": "v1", + "Kind": "Deployment" + } + }, + "RbInstanceRequest": { + "type": "object", + "properties": { + "rb-name": { + "type": "string" + }, + "rb-version": { + "type": "string" + }, + "profile-name": { + "type": "string" + }, + "release-name": { + "type": "string" + }, + "cloud-region": { + "type": "string" + }, + "labels": { + "type": "object" + }, + "override-values": { + "type": "object" + } + }, + "example": { + "cloud-region": "kus", + "profile-name": "p1", + "release-name": "release-x", + "rb-name": "test", + "rb-version": "v1", + "override-parameters": { + "optionalDictOfParameters": "andTheirValues, like", + "global.name": "dummy-name" + }, + "labels": { + "optionalLabelForInternalK8spluginInstancesMetadata": "dummy-value" + } + } + }, + "ApiResponse": { + "type": "string" + } + }, + "externalDocs": { + "description": "K8s Plugin v1 API - ONAP wiki", + "url": "https://wiki.onap.org/display/DW/MultiCloud+K8s-Plugin-service+API" + } +} \ No newline at end of file diff --git a/docs/multicloud-hpa-discovery-pluggable.rst b/docs/multicloud-hpa-discovery-pluggable.rst index ff330bb..8540bf3 100644 --- a/docs/multicloud-hpa-discovery-pluggable.rst +++ b/docs/multicloud-hpa-discovery-pluggable.rst @@ -2,6 +2,8 @@ .. http://creativecommons.org/licenses/by/4.0 .. Copyright (c) 2017-2018 VMware, Inc. +:orphan: + ================================== MultiCloud HPA Discovery Pluggable ================================== diff --git a/docs/multicloud-plugin-windriver/Tutorial-HPA-Provision-Discovery-WindRiver-TitaniumCloud.rst b/docs/multicloud-plugin-windriver/Tutorial-HPA-Provision-Discovery-WindRiver-TitaniumCloud.rst index 0480146..6e17aef 100644 --- a/docs/multicloud-plugin-windriver/Tutorial-HPA-Provision-Discovery-WindRiver-TitaniumCloud.rst +++ b/docs/multicloud-plugin-windriver/Tutorial-HPA-Provision-Discovery-WindRiver-TitaniumCloud.rst @@ -65,4 +65,4 @@ On-board the Titanium Cloud instance Now you can onboard this Titanium Cloud instance, make sure the multicloud registration process is triggered. -See :ref:`Tutorial: Onboard instance of Wind River Titanium Cloud ` +See `Tutorial: Onboard instance of Wind River Titanium Cloud` diff --git a/docs/release-notes.rst b/docs/release-notes.rst new file mode 100644 index 0000000..e0d3406 --- /dev/null +++ b/docs/release-notes.rst @@ -0,0 +1,174 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 + International License. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) ONAP Project and its contributors +.. _release_notes: + +************************ +MultiCloud Release Notes +************************ + +Abstract +======== + +This document provides the release notes for the ``jakarta`` release. + +Summary +======= + + +Version: 11.0.0 +--------------- + +There are no updates to the Multicloud project for the Kohn release + + +Release Data +============ + ++---------------------------+-------------------------------------------------+ +| **Project** | MultiCloud | +| | | ++---------------------------+-------------------------------------------------+ +| **Docker images** | onap/multicloud-framework:1.9.0 | +| | onap/multicloud-framework-artifactbroker:1.9.0 | +| | onap/multicloud-openstack-starlingx:1.5.7 | +| | onap/multicloud-openstack-windriver:1.5.7 | +| | onap/multicloud-openstack-fcaps:1.5.7 | +| | onap/multicloud-openstack-pike:1.5.7 | +| | onap/multicloud-k8s:0.10.1 | ++---------------------------+-------------------------------------------------+ +| **Release designation** | kohn | +| | | ++---------------------------+-------------------------------------------------+ + + +New features +------------ + +N/A + +**Bug fixes** + +N/A + +**Known Issues** + +- `MULTICLOUD-359 `_ + MultiCloud OpenStack: image creating API cannot handle large image file + +- `MULTICLOUD-421 `_ + MultiCloud OpenStack: API request to multicloud with authorization header will be rejected + +- `MULTICLOUD-601 `_ + MultiCloud k8s: move to sigs yaml from ghodss + +- `MULTICLOUD-1312 `_ + MultiCloud k8s: Query API returns 500 instead of 404 + +- `MULTICLOUD-1329 `_ + MultiCloud k8s: Redundant data in MongoDB created + +- `MULTICLOUD-1330 `_ + MultiCloud k8s: Consul operation interface problems + +- `MULTICLOUD-1331 `_ + MultiCloud k8s: Instance status update failure + +- `MULTICLOUD-1459 `_ + MultiCloud k8s: Multicloud-k8s dockers contain GPLv3 + +Deliverables +------------ + +Software Deliverables +~~~~~~~~~~~~~~~~~~~~~ + + +Documentation Deliverables +~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +Known Limitations, Issues and Workarounds +========================================= + +System Limitations +------------------ + +N/A + +Known Vulnerabilities +--------------------- + +MULTICLOUD code has been formally scanned during build time using NexusIQ and +all Critical vulnerabilities have been addressed, items that remain open have +been assessed for risk and determined to be false positive. + +The MULTICLOUD open Critical security vulnerabilities and their risk +assessment have been documented as part of the +`project +`_. + +Workarounds +----------- + +N/A + +Security Notes +-------------- + +**Fixed Security Issues** + +CVE issue pertained to multicloud-openstack components reported +by https://wiki.onap.org/display/SV/Istanbul+Multicloud +has been fixed by upgrading dependencies + +CVE issue pertained to multicloud-framework components reported +by https://wiki.onap.org/display/SV/Istanbul+Multicloud +has been fixed by upgrading dependencies + +**Known Security Issues** + + +Fixing of CVE issue pertained to multicloud-framework-artifactbroker components +reported by https://wiki.onap.org/display/SV/Istanbul+Multicloud +is an ongoing effort + + +Fixing of CVE issue pertained to multicloud-openstack-vmware components +reported by https://wiki.onap.org/display/SV/Istanbul+Multicloud +will not be fixed due to lack of commitment from community + + +Test Results +============ + +N/A + +References +========== + +For more information on the ONAP ``kohn`` release, please see: + +#. `ONAP Home Page`_ +#. `ONAP Documentation`_ +#. `ONAP Release Downloads`_ +#. `ONAP Wiki Page`_ + + +.. _`ONAP Home Page`: https://www.onap.org +.. _`ONAP Wiki Page`: https://wiki.onap.org +.. _`ONAP Documentation`: https://docs.onap.org +.. _`ONAP Release Downloads`: https://git.onap.org + + +Quick Links +=========== + + - `MULTICLOUD project page `_ + + - `Passing Badge information for MULTICLOUD `_ + + - `Project Vulnerability Review Table for Multicloud `_ + + - `Multicloud K8s Plugin Service APIs `_ diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt new file mode 100644 index 0000000..097282b --- /dev/null +++ b/docs/requirements-docs.txt @@ -0,0 +1,8 @@ +sphinx>=4.2.0 # BSD +sphinx-rtd-theme>=1.0.0 # MIT +sphinxcontrib-blockdiag # BSD +sphinxcontrib-seqdiag # BSD +sphinxcontrib-swaggerdoc +sphinxcontrib-spelling +sphinxcontrib-plantuml +six diff --git a/docs/specs/README.rst b/docs/specs/README.rst index b39c8d3..28714fb 100644 --- a/docs/specs/README.rst +++ b/docs/specs/README.rst @@ -1,3 +1,6 @@ + +:orphan: + INTRO ===== diff --git a/docs/specs/elastic_api_exposure.rst b/docs/specs/elastic_api_exposure.rst index 99061d7..a7a4ca2 100644 --- a/docs/specs/elastic_api_exposure.rst +++ b/docs/specs/elastic_api_exposure.rst @@ -1,6 +1,7 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. _offeredapis: ==================================== Elastic API exposure for Multi Cloud diff --git a/docs/specs/logging_enablement.rst b/docs/specs/logging_enablement.rst index 9f89443..4f4ac16 100644 --- a/docs/specs/logging_enablement.rst +++ b/docs/specs/logging_enablement.rst @@ -19,12 +19,12 @@ Problem Description So far the logging of multi-vim is not able to support customer configuration, handler context specific logging like -MDC[MDC_Document]_, also it dose't propagate transaction-ID in REST headers +MDC `MDC_Document`_ , also it dose't propagate transaction-ID in REST headers which is critical to tracing request. There are 4 python containers in oom project need to configure filebeat container for shipping logs. -.. [MDC_Document] https://wiki.onap.org/display/DW/ONAP+Application+Logging+Guidelines+v1.1#ONAPApplicationLoggingGuidelinesv1.1-MDCs +.. _MDC_Document: https://wiki.onap.org/display/DW/ONAP+Application+Logging+Guidelines+v1.1#ONAPApplicationLoggingGuidelinesv1.1-MDCs In addition the current logging is very difficult to understand behavior and performance. @@ -38,13 +38,13 @@ The proposed change will include three parts. Filebeat container ------------------ -Logging architecture[Log_Architecture]_ use Filebeat collects logs from +Logging architecture `Log_Architecture`_ use Filebeat collects logs from multi-vim containers and ships them to the centralized logging stack. To enable this feature it need to add Filebeat container in multi-vim pod that was deployed by OOM, as well Yaml file will be used to configure Filebeat. -.. [Log_Architecture] https://wiki.onap.org/display/DW/Logging+Architecture +.. _Log_Architecture: https://wiki.onap.org/display/DW/Logging+Architecture Tracing ID ---------- diff --git a/docs/specs/multicloud-container-plugin.rst b/docs/specs/multicloud-container-plugin.rst index 0c68a89..d7182cb 100644 --- a/docs/specs/multicloud-container-plugin.rst +++ b/docs/specs/multicloud-container-plugin.rst @@ -294,7 +294,7 @@ Request Body: ================== ========== ======= ======================================== There are several constraints/assumptions on cloudOwner and -cloudRegionId. `cloud-region`_ . For k8s, cloudRegionId is (ab)used to +cloudRegionId. For k8s, cloudRegionId is (ab)used to specify k8s cluster instance. ONAP admin has to assign unique id for cloudRegionId as id for k8s cluster instance. @@ -571,9 +571,9 @@ Past presentations/proposals ONAP components --------------- -.. _ESR: Extenral System Register https://wiki.onap.org/pages/viewpage.action?pageId=11930343#A&AI:ExternalSystemOperationAPIDefinition-VIM +.. _"ESR: External System Register" https://wiki.onap.org/pages/viewpage.action?pageId=11930343#A&AI:ExternalSystemOperationAPIDefinition-VIM .. _AAI: Active and Available Inventory https://wiki.onap.org/display/DW/Active+and+Available+Inventory+Project -.. _OOM: ONAP Operations Manager https://wiki.onap.org/display/DW/ONAP+Operations+Manager+Project +.. _"OOM: ONAP Operations Manager" https://wiki.onap.org/display/DW/ONAP+Operations+Manager+Project .. _ONAPREST: RESTful API Design Specification https://wiki.onap.org/display/DW/RESTful+API+Design+Specification kubernetes @@ -582,9 +582,9 @@ kubernetes .. _issue23: https://github.com/kubernetes/kubeadm/issues/23 -misc ----- -.. _cloud-region: How to add a new cloud region and some thoughts https://wiki.onap.org/download/attachments/25429038/HowToAddNewCloudRegionAndThoughts.pdf +.. misc +.. ---- +.. .. _cloud-region: How to add a new cloud region and some thoughts https://wiki.onap.org/download/attachments/25429038/HowToAddNewCloudRegionAndThoughts.pdf Contributors diff --git a/docs/specs/multicloud-secured-communication.rst b/docs/specs/multicloud-secured-communication.rst index 722e86b..c12290f 100644 --- a/docs/specs/multicloud-secured-communication.rst +++ b/docs/specs/multicloud-secured-communication.rst @@ -2,6 +2,8 @@ This work is licensed under a Creative Commons Attribution 4.0 International License. +:orphan: + ====================================================== MultiCloud security enhancement: secured communication ====================================================== diff --git a/docs/specs/multicloud4k8s-hpa-discovery.rst b/docs/specs/multicloud4k8s-hpa-discovery.rst index 4d90a8c..fccf9b5 100644 --- a/docs/specs/multicloud4k8s-hpa-discovery.rst +++ b/docs/specs/multicloud4k8s-hpa-discovery.rst @@ -2,6 +2,8 @@ .. http://creativecommons.org/licenses/by/4.0 .. Copyright (c) 2019 Intel, Inc. +:orphan: + ================================================= MultiCloud for k8s HPA Discovery And Registration ================================================= diff --git a/docs/specs/parallelism_improvement.rst b/docs/specs/parallelism_improvement.rst index 69f0fb8..6ebece3 100644 --- a/docs/specs/parallelism_improvement.rst +++ b/docs/specs/parallelism_improvement.rst @@ -2,6 +2,8 @@ This work is licensed under a Creative Commons Attribution 4.0 International License. +:orphan: + =============================================== Parallelism improvement of Multi Cloud Services =============================================== diff --git a/docs/tox.ini b/docs/tox.ini new file mode 100644 index 0000000..73e317e --- /dev/null +++ b/docs/tox.ini @@ -0,0 +1,31 @@ +[tox] +minversion = 1.6 +envlist = docs,docs-linkcheck,docs-spellcheck +skipsdist = true + +[testenv:docs] +basepython = python3.8 +deps = + -r{toxinidir}/requirements-docs.txt + -chttps://releases.openstack.org/constraints/upper/yoga + -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master +commands = + sphinx-build -q -b html -n -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/html + +[testenv:docs-linkcheck] +basepython = python3.8 +deps = + -r{toxinidir}/requirements-docs.txt + -chttps://releases.openstack.org/constraints/upper/yoga + -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master +commands = + sphinx-build -q -b linkcheck -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/linkcheck + +[testenv:docs-spellcheck] +basepython = python3.8 +deps = + -r{toxinidir}/requirements-docs.txt + -chttps://releases.openstack.org/constraints/upper/yoga + -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt?h=master +commands = + sphinx-build -q -b spelling -d {envtmpdir}/doctrees {toxinidir} {toxinidir}/_build/spellcheck diff --git a/multivimbroker/docker/Dockerfile b/multivimbroker/docker/Dockerfile index f12a875..8bcd6e5 100644 --- a/multivimbroker/docker/Dockerfile +++ b/multivimbroker/docker/Dockerfile @@ -1,4 +1,5 @@ -FROM python:3.7-alpine +#FROM python:3.8-alpine +FROM nexus3.onap.org:10001/onap/integration-python:9.1.0 ENV MSB_PROTO "http" ENV MSB_ADDR "127.0.0.1" @@ -8,20 +9,23 @@ ENV AAI_PORT "8443" ENV AAI_SCHEMA_VERSION "v11" ENV AAI_USERNAME "AAI" ENV AAI_PASSWORD "AAI" +ENV AAI_PROTOCOL "https" EXPOSE 9001 -RUN addgroup -S onap && adduser -S -G onap onap +# RUN addgroup -S onap && adduser -S -G onap onap +USER root COPY ./multicloud-framework-broker-*.zip /opt/multicloud-framework.zip RUN apk update && \ - apk add uwsgi wget unzip gcc make libc-dev libffi-dev openssl-dev && \ + apk add --no-cache uwsgi && \ + apk add --no-cache --virtual .build-deps wget unzip gcc make libc-dev libffi-dev openssl-dev && \ cd /opt/ && \ unzip -q -o -B multicloud-framework.zip && \ rm -f multicloud-framework.zip && \ pip3 install -r /opt/multivimbroker/requirements.txt && \ pip3 install -r /opt/multivimbroker/uwsgi-requirements.txt && \ - apk del wget unzip gcc make libc-dev libffi-dev openssl-dev && \ + apk del --no-network .build-deps && \ mkdir -p /var/log/onap/multicloud/multivimbroker && \ chown onap:onap /var/log/onap -R && \ chown onap:onap /opt/multivimbroker -R diff --git a/multivimbroker/docker/build_image.sh b/multivimbroker/docker/build_image.sh index 57b9106..f399646 100644 --- a/multivimbroker/docker/build_image.sh +++ b/multivimbroker/docker/build_image.sh @@ -17,8 +17,8 @@ cd ${DOCKER_BUILD_DIR} BUILD_ARGS="--no-cache" ORG="onap" -VERSION="1.5.1-SNAPSHOT" -STAGING_VERSION="1.5.1-STAGING" +VERSION="1.9.1-SNAPSHOT" +STAGING_VERSION="1.9.1-STAGING" PROJECT="multicloud" IMAGE="framework" DOCKER_REPOSITORY="nexus3.onap.org:10003" diff --git a/multivimbroker/docker/pecan/Dockerfile b/multivimbroker/docker/pecan/Dockerfile index 5230182..ae225b6 100644 --- a/multivimbroker/docker/pecan/Dockerfile +++ b/multivimbroker/docker/pecan/Dockerfile @@ -7,6 +7,7 @@ ENV AAI_PORT "8443" ENV AAI_SCHEMA_VERSION "v11" ENV AAI_USERNAME "AAI" ENV AAI_PASSWORD "AAI" +ENV AAI_PROTOCOL "https" EXPOSE 9001 diff --git a/multivimbroker/multivimbroker/middleware.py b/multivimbroker/multivimbroker/middleware.py deleted file mode 100644 index fd063c3..0000000 --- a/multivimbroker/multivimbroker/middleware.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2017-2018 VMware, Inc. -# -# 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. - - -import uuid -from onaplogging.mdcContext import MDC -from multivimbroker.pub.config.config import SERVICE_NAME -from multivimbroker.pub.config.config import FORWARDED_FOR_FIELDS - - -class LogContextMiddleware(object): - - # the last IP behind multiple proxies, if no exist proxies - # get local host ip. - def _getLastIp(self, request): - - ip = "" - try: - for field in FORWARDED_FOR_FIELDS: - if field in request.META: - if ',' in request.META[field]: - parts = request.META[field].split(',') - ip = parts[-1].strip().split(":")[0] - else: - ip = request.META[field].split(":")[0] - - if ip == "": - ip = request.META.get("HTTP_HOST").split(":")[0] - - except Exception: - pass - - return ip - - def process_request(self, request): - - # Fetch TRANSACTIONID Id and pass to plugin server - ReqeustID = request.META.get("HTTP_X_TRANSACTIONID", None) - if ReqeustID is None: - ReqeustID = str(uuid.uuid3(uuid.NAMESPACE_URL, SERVICE_NAME)) - request.META["HTTP_X_TRANSACTIONID"] = ReqeustID - MDC.put("requestID", ReqeustID) - # generate the unique id - InovocationID = str(uuid.uuid4()) - MDC.put("invocationID", InovocationID) - MDC.put("serviceName", SERVICE_NAME) - # access ip - MDC.put("serviceIP", self._getLastIp(request)) - - return None - - def process_response(self, request, response): - - MDC.clear() - return response diff --git a/multivimbroker/multivimbroker/pub/config/config.py b/multivimbroker/multivimbroker/pub/config/config.py index 350bc92..90c38ec 100644 --- a/multivimbroker/multivimbroker/pub/config/config.py +++ b/multivimbroker/multivimbroker/pub/config/config.py @@ -24,7 +24,8 @@ MSB_SERVICE_PORT = '10080' # [A&AI] AAI_ADDR = "aai.api.simpledemo.openecomp.org" AAI_PORT = "8443" -AAI_SERVICE_URL = 'https://%s:%s/aai' % (AAI_ADDR, AAI_PORT) +AAI_PROTOCOL = "https" +AAI_SERVICE_URL = '%s://%s:%s/aai' % (AAI_PROTOCOL, AAI_ADDR, AAI_PORT) AAI_SCHEMA_VERSION = "v13" AAI_USERNAME = 'AAI' AAI_PASSWORD = 'AAI' diff --git a/multivimbroker/multivimbroker/pub/config/log.yml b/multivimbroker/multivimbroker/pub/config/log.yml index 09be40d..bdcf2ad 100644 --- a/multivimbroker/multivimbroker/pub/config/log.yml +++ b/multivimbroker/multivimbroker/pub/config/log.yml @@ -11,16 +11,9 @@ handlers: level: "DEBUG" class: "logging.handlers.RotatingFileHandler" filename: "/var/log/onap/multicloud/multivimbroker/multivimbroker.log" - formatter: "mdcFormat" + formatter: "standard" maxBytes: 52428800 backupCount: 10 formatters: standard: format: "%(asctime)s|||||%(name)s||%(thread)||%(funcName)s||%(levelname)s||%(message)s" - mdcFormat: - format: "%(asctime)s|||||%(name)s||%(thread)s||%(funcName)s||%(levelname)s||%(message)s||||%(mdc)s \t" - mdcfmt: "{requestID} {invocationID} {serviceName} {serviceIP}" - datefmt: "%Y-%m-%d %H:%M:%S" - (): onaplogging.mdcformatter.MDCFormatter - - diff --git a/multivimbroker/multivimbroker/settings.py b/multivimbroker/multivimbroker/settings.py index d5cd466..850694e 100644 --- a/multivimbroker/multivimbroker/settings.py +++ b/multivimbroker/multivimbroker/settings.py @@ -12,9 +12,9 @@ import os import sys -from logging import config -from onaplogging import monkey -monkey.patch_all() +import platform +import yaml +from logging import config as log_config # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -51,7 +51,6 @@ MIDDLEWARE_CLASSES = [ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'multivimbroker.middleware.LogContextMiddleware', ] ROOT_URLCONF = 'multivimbroker.urls' @@ -82,15 +81,51 @@ TIME_ZONE = 'UTC' STATIC_URL = '/static/' - -LOGGING_CONFIG = None -# yaml configuration of logging -LOGGING_FILE = os.path.join(BASE_DIR, 'multivimbroker/pub/config/log.yml') -config.yamlConfig(filepath=LOGGING_FILE, watchDog=True) - +if platform.system() == 'Windows' or 'test' in sys.argv: + LOGGING = { + 'version': 1, + 'disable_existing_loggers': True, + 'formatters': { + 'standard': { + 'format': '%(asctime)s:[%(name)s]:[%(filename)s]' + + '-[%(lineno)d] [%(levelname)s]:%(message)s', + }, + }, + 'filters': { + }, + 'handlers': { + 'file_handler': { + 'level': 'DEBUG', + 'class': 'logging.handlers.RotatingFileHandler', + 'filename': os.path.join(BASE_DIR, 'logs/test.log'), + 'formatter': 'standard', + 'maxBytes': 1024 * 1024 * 50, + 'backupCount': 5, + }, + }, + + 'loggers': { + 'common': { + 'handlers': ['file_handler'], + 'level': 'DEBUG', + 'propagate': False + }, + } + } +else: + log_path = "/var/log/onap/multicloud/multivimbroker" + if not os.path.exists(log_path): + os.makedirs(log_path) + + LOGGING_CONFIG = None + # yaml configuration of logging + LOGGING_FILE = os.path.join(BASE_DIR, 'multivimbroker/pub/config/log.yml') + with open(file=LOGGING_FILE, mode='r', encoding="utf-8")as file: + logging_yaml = yaml.load(stream=file, Loader=yaml.FullLoader) + log_config.dictConfig(config=logging_yaml) if 'test' in sys.argv: - from multivimbroker.pub.config import config + # from multivimbroker.pub.config import config REST_FRAMEWORK = {} import platform diff --git a/multivimbroker/pom.xml b/multivimbroker/pom.xml index d20e2d3..b63ce14 100644 --- a/multivimbroker/pom.xml +++ b/multivimbroker/pom.xml @@ -18,12 +18,11 @@ org.onap.multicloud.framework multicloud-framework - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT 4.0.0 - org.onap.multicloud.framework multicloud-framework-broker - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT pom multicloud-framework-broker multivim broker diff --git a/multivimbroker/requirements.txt b/multivimbroker/requirements.txt index f417847..cadc98f 100644 --- a/multivimbroker/requirements.txt +++ b/multivimbroker/requirements.txt @@ -1,6 +1,6 @@ # rest framework -Django==2.2.3 -djangorestframework==3.9.3 +Django==3.2.7 +djangorestframework==3.12.4 # multipart support # poster==0.8.1 @@ -13,7 +13,7 @@ djangorestframework==3.9.3 # django-redis-cache==0.13.1 # for call rest api -httplib2==0.13.0 +httplib2==0.19.1 # for call openstack api # python-keystoneclient==3.6.0 @@ -26,8 +26,7 @@ httplib2==0.13.0 # mock==2.0.0 # unittest_xml_reporting==1.12.0 -# for onap logging -onappylog>=1.0.9 +PyYAML==5.4.1 # for pecan framework # pecan>=1.2.1 diff --git a/multivimbroker/run.sh b/multivimbroker/run.sh index 1079cf1..9dc4c9e 100755 --- a/multivimbroker/run.sh +++ b/multivimbroker/run.sh @@ -21,6 +21,7 @@ sed -i "s/AAI_PORT =.*/AAI_PORT = \"${AAI_PORT}\"/g" multivimbroker/pub/config/c sed -i "s/AAI_SCHEMA_VERSION =.*/AAI_SCHEMA_VERSION = \"${AAI_SCHEMA_VERSION}\"/g" multivimbroker/pub/config/config.py sed -i "s/AAI_USERNAME =.*/AAI_USERNAME = \"${AAI_USERNAME}\"/g" multivimbroker/pub/config/config.py sed -i "s/AAI_PASSWORD =.*/AAI_PASSWORD = \"${AAI_PASSWORD}\"/g" multivimbroker/pub/config/config.py +sed -i "s/AAI_PROTOCOL =.*/AAI_PROTOCOL = \"${AAI_PROTOCOL}\"/g" multivimbroker/pub/config/config.py logDir="/var/log/onap/multicloud/multivimbroker" if [ ! -x $logDir ]; then diff --git a/pom.xml b/pom.xml index b83ca4c..f9847db 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 4.0.0 org.onap.multicloud.framework multicloud-framework - 1.5.1-SNAPSHOT + 1.9.1-SNAPSHOT pom multicloud-framework multicloud broker diff --git a/releases/container-1.5.1.yaml b/releases/container-1.5.1.yaml new file mode 100644 index 0000000..74ca1b9 --- /dev/null +++ b/releases/container-1.5.1.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.5.1' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/259/' +ref: e6a4b2a5809b359397730f2ae3517a3ffc5204a4 +containers: + - name: 'multicloud/framework' + version: '1.5.1' + - name: 'multicloud/framework-artifactbroker' + version: '1.5.1' diff --git a/releases/container-1.6.0.yaml b/releases/container-1.6.0.yaml new file mode 100644 index 0000000..ca4041e --- /dev/null +++ b/releases/container-1.6.0.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.6.0' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/442/' +ref: a075855e21d2dccfdbc41d0180e202c98951f99e +containers: + - name: 'multicloud/framework' + version: '1.6.0' + - name: 'multicloud/framework-artifactbroker' + version: '1.6.0' diff --git a/releases/container-1.7.0.yaml b/releases/container-1.7.0.yaml new file mode 100644 index 0000000..bec9344 --- /dev/null +++ b/releases/container-1.7.0.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.7.0' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/757/' +ref: 169c89e0c403dad3e3e538ae92b46f12971aa20a +containers: + - name: 'multicloud/framework' + version: '1.7.0' + - name: 'multicloud/framework-artifactbroker' + version: '1.7.0' diff --git a/releases/container-1.7.1.yaml b/releases/container-1.7.1.yaml new file mode 100644 index 0000000..c0a0881 --- /dev/null +++ b/releases/container-1.7.1.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.7.1' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/806/' +ref: 311d1f0439e83698e626df392d743b4a20d4c256 +containers: + - name: 'multicloud/framework' + version: '1.7.1' + - name: 'multicloud/framework-artifactbroker' + version: '1.7.1' diff --git a/releases/container-1.7.2.yaml b/releases/container-1.7.2.yaml new file mode 100644 index 0000000..4de7b16 --- /dev/null +++ b/releases/container-1.7.2.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.7.2' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/897/' +ref: aee2986329a6ec2c6bf110b77f58eba7525645ed +containers: + - name: 'multicloud/framework' + version: '1.7.2' + - name: 'multicloud/framework-artifactbroker' + version: '1.7.2' diff --git a/releases/container-1.7.3.yaml b/releases/container-1.7.3.yaml new file mode 100644 index 0000000..08906ee --- /dev/null +++ b/releases/container-1.7.3.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.7.3' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/995/' +ref: f2a54b5dec59e27ebb57efb5ff88956fca96c986 +containers: + - name: 'multicloud/framework' + version: '1.7.3' + - name: 'multicloud/framework-artifactbroker' + version: '1.7.3' diff --git a/releases/container-1.8.0.yaml b/releases/container-1.8.0.yaml new file mode 100644 index 0000000..43e7329 --- /dev/null +++ b/releases/container-1.8.0.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.8.0' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/1119/' +ref: 2dd69c0d88813832699813f6f002f01d02566107 +containers: + - name: 'multicloud/framework' + version: '1.8.0' + - name: 'multicloud/framework-artifactbroker' + version: '1.8.0' diff --git a/releases/container-1.8.1.yaml b/releases/container-1.8.1.yaml new file mode 100644 index 0000000..5198de3 --- /dev/null +++ b/releases/container-1.8.1.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.8.1' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/1128/' +ref: 781e93f42dfd17296f2027547ab7b2286b596650 +containers: + - name: 'multicloud/framework' + version: '1.8.1' + - name: 'multicloud/framework-artifactbroker' + version: '1.8.1' diff --git a/releases/container-1.8.2.yaml b/releases/container-1.8.2.yaml new file mode 100644 index 0000000..ccb526a --- /dev/null +++ b/releases/container-1.8.2.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.8.2' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/1240/' +ref: b95e90ad1be8a8aa9c80b987d446010a9e34cc7a +containers: + - name: 'multicloud/framework' + version: '1.8.2' + - name: 'multicloud/framework-artifactbroker' + version: '1.8.2' diff --git a/releases/container-1.9.0.yaml b/releases/container-1.9.0.yaml new file mode 100644 index 0000000..dba9e49 --- /dev/null +++ b/releases/container-1.9.0.yaml @@ -0,0 +1,10 @@ +distribution_type: 'container' +container_release_tag: '1.9.0' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-docker-stage-master/1244/' +ref: e127b3c32c81390e0c8d928f1266360802fc7071 +containers: + - name: 'multicloud/framework' + version: '1.9.0' + - name: 'multicloud/framework-artifactbroker' + version: '1.9.0-SNAPSHOT' diff --git a/releases/maven-1.5.1.yaml b/releases/maven-1.5.1.yaml new file mode 100644 index 0000000..9bcd4ce --- /dev/null +++ b/releases/maven-1.5.1.yaml @@ -0,0 +1,4 @@ +distribution_type: 'maven' +version: '1.5.1' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-stage-master/335/' diff --git a/releases/maven-1.6.0.yaml b/releases/maven-1.6.0.yaml new file mode 100644 index 0000000..e9759fe --- /dev/null +++ b/releases/maven-1.6.0.yaml @@ -0,0 +1,4 @@ +distribution_type: 'maven' +version: '1.6.0' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-stage-master/518/' diff --git a/releases/maven-1.7.0.yaml b/releases/maven-1.7.0.yaml new file mode 100644 index 0000000..f8b5c37 --- /dev/null +++ b/releases/maven-1.7.0.yaml @@ -0,0 +1,4 @@ +distribution_type: 'maven' +version: '1.7.0' +project: 'multicloud-framework' +log_dir: 'multicloud-framework-maven-stage-master/833/' diff --git a/version.properties b/version.properties index f1ea5f1..e0453f1 100644 --- a/version.properties +++ b/version.properties @@ -18,7 +18,7 @@ # because they are used in Jenkins, whose plug-in doesn't support major=1 -minor=5 +minor=9 patch=1 base_version=${major}.${minor}.${patch}