diff --git a/client/contivModelClient.go b/client/contivModelClient.go index 254f08697..ee36809c6 100644 --- a/client/contivModelClient.go +++ b/client/contivModelClient.go @@ -235,6 +235,7 @@ type EndpointGroup struct { type EndpointGroupLinkSets struct { ExtContractsGrps map[string]Link `json:"ExtContractsGrps,omitempty"` + MatchRules map[string]Link `json:"MatchRules,omitempty"` Policies map[string]Link `json:"Policies,omitempty"` Services map[string]Link `json:"Services,omitempty"` } @@ -428,12 +429,17 @@ type Rule struct { // add link-sets and links LinkSets RuleLinkSets `json:"link-sets,omitempty"` + Links RuleLinks `json:"links,omitempty"` } type RuleLinkSets struct { Policies map[string]Link `json:"Policies,omitempty"` } +type RuleLinks struct { + MatchEndpointGroup Link `json:"MatchEndpointGroup,omitempty"` +} + type RuleInspect struct { Config Rule } diff --git a/contivModel.go b/contivModel.go index db9cc1b1b..4a4e1bda8 100644 --- a/contivModel.go +++ b/contivModel.go @@ -109,6 +109,7 @@ type EndpointGroup struct { type EndpointGroupLinkSets struct { ExtContractsGrps map[string]modeldb.Link `json:"ExtContractsGrps,omitempty"` + MatchRules map[string]modeldb.Link `json:"MatchRules,omitempty"` Policies map[string]modeldb.Link `json:"Policies,omitempty"` Services map[string]modeldb.Link `json:"Services,omitempty"` } @@ -302,12 +303,17 @@ type Rule struct { // add link-sets and links LinkSets RuleLinkSets `json:"link-sets,omitempty"` + Links RuleLinks `json:"links,omitempty"` } type RuleLinkSets struct { Policies map[string]modeldb.Link `json:"Policies,omitempty"` } +type RuleLinks struct { + MatchEndpointGroup modeldb.Link `json:"MatchEndpointGroup,omitempty"` +} + type RuleInspect struct { Config Rule } diff --git a/endpointGroup.json b/endpointGroup.json index ebf3d2ba2..0ec8734da 100644 --- a/endpointGroup.json +++ b/endpointGroup.json @@ -75,6 +75,9 @@ "policies": { "ref": "policy" }, + "matchRules": { + "ref": "rule" + }, "extContractsGrps": { "ref": "extContractsGrp" } diff --git a/rule.json b/rule.json index 058e711f1..fe247ebbb 100644 --- a/rule.json +++ b/rule.json @@ -114,7 +114,12 @@ "policies": { "ref": "policy" } - } + }, + "links": { + "matchEndpointGroup": { + "ref": "endpointGroup" + } + } } ] }