Skip to content

Commit 4e91ac6

Browse files
committed
update example formatting
1 parent b46ff01 commit 4e91ac6

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

examples/bulk-volume-delete/main.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@ import (
1616
func main() {
1717
//session Inputs
1818
// < IAM TOKEN >
19-
// token := ""
20-
region := ""
21-
zone := ""
22-
accountID := ""
19+
token := ""
20+
region := " < REGION > "
21+
zone := " < ZONE > "
22+
accountID := " < ACCOUNT ID > "
2323
url := region + ".power-iaas.test.cloud.ibm.com"
2424

2525
// volume inputs
2626
rand.Seed(time.Now().UnixNano())
2727
randomNumber := rand.Intn(100) + 1
2828
randomNumber2 := rand.Intn(100) + 1
29-
piID := ""
29+
piID := " < POWER INSTANCE ID > "
3030
name := fmt.Sprintf("power-go-test-volume-%d", randomNumber)
3131
name2 := fmt.Sprintf("power-go-test-volume-%d", randomNumber2)
3232
size := 20.0
3333
vtype := "tier3"
3434
sharable := true
3535
replicationEnabled := false
3636

37-
// authenticator := &core.BearerTokenAuthenticator{
38-
// BearerToken: token,
39-
// }
40-
authenticator := &core.IamAuthenticator{
41-
ApiKey: "",
42-
// Uncomment for test environment
43-
URL: "https://iam.test.cloud.ibm.com",
37+
authenticator := &core.BearerTokenAuthenticator{
38+
BearerToken: token,
4439
}
40+
// authenticator := &core.IamAuthenticator{
41+
// ApiKey: "< API KEY >",
42+
// // Uncomment for test environment
43+
// URL: "https://iam.test.cloud.ibm.com",
44+
// }
4545
// Create the session
4646
options := &ps.IBMPIOptions{
4747
Authenticator: authenticator,

examples/bulk-volume-detach/main.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ import (
1717
func main() {
1818
//session Inputs
1919
// < IAM TOKEN >
20-
// token := ""
21-
region := "dal"
22-
zone := "dal10"
23-
accountID := "efe5e8b9d3f04b948790fe5499bd18bc"
20+
token := ""
21+
region := " < REGION > "
22+
zone := " < ZONE > "
23+
accountID := " < ACCOUNT ID > "
2424
url := region + ".power-iaas.test.cloud.ibm.com"
2525

2626
// volume inputs
2727
rand.Seed(time.Now().UnixNano())
2828
randomNumber := rand.Intn(100) + 1
2929
randomNumber2 := rand.Intn(100) + 1
30-
piID := "a1a23e24-220d-4a20-a678-c8c5e84056bd"
30+
piID := " < POWER INSTANCE ID > "
3131
name := fmt.Sprintf("power-go-test-volume-%d", randomNumber)
3232
name2 := fmt.Sprintf("power-go-test-volume-%d", randomNumber2)
3333
size := 20.0
@@ -44,14 +44,14 @@ func main() {
4444
procType := "shared"
4545
sysType := "s922"
4646

47-
// authenticator := &core.BearerTokenAuthenticator{
48-
// BearerToken: token,
49-
// }
50-
authenticator := &core.IamAuthenticator{
51-
ApiKey: "PaBXQ7QI6AyBm86Bqo0C45o_6LmW9I76csCkWLojdZLQ",
52-
// Uncomment for test environment
53-
URL: "https://iam.test.cloud.ibm.com",
47+
authenticator := &core.BearerTokenAuthenticator{
48+
BearerToken: token,
5449
}
50+
// authenticator := &core.IamAuthenticator{
51+
// ApiKey: "< API KEY >",
52+
// // Uncomment for test environment
53+
// URL: "https://iam.test.cloud.ibm.com",
54+
// }
5555
// Create the session
5656
options := &ps.IBMPIOptions{
5757
Authenticator: authenticator,
@@ -103,7 +103,7 @@ func main() {
103103
log.Printf("***************[3]****************** %+v\n", *createRespOk2)
104104

105105
volumeID2 := *createRespOk2.VolumeID
106-
getResp2, err := powerClientVolume.Get(volumeID)
106+
getResp2, err := powerClientVolume.Get(volumeID2)
107107
if err != nil {
108108
log.Fatal(err)
109109
}

0 commit comments

Comments
 (0)