Skip to content

Commit be8c6ea

Browse files
feat(loadbalancer): show amount of backend TLS configs (#270)
1 parent 2b5ff40 commit be8c6ea

5 files changed

Lines changed: 28 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
- Add backend `TLS configs` field to `loadbalancer show` command
12+
1013
## [3.2.0] - 2023-11-15
1114

1215
### Added

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.20
44

55
require (
66
github.com/UpCloudLtd/progress v1.0.2
7-
github.com/UpCloudLtd/upcloud-go-api/v6 v6.9.0
7+
github.com/UpCloudLtd/upcloud-go-api/v6 v6.10.0
88
github.com/adrg/xdg v0.3.2
99
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
1010
github.com/gemalto/flume v0.12.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
1717
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
1818
github.com/UpCloudLtd/progress v1.0.2 h1:CTr1bBuFuXop9TEhR1PakbUMPTlUVL7Bgae9JgqXwPg=
1919
github.com/UpCloudLtd/progress v1.0.2/go.mod h1:iGxOnb9HvHW0yrLGUjHr0lxHhn7TehgWwh7a8NqK6iQ=
20-
github.com/UpCloudLtd/upcloud-go-api/v6 v6.9.0 h1:d4N5tYgVowcZ0zVtr4gLIyO/m3QD7Dbmpo0BoogHwX4=
21-
github.com/UpCloudLtd/upcloud-go-api/v6 v6.9.0/go.mod h1:I8rWmBBl+OhiY3AGzKbrobiE5TsLCLNYkCQxE4eJcTg=
20+
github.com/UpCloudLtd/upcloud-go-api/v6 v6.10.0 h1:fs/hpOfuwpEHVxd+SbjNhcm3h+Rcv1S7zXqoVuIXcss=
21+
github.com/UpCloudLtd/upcloud-go-api/v6 v6.10.0/go.mod h1:I8rWmBBl+OhiY3AGzKbrobiE5TsLCLNYkCQxE4eJcTg=
2222
github.com/adrg/xdg v0.3.2 h1:GUSGQ5pHdev83AYhDSS1A/CX+0JIsxbiWtow2DSA+RU=
2323
github.com/adrg/xdg v0.3.2/go.mod h1:7I2hH/IT30IsupOpKZ5ue7/qNi3CoKzD6tL3HwpaRMQ=
2424
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=

internal/commands/loadbalancer/show.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ func (s *showCommand) Execute(exec commands.Executor, uuid string) (output.Outpu
5858
backEnd.Name,
5959
resolver,
6060
len(backEnd.Members),
61+
len(backEnd.TLSConfigs),
6162
})
6263
}
6364

@@ -114,6 +115,7 @@ func (s *showCommand) Execute(exec commands.Executor, uuid string) (output.Outpu
114115
{Key: "name", Header: "Name"},
115116
{Key: "resolver", Header: "Resolver"},
116117
{Key: "members", Header: "Members"},
118+
{Key: "tls_configs", Header: "TLS configs"},
117119
},
118120
Rows: backEndRows,
119121
},

internal/mock/mock.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,26 @@ func (m *Service) DeleteLoadBalancerBackendMember(_ context.Context, r *request.
784784
return nil
785785
}
786786

787+
func (m *Service) GetLoadBalancerBackendTLSConfigs(_ context.Context, r *request.GetLoadBalancerBackendTLSConfigsRequest) ([]upcloud.LoadBalancerBackendTLSConfig, error) {
788+
return nil, nil
789+
}
790+
791+
func (m *Service) GetLoadBalancerBackendTLSConfig(_ context.Context, r *request.GetLoadBalancerBackendTLSConfigRequest) (*upcloud.LoadBalancerBackendTLSConfig, error) {
792+
return nil, nil
793+
}
794+
795+
func (m *Service) CreateLoadBalancerBackendTLSConfig(_ context.Context, r *request.CreateLoadBalancerBackendTLSConfigRequest) (*upcloud.LoadBalancerBackendTLSConfig, error) {
796+
return nil, nil
797+
}
798+
799+
func (m *Service) ModifyLoadBalancerBackendTLSConfig(_ context.Context, r *request.ModifyLoadBalancerBackendTLSConfigRequest) (*upcloud.LoadBalancerBackendTLSConfig, error) {
800+
return nil, nil
801+
}
802+
803+
func (m *Service) DeleteLoadBalancerBackendTLSConfig(_ context.Context, r *request.DeleteLoadBalancerBackendTLSConfigRequest) error {
804+
return nil
805+
}
806+
787807
func (m *Service) GetLoadBalancerResolvers(_ context.Context, r *request.GetLoadBalancerResolversRequest) ([]upcloud.LoadBalancerResolver, error) {
788808
return nil, nil
789809
}

0 commit comments

Comments
 (0)