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
10 changes: 5 additions & 5 deletions instance_ips.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ type InstanceIPAddressResponse struct {

// InstanceIPv4Response contains the details of all IPv4 addresses associated with an Instance
type InstanceIPv4Response struct {
Public []*InstanceIP `json:"public"`
Private []*InstanceIP `json:"private"`
Shared []*InstanceIP `json:"shared"`
Reserved []*InstanceIP `json:"reserved"`
VPC []*VPCIP `json:"vpc"`
Public []InstanceIP `json:"public"`
Private []InstanceIP `json:"private"`
Shared []InstanceIP `json:"shared"`
Reserved []InstanceIP `json:"reserved"`
VPC []VPCIP `json:"vpc"`
}

// InstanceIP represents an Instance IP with additional DNS and networking details
Expand Down
22 changes: 11 additions & 11 deletions instance_snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// InstanceBackupsResponse response struct for backup snapshot
type InstanceBackupsResponse struct {
Automatic []*InstanceSnapshot `json:"automatic"`
Automatic []InstanceSnapshot `json:"automatic"`
Snapshot *InstanceBackupSnapshotResponse `json:"snapshot"`
}

Expand All @@ -32,16 +32,16 @@ type RestoreInstanceOptions struct {

// InstanceSnapshot represents a linode backup snapshot
type InstanceSnapshot struct {
ID int `json:"id"`
Label string `json:"label"`
Status InstanceSnapshotStatus `json:"status"`
Type string `json:"type"`
Created *time.Time `json:"-"`
Updated *time.Time `json:"-"`
Finished *time.Time `json:"-"`
Configs []string `json:"configs"`
Disks []*InstanceSnapshotDisk `json:"disks"`
Available bool `json:"available"`
ID int `json:"id"`
Label string `json:"label"`
Status InstanceSnapshotStatus `json:"status"`
Type string `json:"type"`
Created *time.Time `json:"-"`
Updated *time.Time `json:"-"`
Finished *time.Time `json:"-"`
Configs []string `json:"configs"`
Disks []InstanceSnapshotDisk `json:"disks"`
Available bool `json:"available"`
}

// InstanceSnapshotDisk fields represent the source disk of a Snapshot
Expand Down
2 changes: 1 addition & 1 deletion instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Instance struct {
Backups *InstanceBackup `json:"backups"`
Image string `json:"image"`
Group string `json:"group"`
IPv4 []*net.IP `json:"ipv4"`
IPv4 []net.IP `json:"ipv4"`
IPv6 string `json:"ipv6"`
Label string `json:"label"`
Type string `json:"type"`
Expand Down
12 changes: 6 additions & 6 deletions nodebalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ type NodeBalancerCreateOptions struct {
// NOTE: ClientUDPSessThrottle may not currently be available to all users.
ClientUDPSessThrottle *int `json:"client_udp_sess_throttle,omitzero"`

Configs []*NodeBalancerConfigCreateOptions `json:"configs,omitzero"`
Tags []string `json:"tags"`
FirewallID int `json:"firewall_id,omitzero"`
Type NodeBalancerPlanType `json:"type,omitzero"`
VPCs []NodeBalancerVPCOptions `json:"vpcs,omitzero"`
IPv4 *string `json:"ipv4,omitzero"`
Configs []NodeBalancerConfigCreateOptions `json:"configs,omitzero"`
Tags []string `json:"tags"`
FirewallID int `json:"firewall_id,omitzero"`
Type NodeBalancerPlanType `json:"type,omitzero"`
VPCs []NodeBalancerVPCOptions `json:"vpcs,omitzero"`
IPv4 *string `json:"ipv4,omitzero"`
}

// NodeBalancerUpdateOptions are the options permitted for UpdateNodeBalancer
Expand Down
1,252 changes: 928 additions & 324 deletions test/integration/fixtures/TestEventPoller_Secondary.yaml

Large diffs are not rendered by default.

1,117 changes: 700 additions & 417 deletions test/integration/fixtures/TestVLANs_List.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/integration/vlans_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ func TestVLANs_List_smoke(t *testing.T) {
client, fixturesTeardown := createTestClient(t, "fixtures/TestVLANs_List")
defer fixturesTeardown()

var instances []*linodego.Instance
var instances []linodego.Instance
for i := 0; i < 2; i++ {
instance, instanceTeardown, err := createVLANInstance(t, client, fmt.Sprintf("%s-%d", instancePrefix, i), vlanName)
if err != nil {
t.Fatal(err)
}
defer instanceTeardown()

instances = append(instances, instance)
instances = append(instances, *instance)
}

for _, instance := range instances {
Expand Down
4 changes: 2 additions & 2 deletions test/integration/waitfor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestEventPoller_Secondary(t *testing.T) {
}

// Create two instance disks
disks := make([]*linodego.InstanceDisk, 2)
disks := make([]linodego.InstanceDisk, 2)

for i := 0; i < 2; i++ {
disk, err := client.CreateInstanceDisk(context.Background(), instance.ID, linodego.InstanceDiskCreateOptions{
Expand All @@ -188,7 +188,7 @@ func TestEventPoller_Secondary(t *testing.T) {
t.Fatalf("failed to create instance disk: %s", err)
}

disks[i] = disk
disks[i] = *disk
}

// Poll for the first disk to be deleted
Expand Down
2 changes: 1 addition & 1 deletion test/unit/nodebalancers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestNodeBalancers_UDP(t *testing.T) {
Label: linodego.Pointer("foobar"),
Region: "us-mia",
ClientUDPSessThrottle: linodego.Pointer(5),
Configs: []*linodego.NodeBalancerConfigCreateOptions{
Configs: []linodego.NodeBalancerConfigCreateOptions{
{
Protocol: linodego.ProtocolUDP,
Port: 1234,
Expand Down
Loading