You are on page 1of 10

import

import
import
import

Aurora
Hosting
math
sys

topology = Hosting.API.ActiveTopology
topology.ClearLightpath()
w = list(topology.Wavelengths)
for l in w:
topology.RemoveWavelength(l)
del w
f = list(topology.Fibers)
for l in f:
topology.RemoveFiber(l)
del f
topology.ClearLinks()
topology.ClearNetworkElements()
topology.ClearMapLocations()
topology = Hosting.API.ActiveTopology
###################################################################
#Designing a network topology
###################################################################
oxc=[0 for i in range(14)]
######################################################
Seattle = Aurora.Network.MapLocation()
Seattle.Name = "Seattle"
#Any Latitude and Longtitude to determine the network position geographically
Seattle.Latitude = 47.36
Seattle.Longitude = -122.19
#Add the topology
topology.AddMapLocation(Seattle)
oxc[0]= Aurora.Network.BasicElements.OXC()
oxc[0].Name = "oxc 0"
oxc[0].MapLocation = Seattle
######################################################
Palo_Alto = Aurora.Network.MapLocation()
Palo_Alto.Name = "Palo Alto"
#Any Latitude and Longtitude to determine the network position geographically
Palo_Alto.Latitude = 37.26
Palo_Alto.Longitude = -122.8
#Add the topology
topology.AddMapLocation(Palo_Alto)
oxc[1]= Aurora.Network.BasicElements.OXC()
oxc[1].Name = "oxc 1"

oxc[1].MapLocation = Palo_Alto
######################################################
San_Diego= Aurora.Network.MapLocation()
San_Diego.Name = "San Diego"
#Any Latitude and Longtitude to determine the network position geographically
San_Diego.Latitude = 32.42
San_Diego.Longitude = -117.9
#Add the topology
topology.AddMapLocation(San_Diego)
oxc[2]= Aurora.Network.BasicElements.OXC()
oxc[2].Name = "oxc 2"
oxc[2].MapLocation = San_Diego
######################################################
Salt_Lake_City= Aurora.Network.MapLocation()
Salt_Lake_City.Name = "Salt Lake City"
#Any Latitude and Longtitude to determine the network position geographically
Salt_Lake_City.Latitude = 40.45
Salt_Lake_City.Longitude = -111.53
#Add the topology
topology.AddMapLocation(Salt_Lake_City)
oxc[3]= Aurora.Network.BasicElements.OXC()
oxc[3].Name = "oxc 3"
oxc[3].MapLocation = Salt_Lake_City
######################################################
Boulder= Aurora.Network.MapLocation()
Boulder.Name = "Boulder"
#Any Latitude and Longtitude to determine the network position geographically
Boulder.Latitude = 40.0
Boulder.Longitude = -105.16
#Add the topology
topology.AddMapLocation(Boulder)
oxc[4]= Aurora.Network.BasicElements.OXC()
oxc[4].Name = "oxc 4"
oxc[4].MapLocation = Boulder
######################################################
Lincoln= Aurora.Network.MapLocation()
Lincoln.Name = "Lincoln"
#Any Latitude and Longtitude to determine the network position geographically
Lincoln.Latitude = 40.48
Lincoln.Longitude = -96.4
#Add the topology
topology.AddMapLocation(Lincoln)
oxc[5]= Aurora.Network.BasicElements.OXC()
oxc[5].Name = "oxc 5"

