Skip to content

Commit 8f7ea86

Browse files
authored
Merge pull request #5 from poulpreben/master
Expand Nameserver information
2 parents c193c4a + 4e09538 commit 8f7ea86

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

controllers/subnets/subnets.go

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ type Subnet struct {
4343
// The ID of the nameserver to attache the subnet to.
4444
NameserverID int `json:"nameserverId,string,omitempty"`
4545

46+
// The ID and IPs of the nameservers for the subnet
47+
Nameservers map[string]interface{} `json:"nameservers,omitempty"`
48+
4649
// true if the name should be displayed in listing instead of the subnet
4750
// address.
4851
ShowName phpipam.BoolIntString `json:"showName,omitempty"`

controllers/subnets/subnets_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ const testGetSubnetByIDOutputJSON = `
7777
"DNSrecursive": "0",
7878
"DNSrecords": "0",
7979
"nameserverId": "0",
80+
"nameservers": {
81+
"id": "0",
82+
"name": "mynameserver.example.com",
83+
"namesrv1": "1.2.3.4",
84+
"description": "a nameserver description",
85+
"permissions": 1
86+
},
8087
"scanAgent": null,
8188
"isFolder": "0",
8289
"isFull": "0",

0 commit comments

Comments
 (0)