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

Validation for cloud provider settings was added #541

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

testisnullus
Copy link
Collaborator

No description provided.

@testisnullus testisnullus self-assigned this Aug 31, 2023
@testisnullus testisnullus changed the title validation for cloud provider settings was added Validation for cloud provider settings was added Aug 31, 2023
networkMatched, err := regexp.Match(models.PeerSubnetsRegExp, []byte(dc.Network))
if !networkMatched || err != nil {
return fmt.Errorf("the provided CIDR: %s must contain four dot separated parts and form the Private IP address. All bits in the host part of the CIDR must be 0. Suffix must be between 16-28. %v", dc.Network, err)
if dc.ProviderAccountName == "INSTACLUSTR" && len(dc.CloudProviderSettings) != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

please use a const DefaultAccountName instead of hardcode

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored

@testisnullus testisnullus merged commit 5d4530a into main Sep 4, 2023
1 check passed
@testisnullus testisnullus added the enhancement New feature or request label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants