package networks;
import VNFs.Firewall;import VNFs.Router;import VNFs.WebApp;import builder.NetBuilder;
network Dynamic{ @class(Dynamic); string sfcNodes ; string sfcConnections ; submodules: builder: NetBuilder { nodesFile = sfcNodes; connectionsFile = sfcConnections; }}
package builder;
//// Dynamically sets up a network, with the topology coming from text files//simple NetBuilder{ parameters: @display("i=block/cogwheel_s"); string nodesFile; string connectionsFile;}
void Dynamic::initialize(){
std::string nodes =getParentModule()->par("nodesFile").stdstringValue(); std::string connections = getParentModule()->par("connectionsFile").stdstringValue(); nodes= "SFC1_vnfs.txt"; connections="SFC1_connections.txt";}