diff --git a/go.work.sum b/go.work.sum index 9b67e8cae..776905a41 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,21 +1,45 @@ +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5 h1:8Q0qkMVC/MmWkpIdlvZgcv2o2jrlF6zqVOh7W5YHdMA= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/instances.go b/instances.go index 73bfdef8d..067b9702e 100644 --- a/instances.go +++ b/instances.go @@ -108,10 +108,10 @@ type InstanceTransfer struct { // InstancePlacementGroup represents information about the placement group // this Linode is a part of. type InstancePlacementGroup struct { - ID int `json:"id"` - Label string `json:"label"` - AffinityType PlacementGroupAffinityType `json:"affinity_type"` - IsStrict bool `json:"is_strict"` + ID int `json:"id"` + Label string `json:"label"` + PlacementGroupType PlacementGroupType `json:"placement_group_type"` + PlacementGroupPolicy PlacementGroupPolicy `json:"placement_group_policy"` } // InstanceMetadataOptions specifies various Instance creation fields diff --git a/placement_groups.go b/placement_groups.go index 3987adca9..49e92584a 100644 --- a/placement_groups.go +++ b/placement_groups.go @@ -2,12 +2,21 @@ package linodego import "context" -// PlacementGroupAffinityType is an enum that determines the affinity policy +// PlacementGroupType is an enum that determines the affinity policy // for Linodes in a placement group. -type PlacementGroupAffinityType string +type PlacementGroupType string const ( - AffinityTypeAntiAffinityLocal PlacementGroupAffinityType = "anti_affinity:local" + PlacementGroupTypeAntiAffinityLocal PlacementGroupType = "anti_affinity:local" +) + +// PlacementGroupPolicy is an enum for the policy that determines whether a +// Linode can be assigned to a Placement Group. +type PlacementGroupPolicy string + +const ( + PlacementGroupPolicyStrict PlacementGroupPolicy = "strict" + PlacementGroupPolicyFlexible PlacementGroupPolicy = "flexible" ) // PlacementGroupMember represents a single Linode assigned to a @@ -20,22 +29,22 @@ type PlacementGroupMember struct { // PlacementGroup represents a Linode placement group. // NOTE: Placement Groups may not currently be available to all users. type PlacementGroup struct { - ID int `json:"id"` - Label string `json:"label"` - Region string `json:"region"` - AffinityType PlacementGroupAffinityType `json:"affinity_type"` - IsCompliant bool `json:"is_compliant"` - IsStrict bool `json:"is_strict"` - Members []PlacementGroupMember `json:"members"` + 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"` } // PlacementGroupCreateOptions represents the options to use // when creating a placement group. type PlacementGroupCreateOptions struct { - Label string `json:"label"` - Region string `json:"region"` - AffinityType PlacementGroupAffinityType `json:"affinity_type"` - IsStrict bool `json:"is_strict"` + Label string `json:"label"` + Region string `json:"region"` + PlacementGroupType PlacementGroupType `json:"placement_group_type"` + PlacementGroupPolicy PlacementGroupPolicy `json:"placement_group_policy"` } // PlacementGroupUpdateOptions represents the options to use diff --git a/test/integration/fixtures/TestInstance_withPG.yaml b/test/integration/fixtures/TestInstance_withPG.yaml index 0444cc167..0b81f529a 100644 --- a/test/integration/fixtures/TestInstance_withPG.yaml +++ b/test/integration/fixtures/TestInstance_withPG.yaml @@ -14,263 +14,85 @@ interactions: url: https://api.linode.com/v4beta/regions?page=1 method: GET response: - body: '{"data": [{"id": "ap-west", "label": "Mumbai, IN", "country": "in", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "GPU Linodes", "Kubernetes", - "Cloud Firewall", "Vlans", "Block Storage Migrations", "Managed Databases", - "Metadata"], "status": "ok", "resolvers": {"ipv4": "172.105.34.5, 172.105.35.5, - 172.105.36.5, 172.105.37.5, 172.105.38.5, 172.105.39.5, 172.105.40.5, 172.105.41.5, - 172.105.42.5, 172.105.43.5", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "ca-central", "label": "Toronto, CA", "country": "ca", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud - Firewall", "Vlans", "Block Storage Migrations", "Managed Databases", "Metadata"], - "status": "ok", "resolvers": {"ipv4": "172.105.0.5, 172.105.3.5, 172.105.4.5, - 172.105.5.5, 172.105.6.5, 172.105.7.5, 172.105.8.5, 172.105.9.5, 172.105.10.5, - 172.105.11.5", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "ap-southeast", "label": "Sydney, AU", "country": "au", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud - Firewall", "Vlans", "Block Storage Migrations", "Managed Databases", "Metadata"], - "status": "ok", "resolvers": {"ipv4": "172.105.166.5, 172.105.169.5, 172.105.168.5, - 172.105.172.5, 172.105.162.5, 172.105.170.5, 172.105.167.5, 172.105.171.5, 172.105.181.5, - 172.105.161.5", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "us-iad", "label": "Washington, DC", "country": "us", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Object Storage", "Kubernetes", - "Cloud Firewall", "Vlans", "VPCs", "Managed Databases", "Metadata", "Premium - Plans"], "status": "ok", "resolvers": {"ipv4": "139.144.192.62, 139.144.192.60, - 139.144.192.61, 139.144.192.53, 139.144.192.54, 139.144.192.67, 139.144.192.69, - 139.144.192.66, 139.144.192.52, 139.144.192.68", "ipv6": "1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678"}, + body: '{"data": [{"id": "ap-west", "label": "Mumbai, India", "country": "in", + "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", "VPCs", "Managed + Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.34.5,172.105.35.5,172.105.36.5,172.105.37.5,172.105.38.5,172.105.39.5,172.105.40.5,172.105.41.5,172.105.42.5,172.105.43.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-ord", "label": "Chicago, IL", "country": - "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Block Storage", - "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", "Vlans", "VPCs", - "Managed Databases", "Metadata", "Premium Plans", "Placement Group"], "status": - "ok", "resolvers": {"ipv4": "172.232.0.17, 172.232.0.16, 172.232.0.21, 172.232.0.13, - 172.232.0.22, 172.232.0.9, 172.232.0.19, 172.232.0.20, 172.232.0.15, 172.232.0.18", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "fr-par", "label": - "Paris, FR", "country": "fr", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", - "Vlans", "VPCs", "Managed Databases", "Metadata", "Premium Plans"], "status": - "ok", "resolvers": {"ipv4": "172.232.32.21, 172.232.32.23, 172.232.32.17, 172.232.32.18, - 172.232.32.16, 172.232.32.22, 172.232.32.20, 172.232.32.14, 172.232.32.11, 172.232.32.12", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "us-sea", "label": - "Seattle, WA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", - "Vlans", "VPCs", "Metadata", "Premium Plans"], "status": "ok", "resolvers": - {"ipv4": "172.232.160.19, 172.232.160.21, 172.232.160.17, 172.232.160.15, 172.232.160.18, - 172.232.160.8, 172.232.160.12, 172.232.160.11, 172.232.160.14, 172.232.160.16", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "br-gru", "label": - "Sao Paulo, BR", "country": "br", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "Kubernetes", "Cloud Firewall", "Vlans", - "VPCs", "Metadata", "Premium Plans"], "status": "ok", "resolvers": {"ipv4": - "172.233.0.4, 172.233.0.9, 172.233.0.7, 172.233.0.12, 172.233.0.5, 172.233.0.13, - 172.233.0.10, 172.233.0.6, 172.233.0.8, 172.233.0.11", "ipv6": "1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678"}, + 5}, "site_type": "core"}, {"id": "ca-central", "label": "Toronto, Ontario, CAN", + "country": "ca", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", + "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.0.5,172.105.3.5,172.105.4.5,172.105.5.5,172.105.6.5,172.105.7.5,172.105.8.5,172.105.9.5,172.105.10.5,172.105.11.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "nl-ams", "label": "Amsterdam, NL", "country": - "nl", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Block Storage", - "Object Storage", "Kubernetes", "Cloud Firewall", "Vlans", "VPCs", "Metadata", - "Premium Plans"], "status": "ok", "resolvers": {"ipv4": "172.233.33.36, 172.233.33.38, - 172.233.33.35, 172.233.33.39, 172.233.33.34, 172.233.33.33, 172.233.33.31, 172.233.33.30, - 172.233.33.37, 172.233.33.32", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "se-sto", "label": "Stockholm, SE", "country": "se", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Object Storage", "Kubernetes", - "Cloud Firewall", "Vlans", "VPCs", "Metadata", "Premium Plans"], "status": "ok", - "resolvers": {"ipv4": "172.232.128.24, 172.232.128.26, 172.232.128.20, 172.232.128.22, - 172.232.128.25, 172.232.128.19, 172.232.128.23, 172.232.128.18, 172.232.128.21, - 172.232.128.27", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "es-mad", "label": "Madrid, ES", "country": "es", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Object Storage", "Kubernetes", - "Cloud Firewall", "Vlans", "VPCs", "Metadata", "Premium Plans"], "status": "ok", - "resolvers": {"ipv4": "172.233.111.6, 172.233.111.17, 172.233.111.21, 172.233.111.25, - 172.233.111.19, 172.233.111.12, 172.233.111.26, 172.233.111.16, 172.233.111.18, - 172.233.111.9", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "in-maa", "label": "Chennai, IN", "country": "in", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Object Storage", "Kubernetes", - "Cloud Firewall", "Vlans", "VPCs", "Metadata", "Premium Plans"], "status": "ok", - "resolvers": {"ipv4": "172.232.96.17, 172.232.96.26, 172.232.96.19, 172.232.96.20, - 172.232.96.25, 172.232.96.21, 172.232.96.18, 172.232.96.22, 172.232.96.23, 172.232.96.24", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "jp-osa", "label": - "Osaka, JP", "country": "jp", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", - "Vlans", "VPCs", "Metadata", "Premium Plans"], "status": "ok", "resolvers": - {"ipv4": "172.233.64.44, 172.233.64.43, 172.233.64.37, 172.233.64.40, 172.233.64.46, - 172.233.64.41, 172.233.64.39, 172.233.64.42, 172.233.64.45, 172.233.64.38", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "it-mil", "label": - "Milan, IT", "country": "it", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "Kubernetes", "Cloud Firewall", "Vlans", - "VPCs", "Metadata", "Premium Plans"], "status": "ok", "resolvers": {"ipv4": - "172.232.192.19, 172.232.192.18, 172.232.192.16, 172.232.192.20, 172.232.192.24, - 172.232.192.21, 172.232.192.22, 172.232.192.17, 172.232.192.15, 172.232.192.23", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "us-mia", "label": - "Miami, FL", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "Kubernetes", "Cloud Firewall", "Vlans", - "VPCs", "Metadata", "Premium Plans", "Placement Group"], "status": "ok", "resolvers": - {"ipv4": "172.233.160.34, 172.233.160.27, 172.233.160.30, 172.233.160.29, 172.233.160.32, - 172.233.160.28, 172.233.160.33, 172.233.160.26, 172.233.160.25, 172.233.160.31", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "id-cgk", "label": - "Jakarta, ID", "country": "id", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "Kubernetes", "Cloud Firewall", "Vlans", - "VPCs", "Metadata", "Premium Plans"], "status": "ok", "resolvers": {"ipv4": - "172.232.224.23, 172.232.224.32, 172.232.224.26, 172.232.224.27, 172.232.224.21, - 172.232.224.24, 172.232.224.22, 172.232.224.20, 172.232.224.31, 172.232.224.28", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "us-lax", "label": - "Los Angeles, CA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Object Storage", "Kubernetes", "Cloud Firewall", "Vlans", - "VPCs", "Metadata", "Premium Plans"], "status": "ok", "resolvers": {"ipv4": - "172.233.128.45, 172.233.128.38, 172.233.128.53, 172.233.128.37, 172.233.128.34, - 172.233.128.36, 172.233.128.33, 172.233.128.39, 172.233.128.43, 172.233.128.44", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "gb-lon", "label": - "London 2, UK", "country": "gb", "capabilities": ["Linodes", "Backups", "NodeBalancers", - "Block Storage", "Kubernetes", "Cloud Firewall", "Vlans", "VPCs", "Metadata", - "Premium Plans"], "status": "ok", "resolvers": {"ipv4": "172.236.0.46, 172.236.0.50, - 172.236.0.47, 172.236.0.53, 172.236.0.52, 172.236.0.45, 172.236.0.49, 172.236.0.51, - 172.236.0.54, 172.236.0.48", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "au-mel", "label": "Melbourne, AU", "country": "au", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Cloud Firewall", "Vlans", - "VPCs", "Metadata", "Premium Plans"], "status": "ok", "resolvers": {"ipv4": - "172.236.32.23, 172.236.32.35, 172.236.32.30, 172.236.32.28, 172.236.32.32, - 172.236.32.33, 172.236.32.27, 172.236.32.37, 172.236.32.29, 172.236.32.34", - "ipv6": "1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, - 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "us-central", - "label": "Dallas, TX", "country": "us", "capabilities": ["Linodes", "Backups", - "NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall", "Vlans", "Block - Storage Migrations", "Managed Databases", "Metadata"], "status": "ok", "resolvers": - {"ipv4": "72.14.179.5, 72.14.188.5, 173.255.199.5, 66.228.53.5, 96.126.122.5, - 96.126.124.5, 96.126.127.5, 198.58.107.5, 198.58.111.5, 23.239.24.5", "ipv6": - "1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "us-west", "label": "Fremont, CA", "country": "us", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud - Firewall", "Vlans", "Block Storage Migrations", "Managed Databases", "Metadata"], - "status": "ok", "resolvers": {"ipv4": "173.230.145.5, 173.230.147.5, 173.230.155.5, - 173.255.212.5, 173.255.219.5, 173.255.241.5, 173.255.243.5, 173.255.244.5, 74.207.241.5, - 74.207.242.5", "ipv6": "1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678"}, + 5}, "site_type": "core"}, {"id": "ap-southeast", "label": "Sydney, NSW, Australia", + "country": "au", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", + "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.166.5,172.105.169.5,172.105.168.5,172.105.172.5,172.105.162.5,172.105.170.5,172.105.167.5,172.105.171.5,172.105.181.5,172.105.161.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "fake-cph-4", "label": "Fake CPH 4, DK", "country": + "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers": + {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "fake-cph-5", "label": "Fake CPH 5, DK", "country": + "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers": + {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "billing66", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "billing67", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "billing100", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "us-central", "label": "Dallas, TX, USA", "country": + "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Kubernetes", + "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "72.14.179.5,72.14.188.5,173.255.199.5,66.228.53.5,96.126.122.5,96.126.124.5,96.126.127.5,198.58.107.5,198.58.111.5,23.239.24.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "us-west", "label": "Fremont, CA, USA", "country": + "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], + "status": "ok", "resolvers": {"ipv4": "173.230.145.5,173.230.147.5,173.230.155.5,173.255.212.5,173.255.219.5,173.255.241.5,173.255.243.5,173.255.244.5,74.207.241.5,74.207.242.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-southeast", "label": "Atlanta, GA", "country": - "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Block Storage", - "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", "Vlans", "Block - Storage Migrations", "Managed Databases", "Metadata"], "status": "ok", "resolvers": - {"ipv4": "74.207.231.5, 173.230.128.5, 173.230.129.5, 173.230.136.5, 173.230.140.5, - 66.228.59.5, 66.228.62.5, 50.116.35.5, 50.116.41.5, 23.239.18.5", "ipv6": "1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "us-east", "label": - "Newark, NJ", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", + 5}, "site_type": "core"}, {"id": "us-southeast", "label": "Atlanta, GA, USA", + "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed + Databases"], "status": "ok", "resolvers": {"ipv4": "74.207.231.5,173.230.128.5,173.230.129.5,173.230.136.5,173.230.140.5,66.228.59.5,66.228.62.5,50.116.35.5,50.116.41.5,23.239.18.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "us-east", "label": "Newark, NJ, USA", "country": + "us", "capabilities": ["Linodes", "Disk Encryption", "Backups", "NodeBalancers", "Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", - "Vlans", "Block Storage Migrations", "Managed Databases", "Metadata"], "status": - "ok", "resolvers": {"ipv4": "66.228.42.5, 96.126.106.5, 50.116.53.5, 50.116.58.5, - 50.116.61.5, 50.116.62.5, 66.175.211.5, 97.107.133.4, 207.192.69.4, 207.192.69.5", - "ipv6": "1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "eu-west", "label": "London, UK", "country": "gb", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Kubernetes", "Cloud - Firewall", "Vlans", "Block Storage Migrations", "Managed Databases", "Metadata"], - "status": "ok", "resolvers": {"ipv4": "178.79.182.5, 176.58.107.5, 176.58.116.5, - 176.58.121.5, 151.236.220.5, 212.71.252.5, 212.71.253.5, 109.74.192.20, 109.74.193.20, - 109.74.194.20", "ipv6": "1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678"}, + "Bare Metal", "Vlans", "VPCs", "Block Storage Migrations", "Managed Databases", + "Placement Group"], "status": "ok", "resolvers": {"ipv4": "66.228.42.5,96.126.106.5,50.116.53.5,50.116.58.5,50.116.61.5,50.116.62.5,66.175.211.5,97.107.133.4,207.192.69.4,207.192.69.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "eu-west", "label": "London, England, UK", + "country": "uk", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Cloud + Firewall", "Vlans", "VPCs", "Managed Databases", "Metadata", "Placement Group"], + "status": "ok", "resolvers": {"ipv4": "178.79.182.5,176.58.107.5,176.58.116.5,176.58.121.5,151.236.220.5,212.71.252.5,212.71.253.5,109.74.192.20,109.74.193.20,109.74.194.20", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "ap-south", "label": "Singapore, SG", "country": - "sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Block Storage", - "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", "Vlans", "Block - Storage Migrations", "Managed Databases", "Metadata"], "status": "ok", "resolvers": - {"ipv4": "139.162.11.5, 139.162.13.5, 139.162.14.5, 139.162.15.5, 139.162.16.5, - 139.162.21.5, 139.162.27.5, 103.3.60.18, 103.3.60.19, 103.3.60.20", "ipv6": - "1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country": "de", "capabilities": - ["Linodes", "Backups", "NodeBalancers", "Block Storage", "Object Storage", "GPU - Linodes", "Kubernetes", "Cloud Firewall", "Vlans", "Block Storage Migrations", - "Managed Databases", "Metadata"], "status": "ok", "resolvers": {"ipv4": "139.162.130.5, - 139.162.131.5, 139.162.132.5, 139.162.133.5, 139.162.134.5, 139.162.135.5, 139.162.136.5, - 139.162.137.5, 139.162.138.5, 139.162.139.5", "ipv6": "1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678"}, "placement_group_limits": {"maximum_pgs_per_customer": - 100, "maximum_linodes_per_pg": 5}, "site_type": "core"}, {"id": "ap-northeast", - "label": "Tokyo, JP", "country": "jp", "capabilities": ["Linodes", "Backups", - "NodeBalancers", "Block Storage", "Kubernetes", "Cloud Firewall", "Vlans", "Block - Storage Migrations", "Managed Databases", "Metadata"], "status": "ok", "resolvers": - {"ipv4": "139.162.66.5, 139.162.67.5, 139.162.68.5, 139.162.69.5, 139.162.70.5, - 139.162.71.5, 139.162.72.5, 139.162.73.5, 139.162.74.5, 139.162.75.5", "ipv6": - "1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, 1234::5678, - 1234::5678, 1234::5678, 1234::5678, 1234::5678"}, "placement_group_limits": - {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": 5}, "site_type": - "core"}], "page": 1, "pages": 1, "results": 27}' + "sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], + "status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country": + "de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], + "status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}, {"id": "ap-northeast", "label": "Tokyo 2, JP", "country": + "jp", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], + "status": "ok", "resolvers": {"ipv4": "139.162.66.5,139.162.67.5,139.162.68.5,139.162.69.5,139.162.70.5,139.162.71.5,139.162.72.5,139.162.73.5,139.162.74.5,139.162.75.5", + "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": + 5}, "site_type": "core"}], "page": 1, "pages": 1, "results": 16}' headers: Access-Control-Allow-Credentials: - "true" @@ -283,23 +105,20 @@ interactions: Access-Control-Expose-Headers: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - - max-age=0, no-cache, no-store - Connection: - - keep-alive + - private, max-age=900 + - private, max-age=60, s-maxage=60 Content-Security-Policy: - default-src 'none' Content-Type: - application/json - Expires: - - Fri, 28 Jun 2024 21:13:54 GMT - Pragma: - - no-cache + Server: + - nginx Strict-Transport-Security: - max-age=31536000 Vary: + - Accept-Encoding - Authorization, X-Filter - Authorization, X-Filter - - Accept-Encoding X-Accepted-Oauth-Scopes: - '*' X-Content-Type-Options: @@ -317,7 +136,7 @@ interactions: code: 200 duration: "" - request: - body: '{"label":"linodego-test-1719609233973734000","region":"us-ord","affinity_type":"anti_affinity:local","is_strict":false}' + body: '{"label":"linodego-test-1720709926370161000","region":"us-east","placement_group_type":"anti_affinity:local","placement_group_policy":"flexible"}' form: {} headers: Accept: @@ -329,9 +148,9 @@ interactions: url: https://api.linode.com/v4beta/placement/groups method: POST response: - body: '{"id": 1288, "label": "linodego-test-1719609233973734000", "region": "us-ord", - "affinity_type": "anti_affinity:local", "is_strict": false, "is_compliant": - true, "members": []}' + body: '{"id": 5841, "label": "linodego-test-1720709926370161000", "region": "us-east", + "placement_group_type": "anti_affinity:local", "placement_group_policy": "flexible", + "is_compliant": true, "members": [], "migrations": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -344,19 +163,15 @@ interactions: Access-Control-Expose-Headers: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - - max-age=0, no-cache, no-store - Connection: - - keep-alive + - private, max-age=60, s-maxage=60 Content-Length: - - "175" + - "221" Content-Security-Policy: - default-src 'none' Content-Type: - application/json - Expires: - - Fri, 28 Jun 2024 21:13:54 GMT - Pragma: - - no-cache + Server: + - nginx Strict-Transport-Security: - max-age=31536000 Vary: @@ -378,7 +193,7 @@ interactions: code: 200 duration: "" - request: - body: '{"region":"us-ord","type":"g6-nanode-1","label":"go-test-ins-gk37o1p05n6l","root_pass":"2w@C7|L4a8{3h`$6T-uRJ\u0026iCM8f2l''Bgqs`5Wy;kU(G@21rWW9PP[55\u003e1^utW2)j","image":"linode/debian9","firewall_id":611277,"placement_group":{"id":1288},"booted":false}' + body: '{"region":"us-east","type":"g6-nanode-1","label":"go-test-ins-bx6fu6y5c534","root_pass":"#i.X:pdh-49T8.TsJ]#IF17O5p;v4@1Ag9{xJbq2wyB6y`JWAG.-.50N40[v;0cL","image":"linode/debian9","firewall_id":36409,"placement_group":{"id":5841},"booted":false}' form: {} headers: Accept: @@ -390,17 +205,18 @@ interactions: url: https://api.linode.com/v4beta/linode/instances method: POST response: - body: '{"id": 60783502, "label": "go-test-ins-gk37o1p05n6l", "group": "", "status": + body: '{"id": 25220236, "label": "go-test-ins-bx6fu6y5c534", "group": "", "status": "provisioning", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", - "type": "g6-nanode-1", "ipv4": ["172.234.212.186"], "ipv6": "1234::5678/128", - "image": "linode/debian9", "region": "us-ord", "specs": {"disk": 25600, "memory": + "type": "g6-nanode-1", "ipv4": ["143.42.181.186"], "ipv6": "1234::5678/128", + "image": "linode/debian9", "region": "us-east", "specs": {"disk": 25600, "memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu": 90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io": 10000}, "backups": {"enabled": - true, "available": false, "schedule": {"day": null, "window": null}, "last_successful": + false, "available": false, "schedule": {"day": null, "window": null}, "last_successful": null}, "hypervisor": "kvm", "watchdog_enabled": true, "tags": [], "host_uuid": - "a4dde4a930ee064d67f6ba03753d2aec98b0e75b", "has_user_data": false, "placement_group": - {"id": 1288, "label": "linodego-test-1719609233973734000", "affinity_type": - "anti_affinity:local", "is_strict": false}, "lke_cluster_id": null}' + "2e8c6f5e2c38ef3261c570ae22ac2b65435af20b", "has_user_data": false, "placement_group": + {"id": 5841, "label": "linodego-test-1720709926370161000", "placement_group_type": + "anti_affinity:local", "placement_group_policy": "flexible", "migrating_to": + null}, "disk_encryption": "enabled", "lke_cluster_id": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -413,22 +229,18 @@ interactions: Access-Control-Expose-Headers: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - - max-age=0, no-cache, no-store - Connection: - - keep-alive + - private, max-age=60, s-maxage=60 Content-Security-Policy: - default-src 'none' Content-Type: - application/json - Expires: - - Fri, 28 Jun 2024 21:13:55 GMT - Pragma: - - no-cache + Server: + - nginx Strict-Transport-Security: - max-age=31536000 Vary: - - Authorization, X-Filter - Accept-Encoding + - Authorization, X-Filter X-Accepted-Oauth-Scopes: - linodes:read_write X-Content-Type-Options: @@ -455,7 +267,7 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/linode/instances/60783502 + url: https://api.linode.com/v4beta/linode/instances/25220236 method: DELETE response: body: '{}' @@ -471,19 +283,15 @@ interactions: Access-Control-Expose-Headers: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - - max-age=0, no-cache, no-store - Connection: - - keep-alive + - private, max-age=60, s-maxage=60 Content-Length: - "2" Content-Security-Policy: - default-src 'none' Content-Type: - application/json - Expires: - - Fri, 28 Jun 2024 21:13:55 GMT - Pragma: - - no-cache + Server: + - nginx Strict-Transport-Security: - max-age=31536000 Vary: @@ -514,7 +322,7 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/placement/groups/1288 + url: https://api.linode.com/v4beta/placement/groups/5841 method: DELETE response: body: '{}' @@ -530,19 +338,15 @@ interactions: Access-Control-Expose-Headers: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - - max-age=0, no-cache, no-store - Connection: - - keep-alive + - private, max-age=60, s-maxage=60 Content-Length: - "2" Content-Security-Policy: - default-src 'none' Content-Type: - application/json - Expires: - - Fri, 28 Jun 2024 21:13:56 GMT - Pragma: - - no-cache + Server: + - nginx Strict-Transport-Security: - max-age=31536000 Vary: diff --git a/test/integration/fixtures/TestPlacementGroup_assignment.yaml b/test/integration/fixtures/TestPlacementGroup_assignment.yaml index c6774dcf8..708d351b5 100644 --- a/test/integration/fixtures/TestPlacementGroup_assignment.yaml +++ b/test/integration/fixtures/TestPlacementGroup_assignment.yaml @@ -18,69 +18,81 @@ interactions: "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.34.5,172.105.35.5,172.105.36.5,172.105.37.5,172.105.38.5,172.105.39.5,172.105.40.5,172.105.41.5,172.105.42.5,172.105.43.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ca-central", "label": "Toronto, Ontario, CAN", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ca-central", "label": "Toronto, Ontario, CAN", "country": "ca", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.0.5,172.105.3.5,172.105.4.5,172.105.5.5,172.105.6.5,172.105.7.5,172.105.8.5,172.105.9.5,172.105.10.5,172.105.11.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ap-southeast", "label": "Sydney, NSW, Australia", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ap-southeast", "label": "Sydney, NSW, Australia", "country": "au", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.166.5,172.105.169.5,172.105.168.5,172.105.172.5,172.105.162.5,172.105.170.5,172.105.167.5,172.105.171.5,172.105.181.5,172.105.161.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "fake-cph-4", "label": "Fake CPH 4, DK", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "fake-cph-4", "label": "Fake CPH 4, DK", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "fake-cph-5", "label": "Fake CPH 5, DK", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "fake-cph-5", "label": "Fake CPH 5, DK", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-central", "label": "Dallas, TX, USA", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "billing66", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "billing67", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "billing100", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-central", "label": "Dallas, TX, USA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Kubernetes", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "72.14.179.5,72.14.188.5,173.255.199.5,66.228.53.5,96.126.122.5,96.126.124.5,96.126.127.5,198.58.107.5,198.58.111.5,23.239.24.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-west", "label": "Fremont, CA, USA", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-west", "label": "Fremont, CA, USA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "173.230.145.5,173.230.147.5,173.230.155.5,173.255.212.5,173.255.219.5,173.255.241.5,173.255.243.5,173.255.244.5,74.207.241.5,74.207.242.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-southeast", "label": "Atlanta, GA, USA", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-southeast", "label": "Atlanta, GA, USA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "74.207.231.5,173.230.128.5,173.230.129.5,173.230.136.5,173.230.140.5,66.228.59.5,66.228.62.5,50.116.35.5,50.116.41.5,23.239.18.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-east", "label": "Newark, NJ, USA", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-east", "label": "Newark, NJ, USA", "country": "us", "capabilities": ["Linodes", "Disk Encryption", "Backups", "NodeBalancers", "Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", "Bare Metal", "Vlans", "VPCs", "Block Storage Migrations", "Managed Databases", "Placement Group"], "status": "ok", "resolvers": {"ipv4": "66.228.42.5,96.126.106.5,50.116.53.5,50.116.58.5,50.116.61.5,50.116.62.5,66.175.211.5,97.107.133.4,207.192.69.4,207.192.69.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "eu-west", "label": "London, England, UK", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 3}, "site_type": "core"}, {"id": "eu-west", "label": "London, England, UK", "country": "uk", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Cloud Firewall", "Vlans", "VPCs", "Managed Databases", "Metadata", "Placement Group"], "status": "ok", "resolvers": {"ipv4": "178.79.182.5,176.58.107.5,176.58.116.5,176.58.121.5,151.236.220.5,212.71.252.5,212.71.253.5,109.74.192.20,109.74.193.20,109.74.194.20", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ap-south", "label": "Singapore, SG", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 3, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ap-south", "label": "Singapore, SG", "country": "sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country": "de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ap-northeast", "label": "Tokyo 2, JP", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ap-northeast", "label": "Tokyo 2, JP", "country": "jp", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.66.5,139.162.67.5,139.162.68.5,139.162.69.5,139.162.70.5,139.162.71.5,139.162.72.5,139.162.73.5,139.162.74.5,139.162.75.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 100, "maximum_linodes_per_pg": - 5}, "site_type": "core"}], "page": 1, "pages": 1, "results": 13}' + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}], "page": 1, "pages": 1, "results": 16}' headers: Access-Control-Allow-Credentials: - "true" @@ -124,7 +136,64 @@ interactions: code: 200 duration: "" - request: - body: '{"label":"linodego-test-1718722972576732000","region":"us-east","affinity_type":"anti_affinity:local","is_strict":false}' + body: "" + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - linodego/dev https://github.com/linode/linodego + url: https://api.linode.com/v4beta/regions/availability?page=1 + method: GET + response: + body: '{"data": [], "page": 1, "pages": 1, "results": 0}' + headers: + Access-Control-Allow-Credentials: + - "true" + Access-Control-Allow-Headers: + - Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter + Access-Control-Allow-Methods: + - HEAD, GET, OPTIONS, POST, PUT, DELETE + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status + Cache-Control: + - private, max-age=900 + - private, max-age=60, s-maxage=60 + Content-Length: + - "49" + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Vary: + - Authorization, X-Filter + - Authorization, X-Filter + X-Accepted-Oauth-Scopes: + - '*' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + - DENY + X-Oauth-Scopes: + - '*' + X-Ratelimit-Limit: + - "400" + X-Xss-Protection: + - 1; mode=block + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"label":"linodego-test-1721675806113296000","region":"us-east","placement_group_type":"anti_affinity:local","placement_group_policy":"flexible"}' form: {} headers: Accept: @@ -136,9 +205,9 @@ interactions: url: https://api.linode.com/v4beta/placement/groups method: POST response: - body: '{"id": 4020, "label": "linodego-test-1718722972576732000", "region": "us-east", - "affinity_type": "anti_affinity:local", "is_strict": false, "is_compliant": - true, "members": []}' + body: '{"id": 6252, "label": "linodego-test-1721675806113296000", "region": "us-east", + "placement_group_type": "anti_affinity:local", "placement_group_policy": "flexible", + "is_compliant": true, "members": [], "migrations": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -153,7 +222,7 @@ interactions: Cache-Control: - private, max-age=60, s-maxage=60 Content-Length: - - "176" + - "221" Content-Security-Policy: - default-src 'none' Content-Type: @@ -181,7 +250,7 @@ interactions: code: 200 duration: "" - request: - body: '{"region":"us-east","type":"g6-nanode-1","label":"go-test-ins-t02660a1ehag","root_pass":"1@L\u003e)0sb6qd`]5\u0026OW~K\\Q6F~5l4Tys\\3Gh9RI93}2Wrs6u;Pu?5c;~)ERj8Jm9Xo","image":"linode/debian9","firewall_id":34215,"booted":false}' + body: '{"region":"us-east","type":"g6-nanode-1","label":"go-test-ins-45dul0x555hm","root_pass":"f82D1PSTS\u003cN8ifBb=i-b{eS5\u003c5C^5C.F[K.3/y7R;`8s''b`Gh}Arz278be(57iP7","image":"linode/debian9","firewall_id":37174,"booted":false}' form: {} headers: Accept: @@ -193,16 +262,17 @@ interactions: url: https://api.linode.com/v4beta/linode/instances method: POST response: - body: '{"id": 25195349, "label": "go-test-ins-t02660a1ehag", "group": "", "status": + body: '{"id": 25232693, "label": "go-test-ins-45dul0x555hm", "group": "", "status": "provisioning", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", - "type": "g6-nanode-1", "ipv4": ["143.42.181.254"], "ipv6": "1234::5678/128", - "image": "linode/debian9", "region": "us-east", "specs": {"disk": 25600, "memory": - 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu": 90, "network_in": - 10, "network_out": 10, "transfer_quota": 80, "io": 10000}, "backups": {"enabled": - false, "available": false, "schedule": {"day": null, "window": null}, "last_successful": - null}, "hypervisor": "kvm", "watchdog_enabled": true, "tags": [], "host_uuid": - "53257e56e7692e143036a5fbf7daaf92b5350bf3", "has_user_data": false, "placement_group": - null, "disk_encryption": "enabled", "lke_cluster_id": null}' + "type": "g6-nanode-1", "ipv4": ["139.144.131.193"], "ipv6": "1234::5678/128", + "image": "linode/debian9", "region": "us-east", "site_type": "core", "specs": + {"disk": 25600, "memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": + {"cpu": 90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io": + 10000}, "backups": {"enabled": false, "available": false, "schedule": {"day": + null, "window": null}, "last_successful": null}, "hypervisor": "kvm", "watchdog_enabled": + true, "tags": [], "host_uuid": "03530127a19b0fa7234dec4175db15f25a2adce1", "has_user_data": + false, "placement_group": null, "disk_encryption": "enabled", "lke_cluster_id": + null}' headers: Access-Control-Allow-Credentials: - "true" @@ -244,7 +314,7 @@ interactions: code: 200 duration: "" - request: - body: '{"linodes":[25195349]}' + body: '{"linodes":[25232693]}' form: {} headers: Accept: @@ -253,12 +323,13 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/placement/groups/4020/assign + url: https://api.linode.com/v4beta/placement/groups/6252/assign method: POST response: - body: '{"id": 4020, "label": "linodego-test-1718722972576732000", "region": "us-east", - "affinity_type": "anti_affinity:local", "is_strict": false, "is_compliant": - true, "members": [{"linode_id": 25195349, "is_compliant": true}]}' + body: '{"id": 6252, "label": "linodego-test-1721675806113296000", "region": "us-east", + "placement_group_type": "anti_affinity:local", "placement_group_policy": "flexible", + "is_compliant": true, "members": [{"linode_id": 25232693, "is_compliant": true}], + "migrations": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -272,8 +343,6 @@ interactions: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - private, max-age=60, s-maxage=60 - Content-Length: - - "221" Content-Security-Policy: - default-src 'none' Content-Type: @@ -283,6 +352,7 @@ interactions: Strict-Transport-Security: - max-age=31536000 Vary: + - Accept-Encoding - Authorization, X-Filter X-Accepted-Oauth-Scopes: - linodes:read_write @@ -310,21 +380,21 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/linode/instances/25195349 + url: https://api.linode.com/v4beta/linode/instances/25232693 method: GET response: - body: '{"id": 25195349, "label": "go-test-ins-t02660a1ehag", "group": "", "status": + body: '{"id": 25232693, "label": "go-test-ins-45dul0x555hm", "group": "", "status": "provisioning", "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", - "type": "g6-nanode-1", "ipv4": ["143.42.181.254"], "ipv6": "1234::5678/128", - "image": "linode/debian9", "region": "us-east", "specs": {"disk": 25600, "memory": - 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": {"cpu": 90, "network_in": - 10, "network_out": 10, "transfer_quota": 80, "io": 10000}, "backups": {"enabled": - false, "available": false, "schedule": {"day": null, "window": null}, "last_successful": - null}, "hypervisor": "kvm", "watchdog_enabled": true, "tags": [], "host_uuid": - "53257e56e7692e143036a5fbf7daaf92b5350bf3", "has_user_data": false, "placement_group": - {"id": 4020, "label": "linodego-test-1718722972576732000", "affinity_type": - "anti_affinity:local", "is_strict": false}, "disk_encryption": "enabled", "lke_cluster_id": - null}' + "type": "g6-nanode-1", "ipv4": ["139.144.131.193"], "ipv6": "1234::5678/128", + "image": "linode/debian9", "region": "us-east", "site_type": "core", "specs": + {"disk": 25600, "memory": 1024, "vcpus": 1, "gpus": 0, "transfer": 1000}, "alerts": + {"cpu": 90, "network_in": 10, "network_out": 10, "transfer_quota": 80, "io": + 10000}, "backups": {"enabled": false, "available": false, "schedule": {"day": + null, "window": null}, "last_successful": null}, "hypervisor": "kvm", "watchdog_enabled": + true, "tags": [], "host_uuid": "03530127a19b0fa7234dec4175db15f25a2adce1", "has_user_data": + false, "placement_group": {"id": 6252, "label": "linodego-test-1721675806113296000", + "placement_group_type": "anti_affinity:local", "placement_group_policy": "flexible", + "migrating_to": null}, "disk_encryption": "enabled", "lke_cluster_id": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -368,7 +438,7 @@ interactions: code: 200 duration: "" - request: - body: '{"linodes":[25195349]}' + body: '{"linodes":[25232693]}' form: {} headers: Accept: @@ -377,12 +447,12 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/placement/groups/4020/unassign + url: https://api.linode.com/v4beta/placement/groups/6252/unassign method: POST response: - body: '{"id": 4020, "label": "linodego-test-1718722972576732000", "region": "us-east", - "affinity_type": "anti_affinity:local", "is_strict": false, "is_compliant": - true, "members": []}' + body: '{"id": 6252, "label": "linodego-test-1721675806113296000", "region": "us-east", + "placement_group_type": "anti_affinity:local", "placement_group_policy": "flexible", + "is_compliant": true, "members": [], "migrations": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -397,7 +467,7 @@ interactions: Cache-Control: - private, max-age=60, s-maxage=60 Content-Length: - - "176" + - "221" Content-Security-Policy: - default-src 'none' Content-Type: @@ -434,7 +504,7 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/placement/groups/4020 + url: https://api.linode.com/v4beta/placement/groups/6252 method: DELETE response: body: '{}' diff --git a/test/integration/fixtures/TestPlacementGroup_basic.yaml b/test/integration/fixtures/TestPlacementGroup_basic.yaml index b47a1f8c8..8df5e0dc3 100644 --- a/test/integration/fixtures/TestPlacementGroup_basic.yaml +++ b/test/integration/fixtures/TestPlacementGroup_basic.yaml @@ -18,61 +18,137 @@ interactions: "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.34.5,172.105.35.5,172.105.36.5,172.105.37.5,172.105.38.5,172.105.39.5,172.105.40.5,172.105.41.5,172.105.42.5,172.105.43.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ca-central", "label": "Toronto, Ontario, CAN", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ca-central", "label": "Toronto, Ontario, CAN", "country": "ca", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.0.5,172.105.3.5,172.105.4.5,172.105.5.5,172.105.6.5,172.105.7.5,172.105.8.5,172.105.9.5,172.105.10.5,172.105.11.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ap-southeast", "label": "Sydney, NSW, Australia", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ap-southeast", "label": "Sydney, NSW, Australia", "country": "au", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Vlans", "VPCs", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "172.105.166.5,172.105.169.5,172.105.168.5,172.105.172.5,172.105.162.5,172.105.170.5,172.105.167.5,172.105.171.5,172.105.181.5,172.105.161.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-central", "label": "Dallas, TX, USA", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "fake-cph-4", "label": "Fake CPH 4, DK", "country": + "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers": + {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "fake-cph-5", "label": "Fake CPH 5, DK", "country": + "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", "resolvers": + {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "billing66", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "billing67", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "billing100", "label": "Billing Automation, + BA", "country": "dk", "capabilities": ["Linodes", "Metadata"], "status": "ok", + "resolvers": {"ipv4": "8.8.8.8,1.1.1.1,1.0.0.1,8.8.4.4", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678"}, + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-central", "label": "Dallas, TX, USA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Kubernetes", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "72.14.179.5,72.14.188.5,173.255.199.5,66.228.53.5,96.126.122.5,96.126.124.5,96.126.127.5,198.58.107.5,198.58.111.5,23.239.24.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-west", "label": "Fremont, CA, USA", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-west", "label": "Fremont, CA, USA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "173.230.145.5,173.230.147.5,173.230.155.5,173.255.212.5,173.255.219.5,173.255.241.5,173.255.243.5,173.255.244.5,74.207.241.5,74.207.242.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-southeast", "label": "Atlanta, GA, USA", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-southeast", "label": "Atlanta, GA, USA", "country": "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "74.207.231.5,173.230.128.5,173.230.129.5,173.230.136.5,173.230.140.5,66.228.59.5,66.228.62.5,50.116.35.5,50.116.41.5,23.239.18.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "us-east", "label": "Newark, NJ, USA", "country": - "us", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Block Storage", - "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", "Bare Metal", - "Vlans", "VPCs", "Block Storage Migrations", "Managed Databases", "Metadata"], - "status": "ok", "resolvers": {"ipv4": "66.228.42.5,96.126.106.5,50.116.53.5,50.116.58.5,50.116.61.5,50.116.62.5,66.175.211.5,97.107.133.4,207.192.69.4,207.192.69.5", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "us-east", "label": "Newark, NJ, USA", "country": + "us", "capabilities": ["Linodes", "Disk Encryption", "Backups", "NodeBalancers", + "Block Storage", "Object Storage", "GPU Linodes", "Kubernetes", "Cloud Firewall", + "Bare Metal", "Vlans", "VPCs", "Block Storage Migrations", "Managed Databases", + "Placement Group"], "status": "ok", "resolvers": {"ipv4": "66.228.42.5,96.126.106.5,50.116.53.5,50.116.58.5,50.116.61.5,50.116.62.5,66.175.211.5,97.107.133.4,207.192.69.4,207.192.69.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "eu-west", "label": "London, England, UK", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 3}, "site_type": "core"}, {"id": "eu-west", "label": "London, England, UK", "country": "uk", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Cloud Firewall", "Vlans", "VPCs", "Managed Databases", "Metadata", "Placement Group"], "status": "ok", "resolvers": {"ipv4": "178.79.182.5,176.58.107.5,176.58.116.5,176.58.121.5,151.236.220.5,212.71.252.5,212.71.253.5,109.74.192.20,109.74.193.20,109.74.194.20", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ap-south", "label": "Singapore, SG", "country": - "sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Object Storage", - "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20", + "placement_group_limits": {"maximum_pgs_per_customer": 3, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ap-south", "label": "Singapore, SG", "country": + "sg", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], + "status": "ok", "resolvers": {"ipv4": "139.162.11.5,139.162.13.5,139.162.14.5,139.162.15.5,139.162.16.5,139.162.21.5,139.162.27.5,103.3.60.18,103.3.60.19,103.3.60.20", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country": - "de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Object Storage", - "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5", + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "eu-central", "label": "Frankfurt, DE", "country": + "de", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], + "status": "ok", "resolvers": {"ipv4": "139.162.130.5,139.162.131.5,139.162.132.5,139.162.133.5,139.162.134.5,139.162.135.5,139.162.136.5,139.162.137.5,139.162.138.5,139.162.139.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}, {"id": "ap-northeast", "label": "Tokyo 2, JP", "country": + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}, {"id": "ap-northeast", "label": "Tokyo 2, JP", "country": "jp", "capabilities": ["Linodes", "Backups", "NodeBalancers", "Managed Databases"], "status": "ok", "resolvers": {"ipv4": "139.162.66.5,139.162.67.5,139.162.68.5,139.162.69.5,139.162.70.5,139.162.71.5,139.162.72.5,139.162.73.5,139.162.74.5,139.162.75.5", "ipv6": "1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678,1234::5678"}, - "placement_group_limits": {"maximum_pgs_per_customer": 5, "maximum_linodes_per_pg": - 5}, "site_type": "core"}], "page": 1, "pages": 1, "results": 11}' + "placement_group_limits": {"maximum_pgs_per_customer": 2, "maximum_linodes_per_pg": + 2}, "site_type": "core"}], "page": 1, "pages": 1, "results": 16}' + headers: + Access-Control-Allow-Credentials: + - "true" + Access-Control-Allow-Headers: + - Authorization, Origin, X-Requested-With, Content-Type, Accept, X-Filter + Access-Control-Allow-Methods: + - HEAD, GET, OPTIONS, POST, PUT, DELETE + Access-Control-Allow-Origin: + - '*' + Access-Control-Expose-Headers: + - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status + Cache-Control: + - private, max-age=900 + - private, max-age=60, s-maxage=60 + Content-Security-Policy: + - default-src 'none' + Content-Type: + - application/json + Server: + - nginx + Strict-Transport-Security: + - max-age=31536000 + Vary: + - Accept-Encoding + - Authorization, X-Filter + - Authorization, X-Filter + X-Accepted-Oauth-Scopes: + - '*' + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + - DENY + X-Oauth-Scopes: + - '*' + X-Ratelimit-Limit: + - "400" + X-Xss-Protection: + - 1; mode=block + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Content-Type: + - application/json + User-Agent: + - linodego/dev https://github.com/linode/linodego + url: https://api.linode.com/v4beta/regions/availability?page=1 + method: GET + response: + body: '{"data": [], "page": 1, "pages": 1, "results": 0}' headers: Access-Control-Allow-Credentials: - "true" @@ -87,10 +163,8 @@ interactions: Cache-Control: - private, max-age=900 - private, max-age=60, s-maxage=60 - Connection: - - keep-alive Content-Length: - - "7144" + - "49" Content-Security-Policy: - default-src 'none' Content-Type: @@ -119,7 +193,7 @@ interactions: code: 200 duration: "" - request: - body: '{"label":"linodego-test-1712862362503240000","region":"eu-west","affinity_type":"anti_affinity:local","is_strict":false}' + body: '{"label":"linodego-test-1721675804603477000","region":"us-east","placement_group_type":"anti_affinity:local","placement_group_policy":"flexible"}' form: {} headers: Accept: @@ -131,9 +205,9 @@ interactions: url: https://api.linode.com/v4beta/placement/groups method: POST response: - body: '{"id": 351, "label": "linodego-test-1712862362503240000", "region": "eu-west", - "affinity_type": "anti_affinity:local", "is_strict": false, "is_compliant": - true, "members": []}' + body: '{"id": 6251, "label": "linodego-test-1721675804603477000", "region": "us-east", + "placement_group_type": "anti_affinity:local", "placement_group_policy": "flexible", + "is_compliant": true, "members": [], "migrations": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -147,10 +221,8 @@ interactions: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - private, max-age=60, s-maxage=60 - Connection: - - keep-alive Content-Length: - - "175" + - "221" Content-Security-Policy: - default-src 'none' Content-Type: @@ -178,7 +250,7 @@ interactions: code: 200 duration: "" - request: - body: '{"label":"linodego-test-1712862362503240000-updated"}' + body: '{"label":"linodego-test-1721675804603477000-updated"}' form: {} headers: Accept: @@ -187,12 +259,12 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/placement/groups/351 + url: https://api.linode.com/v4beta/placement/groups/6251 method: PUT response: - body: '{"id": 351, "label": "linodego-test-1712862362503240000-updated", "region": - "eu-west", "affinity_type": "anti_affinity:local", "is_strict": false, "is_compliant": - true, "members": []}' + body: '{"id": 6251, "label": "linodego-test-1721675804603477000-updated", "region": + "us-east", "placement_group_type": "anti_affinity:local", "placement_group_policy": + "flexible", "is_compliant": true, "members": [], "migrations": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -206,10 +278,8 @@ interactions: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - private, max-age=60, s-maxage=60 - Connection: - - keep-alive Content-Length: - - "183" + - "229" Content-Security-Policy: - default-src 'none' Content-Type: @@ -246,12 +316,12 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/placement/groups/351 + url: https://api.linode.com/v4beta/placement/groups/6251 method: GET response: - body: '{"id": 351, "label": "linodego-test-1712862362503240000-updated", "region": - "eu-west", "affinity_type": "anti_affinity:local", "is_strict": false, "is_compliant": - true, "members": []}' + body: '{"id": 6251, "label": "linodego-test-1721675804603477000-updated", "region": + "us-east", "placement_group_type": "anti_affinity:local", "placement_group_policy": + "flexible", "is_compliant": true, "members": [], "migrations": null}' headers: Access-Control-Allow-Credentials: - "true" @@ -266,10 +336,8 @@ interactions: Cache-Control: - private, max-age=0, s-maxage=0, no-cache, no-store - private, max-age=60, s-maxage=60 - Connection: - - keep-alive Content-Length: - - "183" + - "229" Content-Security-Policy: - default-src 'none' Content-Type: @@ -308,13 +376,14 @@ interactions: User-Agent: - linodego/dev https://github.com/linode/linodego X-Filter: - - '{"id": 351}' + - '{"id": 6251}' url: https://api.linode.com/v4beta/placement/groups?page=1 method: GET response: - body: '{"data": [{"id": 351, "label": "linodego-test-1712862362503240000-updated", - "region": "eu-west", "affinity_type": "anti_affinity:local", "is_strict": false, - "is_compliant": true, "members": []}], "page": 1, "pages": 1, "results": 1}' + body: '{"data": [{"id": 6251, "label": "linodego-test-1721675804603477000-updated", + "region": "us-east", "placement_group_type": "anti_affinity:local", "placement_group_policy": + "flexible", "is_compliant": true, "members": [], "migrations": null}], "page": + 1, "pages": 1, "results": 1}' headers: Access-Control-Allow-Credentials: - "true" @@ -329,10 +398,6 @@ interactions: Cache-Control: - private, max-age=0, s-maxage=0, no-cache, no-store - private, max-age=60, s-maxage=60 - Connection: - - keep-alive - Content-Length: - - "232" Content-Security-Policy: - default-src 'none' Content-Type: @@ -342,6 +407,7 @@ interactions: Strict-Transport-Security: - max-age=31536000 Vary: + - Accept-Encoding - Authorization, X-Filter - Authorization, X-Filter X-Accepted-Oauth-Scopes: @@ -370,7 +436,7 @@ interactions: - application/json User-Agent: - linodego/dev https://github.com/linode/linodego - url: https://api.linode.com/v4beta/placement/groups/351 + url: https://api.linode.com/v4beta/placement/groups/6251 method: DELETE response: body: '{}' @@ -387,8 +453,6 @@ interactions: - X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Status Cache-Control: - private, max-age=60, s-maxage=60 - Connection: - - keep-alive Content-Length: - "2" Content-Security-Policy: diff --git a/test/integration/instances_test.go b/test/integration/instances_test.go index a5fc4668c..f9da20fdf 100644 --- a/test/integration/instances_test.go +++ b/test/integration/instances_test.go @@ -507,8 +507,8 @@ func TestInstance_withPG(t *testing.T) { require.NotNil(t, inst.PlacementGroup) require.Equal(t, inst.PlacementGroup.ID, pg.ID) require.Equal(t, inst.PlacementGroup.Label, pg.Label) - require.Equal(t, inst.PlacementGroup.AffinityType, pg.AffinityType) - require.Equal(t, inst.PlacementGroup.IsStrict, pg.IsStrict) + require.Equal(t, inst.PlacementGroup.PlacementGroupType, pg.PlacementGroupType) + require.Equal(t, inst.PlacementGroup.PlacementGroupPolicy, pg.PlacementGroupPolicy) } func createInstance(t *testing.T, client *linodego.Client, enableCloudFirewall bool, modifiers ...instanceModifier) (*linodego.Instance, error) { diff --git a/test/integration/main_test.go b/test/integration/main_test.go index 9f23c9c88..8596e5dd8 100644 --- a/test/integration/main_test.go +++ b/test/integration/main_test.go @@ -3,13 +3,14 @@ package integration import ( "context" "fmt" - "github.com/linode/linodego" "io" "log" "net/http" "os" "testing" "time" + + "github.com/linode/linodego" ) var ( diff --git a/test/integration/placement_group_test.go b/test/integration/placement_group_test.go index 12690de78..4a64ca4a3 100644 --- a/test/integration/placement_group_test.go +++ b/test/integration/placement_group_test.go @@ -28,8 +28,8 @@ func TestPlacementGroup_basic(t *testing.T) { require.NotEqual(t, pg.ID, 0) require.Contains(t, pg.Label, "linodego-test-") require.NotEmpty(t, pg.Label) - require.Equal(t, pg.AffinityType, linodego.AffinityTypeAntiAffinityLocal) - require.Equal(t, pg.IsStrict, false) + require.Equal(t, pg.PlacementGroupType, linodego.PlacementGroupTypeAntiAffinityLocal) + require.Equal(t, pg.PlacementGroupPolicy, linodego.PlacementGroupPolicyFlexible) require.Len(t, pg.Members, 0) updatedLabel := pg.Label + "-updated" @@ -97,8 +97,8 @@ func TestPlacementGroup_assignment(t *testing.T) { require.NotNil(t, inst.PlacementGroup) require.Equal(t, inst.PlacementGroup.ID, pg.ID) require.Equal(t, inst.PlacementGroup.Label, pg.Label) - require.Equal(t, inst.PlacementGroup.IsStrict, pg.IsStrict) - require.Equal(t, inst.PlacementGroup.AffinityType, pg.AffinityType) + require.Equal(t, inst.PlacementGroup.PlacementGroupPolicy, pg.PlacementGroupPolicy) + require.Equal(t, inst.PlacementGroup.PlacementGroupType, pg.PlacementGroupType) // Ensure unassignment works as expected pg, err = client.UnassignPlacementGroupLinodes( @@ -121,10 +121,10 @@ func createPlacementGroup( ) (*linodego.PlacementGroup, func(), error) { t.Helper() createOpts := linodego.PlacementGroupCreateOptions{ - Label: "linodego-test-" + getUniqueText(), - Region: getRegionsWithCaps(t, client, []string{"Placement Group"}, []string{})[0], - AffinityType: linodego.AffinityTypeAntiAffinityLocal, - IsStrict: false, + Label: "linodego-test-" + getUniqueText(), + Region: getRegionsWithCaps(t, client, []string{"Placement Group"}, []string{})[0], + PlacementGroupType: linodego.PlacementGroupTypeAntiAffinityLocal, + PlacementGroupPolicy: linodego.PlacementGroupPolicyFlexible, } for _, mod := range pgModifier {