Skip to content
Snippets Groups Projects
main.go 1.01 KiB
Newer Older
  • Learn to ignore specific revisions
  • package main
    
    import (
    
    Martin Stiemerling's avatar
    Martin Stiemerling committed
    	"flag"
    	"gosdn/nucleus"
    
    Martin Stiemerling's avatar
    Martin Stiemerling committed
    
    // Generate the code out of the yang modules
    //go:generate go run $GOPATH/src/github.com/openconfig/ygot/generator/generator.go -path=yang -output_file=yang-processor/gosdnyang.go.go -package_name=gosdnyang -generate_fakeroot -fakeroot_name=device -compress_paths=true -shorten_enum_leaf_names -exclude_modules=ietf-interfaces yang/openconfig-interfaces.yang yang/openconfig-if-ip.yang
    
    type goSDNConfiguration struct {
    	cliServerAddr4 *string
    	cliServerPort4 *int
    }
    
    
    func main() {
    
    
    Martin Stiemerling's avatar
    Martin Stiemerling committed
    	// register our supported flags
    	cliServerAddr4 := flag.String("cliServerAddr", "127.0.0.1", "The IPv4 Address of the grpcCLI.")
    	cliServerPort4 := flag.Int("cliServerPort", 55055, "The port number of the grpcCLI")
    
    	flag.Parse()
    
    	var myConfiguration = new(goSDNConfiguration)
    	myConfiguration.cliServerAddr4 = cliServerAddr4
    	myConfiguration.cliServerPort4 = cliServerPort4
    
    
    	// hand off to cmd for further processing
    
    Martin Stiemerling's avatar
    Martin Stiemerling committed
    	nucleus.StartUp()
    	nucleus.Run()
    
    
    	// nothing to see here, please move on!
    }