Skip to content

Fabric resource. Default Easy Fabric and support other templates using template_props#124

Open
jgomezve wants to merge 3 commits intoCiscoDevNet:masterfrom
jgomezve:jg-fabric-custom
Open

Fabric resource. Default Easy Fabric and support other templates using template_props#124
jgomezve wants to merge 3 commits intoCiscoDevNet:masterfrom
jgomezve:jg-fabric-custom

Conversation

@jgomezve
Copy link
Copy Markdown

No description provided.

@jgomezve
Copy link
Copy Markdown
Author

jgomezve commented Feb 21, 2023

This resources creates a Fabric on the NDFC/DCNM.

By default, it creates a fabric using the Easy_Fabric template. The values given in the resource are used to build the JSON payload (NV pairs) of the Easy_Fabric tempalte. Should another template be used, then values in template_props must be used to build the NV pairs. (See the example)

The resource only exposes the required arguments in addition to some arguments that I need to configure for a CX engagement. Nonetheless, the current version on the NDFC API requires all the items of the NV Pairs to be defined in the JSON payload, otherwise an alarm in raised in the NDFC GUI. As a result The models/fabric.go package automatically sets the default values int he method SetConfigDefaults().

@jgomezve
Copy link
Copy Markdown
Author

Fix #113

@lhercot
Copy link
Copy Markdown
Member

lhercot commented Feb 21, 2023

The dcnm go client part need to be first added to the go client itself via a separate PR to this repo: https://github.com/ciscoecosystem/dcnm-go-client

@jgomezve
Copy link
Copy Markdown
Author

@lhercot Why are we then keeping a "copy" of that repo in this repo? Or am I missing something?

@lhercot lhercot linked an issue Aug 2, 2023 that may be closed by this pull request
@lhercot
Copy link
Copy Markdown
Member

lhercot commented Aug 7, 2023

@lhercot Why are we then keeping a "copy" of that repo in this repo? Or am I missing something?

Hi Jorge, we keep a copy of the code in the vendor directory in case the referenced dependency would disappear and would render it impossible for us to rebuild the provider. This is a common Golang practice referred to as "vendoring".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource to configure a Fabric

2 participants