chiradeep / go-nitro

A Golang client to the Citrix ADC API
Apache License 2.0
18 stars 21 forks source link

Enabling/Disabling member #11

Closed dawez closed 6 years ago

dawez commented 6 years ago

Is there a way to enable/disable a member of serviceGroup? I dug in the source code but I could not find anything.

I checked the web interface and when ENABLING a member a POST is done on this PATH:

/nitro/v1/config/servicegroup

With this json payload

object: 
{
  "params": {
    "action": "enable",
    "warning": "YES"
  },
  "servicegroup": {
    "servicegroupname": "test_group",
    "servername": "99.99.99.98",
    "port": 80
  }
}

And DISABLING, same PATH, with this payload:

{
  "params": {
    "action": "DISABLE",
    "warning": "YES"
  },
  "servicegroup": {
    "delay":"5",
    "graceful":"YES",
    "servicegroupname": "test_group",
    "servername": "99.99.99.98",
    "port": 80
  }
}
chiradeep commented 6 years ago

See https://github.com/chiradeep/go-nitro/blob/9dba4fba4f6c0da675ac452fd0e06131da505dbb/netscaler/config_test.go#L548 for examples