Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions placement_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,25 @@ type PlacementGroupMember struct {

// PlacementGroup represents a Linode placement group.
type PlacementGroup struct {
ID int `json:"id"`
Label string `json:"label"`
Region string `json:"region"`
PlacementGroupType PlacementGroupType `json:"placement_group_type"`
PlacementGroupPolicy PlacementGroupPolicy `json:"placement_group_policy"`
IsCompliant bool `json:"is_compliant"`
Members []PlacementGroupMember `json:"members"`
Migrations PlacementGroupMigrations `json:"migrations"`
ID int `json:"id"`
Label string `json:"label"`
Region string `json:"region"`
PlacementGroupType PlacementGroupType `json:"placement_group_type"`
PlacementGroupPolicy PlacementGroupPolicy `json:"placement_group_policy"`
IsCompliant bool `json:"is_compliant"`
Members []PlacementGroupMember `json:"members"`
Migrations *PlacementGroupMigrations `json:"migrations"`
}

// PlacementGroupMigrations represent the instances that are being migrated to or from the placement group.
type PlacementGroupMigrations struct {
Inbound []struct {
// The unique identifier for a compute instance being migrated into the placement group.
LinodeID int `json:"linode_id"`
} `json:"inbound"`
Outbound []struct {
// The unique identifier for a compute instance being migrated out of the placement group.
LinodeID int `json:"linode_id"`
} `json:"outbound"`
Inbound []PlacementGroupMigrationInstance `json:"inbound"`
Outbound []PlacementGroupMigrationInstance `json:"outbound"`
}

// PlacementGroupMigrationInstance represents the unique identifier for a compute instance being migrated to/from the placement group.
type PlacementGroupMigrationInstance struct {
LinodeID int `json:"linode_id"`
}

// PlacementGroupCreateOptions represents the options to use
Expand Down
Loading
Loading