Commit 126e91b1 authored by Simon Pastor's avatar Simon Pastor
Browse files

commented the code to prevent interdomain communication

parent 611dd30b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -428,7 +428,7 @@ func (this *DefaultBwSharingAlgorithm) createPath(flowName string, srcElement *N
		segment = this.createSegment(segmentName, flowName, destElement.InterDomainMaxThroughput)
		path.Segments = append(path.Segments, segment)

		//when going through interdomain, only to/from a cloud app is supported
		//when going through interdomain, either from/to the cloud or another domain, if not cloud, already handled in other tiers sections
		if destElement.Type == "CLOUD" {
			segmentName = destElement.PhyLocName + "-" + direction
			segment = this.createSegment(segmentName, flowName, destElement.PhyLocMaxThroughput)
@@ -439,8 +439,8 @@ func (this *DefaultBwSharingAlgorithm) createPath(flowName string, srcElement *N
				segmentName = srcElement.PhyLocName + "-" + direction
				segment = this.createSegment(segmentName, flowName, srcElement.PhyLocMaxThroughput)
				path.Segments = append(path.Segments, segment)
			} else {
				return nil
				//} else { //communication between domains is not supported
				//return nil
			}
		}
	}
+1 −1
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ func TestPathCreation(t *testing.T) {
	fmt.Println("Test UE1-FOG4 under diff DOMAIN")
	setElem(&src, "SrcElem", "UE", "UE1", "POA1", "ZONE1", "DOMAIN1", 1, 2, 3, 4, 5, 6)
	setElem(&dst, "DstElem", "FOG", "FOG4", "POA4", "ZONE4", "DOMAIN2", 11, 12, 13, 14, 15, 16)
	expectedResult = ""
	expectedResult = "Path: UE1-uplink...POA1-uplink...FOG4-downlink...ZONE1-POA1-uplink...ZONE4-POA4-downlink...ZONE1-uplink...ZONE4-downlink...DOMAIN1-uplink...DOMAIN2-downlink"
	computedResult = printPath(bwAlgo.createPath("path", &src, &dst))
	if expectedResult != computedResult {
		t.Errorf("UE1-FOG4 under diff DOMAIN failed: " + computedResult)