Skip to content

Commit 4e6e00c

Browse files
committed
Octavia: Support listener tags
For: #2213
1 parent 3b820fa commit 4e6e00c

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

openstack/loadbalancer/v2/listeners/doc.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Example to Create a Listener
3131
AdminStateUp: gophercloud.Enabled,
3232
DefaultPoolID: "41efe233-7591-43c5-9cf7-923964759f9e",
3333
ProtocolPort: 3306,
34+
Tags: []string{"test", "stage"},
3435
}
3536
3637
listener, err := listeners.Create(networkClient, createOpts).Extract()
@@ -44,10 +45,12 @@ Example to Update a Listener
4445
4546
i1001 := 1001
4647
i181000 := 181000
48+
newTags := []string{"prod"}
4749
updateOpts := listeners.UpdateOpts{
4850
ConnLimit: &i1001,
4951
TimeoutClientData: &i181000,
5052
TimeoutMemberData: &i181000,
53+
Tags: &newTags,
5154
}
5255
5356
listener, err := listeners.Update(networkClient, listenerID, updateOpts).Extract()

openstack/loadbalancer/v2/listeners/requests.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ type CreateOpts struct {
167167

168168
// A list of TLS protocol versions. Available from microversion 2.17
169169
TLSVersions []TLSVersion `json:"tls_versions,omitempty"`
170+
171+
// Tags is a set of resource tags. New in version 2.5
172+
Tags []string `json:"tags,omitempty"`
170173
}
171174

172175
// ToListenerCreateMap builds a request body from CreateOpts.
@@ -249,6 +252,9 @@ type UpdateOpts struct {
249252

250253
// A list of TLS protocol versions. Available from microversion 2.17
251254
TLSVersions *[]TLSVersion `json:"tls_versions,omitempty"`
255+
256+
// Tags is a set of resource tags. New in version 2.5
257+
Tags *[]string `json:"tags,omitempty"`
252258
}
253259

254260
// ToListenerUpdateMap builds a request body from UpdateOpts.

openstack/loadbalancer/v2/listeners/results.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ type Listener struct {
8686

8787
// A list of TLS protocol versions. Available from microversion 2.17
8888
TLSVersions []string `json:"tls_versions"`
89+
90+
// Tags is a list of resource tags. Tags are arbitrarily defined strings
91+
// attached to the resource. New in version 2.5
92+
Tags []string `json:"tags"`
8993
}
9094

9195
type Stats struct {

0 commit comments

Comments
 (0)