@@ -121,6 +121,7 @@ type EndpointGroup struct {
121
121
// every object has a key
122
122
Key string `json:"key,omitempty"`
123
123
124
+ CfgdTag string `json:"cfgdTag,omitempty"` // Configured Group Tag
124
125
ExtContractsGrps []string `json:"extContractsGrps,omitempty"`
125
126
GroupName string `json:"groupName,omitempty"` // Group name
126
127
IpPool string `json:"ipPool,omitempty"` // IP-pool
@@ -159,6 +160,7 @@ type EndpointGroupOper struct {
159
160
AvailableIPAddresses string `json:"availableIPAddresses,omitempty"` // Available IP addresses
160
161
Endpoints []EndpointOper `json:"endpoints,omitempty"`
161
162
ExternalPktTag int `json:"externalPktTag,omitempty"` // external packet tag
163
+ GroupTag string `json:"groupTag,omitempty"` // Derived EndpointGroup Tag
162
164
NumEndpoints int `json:"numEndpoints,omitempty"` // number of endpoints
163
165
PktTag int `json:"pktTag,omitempty"` // internal packet tag
164
166
@@ -252,6 +254,7 @@ type Network struct {
252
254
// every object has a key
253
255
Key string `json:"key,omitempty"`
254
256
257
+ CfgdTag string `json:"cfgdTag,omitempty"` // Configured Network Tag
255
258
Encap string `json:"encap,omitempty"` // Encapsulation
256
259
Gateway string `json:"gateway,omitempty"` // Gateway
257
260
Ipv6Gateway string `json:"ipv6Gateway,omitempty"` // IPv6Gateway
@@ -285,6 +288,7 @@ type NetworkOper struct {
285
288
AvailableIPAddresses string `json:"availableIPAddresses,omitempty"` // Available IP addresses
286
289
Endpoints []EndpointOper `json:"endpoints,omitempty"`
287
290
ExternalPktTag int `json:"externalPktTag,omitempty"` // external packet tag
291
+ NetworkTag string `json:"networkTag,omitempty"` // Derived Network Tag
288
292
NumEndpoints int `json:"numEndpoints,omitempty"` // external packet tag
289
293
PktTag int `json:"pktTag,omitempty"` // internal packet tag
290
294
@@ -2429,6 +2433,15 @@ func ValidateEndpointGroup(obj *EndpointGroup) error {
2429
2433
2430
2434
// Validate each field
2431
2435
2436
+ if len (obj .CfgdTag ) > 128 {
2437
+ return errors .New ("cfgdTag string too long" )
2438
+ }
2439
+
2440
+ cfgdTagMatch := regexp .MustCompile ("^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\ -]*[a-zA-Z0-9])\\ .)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\ -]*[A-Za-z0-9]))?$" )
2441
+ if cfgdTagMatch .MatchString (obj .CfgdTag ) == false {
2442
+ return errors .New ("cfgdTag string invalid format" )
2443
+ }
2444
+
2432
2445
if len (obj .GroupName ) > 64 {
2433
2446
return errors .New ("groupName string too long" )
2434
2447
}
@@ -3765,6 +3778,15 @@ func ValidateNetwork(obj *Network) error {
3765
3778
3766
3779
// Validate each field
3767
3780
3781
+ if len (obj .CfgdTag ) > 128 {
3782
+ return errors .New ("cfgdTag string too long" )
3783
+ }
3784
+
3785
+ cfgdTagMatch := regexp .MustCompile ("^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\ -]*[a-zA-Z0-9])\\ .)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\ -]*[A-Za-z0-9]))?$" )
3786
+ if cfgdTagMatch .MatchString (obj .CfgdTag ) == false {
3787
+ return errors .New ("cfgdTag string invalid format" )
3788
+ }
3789
+
3768
3790
encapMatch := regexp .MustCompile ("^(vlan|vxlan)$" )
3769
3791
if encapMatch .MatchString (obj .Encap ) == false {
3770
3792
return errors .New ("encap string invalid format" )
0 commit comments