From fd73bee7a01bcc3489bc2a500eebe0d7a5e65f93 Mon Sep 17 00:00:00 2001 From: Shreyas Date: Tue, 9 Jan 2024 12:16:11 -0500 Subject: [PATCH] [minor_change] Addition of the description attribute to mso_schema_template_anp, mso_schema_template_contract, mso_schema_template_contract_filter, mso_schema_template_externalepg, mso_schema_template_l3out and mso_schema_template_vrf (#131) --- models/schema_template_anp.go | 3 ++- models/schema_template_contract.go | 3 ++- models/schema_template_contract_filter.go | 5 +++-- models/schema_template_externalepg.go | 3 ++- models/schema_template_l3out.go | 3 ++- models/schema_template_vrf.go | 3 ++- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/models/schema_template_anp.go b/models/schema_template_anp.go index 93b6aec..58f6317 100644 --- a/models/schema_template_anp.go +++ b/models/schema_template_anp.go @@ -6,12 +6,13 @@ type SchemaTemplateAnp struct { Value map[string]interface{} `json:",omitempty"` } -func NewSchemaTemplateAnp(ops, path, Name, displayName string) *SchemaTemplateAnp { +func NewSchemaTemplateAnp(ops, path, Name, displayName, desc string) *SchemaTemplateAnp { var VrfMap map[string]interface{} if ops != "remove" { VrfMap = map[string]interface{}{ "displayName": displayName, + "description": desc, "name": Name, "epgs": []interface{}{}, } diff --git a/models/schema_template_contract.go b/models/schema_template_contract.go index b4fe22f..71aa9eb 100644 --- a/models/schema_template_contract.go +++ b/models/schema_template_contract.go @@ -6,10 +6,11 @@ type TemplateContract struct { Value map[string]interface{} `json:",omitempty"` } -func NewTemplateContract(ops, path, name, displayName, scope, filterType, targetDscp, priority string, filterRelationships, filterRelationshipsProviderToConsumer, filterRelationshipsConsumerToProvider []interface{}) *TemplateContract { +func NewTemplateContract(ops, path, name, displayName, scope, filterType, targetDscp, priority, desc string, filterRelationships, filterRelationshipsProviderToConsumer, filterRelationshipsConsumerToProvider []interface{}) *TemplateContract { contractMap := map[string]interface{}{ "name": name, "displayName": displayName, + "description": desc, "scope": scope, "filterType": filterType, "filterRelationships": filterRelationships, diff --git a/models/schema_template_contract_filter.go b/models/schema_template_contract_filter.go index e47cf2f..5fda7bf 100644 --- a/models/schema_template_contract_filter.go +++ b/models/schema_template_contract_filter.go @@ -1,9 +1,10 @@ package models -func NewTemplateContractFilterRelationShip(ops, path, action, priority string, filterRef map[string]interface{}, directives []interface{}) *PatchPayload { +func NewTemplateContractFilterRelationShip(ops, path, action, priority, desc string, filterRef map[string]interface{}, directives []interface{}) *PatchPayload { filterMap := map[string]interface{}{ - "filterRef": filterRef, + "filterRef": filterRef, + "description": desc, } if len(directives) > 0 { diff --git a/models/schema_template_externalepg.go b/models/schema_template_externalepg.go index 0d83e9c..668669a 100644 --- a/models/schema_template_externalepg.go +++ b/models/schema_template_externalepg.go @@ -6,11 +6,12 @@ type TemplateExternalepg struct { Value map[string]interface{} `json:",omitempty"` } -func NewTemplateExternalepg(ops, path, name, displayName, externalEpgType string, preferredGroup bool, vrfRef map[string]interface{}, l3outRef map[string]interface{}, anpRef map[string]interface{}, selector []interface{}) *TemplateExternalepg { +func NewTemplateExternalepg(ops, path, name, displayName, externalEpgType, desc string, preferredGroup bool, vrfRef map[string]interface{}, l3outRef map[string]interface{}, anpRef map[string]interface{}, selector []interface{}) *TemplateExternalepg { var externalepgMap map[string]interface{} externalepgMap = map[string]interface{}{ "name": name, "displayName": displayName, + "description": desc, "vrfRef": vrfRef, "extEpgType": externalEpgType, "preferredGroup": preferredGroup, diff --git a/models/schema_template_l3out.go b/models/schema_template_l3out.go index 8f32a23..a4e0d6e 100644 --- a/models/schema_template_l3out.go +++ b/models/schema_template_l3out.go @@ -6,11 +6,12 @@ type TemplateL3out struct { Value map[string]interface{} `json:",omitempty"` } -func NewTemplateL3out(ops, path, name, displayName string, vrfRef map[string]interface{}) *TemplateL3out { +func NewTemplateL3out(ops, path, name, displayName, desc string, vrfRef map[string]interface{}) *TemplateL3out { var l3outMap map[string]interface{} l3outMap = map[string]interface{}{ "name": name, "displayName": displayName, + "description": desc, "vrfRef": vrfRef, } diff --git a/models/schema_template_vrf.go b/models/schema_template_vrf.go index 0b0178c..3a668aa 100644 --- a/models/schema_template_vrf.go +++ b/models/schema_template_vrf.go @@ -6,12 +6,13 @@ type SchemaTemplateVrf struct { Value map[string]interface{} `json:",omitempty"` } -func NewSchemaTemplateVrf(ops, path, Name, displayName, ipDataPlaneLearning string, l3m, vzany, preferredGroup bool) *SchemaSite { +func NewSchemaTemplateVrf(ops, path, Name, displayName, ipDataPlaneLearning, desc string, l3m, vzany, preferredGroup bool) *SchemaSite { var VrfMap map[string]interface{} if ops != "remove" { VrfMap = map[string]interface{}{ "displayName": displayName, + "description": desc, "name": Name, "l3MCast": l3m, "vzAnyEnabled": vzany,