You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible for you to provide an example of the following
Using the API to create a network , set the specific DHCP options of that network (router, DNS servers, domain etc) set the member servers for that DHCP scope and define a range within the scope . How do I gracefully handle a network that already exists , the Python low level API has an update_if_exists flag which is useful
package main
import (
"fmt"
ibclient "github.com/infobloxopen/infoblox-go-client"
)
func main() {
hostConfig := ibclient.HostConfig{
Host: "XXXXXXXX",
Version: "2.2",
Port: "443",
Username: "XXXXXX",
Password: "XXXXXXX",
}
transportConfig := ibclient.NewTransportConfig("false", 20, 10)
requestBuilder := &ibclient.WapiRequestBuilder{}
requestor := &ibclient.WapiHttpRequestor{}
conn, err := ibclient.NewConnector(hostConfig, transportConfig, requestBuilder, requestor)
if err != nil {
fmt.Println(err)
}
defer conn.Logout()
// No idea what the cmp type or what my tenant id id , so need to work on that
objMgr := ibclient.NewObjectManager(conn, "", "")
//Fetches grid information
fmt.Println(objMgr.GetFixedAddressByRef("fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuMy4yNi4xMDEuMC4u:10.3.26.101/default"))
net, err := objMgr.CreateNetwork("default", "10.200.0.0/16", false, "Azure prefix (testing)", nil)
if err != nil {
fmt.Println(err)
}
fmt.Print(net)
fmt.Print(net.ReturnFields())
The text was updated successfully, but these errors were encountered:
As of now, we do not support update_if_exists flag during creation for any of the objects in Go-client. We will consider this as a feature enhancement and try to implement the same before our next release. Workaround for the same would be to Get an object and check if the returned value is nil. If the returned object is nil, then the code would proceed with creation else an update function can be called.
For example, to handle the creation or updation of a network 10.200.0.0/16,
Would it be possible for you to provide an example of the following
Using the API to create a network , set the specific DHCP options of that network (router, DNS servers, domain etc) set the member servers for that DHCP scope and define a range within the scope . How do I gracefully handle a network that already exists , the Python low level API has an update_if_exists flag which is useful
The text was updated successfully, but these errors were encountered: