id int32 0 167k | repo stringlengths 5 54 | path stringlengths 4 155 | func_name stringlengths 1 118 | original_string stringlengths 52 85.5k | language stringclasses 1 value | code stringlengths 52 85.5k | code_tokens list | docstring stringlengths 6 2.61k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
17,500 | scottdware/go-bigip | ltm.go | ModifyPoolMember | func (b *BigIP) ModifyPoolMember(pool string, config *PoolMember) error {
member := config.FullPath
// These fields are not used when modifying a pool member; so omit them.
config.Name = ""
config.Partition = ""
config.FullPath = ""
// This cannot be modified for an existing pool member.
config.Address = ""
return b.put(config, uriLtm, uriPool, pool, uriPoolMember, member)
} | go | func (b *BigIP) ModifyPoolMember(pool string, config *PoolMember) error {
member := config.FullPath
// These fields are not used when modifying a pool member; so omit them.
config.Name = ""
config.Partition = ""
config.FullPath = ""
// This cannot be modified for an existing pool member.
config.Address = ""
return b.put(config, uriLtm, uriPool, pool, uriPoolMember, member)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyPoolMember",
"(",
"pool",
"string",
",",
"config",
"*",
"PoolMember",
")",
"error",
"{",
"member",
":=",
"config",
".",
"FullPath",
"\n",
"// These fields are not used when modifying a pool member; so omit them.",
"config",
... | // ModifyPoolMember will update the configuration of a particular pool member. | [
"ModifyPoolMember",
"will",
"update",
"the",
"configuration",
"of",
"a",
"particular",
"pool",
"member",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1659-L1670 |
17,501 | scottdware/go-bigip | ltm.go | UpdatePoolMembers | func (b *BigIP) UpdatePoolMembers(pool string, pm *[]PoolMember) error {
config := &poolMembers{
Members: *pm,
}
return b.put(config, uriLtm, uriPool, pool)
} | go | func (b *BigIP) UpdatePoolMembers(pool string, pm *[]PoolMember) error {
config := &poolMembers{
Members: *pm,
}
return b.put(config, uriLtm, uriPool, pool)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"UpdatePoolMembers",
"(",
"pool",
"string",
",",
"pm",
"*",
"[",
"]",
"PoolMember",
")",
"error",
"{",
"config",
":=",
"&",
"poolMembers",
"{",
"Members",
":",
"*",
"pm",
",",
"}",
"\n",
"return",
"b",
".",
"put... | // UpdatePoolMembers does a replace-all-with for the members of a pool. | [
"UpdatePoolMembers",
"does",
"a",
"replace",
"-",
"all",
"-",
"with",
"for",
"the",
"members",
"of",
"a",
"pool",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1679-L1684 |
17,502 | scottdware/go-bigip | ltm.go | RemovePoolMember | func (b *BigIP) RemovePoolMember(pool string, config *PoolMember) error {
member := config.FullPath
return b.delete(uriLtm, uriPool, pool, uriPoolMember, member)
} | go | func (b *BigIP) RemovePoolMember(pool string, config *PoolMember) error {
member := config.FullPath
return b.delete(uriLtm, uriPool, pool, uriPoolMember, member)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"RemovePoolMember",
"(",
"pool",
"string",
",",
"config",
"*",
"PoolMember",
")",
"error",
"{",
"member",
":=",
"config",
".",
"FullPath",
"\n",
"return",
"b",
".",
"delete",
"(",
"uriLtm",
",",
"uriPool",
",",
"poo... | // RemovePoolMember removes a pool member from the specified pool. | [
"RemovePoolMember",
"removes",
"a",
"pool",
"member",
"from",
"the",
"specified",
"pool",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1687-L1690 |
17,503 | scottdware/go-bigip | ltm.go | CreatePool | func (b *BigIP) CreatePool(name string) error {
config := &Pool{
Name: name,
}
return b.post(config, uriLtm, uriPool)
} | go | func (b *BigIP) CreatePool(name string) error {
config := &Pool{
Name: name,
}
return b.post(config, uriLtm, uriPool)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"CreatePool",
"(",
"name",
"string",
")",
"error",
"{",
"config",
":=",
"&",
"Pool",
"{",
"Name",
":",
"name",
",",
"}",
"\n\n",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriLtm",
",",
"uriPool",
")",
"... | // CreatePool adds a new pool to the BIG-IP system by name. | [
"CreatePool",
"adds",
"a",
"new",
"pool",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"by",
"name",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1724-L1730 |
17,504 | scottdware/go-bigip | ltm.go | AddPool | func (b *BigIP) AddPool(config *Pool) error {
return b.post(config, uriLtm, uriPool)
} | go | func (b *BigIP) AddPool(config *Pool) error {
return b.post(config, uriLtm, uriPool)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddPool",
"(",
"config",
"*",
"Pool",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriLtm",
",",
"uriPool",
")",
"\n",
"}"
] | // AddPool creates a new pool on the BIG-IP system. | [
"AddPool",
"creates",
"a",
"new",
"pool",
"on",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1733-L1735 |
17,505 | scottdware/go-bigip | ltm.go | GetPool | func (b *BigIP) GetPool(name string) (*Pool, error) {
var pool Pool
err, ok := b.getForEntity(&pool, uriLtm, uriPool, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &pool, nil
} | go | func (b *BigIP) GetPool(name string) (*Pool, error) {
var pool Pool
err, ok := b.getForEntity(&pool, uriLtm, uriPool, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &pool, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetPool",
"(",
"name",
"string",
")",
"(",
"*",
"Pool",
",",
"error",
")",
"{",
"var",
"pool",
"Pool",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"pool",
",",
"uriLtm",
",",
"uriPool",
... | // Get a Pool by name. Returns nil if the Pool does not exist | [
"Get",
"a",
"Pool",
"by",
"name",
".",
"Returns",
"nil",
"if",
"the",
"Pool",
"does",
"not",
"exist"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1738-L1749 |
17,506 | scottdware/go-bigip | ltm.go | DeletePool | func (b *BigIP) DeletePool(name string) error {
return b.delete(uriLtm, uriPool, name)
} | go | func (b *BigIP) DeletePool(name string) error {
return b.delete(uriLtm, uriPool, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeletePool",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriLtm",
",",
"uriPool",
",",
"name",
")",
"\n",
"}"
] | // DeletePool removes a pool. | [
"DeletePool",
"removes",
"a",
"pool",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1752-L1754 |
17,507 | scottdware/go-bigip | ltm.go | ModifyPool | func (b *BigIP) ModifyPool(name string, config *Pool) error {
return b.put(config, uriLtm, uriPool, name)
} | go | func (b *BigIP) ModifyPool(name string, config *Pool) error {
return b.put(config, uriLtm, uriPool, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyPool",
"(",
"name",
"string",
",",
"config",
"*",
"Pool",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriLtm",
",",
"uriPool",
",",
"name",
")",
"\n",
"}"
] | // ModifyPool allows you to change any attribute of a pool. Fields that
// can be modified are referenced in the Pool struct. | [
"ModifyPool",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"pool",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"Pool",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1758-L1760 |
17,508 | scottdware/go-bigip | ltm.go | VirtualServers | func (b *BigIP) VirtualServers() (*VirtualServers, error) {
var vs VirtualServers
err, _ := b.getForEntity(&vs, uriLtm, uriVirtual)
if err != nil {
return nil, err
}
return &vs, nil
} | go | func (b *BigIP) VirtualServers() (*VirtualServers, error) {
var vs VirtualServers
err, _ := b.getForEntity(&vs, uriLtm, uriVirtual)
if err != nil {
return nil, err
}
return &vs, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"VirtualServers",
"(",
")",
"(",
"*",
"VirtualServers",
",",
"error",
")",
"{",
"var",
"vs",
"VirtualServers",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"vs",
",",
"uriLtm",
",",
"uriVirtual... | // VirtualServers returns a list of virtual servers. | [
"VirtualServers",
"returns",
"a",
"list",
"of",
"virtual",
"servers",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1763-L1771 |
17,509 | scottdware/go-bigip | ltm.go | AddVirtualServer | func (b *BigIP) AddVirtualServer(config *VirtualServer) error {
return b.post(config, uriLtm, uriVirtual)
} | go | func (b *BigIP) AddVirtualServer(config *VirtualServer) error {
return b.post(config, uriLtm, uriVirtual)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddVirtualServer",
"(",
"config",
"*",
"VirtualServer",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriLtm",
",",
"uriVirtual",
")",
"\n",
"}"
] | // AddVirtualServer adds a new virtual server by config to the BIG-IP system. | [
"AddVirtualServer",
"adds",
"a",
"new",
"virtual",
"server",
"by",
"config",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1794-L1796 |
17,510 | scottdware/go-bigip | ltm.go | GetVirtualServer | func (b *BigIP) GetVirtualServer(name string) (*VirtualServer, error) {
var vs VirtualServer
err, ok := b.getForEntity(&vs, uriLtm, uriVirtual, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
profiles, err := b.VirtualServerProfiles(name)
if err != nil {
return nil, err
}
vs.Profiles = profiles.Profiles
policy_names, err := b.VirtualServerPolicyNames(name)
if err != nil {
return nil, err
}
vs.Policies = policy_names
return &vs, nil
} | go | func (b *BigIP) GetVirtualServer(name string) (*VirtualServer, error) {
var vs VirtualServer
err, ok := b.getForEntity(&vs, uriLtm, uriVirtual, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
profiles, err := b.VirtualServerProfiles(name)
if err != nil {
return nil, err
}
vs.Profiles = profiles.Profiles
policy_names, err := b.VirtualServerPolicyNames(name)
if err != nil {
return nil, err
}
vs.Policies = policy_names
return &vs, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetVirtualServer",
"(",
"name",
"string",
")",
"(",
"*",
"VirtualServer",
",",
"error",
")",
"{",
"var",
"vs",
"VirtualServer",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"vs",
",",
"uriLtm... | // GetVirtualServer retrieves a virtual server by name. Returns nil if the virtual server does not exist | [
"GetVirtualServer",
"retrieves",
"a",
"virtual",
"server",
"by",
"name",
".",
"Returns",
"nil",
"if",
"the",
"virtual",
"server",
"does",
"not",
"exist"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1799-L1822 |
17,511 | scottdware/go-bigip | ltm.go | DeleteVirtualServer | func (b *BigIP) DeleteVirtualServer(name string) error {
return b.delete(uriLtm, uriVirtual, name)
} | go | func (b *BigIP) DeleteVirtualServer(name string) error {
return b.delete(uriLtm, uriVirtual, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteVirtualServer",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriLtm",
",",
"uriVirtual",
",",
"name",
")",
"\n",
"}"
] | // DeleteVirtualServer removes a virtual server. | [
"DeleteVirtualServer",
"removes",
"a",
"virtual",
"server",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1825-L1827 |
17,512 | scottdware/go-bigip | ltm.go | ModifyVirtualServer | func (b *BigIP) ModifyVirtualServer(name string, config *VirtualServer) error {
return b.put(config, uriLtm, uriVirtual, name)
} | go | func (b *BigIP) ModifyVirtualServer(name string, config *VirtualServer) error {
return b.put(config, uriLtm, uriVirtual, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyVirtualServer",
"(",
"name",
"string",
",",
"config",
"*",
"VirtualServer",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriLtm",
",",
"uriVirtual",
",",
"name",
")",
"\n",
"}"
] | // ModifyVirtualServer allows you to change any attribute of a virtual server. Fields that
// can be modified are referenced in the VirtualServer struct. Set all the attributes. | [
"ModifyVirtualServer",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"virtual",
"server",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"VirtualServer",
"struct",
".",
"Set",
"all",
"the",
"attributes",
"."... | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1831-L1833 |
17,513 | scottdware/go-bigip | ltm.go | PatchVirtualServer | func (b *BigIP) PatchVirtualServer(name string, config *VirtualServer) error {
return b.patch(config, uriLtm, uriVirtual, name)
} | go | func (b *BigIP) PatchVirtualServer(name string, config *VirtualServer) error {
return b.patch(config, uriLtm, uriVirtual, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"PatchVirtualServer",
"(",
"name",
"string",
",",
"config",
"*",
"VirtualServer",
")",
"error",
"{",
"return",
"b",
".",
"patch",
"(",
"config",
",",
"uriLtm",
",",
"uriVirtual",
",",
"name",
")",
"\n",
"}"
] | // PatchVirtualServer allows you to change any attribute of a virtual server. Fields that
// can be modified are referenced in the VirtualServer struct. Sets only the attributes specified. | [
"PatchVirtualServer",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"virtual",
"server",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"VirtualServer",
"struct",
".",
"Sets",
"only",
"the",
"attributes",
"s... | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1837-L1839 |
17,514 | scottdware/go-bigip | ltm.go | VirtualServerProfiles | func (b *BigIP) VirtualServerProfiles(vs string) (*Profiles, error) {
var p Profiles
err, ok := b.getForEntity(&p, uriLtm, uriVirtual, vs, "profiles")
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &p, nil
} | go | func (b *BigIP) VirtualServerProfiles(vs string) (*Profiles, error) {
var p Profiles
err, ok := b.getForEntity(&p, uriLtm, uriVirtual, vs, "profiles")
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &p, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"VirtualServerProfiles",
"(",
"vs",
"string",
")",
"(",
"*",
"Profiles",
",",
"error",
")",
"{",
"var",
"p",
"Profiles",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"p",
",",
"uriLtm",
",",... | // VirtualServerProfiles gets the profiles currently associated with a virtual server. | [
"VirtualServerProfiles",
"gets",
"the",
"profiles",
"currently",
"associated",
"with",
"a",
"virtual",
"server",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1842-L1853 |
17,515 | scottdware/go-bigip | ltm.go | VirtualServerPolicyNames | func (b *BigIP) VirtualServerPolicyNames(vs string) ([]string, error) {
var policies Policies
err, _ := b.getForEntity(&policies, uriLtm, uriVirtual, vs, "policies")
if err != nil {
return nil, err
}
retval := make([]string, 0, len(policies.Policies))
for _, p := range policies.Policies {
retval = append(retval, p.FullPath)
}
return retval, nil
} | go | func (b *BigIP) VirtualServerPolicyNames(vs string) ([]string, error) {
var policies Policies
err, _ := b.getForEntity(&policies, uriLtm, uriVirtual, vs, "policies")
if err != nil {
return nil, err
}
retval := make([]string, 0, len(policies.Policies))
for _, p := range policies.Policies {
retval = append(retval, p.FullPath)
}
return retval, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"VirtualServerPolicyNames",
"(",
"vs",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"var",
"policies",
"Policies",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"policies",
",... | //Get the names of policies associated with a particular virtual server | [
"Get",
"the",
"names",
"of",
"policies",
"associated",
"with",
"a",
"particular",
"virtual",
"server"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1856-L1867 |
17,516 | scottdware/go-bigip | ltm.go | VirtualAddresses | func (b *BigIP) VirtualAddresses() (*VirtualAddresses, error) {
var va VirtualAddresses
err, _ := b.getForEntity(&va, uriLtm, uriVirtualAddress)
if err != nil {
return nil, err
}
return &va, nil
} | go | func (b *BigIP) VirtualAddresses() (*VirtualAddresses, error) {
var va VirtualAddresses
err, _ := b.getForEntity(&va, uriLtm, uriVirtualAddress)
if err != nil {
return nil, err
}
return &va, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"VirtualAddresses",
"(",
")",
"(",
"*",
"VirtualAddresses",
",",
"error",
")",
"{",
"var",
"va",
"VirtualAddresses",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"va",
",",
"uriLtm",
",",
"uriV... | // VirtualAddresses returns a list of virtual addresses. | [
"VirtualAddresses",
"returns",
"a",
"list",
"of",
"virtual",
"addresses",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1870-L1877 |
17,517 | scottdware/go-bigip | ltm.go | GetVirtualAddress | func (b *BigIP) GetVirtualAddress(vaddr string) (*VirtualAddress, error) {
var virtualAddress VirtualAddress
err, _ := b.getForEntity(&virtualAddress, uriLtm, uriVirtualAddress, vaddr)
if err != nil {
return nil, err
}
return &virtualAddress, nil
} | go | func (b *BigIP) GetVirtualAddress(vaddr string) (*VirtualAddress, error) {
var virtualAddress VirtualAddress
err, _ := b.getForEntity(&virtualAddress, uriLtm, uriVirtualAddress, vaddr)
if err != nil {
return nil, err
}
return &virtualAddress, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetVirtualAddress",
"(",
"vaddr",
"string",
")",
"(",
"*",
"VirtualAddress",
",",
"error",
")",
"{",
"var",
"virtualAddress",
"VirtualAddress",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"virtua... | // GetVirtualAddress retrieves a VirtualAddress by name. | [
"GetVirtualAddress",
"retrieves",
"a",
"VirtualAddress",
"by",
"name",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1880-L1887 |
17,518 | scottdware/go-bigip | ltm.go | ModifyVirtualAddress | func (b *BigIP) ModifyVirtualAddress(vaddr string, config *VirtualAddress) error {
return b.put(config, uriLtm, uriVirtualAddress, vaddr)
} | go | func (b *BigIP) ModifyVirtualAddress(vaddr string, config *VirtualAddress) error {
return b.put(config, uriLtm, uriVirtualAddress, vaddr)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyVirtualAddress",
"(",
"vaddr",
"string",
",",
"config",
"*",
"VirtualAddress",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriLtm",
",",
"uriVirtualAddress",
",",
"vaddr",
")",
"\n",
"}"
... | // ModifyVirtualAddress allows you to change any attribute of a virtual address. Fields that
// can be modified are referenced in the VirtualAddress struct. Sets all the attributes. | [
"ModifyVirtualAddress",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"virtual",
"address",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"VirtualAddress",
"struct",
".",
"Sets",
"all",
"the",
"attributes",
... | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1904-L1906 |
17,519 | scottdware/go-bigip | ltm.go | PatchVirtualAddress | func (b *BigIP) PatchVirtualAddress(vaddr string, config *VirtualAddress) error {
return b.patch(config, uriLtm, uriVirtualAddress, vaddr)
} | go | func (b *BigIP) PatchVirtualAddress(vaddr string, config *VirtualAddress) error {
return b.patch(config, uriLtm, uriVirtualAddress, vaddr)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"PatchVirtualAddress",
"(",
"vaddr",
"string",
",",
"config",
"*",
"VirtualAddress",
")",
"error",
"{",
"return",
"b",
".",
"patch",
"(",
"config",
",",
"uriLtm",
",",
"uriVirtualAddress",
",",
"vaddr",
")",
"\n",
"}"... | // PatchVirtualAddress allows you to change any attribute of a virtual address. Fields that
// can be modified are referenced in the VirtualAddress struct. Sets only the attributes specified. | [
"PatchVirtualAddress",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"virtual",
"address",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"VirtualAddress",
"struct",
".",
"Sets",
"only",
"the",
"attributes",
... | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1910-L1912 |
17,520 | scottdware/go-bigip | ltm.go | Monitors | func (b *BigIP) Monitors() ([]Monitor, error) {
var monitors []Monitor
monitorUris := []string{
"gateway-icmp",
"http",
"https",
"icmp",
"inband",
"mysql",
"postgresql",
"tcp",
"udp",
}
for _, name := range monitorUris {
var m Monitors
err, _ := b.getForEntity(&m, uriLtm, uriMonitor, name)
if err != nil {
return nil, err
}
for _, monitor := range m.Monitors {
monitor.MonitorType = name
monitors = append(monitors, monitor)
}
}
return monitors, nil
} | go | func (b *BigIP) Monitors() ([]Monitor, error) {
var monitors []Monitor
monitorUris := []string{
"gateway-icmp",
"http",
"https",
"icmp",
"inband",
"mysql",
"postgresql",
"tcp",
"udp",
}
for _, name := range monitorUris {
var m Monitors
err, _ := b.getForEntity(&m, uriLtm, uriMonitor, name)
if err != nil {
return nil, err
}
for _, monitor := range m.Monitors {
monitor.MonitorType = name
monitors = append(monitors, monitor)
}
}
return monitors, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Monitors",
"(",
")",
"(",
"[",
"]",
"Monitor",
",",
"error",
")",
"{",
"var",
"monitors",
"[",
"]",
"Monitor",
"\n",
"monitorUris",
":=",
"[",
"]",
"string",
"{",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"... | // Monitors returns a list of all HTTP, HTTPS, Gateway ICMP, ICMP, and Tcp monitors. | [
"Monitors",
"returns",
"a",
"list",
"of",
"all",
"HTTP",
"HTTPS",
"Gateway",
"ICMP",
"ICMP",
"and",
"Tcp",
"monitors",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1919-L1946 |
17,521 | scottdware/go-bigip | ltm.go | AddMonitor | func (b *BigIP) AddMonitor(config *Monitor, monitorType string) error {
if strings.Contains(config.ParentMonitor, "gateway") {
config.ParentMonitor = "gateway_icmp"
}
return b.post(config, uriLtm, uriMonitor, monitorType)
} | go | func (b *BigIP) AddMonitor(config *Monitor, monitorType string) error {
if strings.Contains(config.ParentMonitor, "gateway") {
config.ParentMonitor = "gateway_icmp"
}
return b.post(config, uriLtm, uriMonitor, monitorType)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddMonitor",
"(",
"config",
"*",
"Monitor",
",",
"monitorType",
"string",
")",
"error",
"{",
"if",
"strings",
".",
"Contains",
"(",
"config",
".",
"ParentMonitor",
",",
"\"",
"\"",
")",
"{",
"config",
".",
"ParentM... | // Create a monitor by supplying a config | [
"Create",
"a",
"monitor",
"by",
"supplying",
"a",
"config"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1964-L1970 |
17,522 | scottdware/go-bigip | ltm.go | GetMonitor | func (b *BigIP) GetMonitor(name string, monitorType string) (*Monitor, error) {
// Add a verification that type is an accepted monitor type
var monitor Monitor
err, ok := b.getForEntity(&monitor, uriLtm, uriMonitor, monitorType, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &monitor, nil
} | go | func (b *BigIP) GetMonitor(name string, monitorType string) (*Monitor, error) {
// Add a verification that type is an accepted monitor type
var monitor Monitor
err, ok := b.getForEntity(&monitor, uriLtm, uriMonitor, monitorType, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &monitor, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetMonitor",
"(",
"name",
"string",
",",
"monitorType",
"string",
")",
"(",
"*",
"Monitor",
",",
"error",
")",
"{",
"// Add a verification that type is an accepted monitor type",
"var",
"monitor",
"Monitor",
"\n",
"err",
","... | // GetVirtualServer retrieves a monitor by name. Returns nil if the monitor does not exist | [
"GetVirtualServer",
"retrieves",
"a",
"monitor",
"by",
"name",
".",
"Returns",
"nil",
"if",
"the",
"monitor",
"does",
"not",
"exist"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1973-L1985 |
17,523 | scottdware/go-bigip | ltm.go | DeleteMonitor | func (b *BigIP) DeleteMonitor(name, monitorType string) error {
return b.delete(uriLtm, uriMonitor, monitorType, name)
} | go | func (b *BigIP) DeleteMonitor(name, monitorType string) error {
return b.delete(uriLtm, uriMonitor, monitorType, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteMonitor",
"(",
"name",
",",
"monitorType",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriLtm",
",",
"uriMonitor",
",",
"monitorType",
",",
"name",
")",
"\n",
"}"
] | // DeleteMonitor removes a monitor. | [
"DeleteMonitor",
"removes",
"a",
"monitor",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L1988-L1990 |
17,524 | scottdware/go-bigip | ltm.go | PatchMonitor | func (b *BigIP) PatchMonitor(name, monitorType string, config *Monitor) error {
return b.patch(config, uriLtm, uriMonitor, monitorType, name)
} | go | func (b *BigIP) PatchMonitor(name, monitorType string, config *Monitor) error {
return b.patch(config, uriLtm, uriMonitor, monitorType, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"PatchMonitor",
"(",
"name",
",",
"monitorType",
"string",
",",
"config",
"*",
"Monitor",
")",
"error",
"{",
"return",
"b",
".",
"patch",
"(",
"config",
",",
"uriLtm",
",",
"uriMonitor",
",",
"monitorType",
",",
"na... | // PatchMonitor allows you to change any attribute of a monitor. | [
"PatchMonitor",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"monitor",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2004-L2006 |
17,525 | scottdware/go-bigip | ltm.go | IRules | func (b *BigIP) IRules() (*IRules, error) {
var rules IRules
err, _ := b.getForEntity(&rules, uriLtm, uriIRule)
if err != nil {
return nil, err
}
return &rules, nil
} | go | func (b *BigIP) IRules() (*IRules, error) {
var rules IRules
err, _ := b.getForEntity(&rules, uriLtm, uriIRule)
if err != nil {
return nil, err
}
return &rules, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"IRules",
"(",
")",
"(",
"*",
"IRules",
",",
"error",
")",
"{",
"var",
"rules",
"IRules",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"rules",
",",
"uriLtm",
",",
"uriIRule",
")",
"\n",
... | // IRules returns a list of irules | [
"IRules",
"returns",
"a",
"list",
"of",
"irules"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2018-L2026 |
17,526 | scottdware/go-bigip | ltm.go | IRule | func (b *BigIP) IRule(name string) (*IRule, error) {
var rule IRule
err, ok := b.getForEntity(&rule, uriLtm, uriIRule, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &rule, nil
} | go | func (b *BigIP) IRule(name string) (*IRule, error) {
var rule IRule
err, ok := b.getForEntity(&rule, uriLtm, uriIRule, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &rule, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"IRule",
"(",
"name",
"string",
")",
"(",
"*",
"IRule",
",",
"error",
")",
"{",
"var",
"rule",
"IRule",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"rule",
",",
"uriLtm",
",",
"uriIRule",... | // IRule returns information about the given iRule. | [
"IRule",
"returns",
"information",
"about",
"the",
"given",
"iRule",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2029-L2039 |
17,527 | scottdware/go-bigip | ltm.go | CreateIRule | func (b *BigIP) CreateIRule(name, rule string) error {
irule := &IRule{
Name: name,
Rule: rule,
}
return b.post(irule, uriLtm, uriIRule)
} | go | func (b *BigIP) CreateIRule(name, rule string) error {
irule := &IRule{
Name: name,
Rule: rule,
}
return b.post(irule, uriLtm, uriIRule)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"CreateIRule",
"(",
"name",
",",
"rule",
"string",
")",
"error",
"{",
"irule",
":=",
"&",
"IRule",
"{",
"Name",
":",
"name",
",",
"Rule",
":",
"rule",
",",
"}",
"\n",
"return",
"b",
".",
"post",
"(",
"irule",
... | // CreateIRule creates a new iRule on the system. | [
"CreateIRule",
"creates",
"a",
"new",
"iRule",
"on",
"the",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2042-L2048 |
17,528 | scottdware/go-bigip | ltm.go | DeleteIRule | func (b *BigIP) DeleteIRule(name string) error {
return b.delete(uriLtm, uriIRule, name)
} | go | func (b *BigIP) DeleteIRule(name string) error {
return b.delete(uriLtm, uriIRule, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteIRule",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriLtm",
",",
"uriIRule",
",",
"name",
")",
"\n",
"}"
] | // DeleteIRule removes an iRule from the system. | [
"DeleteIRule",
"removes",
"an",
"iRule",
"from",
"the",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2051-L2053 |
17,529 | scottdware/go-bigip | ltm.go | ModifyIRule | func (b *BigIP) ModifyIRule(name string, irule *IRule) error {
irule.Name = name
return b.put(irule, uriLtm, uriIRule, name)
} | go | func (b *BigIP) ModifyIRule(name string, irule *IRule) error {
irule.Name = name
return b.put(irule, uriLtm, uriIRule, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyIRule",
"(",
"name",
"string",
",",
"irule",
"*",
"IRule",
")",
"error",
"{",
"irule",
".",
"Name",
"=",
"name",
"\n",
"return",
"b",
".",
"put",
"(",
"irule",
",",
"uriLtm",
",",
"uriIRule",
",",
"name",... | // ModifyIRule updates the given iRule with any changed values. | [
"ModifyIRule",
"updates",
"the",
"given",
"iRule",
"with",
"any",
"changed",
"values",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2056-L2059 |
17,530 | scottdware/go-bigip | ltm.go | GetPolicy | func (b *BigIP) GetPolicy(name string) (*Policy, error) {
var p Policy
err, ok := b.getForEntity(&p, uriLtm, uriPolicy, name, policyVersionSuffix)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
var rules PolicyRules
err, _ = b.getForEntity(&rules, uriLtm, uriPolicy, name, "rules", policyVersionSuffix)
if err != nil {
return nil, err
}
p.Rules = rules.Items
for i, _ := range p.Rules {
var a PolicyRuleActions
var c PolicyRuleConditions
err, _ = b.getForEntity(&a, uriLtm, uriPolicy, name, "rules", p.Rules[i].Name, "actions", policyVersionSuffix)
if err != nil {
return nil, err
}
err, _ = b.getForEntity(&c, uriLtm, uriPolicy, name, "rules", p.Rules[i].Name, "conditions", policyVersionSuffix)
if err != nil {
return nil, err
}
p.Rules[i].Actions = a.Items
p.Rules[i].Conditions = c.Items
}
return &p, nil
} | go | func (b *BigIP) GetPolicy(name string) (*Policy, error) {
var p Policy
err, ok := b.getForEntity(&p, uriLtm, uriPolicy, name, policyVersionSuffix)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
var rules PolicyRules
err, _ = b.getForEntity(&rules, uriLtm, uriPolicy, name, "rules", policyVersionSuffix)
if err != nil {
return nil, err
}
p.Rules = rules.Items
for i, _ := range p.Rules {
var a PolicyRuleActions
var c PolicyRuleConditions
err, _ = b.getForEntity(&a, uriLtm, uriPolicy, name, "rules", p.Rules[i].Name, "actions", policyVersionSuffix)
if err != nil {
return nil, err
}
err, _ = b.getForEntity(&c, uriLtm, uriPolicy, name, "rules", p.Rules[i].Name, "conditions", policyVersionSuffix)
if err != nil {
return nil, err
}
p.Rules[i].Actions = a.Items
p.Rules[i].Conditions = c.Items
}
return &p, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetPolicy",
"(",
"name",
"string",
")",
"(",
"*",
"Policy",
",",
"error",
")",
"{",
"var",
"p",
"Policy",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"p",
",",
"uriLtm",
",",
"uriPolicy"... | //Load a fully policy definition. Policies seem to be best dealt with as one big entity. | [
"Load",
"a",
"fully",
"policy",
"definition",
".",
"Policies",
"seem",
"to",
"be",
"best",
"dealt",
"with",
"as",
"one",
"big",
"entity",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2072-L2106 |
17,531 | scottdware/go-bigip | ltm.go | CreatePolicy | func (b *BigIP) CreatePolicy(p *Policy) error {
normalizePolicy(p)
return b.post(p, uriLtm, uriPolicy, policyVersionSuffix)
} | go | func (b *BigIP) CreatePolicy(p *Policy) error {
normalizePolicy(p)
return b.post(p, uriLtm, uriPolicy, policyVersionSuffix)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"CreatePolicy",
"(",
"p",
"*",
"Policy",
")",
"error",
"{",
"normalizePolicy",
"(",
"p",
")",
"\n",
"return",
"b",
".",
"post",
"(",
"p",
",",
"uriLtm",
",",
"uriPolicy",
",",
"policyVersionSuffix",
")",
"\n",
"}"... | //Create a new policy. It is not necessary to set the Ordinal fields on subcollections. | [
"Create",
"a",
"new",
"policy",
".",
"It",
"is",
"not",
"necessary",
"to",
"set",
"the",
"Ordinal",
"fields",
"on",
"subcollections",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2122-L2125 |
17,532 | scottdware/go-bigip | ltm.go | UpdatePolicy | func (b *BigIP) UpdatePolicy(name string, p *Policy) error {
normalizePolicy(p)
return b.put(p, uriLtm, uriPolicy, name, policyVersionSuffix)
} | go | func (b *BigIP) UpdatePolicy(name string, p *Policy) error {
normalizePolicy(p)
return b.put(p, uriLtm, uriPolicy, name, policyVersionSuffix)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"UpdatePolicy",
"(",
"name",
"string",
",",
"p",
"*",
"Policy",
")",
"error",
"{",
"normalizePolicy",
"(",
"p",
")",
"\n",
"return",
"b",
".",
"put",
"(",
"p",
",",
"uriLtm",
",",
"uriPolicy",
",",
"name",
",",
... | //Update an existing policy. | [
"Update",
"an",
"existing",
"policy",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2128-L2131 |
17,533 | scottdware/go-bigip | ltm.go | DeletePolicy | func (b *BigIP) DeletePolicy(name string) error {
return b.delete(uriLtm, uriPolicy, name, policyVersionSuffix)
} | go | func (b *BigIP) DeletePolicy(name string) error {
return b.delete(uriLtm, uriPolicy, name, policyVersionSuffix)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeletePolicy",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriLtm",
",",
"uriPolicy",
",",
"name",
",",
"policyVersionSuffix",
")",
"\n",
"}"
] | //Delete a policy by name. | [
"Delete",
"a",
"policy",
"by",
"name",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/ltm.go#L2134-L2136 |
17,534 | scottdware/go-bigip | sys.go | Volumes | func (b *BigIP) Volumes() (*Volumes, error) {
var volumes Volumes
err, _ := b.getForEntity(&volumes, uriSys, uriSoftware, uriVolume)
if err != nil {
return nil, err
}
return &volumes, nil
} | go | func (b *BigIP) Volumes() (*Volumes, error) {
var volumes Volumes
err, _ := b.getForEntity(&volumes, uriSys, uriSoftware, uriVolume)
if err != nil {
return nil, err
}
return &volumes, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Volumes",
"(",
")",
"(",
"*",
"Volumes",
",",
"error",
")",
"{",
"var",
"volumes",
"Volumes",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"volumes",
",",
"uriSys",
",",
"uriSoftware",
",",
... | // Volumes returns a list of Software Volumes. | [
"Volumes",
"returns",
"a",
"list",
"of",
"Software",
"Volumes",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L38-L46 |
17,535 | scottdware/go-bigip | sys.go | Folders | func (b *BigIP) Folders() (*Folders, error) {
var folders Folders
err, _ := b.getForEntity(&folders, uriSys, uriFolder)
if err != nil {
return nil, err
}
return &folders, nil
} | go | func (b *BigIP) Folders() (*Folders, error) {
var folders Folders
err, _ := b.getForEntity(&folders, uriSys, uriFolder)
if err != nil {
return nil, err
}
return &folders, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Folders",
"(",
")",
"(",
"*",
"Folders",
",",
"error",
")",
"{",
"var",
"folders",
"Folders",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"folders",
",",
"uriSys",
",",
"uriFolder",
")",
... | // Folders returns a list of folders. | [
"Folders",
"returns",
"a",
"list",
"of",
"folders",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L159-L167 |
17,536 | scottdware/go-bigip | sys.go | CreateFolder | func (b *BigIP) CreateFolder(name string) error {
config := &Folder{
Name: name,
}
return b.post(config, uriSys, uriFolder)
} | go | func (b *BigIP) CreateFolder(name string) error {
config := &Folder{
Name: name,
}
return b.post(config, uriSys, uriFolder)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"CreateFolder",
"(",
"name",
"string",
")",
"error",
"{",
"config",
":=",
"&",
"Folder",
"{",
"Name",
":",
"name",
",",
"}",
"\n\n",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriSys",
",",
"uriFolder",
")... | // CreateFolder adds a new folder to the BIG-IP system. | [
"CreateFolder",
"adds",
"a",
"new",
"folder",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L170-L176 |
17,537 | scottdware/go-bigip | sys.go | AddFolder | func (b *BigIP) AddFolder(config *Folder) error {
return b.post(config, uriSys, uriFolder)
} | go | func (b *BigIP) AddFolder(config *Folder) error {
return b.post(config, uriSys, uriFolder)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddFolder",
"(",
"config",
"*",
"Folder",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriSys",
",",
"uriFolder",
")",
"\n",
"}"
] | // AddFolder adds a new folder by config to the BIG-IP system. | [
"AddFolder",
"adds",
"a",
"new",
"folder",
"by",
"config",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L179-L182 |
17,538 | scottdware/go-bigip | sys.go | GetFolder | func (b *BigIP) GetFolder(name string) (*Folder, error) {
var folder Folder
err, ok := b.getForEntity(&folder, uriSys, uriFolder, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &folder, nil
} | go | func (b *BigIP) GetFolder(name string) (*Folder, error) {
var folder Folder
err, ok := b.getForEntity(&folder, uriSys, uriFolder, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &folder, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetFolder",
"(",
"name",
"string",
")",
"(",
"*",
"Folder",
",",
"error",
")",
"{",
"var",
"folder",
"Folder",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"folder",
",",
"uriSys",
",",
"... | // GetFolder retrieves a Folder by name. Returns nil if the folder does not exist | [
"GetFolder",
"retrieves",
"a",
"Folder",
"by",
"name",
".",
"Returns",
"nil",
"if",
"the",
"folder",
"does",
"not",
"exist"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L185-L196 |
17,539 | scottdware/go-bigip | sys.go | DeleteFolder | func (b *BigIP) DeleteFolder(name string) error {
return b.delete(uriSys, uriFolder, name)
} | go | func (b *BigIP) DeleteFolder(name string) error {
return b.delete(uriSys, uriFolder, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteFolder",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriSys",
",",
"uriFolder",
",",
"name",
")",
"\n",
"}"
] | // DeleteFolder removes a folder. | [
"DeleteFolder",
"removes",
"a",
"folder",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L199-L201 |
17,540 | scottdware/go-bigip | sys.go | ModifyFolder | func (b *BigIP) ModifyFolder(name string, config *Folder) error {
return b.put(config, uriSys, uriFolder, name)
} | go | func (b *BigIP) ModifyFolder(name string, config *Folder) error {
return b.put(config, uriSys, uriFolder, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyFolder",
"(",
"name",
"string",
",",
"config",
"*",
"Folder",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriSys",
",",
"uriFolder",
",",
"name",
")",
"\n",
"}"
] | // ModifyFolder allows you to change any attribute of a folder. Fields that can
// be modified are referenced in the Folder struct. This replaces the existing
// configuration, so use PatchFolder if you want to change only particular
// attributes. | [
"ModifyFolder",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"folder",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"Folder",
"struct",
".",
"This",
"replaces",
"the",
"existing",
"configuration",
"so",
... | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L207-L209 |
17,541 | scottdware/go-bigip | sys.go | PatchFolder | func (b *BigIP) PatchFolder(name string, config *Folder) error {
return b.patch(config, uriSys, uriFolder, name)
} | go | func (b *BigIP) PatchFolder(name string, config *Folder) error {
return b.patch(config, uriSys, uriFolder, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"PatchFolder",
"(",
"name",
"string",
",",
"config",
"*",
"Folder",
")",
"error",
"{",
"return",
"b",
".",
"patch",
"(",
"config",
",",
"uriSys",
",",
"uriFolder",
",",
"name",
")",
"\n",
"}"
] | // PatchFolder allows you to change any attribute of a folder. Fields that can
// be modified are referenced in the Folder struct. This changes only the
// attributes provided, so use ModifyFolder if you want to replace the existing
// configuration. | [
"PatchFolder",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"folder",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"Folder",
"struct",
".",
"This",
"changes",
"only",
"the",
"attributes",
"provided",
"s... | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L215-L217 |
17,542 | scottdware/go-bigip | sys.go | Certificates | func (b *BigIP) Certificates() (*Certificates, error) {
var certs Certificates
err, _ := b.getForEntity(&certs, uriSys, uriFile, uriSslCert)
if err != nil {
return nil, err
}
return &certs, nil
} | go | func (b *BigIP) Certificates() (*Certificates, error) {
var certs Certificates
err, _ := b.getForEntity(&certs, uriSys, uriFile, uriSslCert)
if err != nil {
return nil, err
}
return &certs, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Certificates",
"(",
")",
"(",
"*",
"Certificates",
",",
"error",
")",
"{",
"var",
"certs",
"Certificates",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"certs",
",",
"uriSys",
",",
"uriFile",
... | // Certificates returns a list of certificates. | [
"Certificates",
"returns",
"a",
"list",
"of",
"certificates",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L261-L269 |
17,543 | scottdware/go-bigip | sys.go | AddCertificate | func (b *BigIP) AddCertificate(cert *Certificate) error {
return b.post(cert, uriSys, uriFile, uriSslCert)
} | go | func (b *BigIP) AddCertificate(cert *Certificate) error {
return b.post(cert, uriSys, uriFile, uriSslCert)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddCertificate",
"(",
"cert",
"*",
"Certificate",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"cert",
",",
"uriSys",
",",
"uriFile",
",",
"uriSslCert",
")",
"\n",
"}"
] | // AddCertificate installs a certificate. | [
"AddCertificate",
"installs",
"a",
"certificate",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L272-L274 |
17,544 | scottdware/go-bigip | sys.go | GetCertificate | func (b *BigIP) GetCertificate(name string) (*Certificate, error) {
var cert Certificate
err, ok := b.getForEntity(&cert, uriSys, uriFile, uriSslCert, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &cert, nil
} | go | func (b *BigIP) GetCertificate(name string) (*Certificate, error) {
var cert Certificate
err, ok := b.getForEntity(&cert, uriSys, uriFile, uriSslCert, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &cert, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetCertificate",
"(",
"name",
"string",
")",
"(",
"*",
"Certificate",
",",
"error",
")",
"{",
"var",
"cert",
"Certificate",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"cert",
",",
"uriSys",... | // GetCertificate retrieves a Certificate by name. Returns nil if the certificate does not exist | [
"GetCertificate",
"retrieves",
"a",
"Certificate",
"by",
"name",
".",
"Returns",
"nil",
"if",
"the",
"certificate",
"does",
"not",
"exist"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L277-L288 |
17,545 | scottdware/go-bigip | sys.go | DeleteCertificate | func (b *BigIP) DeleteCertificate(name string) error {
return b.delete(uriSys, uriFile, uriSslCert, name)
} | go | func (b *BigIP) DeleteCertificate(name string) error {
return b.delete(uriSys, uriFile, uriSslCert, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteCertificate",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriSys",
",",
"uriFile",
",",
"uriSslCert",
",",
"name",
")",
"\n",
"}"
] | // DeleteCertificate removes a certificate. | [
"DeleteCertificate",
"removes",
"a",
"certificate",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L291-L293 |
17,546 | scottdware/go-bigip | sys.go | Keys | func (b *BigIP) Keys() (*Keys, error) {
var keys Keys
err, _ := b.getForEntity(&keys, uriSys, uriFile, uriSslKey)
if err != nil {
return nil, err
}
return &keys, nil
} | go | func (b *BigIP) Keys() (*Keys, error) {
var keys Keys
err, _ := b.getForEntity(&keys, uriSys, uriFile, uriSslKey)
if err != nil {
return nil, err
}
return &keys, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Keys",
"(",
")",
"(",
"*",
"Keys",
",",
"error",
")",
"{",
"var",
"keys",
"Keys",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"keys",
",",
"uriSys",
",",
"uriFile",
",",
"uriSslKey",
")... | // Keys returns a list of keys. | [
"Keys",
"returns",
"a",
"list",
"of",
"keys",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L327-L335 |
17,547 | scottdware/go-bigip | sys.go | AddKey | func (b *BigIP) AddKey(config *Key) error {
return b.post(config, uriSys, uriFile, uriSslKey)
} | go | func (b *BigIP) AddKey(config *Key) error {
return b.post(config, uriSys, uriFile, uriSslKey)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddKey",
"(",
"config",
"*",
"Key",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriSys",
",",
"uriFile",
",",
"uriSslKey",
")",
"\n",
"}"
] | // AddKey installs a key. | [
"AddKey",
"installs",
"a",
"key",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L338-L340 |
17,548 | scottdware/go-bigip | sys.go | GetKey | func (b *BigIP) GetKey(name string) (*Key, error) {
var key Key
err, ok := b.getForEntity(&key, uriSys, uriFile, uriSslKey, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &key, nil
} | go | func (b *BigIP) GetKey(name string) (*Key, error) {
var key Key
err, ok := b.getForEntity(&key, uriSys, uriFile, uriSslKey, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &key, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetKey",
"(",
"name",
"string",
")",
"(",
"*",
"Key",
",",
"error",
")",
"{",
"var",
"key",
"Key",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"key",
",",
"uriSys",
",",
"uriFile",
","... | // GetKey retrieves a key by name. Returns nil if the key does not exist. | [
"GetKey",
"retrieves",
"a",
"key",
"by",
"name",
".",
"Returns",
"nil",
"if",
"the",
"key",
"does",
"not",
"exist",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L343-L354 |
17,549 | scottdware/go-bigip | sys.go | DeleteKey | func (b *BigIP) DeleteKey(name string) error {
return b.delete(uriSys, uriFile, uriSslKey, name)
} | go | func (b *BigIP) DeleteKey(name string) error {
return b.delete(uriSys, uriFile, uriSslKey, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteKey",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriSys",
",",
"uriFile",
",",
"uriSslKey",
",",
"name",
")",
"\n",
"}"
] | // DeleteKey removes a key. | [
"DeleteKey",
"removes",
"a",
"key",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/sys.go#L357-L359 |
17,550 | scottdware/go-bigip | bigip.go | NewSession | func NewSession(host, user, passwd string, configOptions *ConfigOptions) *BigIP {
var url string
if !strings.HasPrefix(host, "http") {
url = fmt.Sprintf("https://%s", host)
} else {
url = host
}
if configOptions == nil {
configOptions = defaultConfigOptions
}
return &BigIP{
Host: url,
User: user,
Password: passwd,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
},
ConfigOptions: configOptions,
}
} | go | func NewSession(host, user, passwd string, configOptions *ConfigOptions) *BigIP {
var url string
if !strings.HasPrefix(host, "http") {
url = fmt.Sprintf("https://%s", host)
} else {
url = host
}
if configOptions == nil {
configOptions = defaultConfigOptions
}
return &BigIP{
Host: url,
User: user,
Password: passwd,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
},
ConfigOptions: configOptions,
}
} | [
"func",
"NewSession",
"(",
"host",
",",
"user",
",",
"passwd",
"string",
",",
"configOptions",
"*",
"ConfigOptions",
")",
"*",
"BigIP",
"{",
"var",
"url",
"string",
"\n",
"if",
"!",
"strings",
".",
"HasPrefix",
"(",
"host",
",",
"\"",
"\"",
")",
"{",
... | // NewSession sets up our connection to the BIG-IP system. | [
"NewSession",
"sets",
"up",
"our",
"connection",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/bigip.go#L72-L93 |
17,551 | scottdware/go-bigip | bigip.go | NewTokenSession | func NewTokenSession(host, user, passwd, loginProviderName string, configOptions *ConfigOptions) (b *BigIP, err error) {
type authReq struct {
Username string `json:"username"`
Password string `json:"password"`
LoginProviderName string `json:"loginProviderName"`
}
type authResp struct {
Token struct {
Token string
}
}
auth := authReq{
user,
passwd,
loginProviderName,
}
marshalJSON, err := json.Marshal(auth)
if err != nil {
return
}
req := &APIRequest{
Method: "post",
URL: "mgmt/shared/authn/login",
Body: string(marshalJSON),
ContentType: "application/json",
}
b = NewSession(host, user, passwd, configOptions)
resp, err := b.APICall(req)
if err != nil {
return
}
if resp == nil {
err = fmt.Errorf("unable to acquire authentication token")
return
}
var aresp authResp
err = json.Unmarshal(resp, &aresp)
if err != nil {
return
}
if aresp.Token.Token == "" {
err = fmt.Errorf("unable to acquire authentication token")
return
}
b.Token = aresp.Token.Token
return
} | go | func NewTokenSession(host, user, passwd, loginProviderName string, configOptions *ConfigOptions) (b *BigIP, err error) {
type authReq struct {
Username string `json:"username"`
Password string `json:"password"`
LoginProviderName string `json:"loginProviderName"`
}
type authResp struct {
Token struct {
Token string
}
}
auth := authReq{
user,
passwd,
loginProviderName,
}
marshalJSON, err := json.Marshal(auth)
if err != nil {
return
}
req := &APIRequest{
Method: "post",
URL: "mgmt/shared/authn/login",
Body: string(marshalJSON),
ContentType: "application/json",
}
b = NewSession(host, user, passwd, configOptions)
resp, err := b.APICall(req)
if err != nil {
return
}
if resp == nil {
err = fmt.Errorf("unable to acquire authentication token")
return
}
var aresp authResp
err = json.Unmarshal(resp, &aresp)
if err != nil {
return
}
if aresp.Token.Token == "" {
err = fmt.Errorf("unable to acquire authentication token")
return
}
b.Token = aresp.Token.Token
return
} | [
"func",
"NewTokenSession",
"(",
"host",
",",
"user",
",",
"passwd",
",",
"loginProviderName",
"string",
",",
"configOptions",
"*",
"ConfigOptions",
")",
"(",
"b",
"*",
"BigIP",
",",
"err",
"error",
")",
"{",
"type",
"authReq",
"struct",
"{",
"Username",
"s... | // NewTokenSession sets up our connection to the BIG-IP system, and
// instructs the session to use token authentication instead of Basic
// Auth. This is required when using an external authentication
// provider, such as Radius or Active Directory. loginProviderName is
// probably "tmos" but your environment may vary. | [
"NewTokenSession",
"sets",
"up",
"our",
"connection",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"and",
"instructs",
"the",
"session",
"to",
"use",
"token",
"authentication",
"instead",
"of",
"Basic",
"Auth",
".",
"This",
"is",
"required",
"when",
"using",
"an... | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/bigip.go#L100-L155 |
17,552 | scottdware/go-bigip | bigip.go | APICall | func (b *BigIP) APICall(options *APIRequest) ([]byte, error) {
var req *http.Request
client := &http.Client{
Transport: b.Transport,
Timeout: b.ConfigOptions.APICallTimeout,
}
var format string
if strings.Contains(options.URL, "mgmt/") {
format = "%s/%s"
} else {
format = "%s/mgmt/tm/%s"
}
url := fmt.Sprintf(format, b.Host, options.URL)
body := bytes.NewReader([]byte(options.Body))
req, _ = http.NewRequest(strings.ToUpper(options.Method), url, body)
if b.Token != "" {
req.Header.Set("X-F5-Auth-Token", b.Token)
} else {
req.SetBasicAuth(b.User, b.Password)
}
// fmt.Println("REQ -- ", options.Method, " ", url, " -- ", options.Body)
if len(options.ContentType) > 0 {
req.Header.Set("Content-Type", options.ContentType)
}
res, err := client.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
data, _ := ioutil.ReadAll(res.Body)
if res.StatusCode >= 400 {
if res.Header.Get("Content-Type") == "application/json" {
return data, b.checkError(data)
}
return data, errors.New(fmt.Sprintf("HTTP %d :: %s", res.StatusCode, string(data[:])))
}
// fmt.Println("Resp --", res.StatusCode, " -- ", string(data))
return data, nil
} | go | func (b *BigIP) APICall(options *APIRequest) ([]byte, error) {
var req *http.Request
client := &http.Client{
Transport: b.Transport,
Timeout: b.ConfigOptions.APICallTimeout,
}
var format string
if strings.Contains(options.URL, "mgmt/") {
format = "%s/%s"
} else {
format = "%s/mgmt/tm/%s"
}
url := fmt.Sprintf(format, b.Host, options.URL)
body := bytes.NewReader([]byte(options.Body))
req, _ = http.NewRequest(strings.ToUpper(options.Method), url, body)
if b.Token != "" {
req.Header.Set("X-F5-Auth-Token", b.Token)
} else {
req.SetBasicAuth(b.User, b.Password)
}
// fmt.Println("REQ -- ", options.Method, " ", url, " -- ", options.Body)
if len(options.ContentType) > 0 {
req.Header.Set("Content-Type", options.ContentType)
}
res, err := client.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
data, _ := ioutil.ReadAll(res.Body)
if res.StatusCode >= 400 {
if res.Header.Get("Content-Type") == "application/json" {
return data, b.checkError(data)
}
return data, errors.New(fmt.Sprintf("HTTP %d :: %s", res.StatusCode, string(data[:])))
}
// fmt.Println("Resp --", res.StatusCode, " -- ", string(data))
return data, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"APICall",
"(",
"options",
"*",
"APIRequest",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"var",
"req",
"*",
"http",
".",
"Request",
"\n",
"client",
":=",
"&",
"http",
".",
"Client",
"{",
"Transport",
... | // APICall is used to query the BIG-IP web API. | [
"APICall",
"is",
"used",
"to",
"query",
"the",
"BIG",
"-",
"IP",
"web",
"API",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/bigip.go#L158-L204 |
17,553 | scottdware/go-bigip | bigip.go | checkError | func (b *BigIP) checkError(resp []byte) error {
if len(resp) == 0 {
return nil
}
var reqError RequestError
err := json.Unmarshal(resp, &reqError)
if err != nil {
return errors.New(fmt.Sprintf("%s\n%s", err.Error(), string(resp[:])))
}
err = reqError.Error()
if err != nil {
return err
}
return nil
} | go | func (b *BigIP) checkError(resp []byte) error {
if len(resp) == 0 {
return nil
}
var reqError RequestError
err := json.Unmarshal(resp, &reqError)
if err != nil {
return errors.New(fmt.Sprintf("%s\n%s", err.Error(), string(resp[:])))
}
err = reqError.Error()
if err != nil {
return err
}
return nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"checkError",
"(",
"resp",
"[",
"]",
"byte",
")",
"error",
"{",
"if",
"len",
"(",
"resp",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"var",
"reqError",
"RequestError",
"\n\n",
"err",
":=",
"json",
... | // checkError handles any errors we get from our API requests. It returns either the
// message of the error, if any, or nil. | [
"checkError",
"handles",
"any",
"errors",
"we",
"get",
"from",
"our",
"API",
"requests",
".",
"It",
"returns",
"either",
"the",
"message",
"of",
"the",
"error",
"if",
"any",
"or",
"nil",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/bigip.go#L293-L311 |
17,554 | scottdware/go-bigip | bigip.go | Upload | func (b *BigIP) Upload(r io.Reader, size int64, path ...string) (*Upload, error) {
client := &http.Client{
Transport: b.Transport,
Timeout: b.ConfigOptions.APICallTimeout,
}
options := &APIRequest{
Method: "post",
URL: b.iControlPath(path),
ContentType: "application/octet-stream",
}
var format string
if strings.Contains(options.URL, "mgmt/") {
format = "%s/%s"
} else {
format = "%s/mgmt/%s"
}
url := fmt.Sprintf(format, b.Host, options.URL)
chunkSize := 512 * 1024
var start, end int64
for {
// Read next chunk
chunk := make([]byte, chunkSize)
n, err := r.Read(chunk)
if err != nil {
return nil, err
}
end = start + int64(n)
// Resize buffer size to number of bytes read
if n < chunkSize {
chunk = chunk[:n]
}
body := bytes.NewReader(chunk)
req, _ := http.NewRequest(strings.ToUpper(options.Method), url, body)
if b.Token != "" {
req.Header.Set("X-F5-Auth-Token", b.Token)
} else {
req.SetBasicAuth(b.User, b.Password)
}
req.Header.Add("Content-Type", options.ContentType)
req.Header.Add("Content-Range", fmt.Sprintf("%d-%d/%d", start, end-1, size))
// Try to upload chunk
res, err := client.Do(req)
if err != nil {
return nil, err
}
data, _ := ioutil.ReadAll(res.Body)
if res.StatusCode >= 400 {
if res.Header.Get("Content-Type") == "application/json" {
return nil, b.checkError(data)
}
return nil, fmt.Errorf("HTTP %d :: %s", res.StatusCode, string(data[:]))
}
defer res.Body.Close()
var upload Upload
err = json.Unmarshal(data, &upload)
if err != nil {
return nil, err
}
start = end
if start >= size {
// Final chunk was uploaded
return &upload, err
}
}
} | go | func (b *BigIP) Upload(r io.Reader, size int64, path ...string) (*Upload, error) {
client := &http.Client{
Transport: b.Transport,
Timeout: b.ConfigOptions.APICallTimeout,
}
options := &APIRequest{
Method: "post",
URL: b.iControlPath(path),
ContentType: "application/octet-stream",
}
var format string
if strings.Contains(options.URL, "mgmt/") {
format = "%s/%s"
} else {
format = "%s/mgmt/%s"
}
url := fmt.Sprintf(format, b.Host, options.URL)
chunkSize := 512 * 1024
var start, end int64
for {
// Read next chunk
chunk := make([]byte, chunkSize)
n, err := r.Read(chunk)
if err != nil {
return nil, err
}
end = start + int64(n)
// Resize buffer size to number of bytes read
if n < chunkSize {
chunk = chunk[:n]
}
body := bytes.NewReader(chunk)
req, _ := http.NewRequest(strings.ToUpper(options.Method), url, body)
if b.Token != "" {
req.Header.Set("X-F5-Auth-Token", b.Token)
} else {
req.SetBasicAuth(b.User, b.Password)
}
req.Header.Add("Content-Type", options.ContentType)
req.Header.Add("Content-Range", fmt.Sprintf("%d-%d/%d", start, end-1, size))
// Try to upload chunk
res, err := client.Do(req)
if err != nil {
return nil, err
}
data, _ := ioutil.ReadAll(res.Body)
if res.StatusCode >= 400 {
if res.Header.Get("Content-Type") == "application/json" {
return nil, b.checkError(data)
}
return nil, fmt.Errorf("HTTP %d :: %s", res.StatusCode, string(data[:]))
}
defer res.Body.Close()
var upload Upload
err = json.Unmarshal(data, &upload)
if err != nil {
return nil, err
}
start = end
if start >= size {
// Final chunk was uploaded
return &upload, err
}
}
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Upload",
"(",
"r",
"io",
".",
"Reader",
",",
"size",
"int64",
",",
"path",
"...",
"string",
")",
"(",
"*",
"Upload",
",",
"error",
")",
"{",
"client",
":=",
"&",
"http",
".",
"Client",
"{",
"Transport",
":",
... | // Upload a file read from a Reader | [
"Upload",
"a",
"file",
"read",
"from",
"a",
"Reader"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/bigip.go#L408-L473 |
17,555 | scottdware/go-bigip | shared.go | GetLicenseState | func (b *BigIP) GetLicenseState() (*LicenseState, error) {
var l LicenseState
err, _ := b.getForEntity(&l, uriShared, uriLicensing, uriRegistration)
if err != nil {
return nil, err
}
return &l, nil
} | go | func (b *BigIP) GetLicenseState() (*LicenseState, error) {
var l LicenseState
err, _ := b.getForEntity(&l, uriShared, uriLicensing, uriRegistration)
if err != nil {
return nil, err
}
return &l, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetLicenseState",
"(",
")",
"(",
"*",
"LicenseState",
",",
"error",
")",
"{",
"var",
"l",
"LicenseState",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"l",
",",
"uriShared",
",",
"uriLicensing... | // Returns the current license state. | [
"Returns",
"the",
"current",
"license",
"state",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/shared.go#L176-L183 |
17,556 | scottdware/go-bigip | shared.go | InstallLicense | func (b *BigIP) InstallLicense(licenseText string) error {
r := map[string]string{"licenseText": licenseText}
return b.put(r, uriShared, uriLicensing, uriRegistration)
} | go | func (b *BigIP) InstallLicense(licenseText string) error {
r := map[string]string{"licenseText": licenseText}
return b.put(r, uriShared, uriLicensing, uriRegistration)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"InstallLicense",
"(",
"licenseText",
"string",
")",
"error",
"{",
"r",
":=",
"map",
"[",
"string",
"]",
"string",
"{",
"\"",
"\"",
":",
"licenseText",
"}",
"\n",
"return",
"b",
".",
"put",
"(",
"r",
",",
"uriSh... | // Installs the given license. | [
"Installs",
"the",
"given",
"license",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/shared.go#L186-L189 |
17,557 | scottdware/go-bigip | shared.go | AutoLicense | func (b *BigIP) AutoLicense(regKey string, addOnKeys []string, timeout time.Duration) error {
deadline := time.Now().Add(timeout)
actreq := Activation{BaseRegKey: regKey, AddOnKeys: addOnKeys, IsAutomaticActivation: true}
if err := b.Activate(actreq); err != nil {
return err
}
loop:
for time.Now().Before(deadline) {
actresp, err := b.GetActivationStatus()
if err != nil {
return err
}
if actresp.Status == activationInProgress {
time.Sleep(1 * time.Second)
continue
}
switch actresp.Status {
case activationComplete:
return b.InstallLicense(*actresp.LicenseText)
case activationFailed:
return fmt.Errorf("Licensing failed: %s", *actresp.ErrorText)
case activationNeedEula:
eula := *actresp.EulaText
actreq.EulaText = &eula
break loop
default:
return fmt.Errorf("Unknown licensing status: %s", actresp.Status)
}
}
if actreq.EulaText == nil {
return fmt.Errorf("Timed out after %s", timeout)
}
// Proceed with EULA acceptance
if err := b.Activate(actreq); err != nil {
return err
}
for time.Now().Before(deadline) {
actresp, err := b.GetActivationStatus()
if err != nil {
return err
}
if actresp.Status == activationInProgress {
time.Sleep(1 * time.Second)
continue
}
switch actresp.Status {
case activationComplete:
return b.InstallLicense(*actresp.LicenseText)
case activationNeedEula:
return fmt.Errorf("Tried to accept EULA, but status is: %s", *actresp.ErrorText)
case activationFailed:
return fmt.Errorf("Licensing failed: %s", *actresp.ErrorText)
}
return fmt.Errorf("Unknown licensing status: %s", actresp.Status)
}
return fmt.Errorf("Timed out after %s", timeout)
} | go | func (b *BigIP) AutoLicense(regKey string, addOnKeys []string, timeout time.Duration) error {
deadline := time.Now().Add(timeout)
actreq := Activation{BaseRegKey: regKey, AddOnKeys: addOnKeys, IsAutomaticActivation: true}
if err := b.Activate(actreq); err != nil {
return err
}
loop:
for time.Now().Before(deadline) {
actresp, err := b.GetActivationStatus()
if err != nil {
return err
}
if actresp.Status == activationInProgress {
time.Sleep(1 * time.Second)
continue
}
switch actresp.Status {
case activationComplete:
return b.InstallLicense(*actresp.LicenseText)
case activationFailed:
return fmt.Errorf("Licensing failed: %s", *actresp.ErrorText)
case activationNeedEula:
eula := *actresp.EulaText
actreq.EulaText = &eula
break loop
default:
return fmt.Errorf("Unknown licensing status: %s", actresp.Status)
}
}
if actreq.EulaText == nil {
return fmt.Errorf("Timed out after %s", timeout)
}
// Proceed with EULA acceptance
if err := b.Activate(actreq); err != nil {
return err
}
for time.Now().Before(deadline) {
actresp, err := b.GetActivationStatus()
if err != nil {
return err
}
if actresp.Status == activationInProgress {
time.Sleep(1 * time.Second)
continue
}
switch actresp.Status {
case activationComplete:
return b.InstallLicense(*actresp.LicenseText)
case activationNeedEula:
return fmt.Errorf("Tried to accept EULA, but status is: %s", *actresp.ErrorText)
case activationFailed:
return fmt.Errorf("Licensing failed: %s", *actresp.ErrorText)
}
return fmt.Errorf("Unknown licensing status: %s", actresp.Status)
}
return fmt.Errorf("Timed out after %s", timeout)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AutoLicense",
"(",
"regKey",
"string",
",",
"addOnKeys",
"[",
"]",
"string",
",",
"timeout",
"time",
".",
"Duration",
")",
"error",
"{",
"deadline",
":=",
"time",
".",
"Now",
"(",
")",
".",
"Add",
"(",
"timeout",... | // Automatically activate this registration key and install the resulting license.
// The BIG-IP must have access to the activation server for this to work. | [
"Automatically",
"activate",
"this",
"registration",
"key",
"and",
"install",
"the",
"resulting",
"license",
".",
"The",
"BIG",
"-",
"IP",
"must",
"have",
"access",
"to",
"the",
"activation",
"server",
"for",
"this",
"to",
"work",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/shared.go#L193-L259 |
17,558 | scottdware/go-bigip | shared.go | UploadFile | func (b *BigIP) UploadFile(f *os.File) (*Upload, error) {
if strings.HasSuffix(f.Name(), ".iso") {
err := fmt.Errorf("File must not have .iso extension")
return nil, err
}
info, err := f.Stat()
if err != nil {
return nil, err
}
return b.Upload(f, info.Size(), uriShared, uriFileTransfer, uriUploads, info.Name())
} | go | func (b *BigIP) UploadFile(f *os.File) (*Upload, error) {
if strings.HasSuffix(f.Name(), ".iso") {
err := fmt.Errorf("File must not have .iso extension")
return nil, err
}
info, err := f.Stat()
if err != nil {
return nil, err
}
return b.Upload(f, info.Size(), uriShared, uriFileTransfer, uriUploads, info.Name())
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"UploadFile",
"(",
"f",
"*",
"os",
".",
"File",
")",
"(",
"*",
"Upload",
",",
"error",
")",
"{",
"if",
"strings",
".",
"HasSuffix",
"(",
"f",
".",
"Name",
"(",
")",
",",
"\"",
"\"",
")",
"{",
"err",
":=",
... | // Upload a file | [
"Upload",
"a",
"file"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/shared.go#L262-L272 |
17,559 | scottdware/go-bigip | shared.go | UploadBytes | func (b *BigIP) UploadBytes(data []byte, filename string) (*Upload, error) {
r := bytes.NewReader(data)
size := int64(len(data))
return b.Upload(r, size, uriShared, uriFileTransfer, uriUploads, filename)
} | go | func (b *BigIP) UploadBytes(data []byte, filename string) (*Upload, error) {
r := bytes.NewReader(data)
size := int64(len(data))
return b.Upload(r, size, uriShared, uriFileTransfer, uriUploads, filename)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"UploadBytes",
"(",
"data",
"[",
"]",
"byte",
",",
"filename",
"string",
")",
"(",
"*",
"Upload",
",",
"error",
")",
"{",
"r",
":=",
"bytes",
".",
"NewReader",
"(",
"data",
")",
"\n",
"size",
":=",
"int64",
"(... | // Upload a file from a byte slice | [
"Upload",
"a",
"file",
"from",
"a",
"byte",
"slice"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/shared.go#L275-L279 |
17,560 | scottdware/go-bigip | gtm.go | GetGTMWideIPs | func (b *BigIP) GetGTMWideIPs(recordType GTMType) (*GTMWideIPs, error) {
var w GTMWideIPs
err, _ := b.getForEntity(&w, uriGtm, uriWideIp, string(recordType))
if err != nil {
return nil, err
}
return &w, nil
} | go | func (b *BigIP) GetGTMWideIPs(recordType GTMType) (*GTMWideIPs, error) {
var w GTMWideIPs
err, _ := b.getForEntity(&w, uriGtm, uriWideIp, string(recordType))
if err != nil {
return nil, err
}
return &w, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetGTMWideIPs",
"(",
"recordType",
"GTMType",
")",
"(",
"*",
"GTMWideIPs",
",",
"error",
")",
"{",
"var",
"w",
"GTMWideIPs",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"w",
",",
"uriGtm",
... | // GetGTMWideIPs returns a list of all WideIps for a provided type | [
"GetGTMWideIPs",
"returns",
"a",
"list",
"of",
"all",
"WideIps",
"for",
"a",
"provided",
"type"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/gtm.go#L62-L70 |
17,561 | scottdware/go-bigip | gtm.go | GetGTMWideIP | func (b *BigIP) GetGTMWideIP(name string, recordType GTMType) (*GTMWideIP, error) {
var w GTMWideIP
err, ok := b.getForEntity(&w, uriGtm, uriWideIp, string(recordType), name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &w, nil
} | go | func (b *BigIP) GetGTMWideIP(name string, recordType GTMType) (*GTMWideIP, error) {
var w GTMWideIP
err, ok := b.getForEntity(&w, uriGtm, uriWideIp, string(recordType), name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &w, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetGTMWideIP",
"(",
"name",
"string",
",",
"recordType",
"GTMType",
")",
"(",
"*",
"GTMWideIP",
",",
"error",
")",
"{",
"var",
"w",
"GTMWideIP",
"\n\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",... | // GetGTMWideIP get's a WideIP by name | [
"GetGTMWideIP",
"get",
"s",
"a",
"WideIP",
"by",
"name"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/gtm.go#L73-L85 |
17,562 | scottdware/go-bigip | gtm.go | AddGTMWideIP | func (b *BigIP) AddGTMWideIP(config *GTMWideIP, recordType GTMType) error {
return b.post(config, uriGtm, uriWideIp, string(recordType))
} | go | func (b *BigIP) AddGTMWideIP(config *GTMWideIP, recordType GTMType) error {
return b.post(config, uriGtm, uriWideIp, string(recordType))
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddGTMWideIP",
"(",
"config",
"*",
"GTMWideIP",
",",
"recordType",
"GTMType",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriGtm",
",",
"uriWideIp",
",",
"string",
"(",
"recordType",
")",
")... | // AddGTMWideIP adds a WideIp by config to the BIG-IP system. | [
"AddGTMWideIP",
"adds",
"a",
"WideIp",
"by",
"config",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/gtm.go#L88-L90 |
17,563 | scottdware/go-bigip | gtm.go | DeleteGTMWideIP | func (b *BigIP) DeleteGTMWideIP(fullPath string, recordType GTMType) error {
return b.delete(uriGtm, uriWideIp, string(recordType), fullPath)
} | go | func (b *BigIP) DeleteGTMWideIP(fullPath string, recordType GTMType) error {
return b.delete(uriGtm, uriWideIp, string(recordType), fullPath)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteGTMWideIP",
"(",
"fullPath",
"string",
",",
"recordType",
"GTMType",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriGtm",
",",
"uriWideIp",
",",
"string",
"(",
"recordType",
")",
",",
"fullPath",
")"... | // DeleteGTMWideIP removes a WideIp by config to the BIG-IP system. | [
"DeleteGTMWideIP",
"removes",
"a",
"WideIp",
"by",
"config",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/gtm.go#L93-L95 |
17,564 | scottdware/go-bigip | gtm.go | ModifyGTMWideIP | func (b *BigIP) ModifyGTMWideIP(fullPath string, config *GTMWideIP, recordType GTMType) error {
return b.put(config, uriGtm, uriWideIp, string(recordType), fullPath)
} | go | func (b *BigIP) ModifyGTMWideIP(fullPath string, config *GTMWideIP, recordType GTMType) error {
return b.put(config, uriGtm, uriWideIp, string(recordType), fullPath)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyGTMWideIP",
"(",
"fullPath",
"string",
",",
"config",
"*",
"GTMWideIP",
",",
"recordType",
"GTMType",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriGtm",
",",
"uriWideIp",
",",
"string",... | // ModifyGTMWideIP adds a WideIp by config to the BIG-IP system. | [
"ModifyGTMWideIP",
"adds",
"a",
"WideIp",
"by",
"config",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/gtm.go#L98-L100 |
17,565 | scottdware/go-bigip | net.go | Interfaces | func (b *BigIP) Interfaces() (*Interfaces, error) {
var interfaces Interfaces
err, _ := b.getForEntity(&interfaces, uriNet, uriInterface)
if err != nil {
return nil, err
}
return &interfaces, nil
} | go | func (b *BigIP) Interfaces() (*Interfaces, error) {
var interfaces Interfaces
err, _ := b.getForEntity(&interfaces, uriNet, uriInterface)
if err != nil {
return nil, err
}
return &interfaces, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Interfaces",
"(",
")",
"(",
"*",
"Interfaces",
",",
"error",
")",
"{",
"var",
"interfaces",
"Interfaces",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"interfaces",
",",
"uriNet",
",",
"uriInt... | // Interfaces returns a list of interfaces. | [
"Interfaces",
"returns",
"a",
"list",
"of",
"interfaces",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L208-L217 |
17,566 | scottdware/go-bigip | net.go | AddInterfaceToVlan | func (b *BigIP) AddInterfaceToVlan(vlan, iface string, tagged bool) error {
config := &VlanInterface{}
config.Name = iface
if tagged {
config.Tagged = true
} else {
config.Untagged = true
}
return b.put(config, uriNet, uriVlan, vlan, "interfaces")
} | go | func (b *BigIP) AddInterfaceToVlan(vlan, iface string, tagged bool) error {
config := &VlanInterface{}
config.Name = iface
if tagged {
config.Tagged = true
} else {
config.Untagged = true
}
return b.put(config, uriNet, uriVlan, vlan, "interfaces")
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddInterfaceToVlan",
"(",
"vlan",
",",
"iface",
"string",
",",
"tagged",
"bool",
")",
"error",
"{",
"config",
":=",
"&",
"VlanInterface",
"{",
"}",
"\n\n",
"config",
".",
"Name",
"=",
"iface",
"\n",
"if",
"tagged",... | // AddInterfaceToVlan associates the given interface to the specified VLAN. | [
"AddInterfaceToVlan",
"associates",
"the",
"given",
"interface",
"to",
"the",
"specified",
"VLAN",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L220-L231 |
17,567 | scottdware/go-bigip | net.go | SelfIPs | func (b *BigIP) SelfIPs() (*SelfIPs, error) {
var self SelfIPs
err, _ := b.getForEntity(&self, uriNet, uriSelf)
if err != nil {
return nil, err
}
return &self, nil
} | go | func (b *BigIP) SelfIPs() (*SelfIPs, error) {
var self SelfIPs
err, _ := b.getForEntity(&self, uriNet, uriSelf)
if err != nil {
return nil, err
}
return &self, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"SelfIPs",
"(",
")",
"(",
"*",
"SelfIPs",
",",
"error",
")",
"{",
"var",
"self",
"SelfIPs",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"self",
",",
"uriNet",
",",
"uriSelf",
")",
"\n",
... | // SelfIPs returns a list of self IP's. | [
"SelfIPs",
"returns",
"a",
"list",
"of",
"self",
"IP",
"s",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L234-L242 |
17,568 | scottdware/go-bigip | net.go | DeleteSelfIP | func (b *BigIP) DeleteSelfIP(name string) error {
return b.delete(uriNet, uriSelf, name)
} | go | func (b *BigIP) DeleteSelfIP(name string) error {
return b.delete(uriNet, uriSelf, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteSelfIP",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriNet",
",",
"uriSelf",
",",
"name",
")",
"\n",
"}"
] | // DeleteSelfIP removes a self IP. | [
"DeleteSelfIP",
"removes",
"a",
"self",
"IP",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L257-L259 |
17,569 | scottdware/go-bigip | net.go | ModifySelfIP | func (b *BigIP) ModifySelfIP(name string, config *SelfIP) error {
return b.put(config, uriNet, uriSelf, name)
} | go | func (b *BigIP) ModifySelfIP(name string, config *SelfIP) error {
return b.put(config, uriNet, uriSelf, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifySelfIP",
"(",
"name",
"string",
",",
"config",
"*",
"SelfIP",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriNet",
",",
"uriSelf",
",",
"name",
")",
"\n",
"}"
] | // ModifySelfIP allows you to change any attribute of a self IP. Fields that
// can be modified are referenced in the SelfIP struct. | [
"ModifySelfIP",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"self",
"IP",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"SelfIP",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L263-L265 |
17,570 | scottdware/go-bigip | net.go | Trunks | func (b *BigIP) Trunks() (*Trunks, error) {
var trunks Trunks
err, _ := b.getForEntity(&trunks, uriNet, uriTrunk)
if err != nil {
return nil, err
}
return &trunks, nil
} | go | func (b *BigIP) Trunks() (*Trunks, error) {
var trunks Trunks
err, _ := b.getForEntity(&trunks, uriNet, uriTrunk)
if err != nil {
return nil, err
}
return &trunks, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Trunks",
"(",
")",
"(",
"*",
"Trunks",
",",
"error",
")",
"{",
"var",
"trunks",
"Trunks",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"trunks",
",",
"uriNet",
",",
"uriTrunk",
")",
"\n",
... | // Trunks returns a list of trunks. | [
"Trunks",
"returns",
"a",
"list",
"of",
"trunks",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L268-L276 |
17,571 | scottdware/go-bigip | net.go | DeleteTrunk | func (b *BigIP) DeleteTrunk(name string) error {
return b.delete(uriNet, uriTrunk, name)
} | go | func (b *BigIP) DeleteTrunk(name string) error {
return b.delete(uriNet, uriTrunk, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteTrunk",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriNet",
",",
"uriTrunk",
",",
"name",
")",
"\n",
"}"
] | // DeleteTrunk removes a trunk. | [
"DeleteTrunk",
"removes",
"a",
"trunk",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L301-L303 |
17,572 | scottdware/go-bigip | net.go | ModifyTrunk | func (b *BigIP) ModifyTrunk(name string, config *Trunk) error {
return b.put(config, uriNet, uriTrunk, name)
} | go | func (b *BigIP) ModifyTrunk(name string, config *Trunk) error {
return b.put(config, uriNet, uriTrunk, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyTrunk",
"(",
"name",
"string",
",",
"config",
"*",
"Trunk",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriNet",
",",
"uriTrunk",
",",
"name",
")",
"\n",
"}"
] | // ModifyTrunk allows you to change any attribute of a trunk. Fields that
// can be modified are referenced in the Trunk struct. | [
"ModifyTrunk",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"trunk",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"Trunk",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L307-L309 |
17,573 | scottdware/go-bigip | net.go | Vlans | func (b *BigIP) Vlans() (*Vlans, error) {
var vlans Vlans
err, _ := b.getForEntity(&vlans, uriNet, uriVlan)
if err != nil {
return nil, err
}
return &vlans, nil
} | go | func (b *BigIP) Vlans() (*Vlans, error) {
var vlans Vlans
err, _ := b.getForEntity(&vlans, uriNet, uriVlan)
if err != nil {
return nil, err
}
return &vlans, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Vlans",
"(",
")",
"(",
"*",
"Vlans",
",",
"error",
")",
"{",
"var",
"vlans",
"Vlans",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"vlans",
",",
"uriNet",
",",
"uriVlan",
")",
"\n\n",
"i... | // Vlans returns a list of vlans. | [
"Vlans",
"returns",
"a",
"list",
"of",
"vlans",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L312-L321 |
17,574 | scottdware/go-bigip | net.go | CreateVlan | func (b *BigIP) CreateVlan(name string, tag int) error {
config := &Vlan{
Name: name,
Tag: tag,
}
return b.post(config, uriNet, uriVlan)
} | go | func (b *BigIP) CreateVlan(name string, tag int) error {
config := &Vlan{
Name: name,
Tag: tag,
}
return b.post(config, uriNet, uriVlan)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"CreateVlan",
"(",
"name",
"string",
",",
"tag",
"int",
")",
"error",
"{",
"config",
":=",
"&",
"Vlan",
"{",
"Name",
":",
"name",
",",
"Tag",
":",
"tag",
",",
"}",
"\n\n",
"return",
"b",
".",
"post",
"(",
"c... | // CreateVlan adds a new VLAN to the BIG-IP system. | [
"CreateVlan",
"adds",
"a",
"new",
"VLAN",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L324-L331 |
17,575 | scottdware/go-bigip | net.go | DeleteVlan | func (b *BigIP) DeleteVlan(name string) error {
return b.delete(uriNet, uriVlan, name)
} | go | func (b *BigIP) DeleteVlan(name string) error {
return b.delete(uriNet, uriVlan, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteVlan",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriNet",
",",
"uriVlan",
",",
"name",
")",
"\n",
"}"
] | // DeleteVlan removes a vlan. | [
"DeleteVlan",
"removes",
"a",
"vlan",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L334-L336 |
17,576 | scottdware/go-bigip | net.go | ModifyVlan | func (b *BigIP) ModifyVlan(name string, config *Vlan) error {
return b.put(config, uriNet, uriVlan, name)
} | go | func (b *BigIP) ModifyVlan(name string, config *Vlan) error {
return b.put(config, uriNet, uriVlan, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyVlan",
"(",
"name",
"string",
",",
"config",
"*",
"Vlan",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriNet",
",",
"uriVlan",
",",
"name",
")",
"\n",
"}"
] | // ModifyVlan allows you to change any attribute of a VLAN. Fields that
// can be modified are referenced in the Vlan struct. | [
"ModifyVlan",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"VLAN",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"Vlan",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L340-L342 |
17,577 | scottdware/go-bigip | net.go | Routes | func (b *BigIP) Routes() (*Routes, error) {
var routes Routes
err, _ := b.getForEntity(&routes, uriNet, uriRoute)
if err != nil {
return nil, err
}
return &routes, nil
} | go | func (b *BigIP) Routes() (*Routes, error) {
var routes Routes
err, _ := b.getForEntity(&routes, uriNet, uriRoute)
if err != nil {
return nil, err
}
return &routes, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Routes",
"(",
")",
"(",
"*",
"Routes",
",",
"error",
")",
"{",
"var",
"routes",
"Routes",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"routes",
",",
"uriNet",
",",
"uriRoute",
")",
"\n\n"... | // Routes returns a list of routes. | [
"Routes",
"returns",
"a",
"list",
"of",
"routes",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L345-L354 |
17,578 | scottdware/go-bigip | net.go | AddRoute | func (b *BigIP) AddRoute(config *Route) error {
return b.post(config, uriNet, uriRoute)
} | go | func (b *BigIP) AddRoute(config *Route) error {
return b.post(config, uriNet, uriRoute)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddRoute",
"(",
"config",
"*",
"Route",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriNet",
",",
"uriRoute",
")",
"\n",
"}"
] | // AddRoute adds a new static route to the BIG-IP system. | [
"AddRoute",
"adds",
"a",
"new",
"static",
"route",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L369-L371 |
17,579 | scottdware/go-bigip | net.go | GetRoute | func (b *BigIP) GetRoute(name string) (*Route, error) {
var route Route
err, _ := b.getForEntity(&route, uriNet, uriRoute, name)
if err != nil {
return nil, err
}
return &route, nil
} | go | func (b *BigIP) GetRoute(name string) (*Route, error) {
var route Route
err, _ := b.getForEntity(&route, uriNet, uriRoute, name)
if err != nil {
return nil, err
}
return &route, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetRoute",
"(",
"name",
"string",
")",
"(",
"*",
"Route",
",",
"error",
")",
"{",
"var",
"route",
"Route",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"route",
",",
"uriNet",
",",
"uriRou... | // GetRoute gets a static route. | [
"GetRoute",
"gets",
"a",
"static",
"route",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L374-L383 |
17,580 | scottdware/go-bigip | net.go | DeleteRoute | func (b *BigIP) DeleteRoute(name string) error {
return b.delete(uriNet, uriRoute, name)
} | go | func (b *BigIP) DeleteRoute(name string) error {
return b.delete(uriNet, uriRoute, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteRoute",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriNet",
",",
"uriRoute",
",",
"name",
")",
"\n",
"}"
] | // DeleteRoute removes a static route. | [
"DeleteRoute",
"removes",
"a",
"static",
"route",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L386-L388 |
17,581 | scottdware/go-bigip | net.go | ModifyRoute | func (b *BigIP) ModifyRoute(name string, config *Route) error {
return b.put(config, uriNet, uriRoute, name)
} | go | func (b *BigIP) ModifyRoute(name string, config *Route) error {
return b.put(config, uriNet, uriRoute, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyRoute",
"(",
"name",
"string",
",",
"config",
"*",
"Route",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriNet",
",",
"uriRoute",
",",
"name",
")",
"\n",
"}"
] | // ModifyRoute allows you to change any attribute of a static route. Fields that
// can be modified are referenced in the Route struct. | [
"ModifyRoute",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"static",
"route",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"Route",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L392-L394 |
17,582 | scottdware/go-bigip | net.go | RouteDomains | func (b *BigIP) RouteDomains() (*RouteDomains, error) {
var rd RouteDomains
err, _ := b.getForEntity(&rd, uriNet, uriRouteDomain)
if err != nil {
return nil, err
}
return &rd, nil
} | go | func (b *BigIP) RouteDomains() (*RouteDomains, error) {
var rd RouteDomains
err, _ := b.getForEntity(&rd, uriNet, uriRouteDomain)
if err != nil {
return nil, err
}
return &rd, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"RouteDomains",
"(",
")",
"(",
"*",
"RouteDomains",
",",
"error",
")",
"{",
"var",
"rd",
"RouteDomains",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"rd",
",",
"uriNet",
",",
"uriRouteDomain",... | // RouteDomains returns a list of route domains. | [
"RouteDomains",
"returns",
"a",
"list",
"of",
"route",
"domains",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L397-L406 |
17,583 | scottdware/go-bigip | net.go | DeleteRouteDomain | func (b *BigIP) DeleteRouteDomain(name string) error {
return b.delete(uriNet, uriRouteDomain, name)
} | go | func (b *BigIP) DeleteRouteDomain(name string) error {
return b.delete(uriNet, uriRouteDomain, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteRouteDomain",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriNet",
",",
"uriRouteDomain",
",",
"name",
")",
"\n",
"}"
] | // DeleteRouteDomain removes a route domain. | [
"DeleteRouteDomain",
"removes",
"a",
"route",
"domain",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L434-L436 |
17,584 | scottdware/go-bigip | net.go | ModifyRouteDomain | func (b *BigIP) ModifyRouteDomain(name string, config *RouteDomain) error {
return b.put(config, uriNet, uriRouteDomain, name)
} | go | func (b *BigIP) ModifyRouteDomain(name string, config *RouteDomain) error {
return b.put(config, uriNet, uriRouteDomain, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyRouteDomain",
"(",
"name",
"string",
",",
"config",
"*",
"RouteDomain",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriNet",
",",
"uriRouteDomain",
",",
"name",
")",
"\n",
"}"
] | // ModifyRouteDomain allows you to change any attribute of a route domain. Fields that
// can be modified are referenced in the RouteDomain struct. | [
"ModifyRouteDomain",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"route",
"domain",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"RouteDomain",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L440-L442 |
17,585 | scottdware/go-bigip | net.go | BGPInstances | func (b *BigIP) BGPInstances() (*BGPInstances, error) {
var bgpInstances BGPInstances
err, _ := b.getForEntity(&bgpInstances, uriNet, uriRouting, uriBGP)
if err != nil {
return nil, err
}
return &bgpInstances, nil
} | go | func (b *BigIP) BGPInstances() (*BGPInstances, error) {
var bgpInstances BGPInstances
err, _ := b.getForEntity(&bgpInstances, uriNet, uriRouting, uriBGP)
if err != nil {
return nil, err
}
return &bgpInstances, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"BGPInstances",
"(",
")",
"(",
"*",
"BGPInstances",
",",
"error",
")",
"{",
"var",
"bgpInstances",
"BGPInstances",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"bgpInstances",
",",
"uriNet",
",",... | // BGPInstances returns a list of BGP instances. | [
"BGPInstances",
"returns",
"a",
"list",
"of",
"BGP",
"instances",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L445-L453 |
17,586 | scottdware/go-bigip | net.go | CreateBGPInstance | func (b *BigIP) CreateBGPInstance(name string, localAS int) error {
config := &BGPInstance{
Name: name,
LocalAS: localAS,
}
return b.post(config, uriNet, uriRouting, uriBGP)
} | go | func (b *BigIP) CreateBGPInstance(name string, localAS int) error {
config := &BGPInstance{
Name: name,
LocalAS: localAS,
}
return b.post(config, uriNet, uriRouting, uriBGP)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"CreateBGPInstance",
"(",
"name",
"string",
",",
"localAS",
"int",
")",
"error",
"{",
"config",
":=",
"&",
"BGPInstance",
"{",
"Name",
":",
"name",
",",
"LocalAS",
":",
"localAS",
",",
"}",
"\n\n",
"return",
"b",
... | // CreateBGPInstance adds a new BGP instance to the BIG-IP system. | [
"CreateBGPInstance",
"adds",
"a",
"new",
"BGP",
"instance",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L456-L463 |
17,587 | scottdware/go-bigip | net.go | AddBGPInstance | func (b *BigIP) AddBGPInstance(config *BGPInstance) error {
return b.post(config, uriNet, uriRouting, uriBGP)
} | go | func (b *BigIP) AddBGPInstance(config *BGPInstance) error {
return b.post(config, uriNet, uriRouting, uriBGP)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddBGPInstance",
"(",
"config",
"*",
"BGPInstance",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriNet",
",",
"uriRouting",
",",
"uriBGP",
")",
"\n",
"}"
] | // AddBGPInstance adds a new BGP instance to the BIG-IP system. | [
"AddBGPInstance",
"adds",
"a",
"new",
"BGP",
"instance",
"to",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L466-L468 |
17,588 | scottdware/go-bigip | net.go | GetBGPInstance | func (b *BigIP) GetBGPInstance(name string) (*BGPInstance, error) {
var bgpInstance BGPInstance
err, ok := b.getForEntity(&bgpInstance, uriNet, uriRouting, uriBGP, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &bgpInstance, nil
} | go | func (b *BigIP) GetBGPInstance(name string) (*BGPInstance, error) {
var bgpInstance BGPInstance
err, ok := b.getForEntity(&bgpInstance, uriNet, uriRouting, uriBGP, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &bgpInstance, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetBGPInstance",
"(",
"name",
"string",
")",
"(",
"*",
"BGPInstance",
",",
"error",
")",
"{",
"var",
"bgpInstance",
"BGPInstance",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"bgpInstance",
",... | // GetBGPInstance gets a BGP instance. | [
"GetBGPInstance",
"gets",
"a",
"BGP",
"instance",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L471-L482 |
17,589 | scottdware/go-bigip | net.go | DeleteBGPInstance | func (b *BigIP) DeleteBGPInstance(name string) error {
return b.delete(uriNet, uriRouting, uriBGP, name)
} | go | func (b *BigIP) DeleteBGPInstance(name string) error {
return b.delete(uriNet, uriRouting, uriBGP, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteBGPInstance",
"(",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriNet",
",",
"uriRouting",
",",
"uriBGP",
",",
"name",
")",
"\n",
"}"
] | // DeleteBGPInstance removes a BGP instance. | [
"DeleteBGPInstance",
"removes",
"a",
"BGP",
"instance",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L485-L487 |
17,590 | scottdware/go-bigip | net.go | ModifyBGPInstance | func (b *BigIP) ModifyBGPInstance(name string, config *BGPInstance) error {
return b.put(config, uriNet, uriRouting, uriBGP, name)
} | go | func (b *BigIP) ModifyBGPInstance(name string, config *BGPInstance) error {
return b.put(config, uriNet, uriRouting, uriBGP, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyBGPInstance",
"(",
"name",
"string",
",",
"config",
"*",
"BGPInstance",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriNet",
",",
"uriRouting",
",",
"uriBGP",
",",
"name",
")",
"\n",
... | // ModifyBGPInstance allows you to change any attribute of a BGP instance. Fields that
// can be modified are referenced in the BGPInstance struct. | [
"ModifyBGPInstance",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"BGP",
"instance",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"BGPInstance",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L491-L493 |
17,591 | scottdware/go-bigip | net.go | BGPNeighbors | func (b *BigIP) BGPNeighbors(instance string) (*BGPNeighbors, error) {
var bgpNeighbors BGPNeighbors
err, _ := b.getForEntity(&bgpNeighbors, uriNet, uriRouting, uriBGP, instance, uriNeighbor)
if err != nil {
return nil, err
}
return &bgpNeighbors, nil
} | go | func (b *BigIP) BGPNeighbors(instance string) (*BGPNeighbors, error) {
var bgpNeighbors BGPNeighbors
err, _ := b.getForEntity(&bgpNeighbors, uriNet, uriRouting, uriBGP, instance, uriNeighbor)
if err != nil {
return nil, err
}
return &bgpNeighbors, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"BGPNeighbors",
"(",
"instance",
"string",
")",
"(",
"*",
"BGPNeighbors",
",",
"error",
")",
"{",
"var",
"bgpNeighbors",
"BGPNeighbors",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"bgpNeighbors",... | // BGPNeighbors returns a list of BGP neighbors of a BGP instance. | [
"BGPNeighbors",
"returns",
"a",
"list",
"of",
"BGP",
"neighbors",
"of",
"a",
"BGP",
"instance",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L496-L504 |
17,592 | scottdware/go-bigip | net.go | CreateBGPNeighbor | func (b *BigIP) CreateBGPNeighbor(instance, name string, remoteAS int) error {
config := &BGPNeighbor{
Name: name,
RemoteAS: remoteAS,
}
return b.post(config, uriNet, uriRouting, uriBGP, instance, uriNeighbor)
} | go | func (b *BigIP) CreateBGPNeighbor(instance, name string, remoteAS int) error {
config := &BGPNeighbor{
Name: name,
RemoteAS: remoteAS,
}
return b.post(config, uriNet, uriRouting, uriBGP, instance, uriNeighbor)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"CreateBGPNeighbor",
"(",
"instance",
",",
"name",
"string",
",",
"remoteAS",
"int",
")",
"error",
"{",
"config",
":=",
"&",
"BGPNeighbor",
"{",
"Name",
":",
"name",
",",
"RemoteAS",
":",
"remoteAS",
",",
"}",
"\n\n... | // CreateBGPNeighbor adds a new BGP neigbhor to a BGP instance in the BIG-IP system. | [
"CreateBGPNeighbor",
"adds",
"a",
"new",
"BGP",
"neigbhor",
"to",
"a",
"BGP",
"instance",
"in",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L507-L514 |
17,593 | scottdware/go-bigip | net.go | AddBGPNeighbor | func (b *BigIP) AddBGPNeighbor(instance string, config *BGPNeighbor) error {
return b.post(config, uriNet, uriRouting, uriBGP, instance, uriNeighbor)
} | go | func (b *BigIP) AddBGPNeighbor(instance string, config *BGPNeighbor) error {
return b.post(config, uriNet, uriRouting, uriBGP, instance, uriNeighbor)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"AddBGPNeighbor",
"(",
"instance",
"string",
",",
"config",
"*",
"BGPNeighbor",
")",
"error",
"{",
"return",
"b",
".",
"post",
"(",
"config",
",",
"uriNet",
",",
"uriRouting",
",",
"uriBGP",
",",
"instance",
",",
"u... | // AddBGPNeighbor adds a new BGP neighbor to a BGP instance in the BIG-IP system. | [
"AddBGPNeighbor",
"adds",
"a",
"new",
"BGP",
"neighbor",
"to",
"a",
"BGP",
"instance",
"in",
"the",
"BIG",
"-",
"IP",
"system",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L517-L519 |
17,594 | scottdware/go-bigip | net.go | GetBGPNeighbor | func (b *BigIP) GetBGPNeighbor(instance, name string) (*BGPNeighbor, error) {
var bgpNeighbor BGPNeighbor
err, ok := b.getForEntity(&bgpNeighbor, uriNet, uriRouting, uriBGP, instance, uriNeighbor, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &bgpNeighbor, nil
} | go | func (b *BigIP) GetBGPNeighbor(instance, name string) (*BGPNeighbor, error) {
var bgpNeighbor BGPNeighbor
err, ok := b.getForEntity(&bgpNeighbor, uriNet, uriRouting, uriBGP, instance, uriNeighbor, name)
if err != nil {
return nil, err
}
if !ok {
return nil, nil
}
return &bgpNeighbor, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetBGPNeighbor",
"(",
"instance",
",",
"name",
"string",
")",
"(",
"*",
"BGPNeighbor",
",",
"error",
")",
"{",
"var",
"bgpNeighbor",
"BGPNeighbor",
"\n",
"err",
",",
"ok",
":=",
"b",
".",
"getForEntity",
"(",
"&",
... | // GetBGPNeighbor gets a BGP neighbor of a BGP instance. | [
"GetBGPNeighbor",
"gets",
"a",
"BGP",
"neighbor",
"of",
"a",
"BGP",
"instance",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L522-L533 |
17,595 | scottdware/go-bigip | net.go | DeleteBGPNeighbor | func (b *BigIP) DeleteBGPNeighbor(instance, name string) error {
return b.delete(uriNet, uriRouting, uriBGP, instance, uriNeighbor, name)
} | go | func (b *BigIP) DeleteBGPNeighbor(instance, name string) error {
return b.delete(uriNet, uriRouting, uriBGP, instance, uriNeighbor, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"DeleteBGPNeighbor",
"(",
"instance",
",",
"name",
"string",
")",
"error",
"{",
"return",
"b",
".",
"delete",
"(",
"uriNet",
",",
"uriRouting",
",",
"uriBGP",
",",
"instance",
",",
"uriNeighbor",
",",
"name",
")",
"... | // DeleteBGPNeighbor removes a BGP neighbor from a BGP instance. | [
"DeleteBGPNeighbor",
"removes",
"a",
"BGP",
"neighbor",
"from",
"a",
"BGP",
"instance",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L536-L538 |
17,596 | scottdware/go-bigip | net.go | ModifyBGPNeighbor | func (b *BigIP) ModifyBGPNeighbor(instance, name string, config *BGPNeighbor) error {
return b.put(config, uriNet, uriRouting, uriBGP, instance, uriNeighbor, name)
} | go | func (b *BigIP) ModifyBGPNeighbor(instance, name string, config *BGPNeighbor) error {
return b.put(config, uriNet, uriRouting, uriBGP, instance, uriNeighbor, name)
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"ModifyBGPNeighbor",
"(",
"instance",
",",
"name",
"string",
",",
"config",
"*",
"BGPNeighbor",
")",
"error",
"{",
"return",
"b",
".",
"put",
"(",
"config",
",",
"uriNet",
",",
"uriRouting",
",",
"uriBGP",
",",
"ins... | // ModifyBGPNeighbor allows you to change any attribute of a BGP neighbor of a BGP instance.
// Fields that can be modified are referenced in the BGPNeighbor struct. | [
"ModifyBGPNeighbor",
"allows",
"you",
"to",
"change",
"any",
"attribute",
"of",
"a",
"BGP",
"neighbor",
"of",
"a",
"BGP",
"instance",
".",
"Fields",
"that",
"can",
"be",
"modified",
"are",
"referenced",
"in",
"the",
"BGPNeighbor",
"struct",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/net.go#L542-L544 |
17,597 | scottdware/go-bigip | cm.go | Devices | func (b *BigIP) Devices() (*Devices, error) {
var devices Devices
err, _ := b.getForEntity(&devices, uriCm, uriDevice)
if err != nil {
return nil, err
}
return &devices, nil
} | go | func (b *BigIP) Devices() (*Devices, error) {
var devices Devices
err, _ := b.getForEntity(&devices, uriCm, uriDevice)
if err != nil {
return nil, err
}
return &devices, nil
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"Devices",
"(",
")",
"(",
"*",
"Devices",
",",
"error",
")",
"{",
"var",
"devices",
"Devices",
"\n",
"err",
",",
"_",
":=",
"b",
".",
"getForEntity",
"(",
"&",
"devices",
",",
"uriCm",
",",
"uriDevice",
")",
"... | // Devices returns a list of devices. | [
"Devices",
"returns",
"a",
"list",
"of",
"devices",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/cm.go#L41-L50 |
17,598 | scottdware/go-bigip | cm.go | GetCurrentDevice | func (b *BigIP) GetCurrentDevice() (*Device, error) {
devices, err := b.Devices()
if err != nil {
return nil, err
}
for _, d := range devices.Devices {
// f5 api is returning bool value as string
if d.SelfDevice == "true" {
return &d, nil
}
}
return nil, errors.New("could not find this device")
} | go | func (b *BigIP) GetCurrentDevice() (*Device, error) {
devices, err := b.Devices()
if err != nil {
return nil, err
}
for _, d := range devices.Devices {
// f5 api is returning bool value as string
if d.SelfDevice == "true" {
return &d, nil
}
}
return nil, errors.New("could not find this device")
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"GetCurrentDevice",
"(",
")",
"(",
"*",
"Device",
",",
"error",
")",
"{",
"devices",
",",
"err",
":=",
"b",
".",
"Devices",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"... | // GetCurrentDevice returns a current device. | [
"GetCurrentDevice",
"returns",
"a",
"current",
"device",
"."
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/cm.go#L53-L65 |
17,599 | scottdware/go-bigip | cm.go | UploadSoftwareImage | func (b *BigIP) UploadSoftwareImage(f *os.File) (*Upload, error) {
if !strings.HasSuffix(f.Name(), ".iso") {
err := fmt.Errorf("File must have .iso extension")
return nil, err
}
info, err := f.Stat()
if err != nil {
return nil, err
}
return b.Upload(f, info.Size(), uriCm, uriAutodeploy, uriSoftwareImageUploads, info.Name())
} | go | func (b *BigIP) UploadSoftwareImage(f *os.File) (*Upload, error) {
if !strings.HasSuffix(f.Name(), ".iso") {
err := fmt.Errorf("File must have .iso extension")
return nil, err
}
info, err := f.Stat()
if err != nil {
return nil, err
}
return b.Upload(f, info.Size(), uriCm, uriAutodeploy, uriSoftwareImageUploads, info.Name())
} | [
"func",
"(",
"b",
"*",
"BigIP",
")",
"UploadSoftwareImage",
"(",
"f",
"*",
"os",
".",
"File",
")",
"(",
"*",
"Upload",
",",
"error",
")",
"{",
"if",
"!",
"strings",
".",
"HasSuffix",
"(",
"f",
".",
"Name",
"(",
")",
",",
"\"",
"\"",
")",
"{",
... | // Upload a software image | [
"Upload",
"a",
"software",
"image"
] | 089ab35c13547ce4bcde55918adacdba00708753 | https://github.com/scottdware/go-bigip/blob/089ab35c13547ce4bcde55918adacdba00708753/cm.go#L78-L88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.