diff --git a/src/core/mcir/image.go b/src/core/mcir/image.go index 0abc06ecb..92f28451e 100644 --- a/src/core/mcir/image.go +++ b/src/core/mcir/image.go @@ -3,6 +3,7 @@ package mcir import ( "encoding/json" "fmt" + "net/url" "os" "strconv" @@ -348,7 +349,7 @@ func LookupImage(connConfig string, imageId string) (SpiderImageInfo, error) { if os.Getenv("SPIDER_CALL_METHOD") == "REST" { - url := common.SPIDER_REST_URL + "/vmimage/" + imageId + url := common.SPIDER_REST_URL + "/vmimage/" + url.QueryEscape(imageId) // Create Req body type JsonTemplate struct { diff --git a/test/official/6.image/registerImageWithId.sh b/test/official/6.image/registerImageWithId.sh index efb8422ed..648418753 100755 --- a/test/official/6.image/registerImageWithId.sh +++ b/test/official/6.image/registerImageWithId.sh @@ -21,7 +21,7 @@ source ../common-functions.sh getCloudIndex $CSP - curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NS_ID/resources/image?action=registerWithInfo -H 'Content-Type: application/json' -d \ + curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NS_ID/resources/image?action=registerWithId -H 'Content-Type: application/json' -d \ '{ "connectionName": "'${CONN_CONFIG[$INDEX,$REGION]}'", "name": "'${CONN_CONFIG[$INDEX,$REGION]}'-'${POSTFIX}'",