Commit a69b2843 authored by Simon Pastor's avatar Simon Pastor Committed by Kevin Di Lallo
Browse files

PR comments addressed

parent fabf32df
Loading
Loading
Loading
Loading
+10 −15
Original line number Diff line number Diff line
@@ -913,19 +913,14 @@ definitions:
        type: "string"
        description: "Type of the network element to be updated"
        enum:
        - "OPERATOR"
        - "POA"
        - "SCENARIO"
        - "ZONE-INTER-EDGE"
        - "ZONE-INTER-FOG"
        - "ZONE-EDGE-FOG"
        - "EDGE"
        - "FOG"
        - "UE"
        - "DISTANT-CLOUD"
        - "UE-APP"
        - "EDGE-APP"
        - "CLOUD-APP"
        - "INTER-DOMAIN"
        - "INTER-ZONE"
        - "INTER-EDGE"
        - "INTER-FOG"
        - "EDGE-FOG"
        - "TERMINAL-LINK"
        - "LINK"
        - "APP"
      latency:
        type: "integer"
        description: "Latency in ms"
@@ -944,9 +939,9 @@ definitions:
  EventMobility:
    type: "object"
    properties:
      src:
      elementName:
        type: "string"
        description: "Source element identifier"
        description: "Name of the network element to be updated"
      dest:
        type: "string"
        description: "Destination element identifier"
