Skip to content

Commit

Permalink
[feat] the new api for dns service
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed Nov 3, 2024
1 parent c1927ed commit 9cc386b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vngcloud/services/compute/v2/server_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ type CreateServerRequest struct {
FlavorId string `json:"flavorId"`
ImageId string `json:"imageId"`
Name string `json:"name"`
NetworkId *string `json:"networkId,omitempty"`
SubnetId *string `json:"subnetId,omitempty"`
NetworkId string `json:"networkId,omitempty"`
SubnetId string `json:"subnetId,omitempty"`
OsLicence bool `json:"osLicence,omitempty"`
RestoreBackup bool `json:"restoreBackup,omitempty"`
RootDiskEncryptionType DataDiskEncryptionType `json:"rootDiskEncryptionType,omitempty"`
Expand Down Expand Up @@ -80,7 +80,7 @@ func (s *CreateServerRequest) WithServerNetworkInterface(pprojectId, pnetworkId,
AttachFloating: pattachFloating,
})

return s
return s.WithNetwork(s.Networks[0].NetworkId, s.Networks[0].SubnetId)
}

func (s *CreateServerRequest) WithRootDiskEncryptionType(pdataDisk DataDiskEncryptionType) ICreateServerRequest {
Expand Down Expand Up @@ -146,8 +146,8 @@ func (s *CreateServerRequest) WithProduct(pproduct string) ICreateServerRequest
}

func (s *CreateServerRequest) WithNetwork(pnetworkId, psubnetId string) ICreateServerRequest {
s.NetworkId = &pnetworkId
s.SubnetId = &psubnetId
s.NetworkId = pnetworkId
s.SubnetId = psubnetId

return s
}
Expand Down

0 comments on commit 9cc386b

Please sign in to comment.