Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add l3out schema, template and on_apic attributes (DCNE-161) #291

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

juchowan
Copy link
Contributor

@juchowan juchowan commented Aug 26, 2024

DCNE-161

Comment on lines 59 to 75
"l3out_template": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringLenBetween(1, 1000),
},
"l3out_schema": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.StringLenBetween(1, 1000),
},
"l3out_on_apic": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Default: false,
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. handle the read and import of these attributes.
  2. adjust the datasource for these attributes.
  3. update the example to include a APIC and a NDO l3out
  4. update documentation with attributes missing ( website/docs/r/mso_schema_site_external_epg.html.markdown )

@akinross akinross changed the title Add l3out schema, template and on_apic attributes DCNE-161 Add l3out schema, template and on_apic attributes Aug 26, 2024
@akinross akinross self-requested a review August 27, 2024 17:18
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juchowan Can you please update the following:

  1. data source of schema_site_external_epg with the attributes you introduced in the resource
  2. documentation of the data source schema_site_external_epg with new attributes

Please let us know if you have any questions.

@akinross
Copy link
Collaborator

@juchowan Can you please update the following:

  1. data source of schema_site_external_epg with the attributes you introduced in the resource
  2. documentation of the data source schema_site_external_epg with new attributes

Please let us know if you have any questions.

@shrsr the datasource already exposes these attributes and the are also present in the docs. The boolean value has no value I would say in the data-source as the l3out_dn is important from that perspective only.

Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akinross akinross requested a review from shrsr August 28, 2024 06:53
anvitha-jain
anvitha-jain previously approved these changes Aug 28, 2024
Copy link
Collaborator

@anvitha-jain anvitha-jain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 199 to 201
l3outRefMap["schemaId"] = l3outSchema
l3outRefMap["templateName"] = l3outTemplate
l3outRefMap["l3outName"] = l3outName
Copy link
Collaborator

@akinross akinross Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we still miss a thing. We can do two things actually.

  • We should do a check that the template and schema are provided because they are optional but I believe they are required for the ref to be constructed.
  • Or we can set the schema/template of the external epg when these are not provided. ( my preference )

Another thing is should we add validation of config to make l3outSchema/l3outTemplate mutually exclusive from l3out_on_apic?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behaviour should also be described in documentation.

"l3out_on_apic": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Default: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a default here? Is not providing it not the same as false. In documentation we should mention the default.

@akinross akinross requested a review from anvitha-jain August 28, 2024 16:14
…efaults, add validation for mutually

adds logic for computing l3out schema and tempalte if not provided,
removes default l3out_on_apic
adds validation for mutually exclusive attributes
@github-actions github-actions bot changed the title DCNE-161 Add l3out schema, template and on_apic attributes Add l3out schema, template and on_apic attributes (DCNE-161) Oct 1, 2024
akinross
akinross previously approved these changes Oct 9, 2024
Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akinross akinross self-requested a review October 9, 2024 10:22
Copy link
Collaborator

@sajagana sajagana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@akinross akinross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@anvitha-jain anvitha-jain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@lhercot lhercot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lhercot lhercot merged commit b5699dd into CiscoDevNet:master Oct 9, 2024
9 checks passed
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.

mso_schema_site_external_epg should allow l3out created in different template (DCNE-161)
6 participants