Skip to content

Commit

Permalink
Updated migrations field to be pointer (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezilber-akamai authored Dec 6, 2024
1 parent 94c3d40 commit 55f9fb9
Show file tree
Hide file tree
Showing 5 changed files with 816 additions and 782 deletions.
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

0 comments on commit 55f9fb9

Please sign in to comment.