+19 −19
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@ func sendEventNetworkCharacteristics(event Event) (string, int) {
		for zIndex, z := range d.Zones {
			if elementFound {
				break
			} else if elementType == "ZONE-INTER-EDGE" && elementName == z.Name {
			} else if elementType == "INTER-EDGE" && elementName == z.Name {
				zone := &scenario.Deployment.Domains[dIndex].Zones[zIndex]
				zone.InterEdgeLatency = netChar.Latency
				zone.InterEdgeLatencyVariation = netChar.LatencyVariation
@@ -741,7 +741,7 @@ func sendEventNetworkCharacteristics(event Event) (string, int) {
				zone.InterEdgePacketLoss = netChar.PacketLoss
				elementFound = true
				break
			} else if elementType == "ZONE-INTER-FOG" && elementName == z.Name {
			} else if elementType == "INTER-FOG" && elementName == z.Name {
				zone := &scenario.Deployment.Domains[dIndex].Zones[zIndex]
				zone.InterFogLatency = netChar.Latency
				zone.InterFogLatencyVariation = netChar.LatencyVariation
@@ -749,7 +749,7 @@ func sendEventNetworkCharacteristics(event Event) (string, int) {
				zone.InterFogPacketLoss = netChar.PacketLoss
				elementFound = true
				break
			} else if elementType == "ZONE-EDGE-FOG" && elementName == z.Name {
			} else if elementType == "EDGE-FOG" && elementName == z.Name {
				zone := &scenario.Deployment.Domains[dIndex].Zones[zIndex]
				zone.EdgeFogLatency = netChar.Latency
				zone.EdgeFogLatencyVariation = netChar.LatencyVariation
@@ -774,22 +774,22 @@ func sendEventNetworkCharacteristics(event Event) (string, int) {
				// Parse Physical Locations
				for plIndex, pl := range nl.PhysicalLocations {
					if (elementType == "DISTANT CLOUD" || elementType == "EDGE" || elementType == "FOG" || elementType == "UE") && elementName == pl.Name {
						netloc := &scenario.Deployment.Domains[dIndex].Zones[zIndex].NetworkLocations[nlIndex].PhysicalLocations[plIndex]
						netloc.LinkLatency = netChar.Latency
						netloc.LinkLatencyVariation = netChar.LatencyVariation
						netloc.LinkThroughput = netChar.Throughput
						netloc.LinkPacketLoss = netChar.PacketLoss
						phyloc := &scenario.Deployment.Domains[dIndex].Zones[zIndex].NetworkLocations[nlIndex].PhysicalLocations[plIndex]
						phyloc.LinkLatency = netChar.Latency
						phyloc.LinkLatencyVariation = netChar.LatencyVariation
						phyloc.LinkThroughput = netChar.Throughput
						phyloc.LinkPacketLoss = netChar.PacketLoss
						elementFound = true
						break
					}
					// Parse Processes
					for procIndex, proc := range pl.Processes {
						if (elementType == "CLOUD APPLICATION" || elementType == "EDGE APPLICATION" || elementType == "UE APPLICATION") && elementName == proc.Name {
							netloc := &scenario.Deployment.Domains[dIndex].Zones[zIndex].NetworkLocations[nlIndex].PhysicalLocations[plIndex].Processes[procIndex]
							netloc.AppLatency = netChar.Latency
							netloc.AppLatencyVariation = netChar.LatencyVariation
							netloc.AppThroughput = netChar.Throughput
							netloc.AppPacketLoss = netChar.PacketLoss
							procloc := &scenario.Deployment.Domains[dIndex].Zones[zIndex].NetworkLocations[nlIndex].PhysicalLocations[plIndex].Processes[procIndex]
							procloc.AppLatency = netChar.Latency
							procloc.AppLatencyVariation = netChar.LatencyVariation
							procloc.AppThroughput = netChar.Throughput
							procloc.AppPacketLoss = netChar.PacketLoss
							elementFound = true
							break
						}
@@ -830,7 +830,7 @@ func sendEventMobility(event Event) (string, int) {
	}

	// Retrieve target name (src) and destination parent name
	srcName := event.EventMobility.Src
	elemName := event.EventMobility.ElementName
	destName := event.EventMobility.Dest

	var oldNL *NetworkLocation
@@ -847,7 +847,7 @@ func sendEventMobility(event Event) (string, int) {
	isMoveable := true

	// Find PL & destination element
	log.Debug("Searching for ", srcName, " and destination in active scenario")
	log.Debug("Searching for ", elemName, " and destination in active scenario")
	for i := range scenario.Deployment.Domains {
		domain := &scenario.Deployment.Domains[i]

@@ -875,7 +875,7 @@ func sendEventMobility(event Event) (string, int) {
					}

					// UE to move
					if currentPl.Name == srcName {
					if currentPl.Name == elemName {
						if currentPl.Type_ == "UE" || currentPl.Type_ == "FOG" || currentPl.Type_ == "EDGE" {
							oldNL = nl
							pl = currentPl
@@ -887,7 +887,7 @@ func sendEventMobility(event Event) (string, int) {
						currentP := &currentPl.Processes[p]

						// APP to move
						if currentP.Name == srcName {
						if currentP.Name == elemName {
							if currentP.Type_ == "EDGE-APP" {
								//exception, we do not move if we are part of a mobility group
								if currentP.ServiceConfig != nil {
@@ -962,8 +962,8 @@ func sendEventMobility(event Event) (string, int) {
			"meep.log.msgType":   "mobilityEvent",
			"meep.log.oldLoc":    oldLocName,
			"meep.log.newLoc":    newLocName,
			"meep.log.src":       srcName,
			"meep.log.dest":      srcName,
			"meep.log.src":       elemName,
			"meep.log.dest":      elemName,
		}).Info("Measurements log")

		// TODO in Execution Engine:
+2 −2
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@ package server
// Mobility Event object
type EventMobility struct {

	// Source element identifier
	Src string `json:"src,omitempty"`
	// Name of the network element to be updated
	ElementName string `json:"elementName,omitempty"`

	// Destination element identifier
	Dest string `json:"dest,omitempty"`
+10 −15
Original line number Diff line number Diff line
@@ -913,19 +913,14 @@ definitions:
        type: "string"
        description: "Type of the network element to be updated"
        enum:
        - "OPERATOR"
        - "POA"
        - "SCENARIO"
        - "ZONE-INTER-EDGE"
        - "ZONE-INTER-FOG"
        - "ZONE-EDGE-FOG"
        - "EDGE"
        - "FOG"
        - "UE"
        - "DISTANT-CLOUD"
        - "UE-APP"
        - "EDGE-APP"
        - "CLOUD-APP"
        - "INTER-DOMAIN"
        - "INTER-ZONE"
        - "INTER-EDGE"
        - "INTER-FOG"
        - "EDGE-FOG"
        - "TERMINAL-LINK"
        - "LINK"
        - "APP"
      latency:
        type: "integer"
        description: "Latency in ms"
@@ -944,9 +939,9 @@ definitions:
  EventMobility:
    type: "object"
    properties:
      src:
      elementName:
        type: "string"
        description: "Source element identifier"
        description: "Name of the network element to be updated"
      dest:
        type: "string"
        description: "Destination element identifier"
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Src** | **string** | Source element identifier | [optional] [default to null]
**ElementName** | **string** | Name of the network element to be updated | [optional] [default to null]
**Dest** | **string** | Destination element identifier | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Loading