Skip to content

Commit

Permalink
fix creating tags
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Aug 30, 2024
1 parent 8691f3a commit 7dd71ab
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/infrastructure/vcsim/controllers/vcsim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,16 @@ func createGovmomiFailureDomainTags(vCenterSimulator *vcsimv1.VCenterSimulator)
datacenterName := vcsimhelpers.DatacenterName(0)
computeClusterName := vcsimhelpers.ClusterName(0, 0)
commands := [][]string{
{"tags.category.create", govcURLArg, "-t=Datacenter", "k8s-region"},
{"tags.category.create", govcURLArg, "k8s-zone"},
{"tags.create", govcURLArg, "-c", "k8s-region", datacenterName},
{"tags.create", govcURLArg, "-c", "k8s-zone", computeClusterName},
{"tags.attach", govcURLArg, "-c", "k8s-region", datacenterName, "/" + datacenterName},
{"tags.attach", govcURLArg, "-c", "k8s-zone", computeClusterName, "/" + datacenterName + "/host/" + computeClusterName},
{"tags.category.create", "-k=true", govcURLArg, "-t=Datacenter", "k8s-region"},
{"tags.category.create", "-k=true", govcURLArg, "k8s-zone"},
{"tags.create", "-k=true", govcURLArg, "-c", "k8s-region", datacenterName},
{"tags.create", "-k=true", govcURLArg, "-c", "k8s-zone", computeClusterName},
{"tags.attach", "-k=true", govcURLArg, "-c", "k8s-region", datacenterName, "/" + datacenterName},
{"tags.attach", "-k=true", govcURLArg, "-c", "k8s-zone", computeClusterName, "/" + datacenterName + "/host/" + computeClusterName},
}

for _, command := range commands {
fmt.Printf("Running command: %s", strings.Join(command, " "))
exit := cli.Run(command)
if exit != 0 {
return fmt.Errorf("failed to run command: %s", strings.Join(command, " "))
Expand Down

0 comments on commit 7dd71ab

Please sign in to comment.