Skip to content

bekbulatov/go-vtm

Repository files navigation

go-vtm Build Status Coverage Status Go Report Card

Brocade VTM Rest Client

Currently supported objects are:

  • Pools
  • Monitors

Code Examples

There is an examples directory in the source which contains some code of how to use it.

Creating a client

config := vtm.NewDefaultConfig()
config.URL = "http://127.0.0.1:9070"

client := vtm.NewClient(config)

pools, err := client.ListPools()
if err == nil {
  log.Printf("Found %d pools", len(pools))
}

Creating a new pool

poolName := "my-pool"

pool := vtm.NewPool()
pool.AddNode(vtm.NodeItem{Node: "foo.bar.com:123", Weight: 1})
_, err = client.CreatePool(poolName, pool)
if err == nil {
  log.Printf("Successfully created the pool: %s", poolName)
}

About

Brocade VTM Rest Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published