Skip to content

Commit 0863a81

Browse files
authored
add azid and enableazr fields to putNC call (#1756)
* add azid and enableazr fields to putNC call * remove json tags
1 parent 6989215 commit 0863a81

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nmagent/requests.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ type PutNetworkContainerRequest struct {
6868
// PrimaryAddress is the primary customer address of the interface in the
6969
// management VNet
7070
PrimaryAddress string
71+
72+
// AzID is the home AZ ID of the network container
73+
AzID uint
74+
75+
// EnableAZR denotes whether AZR is enabled for network container or not
76+
EnableAZR bool
7177
}
7278

7379
type internalNC struct {
@@ -83,6 +89,8 @@ type internalNC struct {
8389
Policies []Policy `json:"policies"`
8490
VlanID int `json:"vlanId"`
8591
GREKey uint16 `json:"greKey"`
92+
AzID uint `json:"azID"`
93+
EnableAZR bool `json:"enableAZR"`
8694
}
8795

8896
func (p *PutNetworkContainerRequest) MarshalJSON() ([]byte, error) {
@@ -94,6 +102,8 @@ func (p *PutNetworkContainerRequest) MarshalJSON() ([]byte, error) {
94102
Policies: p.Policies,
95103
VlanID: p.VlanID,
96104
GREKey: p.GREKey,
105+
AzID: p.AzID,
106+
EnableAZR: p.EnableAZR,
97107
}
98108

99109
body, err := json.Marshal(pBody)
@@ -123,6 +133,8 @@ func (p *PutNetworkContainerRequest) UnmarshalJSON(in []byte) error {
123133
p.Policies = req.Policies
124134
p.VlanID = req.VlanID
125135
p.GREKey = req.GREKey
136+
p.AzID = req.AzID
137+
p.EnableAZR = req.EnableAZR
126138

127139
return nil
128140
}

0 commit comments

Comments
 (0)