github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/compute/v2/extensions/rescueunrescue/doc.go (about) 1 /* 2 Package rescueunrescue provides the ability to place a server into rescue mode 3 and to return it back. 4 5 Example to Rescue a server 6 7 rescueOpts := rescueunrescue.RescueOpts{ 8 AdminPass: "aUPtawPzE9NU", 9 RescueImageRef: "115e5c5b-72f0-4a0a-9067-60706545248c", 10 } 11 serverID := "3f54d05f-3430-4d80-aa07-63e6af9e2488" 12 13 adminPass, err := rescueunrescue.Rescue(computeClient, serverID, rescueOpts).Extract() 14 if err != nil { 15 panic(err) 16 } 17 18 fmt.Printf("adminPass of the rescued server %s: %s\n", serverID, adminPass) 19 20 Example to Unrescue a server 21 22 serverID := "3f54d05f-3430-4d80-aa07-63e6af9e2488" 23 24 if err := rescueunrescue.Unrescue(computeClient, serverID).ExtractErr(); err != nil { 25 panic(err) 26 } 27 */ 28 package rescueunrescue