diff --git a/examples/00-simple-peering/README.md b/examples/A00-simple-peering/README.md similarity index 100% rename from examples/00-simple-peering/README.md rename to examples/A00-simple-peering/README.md diff --git a/examples/00-simple-peering/00-simple-peering.py b/examples/A00-simple-peering/simple-peering.py old mode 100644 new mode 100755 similarity index 98% rename from examples/00-simple-peering/00-simple-peering.py rename to examples/A00-simple-peering/simple-peering.py index 378bc2c80..5fbd1b595 --- a/examples/00-simple-peering/00-simple-peering.py +++ b/examples/A00-simple-peering/simple-peering.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.layers import Base, Routing, Ebgp from seedemu.services import WebService from seedemu.compiler import Docker diff --git a/examples/01-transit-as/README.md b/examples/A01-transit-as/README.md similarity index 100% rename from examples/01-transit-as/README.md rename to examples/A01-transit-as/README.md diff --git a/examples/01-transit-as/01-transit-as.py b/examples/A01-transit-as/transit-as.py old mode 100644 new mode 100755 similarity index 98% rename from examples/01-transit-as/01-transit-as.py rename to examples/A01-transit-as/transit-as.py index e416c6129..ec6b5f1ea --- a/examples/01-transit-as/01-transit-as.py +++ b/examples/A01-transit-as/transit-as.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.layers import Base, Routing, Ebgp, PeerRelationship, Ibgp, Ospf from seedemu.services import WebService from seedemu.core import Emulator, Binding, Filter diff --git a/examples/02-transit-as-mpls/README.md b/examples/A02-transit-as-mpls/README.md similarity index 97% rename from examples/02-transit-as-mpls/README.md rename to examples/A02-transit-as-mpls/README.md index c9cfbf452..a11119395 100644 --- a/examples/02-transit-as-mpls/README.md +++ b/examples/A02-transit-as-mpls/README.md @@ -1,6 +1,6 @@ # Transit AS (MPLS) -This topology of this example is exactly the same as that in `01-transit-as`. +This topology of this example is exactly the same as that in `A01-transit-as`. The only difference in this example is that we will now use MPLS instead of OSPF and IBGP in the transit network. With MPLS, non-edge routers don't need to carry the BGP routing table at all. Non-edge routes only need to keep track of a diff --git a/examples/02-transit-as-mpls/02-transit-as-mpls.py b/examples/A02-transit-as-mpls/transit-as-mpls.py old mode 100644 new mode 100755 similarity index 98% rename from examples/02-transit-as-mpls/02-transit-as-mpls.py rename to examples/A02-transit-as-mpls/transit-as-mpls.py index a1f30ec15..743720d4c --- a/examples/02-transit-as-mpls/02-transit-as-mpls.py +++ b/examples/A02-transit-as-mpls/transit-as-mpls.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.layers import Base, Routing, Ebgp, PeerRelationship, Mpls from seedemu.services import WebService from seedemu.core import Emulator, Binding, Filter diff --git a/examples/03-real-world/README.md b/examples/A03-real-world/README.md similarity index 100% rename from examples/03-real-world/README.md rename to examples/A03-real-world/README.md diff --git a/examples/03-real-world/03-real-world.py b/examples/A03-real-world/real-world.py old mode 100644 new mode 100755 similarity index 98% rename from examples/03-real-world/03-real-world.py rename to examples/A03-real-world/real-world.py index 57a54c357..d8c5293bc --- a/examples/03-real-world/03-real-world.py +++ b/examples/A03-real-world/real-world.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.layers import Base, Routing, Ebgp, PeerRelationship, Ibgp, Ospf from seedemu.services import WebService from seedemu.core import Emulator, Binding, Filter diff --git a/examples/04-visualization/README.md b/examples/A04-visualization/README.md similarity index 100% rename from examples/04-visualization/README.md rename to examples/A04-visualization/README.md diff --git a/examples/04-visualization/04-visualization.py b/examples/A04-visualization/visualization.py old mode 100644 new mode 100755 similarity index 92% rename from examples/04-visualization/04-visualization.py rename to examples/A04-visualization/visualization.py index 4ef7c46fa..ce6f2b30f --- a/examples/04-visualization/04-visualization.py +++ b/examples/A04-visualization/visualization.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.core import Emulator, Binding, Filter from seedemu.layers import Base, Routing, Ebgp, PeerRelationship from seedemu.services import WebService @@ -9,7 +12,7 @@ # Need to go to 01-transit-as and generate the component first emu = Emulator() -emu.load('../01-transit-as/base-component.bin') +emu.load('../A01-transit-as/base-component.bin') base: Base = emu.getLayer('Base') diff --git a/examples/05-components/README.md b/examples/A05-components/README.md similarity index 97% rename from examples/05-components/README.md rename to examples/A05-components/README.md index 4cb0749b6..6fd610c3e 100644 --- a/examples/05-components/README.md +++ b/examples/A05-components/README.md @@ -1,6 +1,6 @@ # Using a Pre-built Component -In Example `01-transit-as`, we have saved the emulator in +In Example `A01-transit-as`, we have saved the emulator in a file as a component. In this example, we demonstrate how we can load it into another emulation. diff --git a/examples/05-components/05-components.py b/examples/A05-components/components.py old mode 100644 new mode 100755 similarity index 96% rename from examples/05-components/05-components.py rename to examples/A05-components/components.py index b3f677734..6701c041a --- a/examples/05-components/05-components.py +++ b/examples/A05-components/components.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.core import Emulator, Binding, Filter from seedemu.layers import Base, Routing, Ebgp, PeerRelationship from seedemu.services import WebService @@ -9,7 +12,7 @@ # Need to go to 01-transit-as and generate the component first emu = Emulator() -emu.load('../01-transit-as/base-component.bin') +emu.load('../A01-transit-as/base-component.bin') ############################################################################### diff --git a/examples/06-merge-emulation/README.md b/examples/A06-merge-emulation/README.md similarity index 100% rename from examples/06-merge-emulation/README.md rename to examples/A06-merge-emulation/README.md diff --git a/examples/06-merge-emulation/06-merge-emulation.py b/examples/A06-merge-emulation/merge-emulation.py old mode 100644 new mode 100755 similarity index 97% rename from examples/06-merge-emulation/06-merge-emulation.py rename to examples/A06-merge-emulation/merge-emulation.py index cedd82147..ff03f8fb6 --- a/examples/06-merge-emulation/06-merge-emulation.py +++ b/examples/A06-merge-emulation/merge-emulation.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.core import Emulator from seedemu.mergers import DEFAULT_MERGERS from seedemu.layers import Base, Routing, Ebgp diff --git a/examples/07-compilers/README.md b/examples/A07-compilers/README.md similarity index 100% rename from examples/07-compilers/README.md rename to examples/A07-compilers/README.md diff --git a/examples/07-compilers/07-compilers.py b/examples/A07-compilers/compilers.py old mode 100644 new mode 100755 similarity index 93% rename from examples/07-compilers/07-compilers.py rename to examples/A07-compilers/compilers.py index 6820fe0b6..09f63d5b7 --- a/examples/07-compilers/07-compilers.py +++ b/examples/A07-compilers/compilers.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python3 +# encoding: utf-8 + from seedemu.layers import Base, Routing, Ebgp, PeerRelationship, Mpls from seedemu.compiler import Docker, DistributedDocker, GcpDistributedDocker, Graphviz from seedemu.services import WebService @@ -9,7 +12,7 @@ # Need to go to 01-transit-as and generate the component first emu = Emulator() -emu.load('../01-transit-as/base-component.bin') +emu.load('../A01-transit-as/base-component.bin') ############################################################################### # Render the emulation