Committed by
Gerrit Code Review
Fixed object naming problem from SDNTopo to SdnIpTopo
Following tutorial_ipv6.py, topology obecjt name is "SdnIpTopo", not "SDNTopo" Change-Id: I8d27b35ff7fbecbb1dac37156f06cf0bc7897baa
Showing
2 changed files
with
20 additions
and
20 deletions
| ... | @@ -57,7 +57,7 @@ class Router(Host): | ... | @@ -57,7 +57,7 @@ class Router(Host): |
| 57 | 57 | ||
| 58 | class SdnIpTopo( Topo ): | 58 | class SdnIpTopo( Topo ): |
| 59 | "SDN-IP tutorial topology" | 59 | "SDN-IP tutorial topology" |
| 60 | - | 60 | + |
| 61 | def build( self ): | 61 | def build( self ): |
| 62 | s1 = self.addSwitch('s1', dpid='00000000000000a1') | 62 | s1 = self.addSwitch('s1', dpid='00000000000000a1') |
| 63 | s2 = self.addSwitch('s2', dpid='00000000000000a2') | 63 | s2 = self.addSwitch('s2', dpid='00000000000000a2') |
| ... | @@ -84,16 +84,16 @@ class SdnIpTopo( Topo ): | ... | @@ -84,16 +84,16 @@ class SdnIpTopo( Topo ): |
| 84 | 84 | ||
| 85 | router = self.addHost(name, cls=Router, quaggaConfFile=quaggaConf, | 85 | router = self.addHost(name, cls=Router, quaggaConfFile=quaggaConf, |
| 86 | zebraConfFile=zebraConf, intfDict=intfs) | 86 | zebraConfFile=zebraConf, intfDict=intfs) |
| 87 | - | 87 | + |
| 88 | - host = self.addHost('h%s' % i, cls=SdnIpHost, | 88 | + host = self.addHost('h%s' % i, cls=SdnIpHost, |
| 89 | ip='192.168.%s.1/24' % i, | 89 | ip='192.168.%s.1/24' % i, |
| 90 | route='192.168.%s.254' % i) | 90 | route='192.168.%s.254' % i) |
| 91 | - | 91 | + |
| 92 | self.addLink(router, attachmentSwitches[i-1]) | 92 | self.addLink(router, attachmentSwitches[i-1]) |
| 93 | self.addLink(router, host) | 93 | self.addLink(router, host) |
| 94 | 94 | ||
| 95 | # Set up the internal BGP speaker | 95 | # Set up the internal BGP speaker |
| 96 | - bgpEth0 = { 'mac':'00:00:00:00:00:01', | 96 | + bgpEth0 = { 'mac':'00:00:00:00:00:01', |
| 97 | 'ipAddrs' : ['10.0.1.101/24', | 97 | 'ipAddrs' : ['10.0.1.101/24', |
| 98 | '10.0.2.101/24', | 98 | '10.0.2.101/24', |
| 99 | '10.0.3.101/24', | 99 | '10.0.3.101/24', |
| ... | @@ -101,12 +101,12 @@ class SdnIpTopo( Topo ): | ... | @@ -101,12 +101,12 @@ class SdnIpTopo( Topo ): |
| 101 | bgpEth1 = { 'ipAddrs' : ['10.10.10.1/24'] } | 101 | bgpEth1 = { 'ipAddrs' : ['10.10.10.1/24'] } |
| 102 | bgpIntfs = { 'bgp-eth0' : bgpEth0, | 102 | bgpIntfs = { 'bgp-eth0' : bgpEth0, |
| 103 | 'bgp-eth1' : bgpEth1 } | 103 | 'bgp-eth1' : bgpEth1 } |
| 104 | - | 104 | + |
| 105 | - bgp = self.addHost( "bgp", cls=Router, | 105 | + bgp = self.addHost( "bgp", cls=Router, |
| 106 | - quaggaConfFile = '%s/quagga-sdn.conf' % CONFIG_DIR, | 106 | + quaggaConfFile = '%s/quagga-sdn.conf' % CONFIG_DIR, |
| 107 | - zebraConfFile = zebraConf, | 107 | + zebraConfFile = zebraConf, |
| 108 | intfDict=bgpIntfs ) | 108 | intfDict=bgpIntfs ) |
| 109 | - | 109 | + |
| 110 | self.addLink( bgp, s3 ) | 110 | self.addLink( bgp, s3 ) |
| 111 | 111 | ||
| 112 | # Connect BGP speaker to the root namespace so it can peer with ONOS | 112 | # Connect BGP speaker to the root namespace so it can peer with ONOS |
| ... | @@ -127,7 +127,7 @@ topos = { 'sdnip' : SdnIpTopo } | ... | @@ -127,7 +127,7 @@ topos = { 'sdnip' : SdnIpTopo } |
| 127 | 127 | ||
| 128 | if __name__ == '__main__': | 128 | if __name__ == '__main__': |
| 129 | setLogLevel('debug') | 129 | setLogLevel('debug') |
| 130 | - topo = SDNTopo() | 130 | + topo = SdnIpTopo() |
| 131 | 131 | ||
| 132 | net = Mininet(topo=topo, controller=RemoteController) | 132 | net = Mininet(topo=topo, controller=RemoteController) |
| 133 | 133 | ... | ... |
| ... | @@ -69,7 +69,7 @@ class SdnSwitch(OVSSwitch): | ... | @@ -69,7 +69,7 @@ class SdnSwitch(OVSSwitch): |
| 69 | 69 | ||
| 70 | class SdnIpTopo( Topo ): | 70 | class SdnIpTopo( Topo ): |
| 71 | "SDN-IP tutorial topology" | 71 | "SDN-IP tutorial topology" |
| 72 | - | 72 | + |
| 73 | def build( self ): | 73 | def build( self ): |
| 74 | s1 = self.addSwitch('s1', cls=SdnSwitch, dpid='00000000000000a1') | 74 | s1 = self.addSwitch('s1', cls=SdnSwitch, dpid='00000000000000a1') |
| 75 | s2 = self.addSwitch('s2', cls=SdnSwitch, dpid='00000000000000a2') | 75 | s2 = self.addSwitch('s2', cls=SdnSwitch, dpid='00000000000000a2') |
| ... | @@ -96,16 +96,16 @@ class SdnIpTopo( Topo ): | ... | @@ -96,16 +96,16 @@ class SdnIpTopo( Topo ): |
| 96 | 96 | ||
| 97 | router = self.addHost(name, cls=Router, quaggaConfFile=quaggaConf, | 97 | router = self.addHost(name, cls=Router, quaggaConfFile=quaggaConf, |
| 98 | zebraConfFile=zebraConf, intfDict=intfs) | 98 | zebraConfFile=zebraConf, intfDict=intfs) |
| 99 | - | 99 | + |
| 100 | host = self.addHost('h%s' % i, cls=SdnIpHost, | 100 | host = self.addHost('h%s' % i, cls=SdnIpHost, |
| 101 | ip='2001:10%s::1/48' % i, | 101 | ip='2001:10%s::1/48' % i, |
| 102 | route='2001:10%s::101' % i) | 102 | route='2001:10%s::101' % i) |
| 103 | - | 103 | + |
| 104 | self.addLink(router, attachmentSwitches[i-1]) | 104 | self.addLink(router, attachmentSwitches[i-1]) |
| 105 | self.addLink(router, host) | 105 | self.addLink(router, host) |
| 106 | 106 | ||
| 107 | # Set up the internal BGP speaker | 107 | # Set up the internal BGP speaker |
| 108 | - bgpEth0 = { 'mac':'00:00:00:00:00:01', | 108 | + bgpEth0 = { 'mac':'00:00:00:00:00:01', |
| 109 | 'ipAddrs' : ['2001:1::101/48', | 109 | 'ipAddrs' : ['2001:1::101/48', |
| 110 | '2001:2::101/48', | 110 | '2001:2::101/48', |
| 111 | '2001:3::101/48', | 111 | '2001:3::101/48', |
| ... | @@ -113,12 +113,12 @@ class SdnIpTopo( Topo ): | ... | @@ -113,12 +113,12 @@ class SdnIpTopo( Topo ): |
| 113 | bgpEth1 = { 'ipAddrs' : ['10.10.10.1/24'] } | 113 | bgpEth1 = { 'ipAddrs' : ['10.10.10.1/24'] } |
| 114 | bgpIntfs = { 'bgp-eth0' : bgpEth0, | 114 | bgpIntfs = { 'bgp-eth0' : bgpEth0, |
| 115 | 'bgp-eth1' : bgpEth1 } | 115 | 'bgp-eth1' : bgpEth1 } |
| 116 | - | 116 | + |
| 117 | - bgp = self.addHost( "bgp", cls=Router, | 117 | + bgp = self.addHost( "bgp", cls=Router, |
| 118 | - quaggaConfFile = '%s/quagga-sdn.conf' % CONFIG_DIR, | 118 | + quaggaConfFile = '%s/quagga-sdn.conf' % CONFIG_DIR, |
| 119 | - zebraConfFile = zebraConf, | 119 | + zebraConfFile = zebraConf, |
| 120 | intfDict=bgpIntfs ) | 120 | intfDict=bgpIntfs ) |
| 121 | - | 121 | + |
| 122 | self.addLink( bgp, s3 ) | 122 | self.addLink( bgp, s3 ) |
| 123 | 123 | ||
| 124 | # Connect BGP speaker to the root namespace so it can peer with ONOS | 124 | # Connect BGP speaker to the root namespace so it can peer with ONOS | ... | ... |
-
Please register or login to post a comment