Skip to content

Conversation

@cristiGuranIonos
Copy link
Collaborator

What does this fix or implement?

Checklist

  • PR name added as appropriate (e.g. feat:/fix:/doc:/test:/refactor:)
  • Tests added or updated
  • Documentation updated
  • Changelog updated and version incremented (label: upcoming release)
  • Github Issue linked if any
  • Jira task updated

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

}

// get additional data for schema
foundServer, apiResponse, err := client.ServersApi.DatacentersServersFindById(ctx, datacenterId, *postServer.Id).Depth(4).Execute()
Copy link
Member

Choose a reason for hiding this comment

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

setting entities data previously used this foundServer value, is it equivalent to postServer at line 632 which is now used instead?

}
}
// what we get from backend
foundFirstNic := (*server.Entities.Nics.Items)[0]
Copy link
Member

Choose a reason for hiding this comment

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

outside nil-check for Entities.Nics, also seems to be duplicated at line 675


if sentFirstNic.Entities != nil && sentFirstNic.Entities.Firewallrules != nil && sentFirstNic.Entities.Firewallrules.Items != nil {
sentRules := *sentFirstNic.Entities.Firewallrules.Items
foundFirstNic := (*server.Entities.Nics.Items)[0]
Copy link
Member

Choose a reason for hiding this comment

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

if this needs to be used at line 714, it will go out of scope before that point

@cristiGuranIonos
Copy link
Collaborator Author

/test datacenter

6 similar comments
@cristiGuranIonos
Copy link
Collaborator Author

/test datacenter

@cristiGuranIonos
Copy link
Collaborator Author

/test datacenter

@cristiGuranIonos
Copy link
Collaborator Author

/test datacenter

@cristiGuranIonos
Copy link
Collaborator Author

/test datacenter

@cristiGuranIonos
Copy link
Collaborator Author

/test datacenter

@cristiGuranIonos
Copy link
Collaborator Author

/test datacenter

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.

3 participants