Unverified Commit f5acdbd7 authored by Kevin Di Lallo's avatar Kevin Di Lallo Committed by GitHub
Browse files

Merge pull request #105 from dilallkx/kd_sp27_fix_gis

POA Selection Algorithm fixes + Build & deployment fixes
parents 3d0f2384 000e1c4a
Loading
Loading
Loading
Loading
+699 −698
Original line number Diff line number Diff line
@@ -29,7 +29,8 @@ repo:
    user:
      # user supplied frontend UI located @ .meep/user/frontend
      frontend: false
      # user supplied swagger UI located @ .meep/user/swagger
      # user supplied platform swagger UI located @ .meep/user/swagger
      # user supplied sandbox swagger UI located @ .meep/user/sandbox-swagger
      swagger: false

  #------------------------------
+7 −2
Original line number Diff line number Diff line
@@ -217,8 +217,13 @@ func processScenarioActivate() {
	// Sync with active scenario store
	ge.activeModel.UpdateScenario()

	// Retrieve & process Assets in active scenario
	assetList := ge.activeModel.GetNodeNames(mod.NodeTypeUE, mod.NodeTypePoa, mod.NodeTypePoaCell, mod.NodeTypeEdge, mod.NodeTypeFog, mod.NodeTypeCloud)
	// Retrieve & process POA and Compute Assets in active scenario
	assetList := ge.activeModel.GetNodeNames(mod.NodeTypePoa, mod.NodeTypePoaCell, mod.NodeTypeEdge, mod.NodeTypeFog, mod.NodeTypeCloud)
	addAssets(assetList)

	// Retrieve & process UE assets in active scenario
	// NOTE: Required to make sure initial UE selection takes all POAs into account
	assetList = ge.activeModel.GetNodeNames(mod.NodeTypeUE)
	addAssets(assetList)
}

+3 −3
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ func mePostEventQuery(w http.ResponseWriter, r *http.Request) {
	if len(valuesArray) == 0 {
		err := errors.New("No matching metrics found")
		log.Error(err.Error())
		http.Error(w, err.Error(), http.StatusNotFound)
		http.Error(w, err.Error(), http.StatusNoContent)
		return
	}

@@ -386,7 +386,7 @@ func mePostHttpQuery(w http.ResponseWriter, r *http.Request) {
	if len(valuesArray) == 0 {
		err := errors.New("No matching metrics found")
		log.Error(err.Error())
		http.Error(w, err.Error(), http.StatusNotFound)
		http.Error(w, err.Error(), http.StatusNoContent)
		return
	}

@@ -511,7 +511,7 @@ func mePostNetworkQuery(w http.ResponseWriter, r *http.Request) {
	if len(valuesArray) == 0 {
		err := errors.New("No matching metrics found")
		log.Error(err.Error())
		http.Error(w, err.Error(), http.StatusNotFound)
		http.Error(w, err.Error(), http.StatusNoContent)
		return
	}

+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ type Route struct {
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc

}
type Routes []Route

+8 −5
Original line number Diff line number Diff line
@@ -13,11 +13,14 @@ for file in /swagger/*-api.yaml; do
done

# Copy user-swagger & adapt basepath to sandbox
if [[ ! -z "${USER_SWAGGER}" ]]; then
    cp -r ${USER_SWAGGER} ${USER_SWAGGER_SANDBOX}
    shopt -s nullglob
    for file in ${USER_SWAGGER_SANDBOX}/*-api.yaml; do
        echo "Prepending [${MEEP_SANDBOX_NAME}] to basepath in: $file"
        sed -i 's,basePath: \"/\?,basePath: \"/'${MEEP_SANDBOX_NAME}'/,' $file;
    done
fi

# Update spec links in index.html
# sed -i 's,"url": "\([^"]*\)","url": "'${MEEP_HOST_URL}'/'${MEEP_SANDBOX_NAME}'/api/\1",g' /swagger/index.html
Loading