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

Enable retrieving existing Prefix CIDRs from the Ipamer #69

Merged
merged 4 commits into from
Oct 1, 2021

Conversation

rene-at-dell
Copy link
Contributor

Discussion can be found here: #68

@majst01
Copy link
Contributor

majst01 commented Sep 30, 2021

Can you please add a small test, otherwise this looks fine.

@rene-at-dell
Copy link
Contributor Author

Added a test for all data sources

Copy link
Contributor

@majst01 majst01 left a comment

Choose a reason for hiding this comment

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

please adjust godoc

ipam.go Outdated
@@ -32,6 +32,8 @@ type Ipamer interface {
// PrefixesOverlapping will check if one ore more prefix of newPrefixes is overlapping
// with one of existingPrefixes
PrefixesOverlapping(existingPrefixes []string, newPrefixes []string) error
// Retrieve all existing Prefix CIDRs from the underlying storage
Copy link
Contributor

Choose a reason for hiding this comment

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

go doc should start with:
// ReadAllPrefixCidrs

prefix.go Outdated
@@ -484,6 +484,11 @@ func (i *ipamer) newPrefix(cidr, parentCidr string) (*Prefix, error) {
return p, nil
}

// Retrieve all existing Prefix CIDRs from the underlying storage
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor

Choose a reason for hiding this comment

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

still missing here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry about that, forgot it was in two places. Should be all good now

@codecov-commenter
Copy link

Codecov Report

Merging #69 (b13a3a3) into master (5a06209) will increase coverage by 0.06%.
The diff coverage is 100.00%.

❗ Current head b13a3a3 differs from pull request most recent head 0b622f0. Consider uploading reports for the commit 0b622f0 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
+ Coverage   78.12%   78.19%   +0.06%     
==========================================
  Files           7        7              
  Lines         640      642       +2     
==========================================
+ Hits          500      502       +2     
  Misses         75       75              
  Partials       65       65              
Impacted Files Coverage Δ
ipam.go 100.00% <ø> (ø)
prefix.go 80.27% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a06209...0b622f0. Read the comment docs.

@rene-at-dell
Copy link
Contributor Author

Fixed.

@majst01 majst01 merged commit 6dd93fd into metal-stack:master Oct 1, 2021
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