github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/compute/v2/extensions/migrate/doc.go (about) 1 /* 2 Package migrate provides functionality to migrate servers that have been 3 provisioned by the OpenStack Compute service. 4 5 Example of Migrate Server (migrate Action) 6 7 serverID := "b16ba811-199d-4ffd-8839-ba96c1185a67" 8 err := migrate.Migrate(computeClient, serverID).ExtractErr() 9 if err != nil { 10 panic(err) 11 } 12 13 Example of Live-Migrate Server (os-migrateLive Action) 14 15 serverID := "b16ba811-199d-4ffd-8839-ba96c1185a67" 16 host := "01c0cadef72d47e28a672a76060d492c" 17 blockMigration := false 18 19 migrationOpts := migrate.LiveMigrateOpts{ 20 Host: &host, 21 BlockMigration: &blockMigration, 22 } 23 24 err := migrate.LiveMigrate(computeClient, serverID, migrationOpts).ExtractErr() 25 if err != nil { 26 panic(err) 27 } 28 29 */ 30 package migrate