@@ -18,6 +18,7 @@ package v1beta1
1818
1919import (
2020 "context"
21+ "fmt"
2122 "strings"
2223
2324 condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
@@ -62,10 +63,22 @@ func (instance *Memcached) GetMemcachedServerListString() string {
6263 return strings .Join (instance .Status .ServerList , "," )
6364}
6465
66+ // GetMemcachedServerListQuotedString - return the memcached servers, each quoted, as comma separated list
67+ // to be used in OpenStack config.
68+ func (instance * Memcached ) GetMemcachedServerListQuotedString () string {
69+ return fmt .Sprintf ("'%s'" , strings .Join (instance .Status .ServerList , "," ))
70+ }
71+
6572// GetMemcachedServerListWithInetString - return the memcached servers as comma separated list
6673// to be used in OpenStack config.
6774func (instance * Memcached ) GetMemcachedServerListWithInetString () string {
68- return strings .Join (instance .Status .ServerListWithInet , "," )
75+ return strings .Join (instance .Status .ServerListWithInet , "','" )
76+ }
77+
78+ // GetMemcachedServerListWithInetQuotedString - return the memcached servers, each quoted, as comma separated list
79+ // to be used in OpenStack config.
80+ func (instance * Memcached ) GetMemcachedServerListWithInetQuotedString () string {
81+ return fmt .Sprintf ("'%s'" , strings .Join (instance .Status .ServerListWithInet , "," ))
6982}
7083
7184// GetMemcachedTLSSupport - return the TLS support of the memcached instance
0 commit comments