@@ -71,7 +71,7 @@ func CreateTransportURLSecret(name types.NamespacedName) *corev1.Secret {
7171 secret := th .CreateSecret (
7272 name ,
7373 map [string ][]byte {
74- "transport_url" : [] byte ( fmt .Sprintf ( "rabbit://%s/" , name ) ),
74+ "transport_url" : fmt .Appendf ( nil , "rabbit://%s/" , name ),
7575 },
7676 )
7777 logger .Info ("Created TransportURLSecret" , "secret" , secret )
@@ -107,14 +107,14 @@ func SimulateKeystoneReady(
107107 }, timeout , interval ).Should (Succeed ())
108108}
109109
110- func GetDefaultOctaviaSpec () map [string ]interface {} {
111- return map [string ]interface {} {
110+ func GetDefaultOctaviaSpec () map [string ]any {
111+ return map [string ]any {
112112 "databaseInstance" : "test-octavia-db-instance" ,
113113 "secret" : SecretName ,
114114 "octaviaNetworkAttachment" : "octavia-attachement" ,
115115 "databaseAccount" : "octavia-db-account" ,
116116 "persistenceDatabaseAccount" : "octavia-persistence-db-account" ,
117- "lbMgmtNetwork" : map [string ]interface {} {
117+ "lbMgmtNetwork" : map [string ]any {
118118 "availabilityZones" : []string {"az0" },
119119 // It seems that the functional tests don't use the correct default
120120 // values for nested structures, when the default is defined in the
@@ -125,12 +125,12 @@ func GetDefaultOctaviaSpec() map[string]interface{} {
125125 }
126126}
127127
128- func CreateOctavia (name types.NamespacedName , spec map [string ]interface {} ) client.Object {
128+ func CreateOctavia (name types.NamespacedName , spec map [string ]any ) client.Object {
129129
130- raw := map [string ]interface {} {
130+ raw := map [string ]any {
131131 "apiVersion" : "octavia.openstack.org/v1beta1" ,
132132 "kind" : "Octavia" ,
133- "metadata" : map [string ]interface {} {
133+ "metadata" : map [string ]any {
134134 "name" : name .Name ,
135135 "namespace" : name .Namespace ,
136136 },
@@ -198,8 +198,8 @@ func SimulateOctaviaCertsSecret(namespace string, name string) *corev1.Secret {
198198}
199199
200200// OctaviaAPI
201- func GetDefaultOctaviaAPISpec () map [string ]interface {} {
202- return map [string ]interface {} {
201+ func GetDefaultOctaviaAPISpec () map [string ]any {
202+ return map [string ]any {
203203 "databaseHostname" : "hostname-for-octavia-api" ,
204204 "databaseInstance" : "test-octavia-db-instance" ,
205205 "secret" : SecretName ,
@@ -208,11 +208,11 @@ func GetDefaultOctaviaAPISpec() map[string]interface{} {
208208 }
209209}
210210
211- func CreateOctaviaAPI (name types.NamespacedName , spec map [string ]interface {} ) client.Object {
212- raw := map [string ]interface {} {
211+ func CreateOctaviaAPI (name types.NamespacedName , spec map [string ]any ) client.Object {
212+ raw := map [string ]any {
213213 "apiVersion" : "octavia.openstack.org/v1beta1" ,
214214 "kind" : "OctaviaAPI" ,
215- "metadata" : map [string ]interface {} {
215+ "metadata" : map [string ]any {
216216 "name" : name .Name ,
217217 "namespace" : name .Namespace ,
218218 },
@@ -244,14 +244,14 @@ func SimulateOctaviaAPIReady(name types.NamespacedName) {
244244}
245245
246246func CreateNAD (name types.NamespacedName ) client.Object {
247- raw := map [string ]interface {} {
247+ raw := map [string ]any {
248248 "apiVersion" : "k8s.cni.cncf.io/v1" ,
249249 "kind" : "NetworkAttachmentDefinition" ,
250- "metadata" : map [string ]interface {} {
250+ "metadata" : map [string ]any {
251251 "name" : name .Name ,
252252 "namespace" : name .Namespace ,
253253 },
254- "spec" : map [string ]interface {} {
254+ "spec" : map [string ]any {
255255 "config" : `{
256256 "cniVersion": "0.3.1",
257257 "name": "octavia",
@@ -290,14 +290,14 @@ func GetNADConfig(name types.NamespacedName) *octavia.NADConfig {
290290}
291291
292292func CreateNode (name types.NamespacedName ) client.Object {
293- raw := map [string ]interface {} {
293+ raw := map [string ]any {
294294 "apiVersion" : "v1" ,
295295 "kind" : "Node" ,
296- "metadata" : map [string ]interface {} {
296+ "metadata" : map [string ]any {
297297 "name" : name .Name ,
298298 "namespace" : name .Namespace ,
299299 },
300- "spec" : map [string ]interface {} {},
300+ "spec" : map [string ]any {},
301301 }
302302 return th .CreateUnstructured (raw )
303303
@@ -307,7 +307,7 @@ func CreateSSHPubKey() client.Object {
307307 return th .CreateConfigMap (types.NamespacedName {
308308 Name : "octavia-ssh-pubkey" ,
309309 Namespace : namespace ,
310- }, map [string ]interface {} {
310+ }, map [string ]any {
311311 "key" : "public key" ,
312312 })
313313}
0 commit comments