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

Aci resource migration esg #1223

Merged
merged 22 commits into from
Jul 2, 2024

Conversation

akinross
Copy link
Collaborator

fixes #1157

anvitha-jain
anvitha-jain previously approved these changes May 31, 2024
gen/definitions/classes.yaml Show resolved Hide resolved
gen/definitions/classes.yaml Outdated Show resolved Hide resolved
gen/definitions/classes.yaml Show resolved Hide resolved
gen/definitions/classes.yaml Show resolved Hide resolved
gen/definitions/classes.yaml Show resolved Hide resolved
gen/definitions/classes.yaml Show resolved Hide resolved
@akinross akinross requested a review from sajagana June 3, 2024 13:00
sajagana
sajagana previously approved these changes Jun 3, 2024
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.

LGMT!

Copy link
Collaborator

@samiib samiib left a comment

Choose a reason for hiding this comment

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

Just have question about that json file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What's this file for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The file contains an overview of the provider schema retrieved with: terraform providers schema -json | jq > schema-doc-new.json. This is used read old the old attribute types/name, which need to be migrated. This way we do not have to manually input all this information into definition files.

I have added the commit tag in case we ever want to look back, or generate a new file.

Copy link
Member

Choose a reason for hiding this comment

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

Is that generation part of the go generate process?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No this is a static file, if we would regenerate on every provider update the problem would be that the old schema used for migration is lost and thus the mapping would not work. So the assumption is a snapshot in time in which we do not make changes anymore to schema of existing resources, where if something needs to be adjusted we would migrate it to framework.

@akinross akinross requested a review from samiib June 12, 2024 11:58
@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 93.77778% with 56 lines in your changes missing coverage. Please review.

Project coverage is 85.08%. Comparing base (e32ebc3) to head (f1d8900).
Report is 1 commits behind head on master.

Files Patch % Lines
...rovider/data_source_aci_endpoint_security_group.go 97.45% 6 Missing and 2 partials ⚠️
...r/data_source_aci_relation_to_consumed_contract.go 91.66% 6 Missing and 2 partials ⚠️
...der/data_source_aci_relation_to_contract_master.go 91.30% 6 Missing and 2 partials ⚠️
...r/data_source_aci_relation_to_imported_contract.go 91.66% 6 Missing and 2 partials ⚠️
.../data_source_aci_relation_to_intra_epg_contract.go 91.30% 6 Missing and 2 partials ⚠️
...r/data_source_aci_relation_to_provided_contract.go 92.00% 6 Missing and 2 partials ⚠️
...ider/data_source_aci_relation_to_taboo_contract.go 91.30% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1223      +/-   ##
==========================================
- Coverage   87.09%   85.08%   -2.02%     
==========================================
  Files          45       59      +14     
  Lines       11802    16619    +4817     
==========================================
+ Hits        10279    14140    +3861     
- Misses       1035     1802     +767     
- Partials      488      677     +189     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

samiib
samiib previously approved these changes Jun 17, 2024
Copy link
Collaborator

@samiib samiib left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -20,6 +23,7 @@ vzCPIf:
rtctrlProfile:
resource_name: "route_control_profile"
rn_format: "/prof-{name}"
exclude: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is exclude used here? Did we introduce the ability to not generate resources if exclude is set to true in the generator and its meta is included?

{
annotation = "annotation_1"
priority = "level1"
contract_interface_name = aci_contract_interface.example.name
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we have a resource aci_contract_interface? Is this the right value?

@akinross akinross dismissed stale reviews from samiib, gmicol, and sajagana via 7d7be7a July 2, 2024 07:55
@akinross akinross force-pushed the aci_resource_migration_esg branch from 7589916 to 7d7be7a Compare July 2, 2024 07:55
Copy link
Collaborator

@samiib samiib left a comment

Choose a reason for hiding this comment

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

image

I think it should be Networking in the UI location.

Comment on lines 293 to 294
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L2Outs -> External EPGs -> Contracts"

Comment on lines 311 to 312
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L2Outs -> External EPGs -> Contracts"

Comment on lines 329 to 330
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L2Outs -> External EPGs -> Contracts"

Comment on lines 344 to 345
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networkings -> L2Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L2Outs -> External EPGs -> Contracts"

ui_locations:
- "Tenants -> Application Profiles -> Application EPGs -> Contracts"
- "Tenants -> Application Profiles -> Endpoint Security Groups -> Contracts"
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- "Tenants -> Networkings -> L3Outs -> External EPGs -> Contracts"
- "Tenants -> Networking -> L3Outs -> External EPGs -> Contracts"

Comment on lines 381 to 382
- "Tenants -> Networkings -> L3Outs -> External EPGs"
- "Tenants -> Networkings -> L2Outs -> External EPGs"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- "Tenants -> Networkings -> L3Outs -> External EPGs"
- "Tenants -> Networkings -> L2Outs -> External EPGs"
- "Tenants -> Networking -> L3Outs -> External EPGs"
- "Tenants -> Networking -> L2Outs -> External EPGs"

@akinross akinross requested a review from samiib July 2, 2024 12:58
@@ -12,14 +12,17 @@ global:
id: "The identifier of the %s object."
tnVzOOBBrCPName: "The name of the Out Of Band Contract object."
tnRtctrlProfileName: "The name of the Route Control Profile object."
prio: "The QoS priority class identifierq of the %s object."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
prio: "The QoS priority class identifierq of the %s object."
prio: "The QoS priority class identifier of the %s object."

@akinross akinross requested a review from samiib July 2, 2024 13:10
samiib
samiib previously approved these changes Jul 2, 2024
Copy link
Collaborator

@samiib samiib 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 c9b51cd into CiscoDevNet:master Jul 2, 2024
4 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
8 participants