diff --git a/object_manager.go b/object_manager.go index a00a0f30..7afdb193 100644 --- a/object_manager.go +++ b/object_manager.go @@ -10,6 +10,7 @@ import ( var _ IBObjectManager = new(ObjectManager) type IBObjectManager interface { + GetDNSView(name string) (*DNSView, error) AllocateIP(netview string, cidr string, ipAddr string, isIPv6 bool, macOrDuid string, name string, comment string, eas EA) (*FixedAddress, error) AllocateNetwork(netview string, cidr string, isIPv6 bool, prefixLen uint, comment string, eas EA) (network *Network, err error) AllocateNetworkContainer(netview string, cidr string, isIPv6 bool, prefixLen uint, comment string, eas EA) (netContainer *NetworkContainer, err error) diff --git a/objects.go b/objects.go index a4b34fae..e9d26073 100644 --- a/objects.go +++ b/objects.go @@ -482,6 +482,23 @@ func NewUserProfile(userprofile UserProfile) *UserProfile { return &res } +type DNSView struct { + IBBase `json:"-"` + Ref string `json:"_ref"` + Name string `json:"name"` + NetworkView string `json:"network_view"` + Comment string `json:"comment"` + Ea EA `json:"extattrs"` +} + +func NewEmptyDNSView() *DNSView { + res := &DNSView{} + res.objectType = "view" + res.returnFields = []string{"extattrs", "name", "network_view", "comment"} + + return res +} + type RecordA struct { IBBase `json:"-"` Ref string `json:"_ref,omitempty"`