Skip to content

Commit 3b5e67c

Browse files
author
git
committed
Merge branch 'main' of github.com:cloudfoundry/bosh into HEAD
2 parents 3154c62 + 7f5d548 commit 3b5e67c

3 files changed

Lines changed: 20 additions & 12 deletions

File tree

config/blobs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ s3cli/s3cli-0.0.396-linux-amd64:
3434
size: 16185266
3535
object_id: 1c03e773-9aee-4f74-56cd-2e3168dd9bb0
3636
sha: sha256:2cf363d5bc7413acc9618e89d41f1cfdd35ef39f0182eb3ff7e5605f91a5af31
37-
verify-multidigest/verify-multidigest-0.0.597-linux-amd64:
38-
size: 4304299
39-
object_id: d3f88bbc-2b2d-4817-49bb-e208d2abd197
40-
sha: sha256:d6fbff648a44c6ab740980e3229c606b8001cb2a419acb335c4adba716eb759f
37+
verify-multidigest/verify-multidigest-0.0.599-linux-amd64:
38+
size: 4303703
39+
object_id: 950e4577-1061-4dcf-4047-4561b9a511b7
40+
sha: sha256:5ae178386262f8cf69a2b7fb312f455ce1fcc5022836c9649883aa0885ea3381

src/bosh-director/spec/unit/bosh/director/deployment_plan/ip_provider/ip_repo_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ def save_ip(ip)
290290
end
291291

292292
it 'clears similar ips with smaller prefix' do
293-
network_spec['subnets'].first['reserved'] = ['192.168.1.0 - 192.168.1.12']
293+
network_spec['subnets'].first['reserved'] = ['192.168.1.2 - 192.168.1.31']
294294
network_spec['subnets'].first['range'] = '192.168.1.0/24'
295-
save_ip(cidr_ip('192.168.1.8'))
295+
save_ip(cidr_ip('192.168.1.20'))
296296

297297
ip_address = ip_repo.allocate_dynamic_ip(reservation, subnet)
298-
expected_ip_address = cidr_ip('192.168.1.13')
298+
expected_ip_address = cidr_ip('192.168.1.32')
299299
expect(ip_address).to eq(expected_ip_address)
300300
end
301301
end

src/bosh-director/spec/unit/bosh/director/deployment_plan/manual_network_subnet_spec.rb

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,36 @@ def make_managed_subnet(properties, availability_zones)
3232
end
3333

3434
it 'should create a subnet spec with restricted_ips in cidr format' do
35-
allow(Bosh::Director::Config).to receive(:director_ips).and_return([to_ipaddr('10.0.3.11').to_s])
35+
allow(Bosh::Director::Config).to receive(:director_ips).and_return([to_ipaddr('10.0.3.150').to_s])
3636

3737
subnet = make_subnet(
3838
{
3939
'dns' => ['10.0.0.2'],
4040
'gateway' => '10.0.3.1',
4141
'range' => '10.0.3.0/24',
4242
'reserved' => [
43-
'10.0.3.0 - 10.0.3.35',
44-
'10.0.3.242 - 10.0.3.255']
43+
'10.0.3.64 - 10.0.3.99',
44+
'10.0.3.200 - 10.0.3.215']
4545
},
4646
[],
4747
)
4848

49-
expected_restricted_ips = Set.new([to_ipaddr('10.0.3.0/27'), to_ipaddr('10.0.3.32/30'), to_ipaddr('10.0.3.242/31'), to_ipaddr('10.0.3.244/30'), to_ipaddr('10.0.3.248/29') ])
49+
expected_restricted_ips = Set.new([
50+
to_ipaddr('10.0.3.0/32'),
51+
to_ipaddr('10.0.3.1/32'),
52+
to_ipaddr('10.0.3.255/32'),
53+
to_ipaddr('10.0.3.150/32'),
54+
to_ipaddr('10.0.3.64/27'),
55+
to_ipaddr('10.0.3.96/30'),
56+
to_ipaddr('10.0.3.200/29'),
57+
to_ipaddr('10.0.3.208/29'),
58+
])
5059

5160
expect(subnet.range.to_s).to eq('10.0.3.0/24')
5261
expect(subnet.netmask).to eq('255.255.255.0')
5362
expect(subnet.gateway).to eq('10.0.3.1')
5463
expect(subnet.dns).to eq(['10.0.0.2'])
5564
expect(subnet.restricted_ips).to eq(expected_restricted_ips)
56-
5765
end
5866

5967
it 'should create valid subnet spec for managed networks' do

0 commit comments

Comments
 (0)