This service generates network configuration (network-cfg.json
) for CORD POD
CONFIGGEN_ConfigServerPort
to the port you wish config-gen to usego run congifGen.go
network-cfg.json
(CURL example below)Makefile
to build the container image with command make image
make run
curl -H "Content-Type: application/json" -d '{"switchcount" : 4, "hostcount": 4, "onosip" : "127.0.0.1" }' http://localhost:1337/config/
switchcount
, and hostcount
are the number of switches & hosts expected to be in the network respectively, and onosip is the ONOS IP (default is 127.0.0.1)CONFIGGEN
Port string `default:"8181"` //ONOS Port IP string `default:"127.0.0.1"` //ONOS IP (Default) SwitchCount int `default:"0"` HostCount int `default:"0"` Username string `default:"karaf"` Password string `default:"karaf"` LogLevel string `default:"warning" envconfig:"LOG_LEVEL"` LogFormat string `default:"text" envconfig:"LOG_FORMAT"` ConfigServerPort string `default:"1337"` //Config-gen service port default ConfigServerIP string `default:"127.0.0.1"` //Config-gen service IP