Merge pull request #1636 from weaveworks/1635-notation

Drop use of interval notation when printing ranges
This commit is contained in:
Adam Harrison committed 2015-11-05 15:38:40 +00:00
commit f284300870
3 files changed
+3 -7

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ func NewRange(start Address, size Offset) Range {
return Range{Start: start, End: Add(start, size)} return Range{Start: start, End: Add(start, size)}
} }
func (r Range) Size() Offset { return Subtract(r.End, r.Start) } func (r Range) Size() Offset { return Subtract(r.End, r.Start) }
func (r Range) String() string { return fmt.Sprintf("[%s-%s)", r.Start, r.End) } func (r Range) String() string { return fmt.Sprintf("%s-%s", r.Start, r.End-1) }
func (r Range) Overlaps(or Range) bool { return !(r.Start >= or.End || r.End <= or.Start) } func (r Range) Overlaps(or Range) bool { return !(r.Start >= or.End || r.End <= or.Start) }
func (r Range) Contains(addr Address) bool { return addr >= r.Start && addr < r.End } func (r Range) Contains(addr Address) bool { return addr >= r.Start && addr < r.End }
+1 -5
View File
@@ -214,7 +214,7 @@ reports on the current status of the weave router and IP allocator:
Service: ipam Service: ipam
Consensus: waiting(quorum: 2, known: 0) Consensus: waiting(quorum: 2, known: 0)
Range: [10.32.0.0-10.48.0.0) Range: 10.32.0.0-10.47.255.255
DefaultSubnet: 10.32.0.0/12 DefaultSubnet: 10.32.0.0/12
... ...
@@ -225,7 +225,3 @@ guide](troubleshooting.html#weave-status) for full details.
The 'Service: ipam' section displays the consensus state as well as The 'Service: ipam' section displays the consensus state as well as
the total allocation range and default subnet. the total allocation range and default subnet.
Note that the 'Range' is written using interval notation - '[' means
the start of the range is included and ')' means the end of the range
is not included.
+1 -1
View File
@@ -81,7 +81,7 @@ $ weave status
Service: ipam Service: ipam
Consensus: achieved Consensus: achieved
Range: [10.32.0.0-10.48.0.0) Range: 10.32.0.0-10.47.255.255
DefaultSubnet: 10.32.0.0/12 DefaultSubnet: 10.32.0.0/12
Service: dns Service: dns