oxc[5].MapLocation = Lincoln
######################################################
Urbana= Aurora.Network.MapLocation()
Urbana.Name = "Urbana"
#Any Latitude and Longtitude to determine the network position geographically
Urbana.Latitude = 40.6
Urbana.Longitude = -88.12
#Add the topology
topology.AddMapLocation(Urbana)
oxc[6]= Aurora.Network.BasicElements.OXC()
oxc[6].Name = "oxc 6"
oxc[6].MapLocation = Urbana
######################################################
Houston= Aurora.Network.MapLocation()
Houston.Name = "Houston"
#Any Latitude and Longtitude to determine the network position geographically
Houston.Latitude = 29.45
Houston.Longitude = -95.22
#Add the topology
topology.AddMapLocation(Houston)
oxc[7]= Aurora.Network.BasicElements.OXC()
oxc[7].Name = "oxc 7"
oxc[7].MapLocation = Houston
######################################################
Atlanta= Aurora.Network.MapLocation()
Atlanta.Name = "Atlanta"
#Any Latitude and Longtitude to determine the network position geographically
Atlanta.Latitude = 33.44
Atlanta.Longitude = -84.23
#Add the topology
topology.AddMapLocation(Atlanta)
oxc[8]= Aurora.Network.BasicElements.OXC()
oxc[8].Name = "oxc 8"
oxc[8].MapLocation = Atlanta
######################################################
Washington= Aurora.Network.MapLocation()
Washington.Name = "Washington"
#Any Latitude and Longtitude to determine the network position geographically
Washington.Latitude = 38.53
Washington.Longitude = -77.2
#Add the topology
topology.AddMapLocation(Washington)
oxc[9]= Aurora.Network.BasicElements.OXC()
oxc[9].Name = "oxc 9"

oxc[9].MapLocation = Washington
######################################################
Pittsburgh= Aurora.Network.MapLocation()
Pittsburgh.Name = "Pittsburgh"
#Any Latitude and Longtitude to determine the network position geographically
Pittsburgh.Latitude = 40.26
Pittsburgh.Longitude = -79.59
#Add the topology
topology.AddMapLocation(Pittsburgh)
oxc[10]= Aurora.Network.BasicElements.OXC()
oxc[10].Name = "oxc 10"
oxc[10].MapLocation = Pittsburgh
######################################################
Princeton= Aurora.Network.MapLocation()
Princeton.Name = "Princeton"
#Any Latitude and Longtitude to determine the network position geographically
Princeton.Latitude = 40.21
Princeton.Longitude = -74.40
#Add the topology
topology.AddMapLocation(Princeton)
oxc[11]= Aurora.Network.BasicElements.OXC()
oxc[11].Name = "oxc 11"
oxc[11].MapLocation = Princeton
######################################################
Ann_Arbor= Aurora.Network.MapLocation()
Ann_Arbor.Name = "Ann Arbor"
#Any Latitude and Longtitude to determine the network position geographically
Ann_Arbor.Latitude = 42.16
Ann_Arbor.Longitude = -83.44
#Add the topology
topology.AddMapLocation(Ann_Arbor)
oxc[12]= Aurora.Network.BasicElements.OXC()
oxc[12].Name = "oxc 12"
oxc[12].MapLocation = Ann_Arbor
######################################################
Ithaca= Aurora.Network.MapLocation()
Ithaca.Name = "Ithaca"
#Any Latitude and Longtitude to determine the network position geographically
Ithaca.Latitude = 42.26
Ithaca.Longitude = -76.30
#Add the topology
topology.AddMapLocation(Ithaca)
oxc[13]= Aurora.Network.BasicElements.OXC()
oxc[13].Name = "oxc 13"

oxc[13].MapLocation = Ithaca
topology.AddNetworkElement(oxc[0])
topology.AddNetworkElement(oxc[1])
topology.AddNetworkElement(oxc[2])
topology.AddNetworkElement(oxc[3])
topology.AddNetworkElement(oxc[4])
topology.AddNetworkElement(oxc[5])
topology.AddNetworkElement(oxc[6])
topology.AddNetworkElement(oxc[7])
topology.AddNetworkElement(oxc[8])
topology.AddNetworkElement(oxc[9])
topology.AddNetworkElement(oxc[10])
topology.AddNetworkElement(oxc[11])
topology.AddNetworkElement(oxc[12])
topology.AddNetworkElement(oxc[13])
######################################################
link=[0 for i in range(42)]
link[0] = Aurora.Network.Link()
link[0].Source = oxc[1]
link[0].Destination = oxc[0]
link[0].Weight = 1
link[0].Properties['State'] = 1 #State = 1: Link is Up , State = 0: Link is Down
link[1] = Aurora.Network.Link()
link[1].Source = oxc[1]
link[1].Destination = oxc[2]
link[1].Weight = 1
link[1].Properties['State'] = 1
link[2] = Aurora.Network.Link()
link[2].Source = oxc[0]
link[2].Destination = oxc[2]
link[2].Weight = 1
link[2].Properties['State'] = 1
link[3] = Aurora.Network.Link()
link[3].Source = oxc[0]
link[3].Destination = oxc[6]
link[3].Weight = 1
link[3].Properties['State'] = 1
link[4] = Aurora.Network.Link()
link[4].Source = oxc[1]
link[4].Destination = oxc[3]
link[4].Weight = 1
link[4].Properties['State'] = 1
link[5] = Aurora.Network.Link()
link[5].Source = oxc[7]
link[5].Destination = oxc[2]
link[5].Weight = 1
link[5].Properties['State'] = 1
link[6] = Aurora.Network.Link()
link[6].Source = oxc[3]
link[6].Destination = oxc[12]

link[6].Weight = 1
link[6].Properties['State'] = 1
link[7] = Aurora.Network.Link()
link[7].Source = oxc[3]
link[7].Destination = oxc[4]
link[7].Weight = 1
link[7].Properties['State'] = 1
link[8] = Aurora.Network.Link()
link[8].Source = oxc[4]
link[8].Destination = oxc[5]
link[8].Weight = 1
link[8].Properties['State'] = 1
link[9] = Aurora.Network.Link()
link[9].Source = oxc[4]
link[9].Destination = oxc[7]
link[9].Weight = 1
link[9].Properties['State'] = 1
link[10] = Aurora.Network.Link()
link[10].Source = oxc[5]
link[10].Destination = oxc[6]
link[10].Weight = 1
link[10].Properties['State'] = 1
link[11] = Aurora.Network.Link()
link[11].Source = oxc[7]
link[11].Destination = oxc[8]
link[11].Weight = 1
link[11].Properties['State'] = 1
link[12] = Aurora.Network.Link()
link[12].Source = oxc[7]
link[12].Destination = oxc[9]
link[12].Weight = 1
link[12].Properties['State'] = 1
link[13] = Aurora.Network.Link()
link[13].Source = oxc[6]
link[13].Destination = oxc[10]
link[13].Weight = 1
link[13].Properties['State'] = 1
link[14] = Aurora.Network.Link()
link[14].Source = oxc[8]
link[14].Destination = oxc[10]
link[14].Weight = 1
link[14].Properties['State'] = 1
link[15] = Aurora.Network.Link()
link[15].Source = oxc[12]
link[15].Destination = oxc[13]
link[15].Weight = 1
link[15].Properties['State'] = 1
link[16] = Aurora.Network.Link()
link[16].Source = oxc[11]
link[16].Destination = oxc[12]

link[16].Weight = 1
link[16].Properties['State'] = 1
link[17] = Aurora.Network.Link()
link[17].Source = oxc[10]
link[17].Destination = oxc[13]
link[17].Weight = 1
link[17].Properties['State'] = 1
link[18] = Aurora.Network.Link()
link[18].Source = oxc[10]
link[18].Destination = oxc[11]
link[18].Weight = 1
link[18].Properties['State'] = 1
link[19] = Aurora.Network.Link()
link[19].Source = oxc[9]
link[19].Destination = oxc[11]
link[19].Weight = 1
link[19].Properties['State'] = 1
link[20] = Aurora.Network.Link()
link[20].Source = oxc[9]
link[20].Destination = oxc[13]
link[20].Weight = 1
link[20].Properties['State'] = 1
link[21] = Aurora.Network.Link()
link[21].Source = oxc[0]
link[21].Destination = oxc[1]
link[21].Weight = 1
link[21].Properties['State'] = 1 #State = 1: Link is Up , State = 0: Link is Dow
n
link[22] = Aurora.Network.Link()
link[22].Source = oxc[2]
link[22].Destination = oxc[1]
link[22].Weight = 1
link[22].Properties['State'] = 1
link[23] = Aurora.Network.Link()
link[23].Source = oxc[2]
link[23].Destination = oxc[0]
link[23].Weight = 1
link[23].Properties['State'] = 1
link[24] = Aurora.Network.Link()
link[24].Source = oxc[6]
link[24].Destination = oxc[0]
link[24].Weight = 1
link[24].Properties['State'] = 1
link[25] = Aurora.Network.Link()
link[25].Source = oxc[3]
link[25].Destination = oxc[1]
link[25].Weight = 1
link[25].Properties['State'] = 1
link[26] = Aurora.Network.Link()

link[26].Source = oxc[2]
link[26].Destination = oxc[7]
link[26].Weight = 1
link[26].Properties['State'] = 1
link[27] = Aurora.Network.Link()
link[27].Source = oxc[12]
link[27].Destination = oxc[3]
link[27].Weight = 1
link[27].Properties['State'] = 1
link[28] = Aurora.Network.Link()
link[28].Source = oxc[4]
link[28].Destination = oxc[3]
link[28].Weight = 1
link[28].Properties['State'] = 1
link[29] = Aurora.Network.Link()
link[29].Source = oxc[5]
link[29].Destination = oxc[4]
link[29].Weight = 1
link[29].Properties['State'] = 1
link[30] = Aurora.Network.Link()
link[30].Source = oxc[7]
link[30].Destination = oxc[4]
link[30].Weight = 1
link[30].Properties['State'] = 1
link[31] = Aurora.Network.Link()
link[31].Source = oxc[6]
link[31].Destination = oxc[5]
link[31].Weight = 1
link[31].Properties['State'] = 1
link[32] = Aurora.Network.Link()
link[32].Source = oxc[8]
link[32].Destination = oxc[7]
link[32].Weight = 1
link[32].Properties['State'] = 1
link[33] = Aurora.Network.Link()
link[33].Source = oxc[9]
link[33].Destination = oxc[7]
link[33].Weight = 1
link[33].Properties['State'] = 1
link[34] = Aurora.Network.Link()
link[34].Source = oxc[10]
link[34].Destination = oxc[6]
link[34].Weight = 1
link[34].Properties['State'] = 1
link[35] = Aurora.Network.Link()
link[35].Source = oxc[10]
link[35].Destination = oxc[8]
link[35].Weight = 1
link[35].Properties['State'] = 1
link[36] = Aurora.Network.Link()

link[36].Source = oxc[13]
link[36].Destination = oxc[12]
link[36].Weight = 1
link[36].Properties['State'] = 1
link[37] = Aurora.Network.Link()
link[37].Source = oxc[12]
link[37].Destination = oxc[11]
link[37].Weight = 1
link[37].Properties['State'] = 1
link[38] = Aurora.Network.Link()
link[38].Source = oxc[13]
link[38].Destination = oxc[10]
link[38].Weight = 1
link[38].Properties['State'] = 1
link[39] = Aurora.Network.Link()
link[39].Source = oxc[11]
link[39].Destination = oxc[10]
link[39].Weight = 1
link[39].Properties['State'] = 1
link[40] = Aurora.Network.Link()
link[40].Source = oxc[11]
link[40].Destination = oxc[9]
link[40].Weight = 1
link[40].Properties['State'] = 1
link[41] = Aurora.Network.Link()
link[41].Source = oxc[13]
link[41].Destination = oxc[9]
link[41].Weight = 1
link[41].Properties['State'] = 1
topology.AddLink(link[0])
topology.AddLink(link[1])
topology.AddLink(link[2])
topology.AddLink(link[3])
topology.AddLink(link[4])
topology.AddLink(link[5])
topology.AddLink(link[6])
topology.AddLink(link[7])
topology.AddLink(link[8])
topology.AddLink(link[9])
topology.AddLink(link[10])
topology.AddLink(link[11])
topology.AddLink(link[12])
topology.AddLink(link[13])
topology.AddLink(link[14])
topology.AddLink(link[15])
topology.AddLink(link[16])
topology.AddLink(link[17])
topology.AddLink(link[18])
topology.AddLink(link[19])
topology.AddLink(link[20])
topology.AddLink(link[21])
topology.AddLink(link[22])
topology.AddLink(link[23])
topology.AddLink(link[24])

topology.AddLink(link[25])
topology.AddLink(link[26])
topology.AddLink(link[27])
topology.AddLink(link[28])
topology.AddLink(link[29])
topology.AddLink(link[30])
topology.AddLink(link[31])
topology.AddLink(link[32])
topology.AddLink(link[33])
topology.AddLink(link[34])
topology.AddLink(link[35])
topology.AddLink(link[36])
topology.AddLink(link[37])
topology.AddLink(link[38])
topology.AddLink(link[39])
topology.AddLink(link[40])
topology.AddLink(link[41])

You might also like