Skip to content

Commit 5a81d98

Browse files
Add VPCInterfaceUpdateOptions (#825)
1 parent 2e1fcf5 commit 5a81d98

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

interfaces.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ type LinodeInterfaceCreateOptions struct {
122122
type LinodeInterfaceUpdateOptions struct {
123123
DefaultRoute *InterfaceDefaultRoute `json:"default_route,omitempty"`
124124
Public *PublicInterfaceCreateOptions `json:"public,omitempty"`
125-
VPC *VPCInterfaceCreateOptions `json:"vpc,omitempty"`
126-
VLAN *VLANInterface `json:"vlan,omitempty"`
125+
VPC *VPCInterfaceUpdateOptions `json:"vpc,omitempty"`
127126
}
128127

129128
type PublicInterfaceCreateOptions struct {
@@ -189,6 +188,11 @@ type VPCInterfaceIPv6RangeCreateOptions struct {
189188
Range string `json:"range"`
190189
}
191190

191+
type VPCInterfaceUpdateOptions struct {
192+
IPv4 *VPCInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
193+
IPv6 *VPCInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
194+
}
195+
192196
type LinodeInterfacesUpgrade struct {
193197
ConfigID int `json:"config_id"`
194198
DryRun bool `json:"dry_run"`

test/unit/interface_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func TestInterface_UpdateVPC(t *testing.T) {
225225
IPv4: linodego.Pointer(true),
226226
IPv6: linodego.Pointer(true),
227227
},
228-
VPC: &linodego.VPCInterfaceCreateOptions{
228+
VPC: &linodego.VPCInterfaceUpdateOptions{
229229
IPv4: &linodego.VPCInterfaceIPv4CreateOptions{
230230
Addresses: &[]linodego.VPCInterfaceIPv4AddressCreateOptions{
231231
{

0 commit comments

Comments
 (0)