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
8 changes: 6 additions & 2 deletions interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ type LinodeInterfaceCreateOptions struct {
type LinodeInterfaceUpdateOptions struct {
DefaultRoute *InterfaceDefaultRoute `json:"default_route,omitempty"`
Public *PublicInterfaceCreateOptions `json:"public,omitempty"`
VPC *VPCInterfaceCreateOptions `json:"vpc,omitempty"`
VLAN *VLANInterface `json:"vlan,omitempty"`
VPC *VPCInterfaceUpdateOptions `json:"vpc,omitempty"`
}

type PublicInterfaceCreateOptions struct {
Expand Down Expand Up @@ -189,6 +188,11 @@ type VPCInterfaceIPv6RangeCreateOptions struct {
Range string `json:"range"`
}

type VPCInterfaceUpdateOptions struct {
IPv4 *VPCInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
IPv6 *VPCInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
}

type LinodeInterfacesUpgrade struct {
ConfigID int `json:"config_id"`
DryRun bool `json:"dry_run"`
Expand Down
2 changes: 1 addition & 1 deletion test/unit/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func TestInterface_UpdateVPC(t *testing.T) {
IPv4: linodego.Pointer(true),
IPv6: linodego.Pointer(true),
},
VPC: &linodego.VPCInterfaceCreateOptions{
VPC: &linodego.VPCInterfaceUpdateOptions{
IPv4: &linodego.VPCInterfaceIPv4CreateOptions{
Addresses: &[]linodego.VPCInterfaceIPv4AddressCreateOptions{
{
Expand Down