Skip to content

Commit

Permalink
[minor_change] Addition of the description attribute to mso_schema_te…
Browse files Browse the repository at this point in the history
…mplate_anp, mso_schema_template_contract, mso_schema_template_contract_filter, mso_schema_template_externalepg, mso_schema_template_l3out and mso_schema_template_vrf (#131)
  • Loading branch information
shrsr authored Jan 9, 2024
1 parent fcf4a64 commit fd73bee
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion models/schema_template_anp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}{},
}
Expand Down
3 changes: 2 additions & 1 deletion models/schema_template_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions models/schema_template_contract_filter.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion models/schema_template_externalepg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion models/schema_template_l3out.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
3 changes: 2 additions & 1 deletion models/schema_template_vrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fd73bee

Please sign in to comment.