#!/bin/bash
+DIRNAME=`dirname $0`
+DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd`
+echo "DOCKER_BUILD_DIR=${DOCKER_BUILD_DIR}"
+cd ${DOCKER_BUILD_DIR}
-IMAGE="multicloud-framework"
-VERSION="latest"
+BUILD_ARGS="--no-cache"
+ORG="onap"
+VERSION="1.0.0-SNAPSHOT"
+PROJECT="multicloud"
+IMAGE="framework"
+DOCKER_REPOSITORY="nexus3.onap.org:10003"
+IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
-docker build -t ${IMAGE}:${VERSION} .
\ No newline at end of file
+if [ $HTTP_PROXY ]; then
+ BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}"
+fi
+if [ $HTTPS_PROXY ]; then
+ BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
+fi
+
+function build_image {
+ docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest .
+}
+
+function push_image {
+ docker push ${IMAGE_NAME}:${VERSION}
+ docker push ${IMAGE_NAME}:latest
+}
+
+build_image
+push_image
\ No newline at end of file
try:
url = getMultivimDriver(vimid, full_path=full_path)
-
except exceptions.VimBrokerException as e:
logging.exception("vimbroker exception: %s" % e)
return HttpResponse(e.content, status=e.status_code)
REG_TO_MSB_WHEN_START = False
REG_TO_MSB_REG_URL = "/api/microservices/v1/services"
REG_TO_MSB_REG_PARAM = {
- "serviceName": "multivim",
- "version": "v1",
+ "serviceName": "multicloud",
+ "version": "v0",
"url": "/api/multicloud/v0",
"protocol": "REST",
"visualRange": "1",
if vim and vim["type"] == "openstack":
if vim["version"] == "kilo":
- multivimdriver = "multivim-kilo"
+ multivimdriver = "multicloud-kilo"
elif vim["version"] == "newton":
- multivimdriver = "multivim-newton"
+ multivimdriver = "multicloud-newton"
else:
# if vim type is openstack, use latest "newton" version as default
- multivimdriver = "multivim-newton"
+ multivimdriver = "multicloud-newton"
elif vim and vim["type"] == "vmware":
- multivimdriver = "multivim-vio"
+ multivimdriver = "multicloud-vio"
else:
raise exceptions.NotFound("Not support VIM type")
return multivimdriver
def getMultivimDriver(vimid, full_path=""):
-
- multivim = "multivim"
+ multcloud = "multicloud"
vim = get_vim_by_id(vimid)
- if vim["type"] and vim["version"]:
- pass
-
- multivimdriver = findMultivimDriver(vim=vim)
- return re.sub(multivim, multivimdriver, full_path)
+ multclouddriver = findMultivimDriver(vim=vim)
+ return re.sub(multcloud, multclouddriver, full_path)
"version": "1.0.0",
"title": "MultiVIM Service rest API"
},
- "basePath": "/openoapi/multivim/v1/",
+ "basePath": "/api/multicloud/v0/",
"tags": [
{
"name": "MultiVIM services"
</plugin>
</plugins>
</build>
- <profiles>
- <profile>
- <id>docker</id>
- <build>
- <plugins>
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>0.16.5</version>
- <inherited>false</inherited>
- <configuration>
- <images>
- <image>
- <name>onap/multicloud/multicloud-framework</name>
- <build>
- <cleanup>try</cleanup>
- <dockerFileDir>${basedir}/docker/</dockerFileDir>
- <dockerFile>${basedir}/docker/Dockerfile</dockerFile>
- <tags>
- <tag>${project.version}-STAGING-latest</tag>
- </tags>
- </build>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>generate-images</id>
- <phase>package</phase>
- <goals>
- <goal>build</goal>
- </goals>
- </execution>
- <execution>
- <id>push-images</id>
- <phase>deploy</phase>
- <goals>
- <goal>build</goal>
- <goal>push</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
</project>
\ No newline at end of file