Skip to content

Commit 15fab7d

Browse files
committed
[networking]: subnet add field dns_publish_fixed_ip
1 parent 71268a5 commit 15fab7d

3 files changed

Lines changed: 435 additions & 412 deletions

File tree

openstack/networking/v2/subnets/requests.go

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,28 @@ type ListOptsBuilder interface {
2020
// by a particular subnet attribute. SortDir sets the direction, and is either
2121
// `asc' or `desc'. Marker and Limit are used for pagination.
2222
type ListOpts struct {
23-
Name string `q:"name"`
24-
Description string `q:"description"`
25-
EnableDHCP *bool `q:"enable_dhcp"`
26-
NetworkID string `q:"network_id"`
27-
TenantID string `q:"tenant_id"`
28-
ProjectID string `q:"project_id"`
29-
IPVersion int `q:"ip_version"`
30-
GatewayIP string `q:"gateway_ip"`
31-
CIDR string `q:"cidr"`
32-
IPv6AddressMode string `q:"ipv6_address_mode"`
33-
IPv6RAMode string `q:"ipv6_ra_mode"`
34-
ID string `q:"id"`
35-
SubnetPoolID string `q:"subnetpool_id"`
36-
Limit int `q:"limit"`
37-
Marker string `q:"marker"`
38-
SortKey string `q:"sort_key"`
39-
SortDir string `q:"sort_dir"`
40-
Tags string `q:"tags"`
41-
TagsAny string `q:"tags-any"`
42-
NotTags string `q:"not-tags"`
43-
NotTagsAny string `q:"not-tags-any"`
23+
Name string `q:"name"`
24+
Description string `q:"description"`
25+
DNSPublishFixedIP *bool `q:"dns_publish_fixed_ip"`
26+
EnableDHCP *bool `q:"enable_dhcp"`
27+
NetworkID string `q:"network_id"`
28+
TenantID string `q:"tenant_id"`
29+
ProjectID string `q:"project_id"`
30+
IPVersion int `q:"ip_version"`
31+
GatewayIP string `q:"gateway_ip"`
32+
CIDR string `q:"cidr"`
33+
IPv6AddressMode string `q:"ipv6_address_mode"`
34+
IPv6RAMode string `q:"ipv6_ra_mode"`
35+
ID string `q:"id"`
36+
SubnetPoolID string `q:"subnetpool_id"`
37+
Limit int `q:"limit"`
38+
Marker string `q:"marker"`
39+
SortKey string `q:"sort_key"`
40+
SortDir string `q:"sort_dir"`
41+
Tags string `q:"tags"`
42+
TagsAny string `q:"tags-any"`
43+
NotTags string `q:"not-tags"`
44+
NotTagsAny string `q:"not-tags-any"`
4445
}
4546

4647
// ToSubnetListQuery formats a ListOpts into a query string.
@@ -123,6 +124,9 @@ type CreateOpts struct {
123124
// DNSNameservers are the nameservers to be set via DHCP.
124125
DNSNameservers []string `json:"dns_nameservers,omitempty"`
125126

127+
// DNSPublishFixedIP will either enable or disable the publication of fixed IPs to the DNS
128+
DNSPublishFixedIP *bool `json:"dns_publish_fixed_ip,omitempty"`
129+
126130
// ServiceTypes are the service types associated with the subnet.
127131
ServiceTypes []string `json:"service_types,omitempty"`
128132

@@ -198,6 +202,9 @@ type UpdateOpts struct {
198202
// DNSNameservers are the nameservers to be set via DHCP.
199203
DNSNameservers *[]string `json:"dns_nameservers,omitempty"`
200204

205+
// DNSPublishFixedIP will either enable or disable the publication of fixed IPs to the DNS
206+
DNSPublishFixedIP *bool `json:"dns_publish_fixed_ip,omitempty"`
207+
201208
// ServiceTypes are the service types associated with the subnet.
202209
ServiceTypes *[]string `json:"service_types,omitempty"`
203210

openstack/networking/v2/subnets/results.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ type Subnet struct {
8383
// DNS name servers used by hosts in this subnet.
8484
DNSNameservers []string `json:"dns_nameservers"`
8585

86+
// Specifies whether the fixed IP addresses are published to the DNS.
87+
DNSPublishFixedIP bool `json:"dns_publish_fixed_ip,omitempty"`
88+
8689
// Service types associated with the subnet.
8790
ServiceTypes []string `json:"service_types"`
8891

0 commit comments

Comments
 (0)