Skip to content

Commit

Permalink
adding DNS view object (read-only so far)
Browse files Browse the repository at this point in the history
  • Loading branch information
skudriavtsev committed Nov 9, 2022
1 parent 92ee29d commit 9289399
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions object_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 17 additions & 0 deletions objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 9289399

Please sign in to comment.