Skip to content

Instantly share code, notes, and snippets.

View lubronzhan's full-sized avatar

Lubron lubronzhan

  • VMware, Broadcom
  • Palo Alto, CA
View GitHub Profile
@lubronzhan
lubronzhan / main_test.go
Last active July 16, 2025 22:15
Test attaaching disk
package main_test
import (
"context"
"fmt"
"testing"
"time"
"github.com/vmware/govmomi"
"github.com/vmware/govmomi/find"
package main
import (
"errors"
"flag"
"fmt"
"net/http"
"os"
"github.com/vmware/alb-sdk/go/clients"
#!/bin/bash
set -o pipefail
## get lock id
## Example:
## get_lock_id https://kscom.svc.eng.vmware.com/job/tkg-release/job/install-vc-dualstack-ipv6-primary/700/
get_lock_id() {
url=$1
echo $(curl -s ${url}artifact/lock.json | jq -r '.id')
}