Skip to content

Commit 9a3fe92

Browse files
authored
Remove mtu and access config defaults from SDK (IBM-Cloud#255)
1 parent 750fdf5 commit 9a3fe92

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

clients/instance/ibm-pi-network.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,9 @@ func (f *IBMPINetworkClient) GetAll() (*models.Networks, error) {
5656

5757
// Create a Network
5858
func (f *IBMPINetworkClient) Create(body *models.NetworkCreate) (*models.Network, error) {
59-
// Set defaults incase user does not
60-
if body.Mtu == nil {
61-
var defaultMTU int64 = 1450
62-
body.Mtu = &defaultMTU
63-
}
64-
if body.AccessConfig == "" {
65-
var defaultAccessConfig models.AccessConfig = "internal-only"
66-
body.AccessConfig = defaultAccessConfig
67-
}
6859
// Check for satellite differences in this endpoint
6960
if f.session.IsOnPrem() && body.Jumbo {
7061
return nil, fmt.Errorf("jumbo parameter is not supported in satellite location, use mtu instead")
71-
} else if !f.session.IsOnPrem() && ((body.Mtu != nil && *body.Mtu != 1450) || body.AccessConfig != "internal-only") {
72-
return nil, fmt.Errorf("mtu and accessConfig parameters are not supported in multi-zone location, check documentation")
7362
}
7463
params := p_cloud_networks.NewPcloudNetworksPostParams().
7564
WithContext(f.ctx).WithTimeout(helpers.PICreateTimeOut).

0 commit comments

Comments
 (0)