github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/compute/v2/extensions/extendedstatus/doc.go (about) 1 /* 2 Package extendedstatus provides the ability to extend a server result with 3 the extended status information. Example: 4 5 type ServerWithExt struct { 6 servers.Server 7 extendedstatus.ServerExtendedStatusExt 8 } 9 10 var allServers []ServerWithExt 11 12 allPages, err := servers.List(client, nil).AllPages() 13 if err != nil { 14 panic("Unable to retrieve servers: %s", err) 15 } 16 17 err = servers.ExtractServersInto(allPages, &allServers) 18 if err != nil { 19 panic("Unable to extract servers: %s", err) 20 } 21 22 for _, server := range allServers { 23 fmt.Println(server.TaskState) 24 fmt.Println(server.VmState) 25 fmt.Println(server.PowerState) 26 } 27 */ 28 package extendedstatus