@@ -37,8 +37,11 @@ type InstanceService interface {
37
37
AttachVPC (ctx context.Context , instanceID , vpcID string ) error
38
38
DetachVPC (ctx context.Context , instanceID , vpcID string ) error
39
39
40
+ // Deprecated: VPC2 is no longer supported
40
41
ListVPC2Info (ctx context.Context , instanceID string , options * ListOptions ) ([]VPC2Info , * Meta , * http.Response , error )
42
+ // Deprecated: VPC2 is no longer supported
41
43
AttachVPC2 (ctx context.Context , instanceID string , vpc2Req * AttachVPC2Req ) error
44
+ // Deprecated: VPC2 is no longer supported
42
45
DetachVPC2 (ctx context.Context , instanceID , vpcID string ) error
43
46
44
47
ISOStatus (ctx context.Context , instanceID string ) (* Iso , * http.Response , error )
@@ -148,13 +151,15 @@ type vpc2InfoBase struct {
148
151
}
149
152
150
153
// VPC2Info information for a given instance.
154
+ // Deprecated: VPC2 is no longer supported
151
155
type VPC2Info struct {
152
156
ID string `json:"id"`
153
157
MacAddress string `json:"mac_address"`
154
158
IPAddress string `json:"ip_address"`
155
159
}
156
160
157
161
// AttachVPC2Req parameters for attaching a VPC 2.0 network
162
+ // Deprecated: VPC2 is no longer supported
158
163
type AttachVPC2Req struct {
159
164
VPCID string `json:"vpc_id,omitempty"`
160
165
IPAddress * string `json:"ip_address,omitempty"`
@@ -232,49 +237,54 @@ type Upgrades struct {
232
237
233
238
// InstanceCreateReq struct used to create an instance.
234
239
type InstanceCreateReq struct {
235
- Region string `json:"region,omitempty"`
236
- Plan string `json:"plan,omitempty"`
237
- Label string `json:"label,omitempty"`
238
- Tags []string `json:"tags"`
239
- OsID int `json:"os_id,omitempty"`
240
- ISOID string `json:"iso_id,omitempty"`
241
- AppID int `json:"app_id,omitempty"`
242
- ImageID string `json:"image_id,omitempty"`
243
- FirewallGroupID string `json:"firewall_group_id,omitempty"`
244
- Hostname string `json:"hostname,omitempty"`
245
- IPXEChainURL string `json:"ipxe_chain_url,omitempty"`
246
- ScriptID string `json:"script_id,omitempty"`
247
- SnapshotID string `json:"snapshot_id,omitempty"`
248
- EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
249
- DisablePublicIPv4 * bool `json:"disable_public_ipv4,omitempty"`
250
- EnableVPC * bool `json:"enable_vpc,omitempty"`
251
- AttachVPC []string `json:"attach_vpc,omitempty"`
252
- EnableVPC2 * bool `json:"enable_vpc2,omitempty"`
253
- AttachVPC2 []string `json:"attach_vpc2,omitempty"`
254
- SSHKeys []string `json:"sshkey_id,omitempty"`
255
- Backups string `json:"backups,omitempty"`
256
- DDOSProtection * bool `json:"ddos_protection,omitempty"`
257
- UserData string `json:"user_data,omitempty"`
258
- ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
259
- ActivationEmail * bool `json:"activation_email,omitempty"`
260
- UserScheme string `json:"user_scheme,omitempty"`
261
- AppVariables map [string ]string `json:"app_variables,omitempty"`
240
+ Region string `json:"region,omitempty"`
241
+ Plan string `json:"plan,omitempty"`
242
+ Label string `json:"label,omitempty"`
243
+ Tags []string `json:"tags"`
244
+ OsID int `json:"os_id,omitempty"`
245
+ ISOID string `json:"iso_id,omitempty"`
246
+ AppID int `json:"app_id,omitempty"`
247
+ ImageID string `json:"image_id,omitempty"`
248
+ FirewallGroupID string `json:"firewall_group_id,omitempty"`
249
+ Hostname string `json:"hostname,omitempty"`
250
+ IPXEChainURL string `json:"ipxe_chain_url,omitempty"`
251
+ ScriptID string `json:"script_id,omitempty"`
252
+ SnapshotID string `json:"snapshot_id,omitempty"`
253
+ EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
254
+ DisablePublicIPv4 * bool `json:"disable_public_ipv4,omitempty"`
255
+ EnableVPC * bool `json:"enable_vpc,omitempty"`
256
+ AttachVPC []string `json:"attach_vpc,omitempty"`
257
+ // Deprecated: VPC2 is no longer supported
258
+ EnableVPC2 * bool `json:"enable_vpc2,omitempty"`
259
+ // Deprecated: VPC2 is no longer supported
260
+ AttachVPC2 []string `json:"attach_vpc2,omitempty"`
261
+ SSHKeys []string `json:"sshkey_id,omitempty"`
262
+ Backups string `json:"backups,omitempty"`
263
+ DDOSProtection * bool `json:"ddos_protection,omitempty"`
264
+ UserData string `json:"user_data,omitempty"`
265
+ ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
266
+ ActivationEmail * bool `json:"activation_email,omitempty"`
267
+ UserScheme string `json:"user_scheme,omitempty"`
268
+ AppVariables map [string ]string `json:"app_variables,omitempty"`
262
269
}
263
270
264
271
// InstanceUpdateReq struct used to update an instance.
265
272
type InstanceUpdateReq struct {
266
- Plan string `json:"plan,omitempty"`
267
- Label string `json:"label,omitempty"`
268
- Tags []string `json:"tags"`
269
- OsID int `json:"os_id,omitempty"`
270
- AppID int `json:"app_id,omitempty"`
271
- ImageID string `json:"image_id,omitempty"`
272
- EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
273
- EnableVPC * bool `json:"enable_vpc,omitempty"`
274
- AttachVPC []string `json:"attach_vpc,omitempty"`
275
- DetachVPC []string `json:"detach_vpc,omitempty"`
276
- EnableVPC2 * bool `json:"enable_vpc2,omitempty"`
277
- AttachVPC2 []string `json:"attach_vpc2,omitempty"`
273
+ Plan string `json:"plan,omitempty"`
274
+ Label string `json:"label,omitempty"`
275
+ Tags []string `json:"tags"`
276
+ OsID int `json:"os_id,omitempty"`
277
+ AppID int `json:"app_id,omitempty"`
278
+ ImageID string `json:"image_id,omitempty"`
279
+ EnableIPv6 * bool `json:"enable_ipv6,omitempty"`
280
+ EnableVPC * bool `json:"enable_vpc,omitempty"`
281
+ AttachVPC []string `json:"attach_vpc,omitempty"`
282
+ DetachVPC []string `json:"detach_vpc,omitempty"`
283
+ // Deprecated: VPC2 is no longer supported
284
+ EnableVPC2 * bool `json:"enable_vpc2,omitempty"`
285
+ // Deprecated: VPC2 is no longer supported
286
+ AttachVPC2 []string `json:"attach_vpc2,omitempty"`
287
+ // Deprecated: VPC2 is no longer supported
278
288
DetachVPC2 []string `json:"detach_vpc2,omitempty"`
279
289
Backups string `json:"backups,omitempty"`
280
290
DDOSProtection * bool `json:"ddos_protection"`
@@ -566,6 +576,7 @@ func (i *InstanceServiceHandler) DetachVPC(ctx context.Context, instanceID, vpcI
566
576
}
567
577
568
578
// ListVPC2Info currently attached to an instance.
579
+ // Deprecated: VPC2 is no longer supported
569
580
func (i * InstanceServiceHandler ) ListVPC2Info (ctx context.Context , instanceID string , options * ListOptions ) ([]VPC2Info , * Meta , * http.Response , error ) { //nolint:lll,dupl
570
581
uri := fmt .Sprintf ("%s/%s/vpc2" , instancePath , instanceID )
571
582
req , err := i .client .NewRequest (ctx , http .MethodGet , uri , nil )
@@ -590,6 +601,7 @@ func (i *InstanceServiceHandler) ListVPC2Info(ctx context.Context, instanceID st
590
601
}
591
602
592
603
// AttachVPC2 to an instance
604
+ // Deprecated: VPC2 is no longer supported
593
605
func (i * InstanceServiceHandler ) AttachVPC2 (ctx context.Context , instanceID string , vpc2Req * AttachVPC2Req ) error {
594
606
uri := fmt .Sprintf ("%s/%s/vpc2/attach" , instancePath , instanceID )
595
607
@@ -603,6 +615,7 @@ func (i *InstanceServiceHandler) AttachVPC2(ctx context.Context, instanceID stri
603
615
}
604
616
605
617
// DetachVPC2 from an instance.
618
+ // Deprecated: VPC2 is no longer supported
606
619
func (i * InstanceServiceHandler ) DetachVPC2 (ctx context.Context , instanceID , vpcID string ) error {
607
620
uri := fmt .Sprintf ("%s/%s/vpc2/detach" , instancePath , instanceID )
608
621
body := RequestBody {"vpc_id" : vpcID }
0 commit comments