Skip to content

vim emu topology file

RafaelSche edited this page Nov 1, 2019 · 1 revision

This page describes specific details on the creation of a new topology file to startup the SONATA emulator. Example topology files are in the folder src/emuvim/examples.

Create the containernet instance

The following line of code in the topology file creates a containernet instance:

net = DCNetwork(controller=RemoteController, monitor=True, enable_learning=False)

Optional flags

  • monitor when set to True, this flag starts a cAdvisor and Prometheus Pushgateway Docker container alongside vim-emu. cAdvisor will monitor general metrics of the deployed Docker VNFs. The Pushgateway will collect specific flow counters that are exported from the vim-emu virtual network implemented by OpenvSwitch. This needs to be enabled for son-monitor (a son-cli tool) to work.

  • enable_learning when set to True, this flag configures the OpenvSwitch networking in vim-emu with fail mode=standalone. This means the 'vim-emu' network topology will function as a self-learning switch.

Add a SONATA dummy Gatekeeper endpoint

This defines a Gatekeeper endpoint , similar to the one in the SONATA SP. A REST API is started here that accepts SONATA service packages.

sdkg1 = SonataDummyGatekeeperEndpoint("0.0.0.0", 5000, deploy_sap=True, auto_deploy=True,
                                          docker_management=True, auto_delete=True,
                                          sap_vnfd_path=sap_vnfd_path)

Optional flags

  • deploy_sap when set to True, each connection point (SAP) in the NSD is deployed according to its defined type:

    • internal : deployed as a dedicated Docker VNF, chained to the VNFs as defined in the NSD.
    • external : deployed as a virtual interface on the vim-emu host. NAT rules are installed using iptables, which make it possible to connect this interface and the service's endpoint to the outside world (eg. to connect a traffic generating process, running on the host).
    • management: as defined by the docker_management flag (see below)
  • auto_deploy when set to True, each pushed service package will automatically be deployed (this avoids the need to explicitly ask the dummy gatekeeper to deploy the latest pushed package).

  • auto_delete when set to True, any currently deployed service will automatically be deleted when a new one is asked to be deployed. This configures vim-emu to only deploy one service at a time.

  • docker_management when set to True, the VNF interfaces that are configured in the NSD/VNFD as type=management are not instantiated, but are replaced with the interfaces to the docker0 switch, which are anyway deployed by Docker.

  • sap_vnfd_path is the pathname of the VNFD .yml file that describes which Docker VNF to use as service endpoint. Each internal connection point in the NSD is deployed with this VNFD.