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

fix: Updating Fabric Service Profile resource mapping functions #582

Merged
merged 11 commits into from
Feb 23, 2024

Conversation

srushti-patl
Copy link
Contributor

fixed mapping functions in resource_fabric_service_profile.go and fabric_common_mapping_helpers.go

Copy link
Contributor

@thogarty thogarty left a comment

Choose a reason for hiding this comment

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

Changes requested. Let me know if you have questions.

equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
@srushti-patl srushti-patl changed the title fix: Updating Fabric network resource mapping functions fix: Updating Fabric Service Profile resource mapping functions Feb 22, 2024
…-Resource-Update' into CXF-86927-Fabric-Service-Profile-Resource-Update
@codecov-commenter
Copy link

codecov-commenter commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 89 lines in your changes are missing coverage. Please review.

Project coverage is 43.81%. Comparing base (450917b) to head (2894e31).

Files Patch % Lines
equinix/resource_fabric_service_profile.go 0.00% 89 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #582      +/-   ##
==========================================
+ Coverage   42.08%   43.81%   +1.72%     
==========================================
  Files          98       98              
  Lines       18401    18397       -4     
==========================================
+ Hits         7744     8060     +316     
+ Misses      10453    10102     -351     
- Partials      204      235      +31     

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

Copy link
Contributor

@thogarty thogarty left a comment

Choose a reason for hiding this comment

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

Got a lot of changes requested. They need to be fulfilled exactly otherwise I will ask for them again. Let me know if you have any questions or if you need a call to go over it.

equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
equinix/resource_fabric_service_profile.go Outdated Show resolved Hide resolved
Copy link
Contributor

@thogarty thogarty left a comment

Choose a reason for hiding this comment

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

Pending live code review.

@@ -1044,44 +1039,44 @@ func accessPointTypeConfigToTerra(spAccessPointTypes []v4.ServiceProfileAccessPo
return mappedSpAccessPointTypes
}

func apiConfigToFabric(apiConfigl []interface{}) v4.ApiConfig {
if apiConfigl == nil {
func apiConfigToFabric(apiConfigs []interface{}) v4.ApiConfig {
Copy link
Contributor

Choose a reason for hiding this comment

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

Marking this method for live code review.

}
return ports
return schemaPortRes
}

func virtualDevicesToFabric(schemaVirtualDevices []interface{}) []v4.ServiceProfileAccessPointVd {
Copy link
Contributor

Choose a reason for hiding this comment

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

Marking method for live code review.

@@ -1208,14 +1203,14 @@ func metrosToFabric(schemaMetros []interface{}) []v4.ServiceMetro {
return []v4.ServiceMetro{}
}
var metros []v4.ServiceMetro
Copy link
Contributor

Choose a reason for hiding this comment

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

Marking method for live code review.

}

func authenticationKeyToFabric(authenticationKeyl []interface{}) v4.AuthenticationKey {
if authenticationKeyl == nil {
func authenticationKeyToFabric(authenticationKeys []interface{}) v4.AuthenticationKey {
Copy link
Contributor

Choose a reason for hiding this comment

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

Marking method for live code review.

psTitle := processStep.(map[string]interface{})["title"].(interface{}).(string)
psSubTitle := processStep.(map[string]interface{})["sub_title"].(interface{}).(string)
psDescription := processStep.(map[string]interface{})["description"].(interface{}).(string)
processSteps = append(processSteps, v4.ProcessStep{
processStepRes[index] = v4.ProcessStep{
Copy link
Contributor

Choose a reason for hiding this comment

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

Marking variable naming for live code review.

Copy link
Contributor

@thogarty thogarty left a comment

Choose a reason for hiding this comment

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

We're good here. Shipping it.

@srushti-patl srushti-patl merged commit 26eb84b into main Feb 23, 2024
6 of 9 checks passed
@srushti-patl srushti-patl deleted the CXF-86927-Fabric-Service-Profile-Resource-Update branch February 23, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/resources/fabric Issues related to Fabric and ECX APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants