Skip to content

Commit

Permalink
wires: default to "default" vpc on creation
Browse files Browse the repository at this point in the history
Wire creation request right now only makes sense in context of classic
network ("default" vpc)
  • Loading branch information
yousong committed May 20, 2020
1 parent 1d78510 commit d83a7da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/compute/models/wires.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ func (manager *SWireManager) ValidateCreateData(
return input, httperrors.NewOutOfRangeError("mtu must be range of 0~1000000")
}

if len(input.Vpc) == 0 {
return input, httperrors.NewMissingParameterError("vpc")
if input.Vpc == "" {
input.Vpc = api.DEFAULT_VPC_ID
}

var vpc *SVpc
Expand Down

0 comments on commit d83a7da

Please sign in to comment.