ohboshwillitfit 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +10 -0
- data/Gemfile +4 -0
- data/Guardfile +8 -0
- data/lib/bosh/cli/commands/will_it_fit.rb +12 -5
- data/lib/ohboshwillitfit/limits.rb +86 -17
- data/lib/ohboshwillitfit/resource.rb +4 -2
- data/lib/ohboshwillitfit/version.rb +1 -1
- data/spec/assets/quotas_compute.json +17 -0
- data/spec/assets/quotas_volumes.json +44 -0
- data/spec/limits_spec.rb +63 -41
- data/spec/resource_spec.rb +2 -2
- metadata +8 -6
- data/spec/assets/fog_limits_no_totals.json +0 -68
- data/spec/assets/fog_limits_totals.json +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4a0ab05faaceb6d40ede364306a259078f562da
|
4
|
+
data.tar.gz: bb43c4199e2394052384bcf059e9c6e38bcfa3e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00d65e6fcce97032220d9b33794a0a40c8393c04347c69f40628d5fe8270e903ca77c2d3a3e162f8e198bb7ca3f2bab7cdf2eed15c5839c4b81217630b1a8fb7
|
7
|
+
data.tar.gz: 8a8209599e2f1be2a07f83652c56bf26681090fdbdfd753be402d9d5ace3a56032b73ce937a68bb1129a252ba9322f99bc62291c7e9b6e671d6d1a91f224fe4b
|
data/ChangeLog.md
ADDED
data/Gemfile
CHANGED
data/Guardfile
ADDED
@@ -6,16 +6,19 @@ module Bosh::Cli::Command
|
|
6
6
|
usage "will it fit"
|
7
7
|
desc "check if this deployment will fit into OpenStack tenancy"
|
8
8
|
option "--fog-key default", "Look up credentials in ~/.fog"
|
9
|
+
option "--ignore-invalid-flavors", "Do not fail if invalid flavors being used"
|
9
10
|
def will_it_fit
|
10
11
|
deployment_required
|
12
|
+
ignore_invalid_flavors = options[:ignore_invalid_flavors]
|
11
13
|
|
12
14
|
if fog_key = options[:fog_key]
|
13
15
|
credentials = OhBoshWillItFit::FogCredentials.load_from_file(fog_key)
|
14
16
|
end
|
15
17
|
fog_compute = Fog::Compute.new({provider: 'OpenStack'}.merge(credentials))
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
fog_volumes = Fog::Volume.new({provider: 'OpenStack'}.merge(credentials))
|
19
|
+
limits = OhBoshWillItFit::Limits.new(fog_compute, fog_volumes)
|
20
|
+
unless limits.volumes_limits_available?
|
21
|
+
say "Older OpenStacks like this do not provide current volume resources being used.".make_yellow
|
19
22
|
say "Can only display output based on quotas, rather than unused limits."
|
20
23
|
end
|
21
24
|
|
@@ -42,12 +45,16 @@ module Bosh::Cli::Command
|
|
42
45
|
flavors.sort {|f1, f2| f1.ram <=> f2.ram}.each do |flavor|
|
43
46
|
say " #{flavor.name}: ram: #{flavor.ram} disk: #{flavor.disk} cpus: #{flavor.vcpus}"
|
44
47
|
end
|
45
|
-
|
48
|
+
end
|
49
|
+
|
50
|
+
if !flavor_errors || ignore_invalid_flavors
|
46
51
|
say "Resources used:"
|
47
52
|
resource_totals = OhBoshWillItFit::Resource.resource_totals(resources)
|
53
|
+
display_resource "instances", resource_totals["instances"], limits.instances_available
|
48
54
|
display_resource "ram", resource_totals["ram"], limits.ram_size_available
|
49
|
-
display_resource "disk", resource_totals["disk"]
|
50
55
|
display_resource "cpus", resource_totals["cpus"], limits.cores_available
|
56
|
+
display_resource "volumes", resource_totals["volumes"], limits.volumes_available
|
57
|
+
display_resource "disk", resource_totals["disk"], limits.volume_size_available
|
51
58
|
end
|
52
59
|
rescue => e
|
53
60
|
err e.message
|
@@ -1,57 +1,126 @@
|
|
1
1
|
module OhBoshWillItFit
|
2
2
|
class Limits
|
3
|
-
attr_reader :fog_compute
|
3
|
+
attr_reader :fog_compute, :fog_volumes
|
4
4
|
|
5
|
-
def initialize(fog_compute)
|
5
|
+
def initialize(fog_compute, fog_volumes)
|
6
6
|
@fog_compute = fog_compute
|
7
|
+
@fog_volumes = fog_volumes
|
7
8
|
end
|
8
9
|
|
9
10
|
def max_total_cores
|
10
|
-
|
11
|
+
compute_quotas["cores"]
|
11
12
|
end
|
12
13
|
|
13
14
|
def max_total_instances
|
14
|
-
|
15
|
+
compute_quotas["instances"]
|
15
16
|
end
|
16
17
|
|
17
18
|
def max_total_ram_size
|
18
|
-
|
19
|
+
compute_quotas["ram"]
|
19
20
|
end
|
20
21
|
|
22
|
+
def max_total_volume_size
|
23
|
+
volume_quotas["gigabytes"]
|
24
|
+
end
|
25
|
+
|
26
|
+
def max_total_volumes
|
27
|
+
volume_quotas["volumes"]
|
28
|
+
end
|
29
|
+
|
30
|
+
|
21
31
|
def total_cores_used
|
22
|
-
|
32
|
+
compute_servers.inject(0) { |total, server| total + flavor_for_server(server).vcpus }
|
23
33
|
end
|
24
34
|
|
25
35
|
def total_instances_used
|
26
|
-
|
36
|
+
compute_servers.size
|
27
37
|
end
|
28
38
|
|
29
39
|
def total_ram_size_used
|
30
|
-
|
40
|
+
compute_servers.inject(0) { |total, server| total + flavor_for_server(server).ram }
|
31
41
|
end
|
32
42
|
|
33
|
-
def
|
34
|
-
|
43
|
+
def total_volume_size_used
|
44
|
+
@total_volume_size_used ||= volumes.inject(0) {|size, vol| size + vol.size }
|
45
|
+
end
|
46
|
+
|
47
|
+
def total_volumes_used
|
48
|
+
@total_volumes_used ||= volumes.size
|
49
|
+
end
|
50
|
+
|
51
|
+
def volumes_limits_available?
|
52
|
+
max_total_volume_size
|
35
53
|
end
|
36
54
|
|
37
55
|
def cores_available
|
38
|
-
max_total_cores -
|
56
|
+
max_total_cores - total_cores_used
|
39
57
|
end
|
40
58
|
|
41
59
|
def instances_available
|
42
|
-
max_total_instances -
|
60
|
+
max_total_instances - total_instances_used
|
43
61
|
end
|
44
62
|
|
45
63
|
def ram_size_available
|
46
|
-
max_total_ram_size -
|
64
|
+
max_total_ram_size - total_ram_size_used
|
65
|
+
end
|
66
|
+
|
67
|
+
# return nil if target OpenStack doesn't support volumes.get_quota
|
68
|
+
def volume_size_available
|
69
|
+
max_total_volume_size ? (max_total_volume_size - total_volume_size_used) : nil
|
70
|
+
end
|
71
|
+
|
72
|
+
# return nil if target OpenStack doesn't support volumes.get_quota
|
73
|
+
def volumes_available
|
74
|
+
max_total_volumes ? (max_total_volumes - total_volumes_used) : nil
|
75
|
+
end
|
76
|
+
|
77
|
+
def compute_servers
|
78
|
+
@compute_servers ||= fog_compute.servers
|
79
|
+
end
|
80
|
+
|
81
|
+
def volumes
|
82
|
+
@volumes ||= fog_volumes.volumes
|
83
|
+
end
|
84
|
+
|
85
|
+
def flavor_for_server(server)
|
86
|
+
flavor_id = server.flavor["id"]
|
87
|
+
@flavors ||= {}
|
88
|
+
@flavors[flavor_id] ||= fog_compute.flavors.get(flavor_id)
|
89
|
+
end
|
90
|
+
|
91
|
+
# {
|
92
|
+
# "metadata_items"=>128,
|
93
|
+
# "ram"=>204800,
|
94
|
+
# "floating_ips"=>10,
|
95
|
+
# "key_pairs"=>100,
|
96
|
+
# "instances"=>40,
|
97
|
+
# "security_group_rules"=>20,
|
98
|
+
# "injected_files"=>5,
|
99
|
+
# "cores"=>50,
|
100
|
+
# "fixed_ips"=>-1,
|
101
|
+
# "security_groups"=>10
|
102
|
+
# }
|
103
|
+
def compute_quotas
|
104
|
+
@compute_quotas ||= fog_compute.get_quota(current_tenant_id).data[:body]["quota_set"]
|
47
105
|
end
|
48
106
|
|
49
|
-
|
50
|
-
|
107
|
+
# {
|
108
|
+
# "snapshots"=>10,
|
109
|
+
# "gigabytes"=>15000,
|
110
|
+
# "volumes"=>40,
|
111
|
+
# }
|
112
|
+
def volume_quotas
|
113
|
+
@volume_quotas ||= fog_volumes.get_quota(current_tenant_id).data[:body]["quota_set"]
|
114
|
+
rescue Fog::Compute::OpenStack::NotFound
|
115
|
+
@volume_quotas = {
|
116
|
+
"snapshots"=>nil,
|
117
|
+
"gigabytes"=>nil,
|
118
|
+
"volumes"=>nil,
|
119
|
+
}
|
51
120
|
end
|
52
121
|
|
53
|
-
def
|
54
|
-
|
122
|
+
def current_tenant_id
|
123
|
+
fog_compute.current_tenant["id"]
|
55
124
|
end
|
56
125
|
|
57
126
|
end
|
@@ -30,11 +30,13 @@ module OhBoshWillItFit
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def self.resource_totals(resources)
|
33
|
-
totals = { "ram" => 0, "disk" => 0, "cpus" => 0 }
|
33
|
+
totals = { "ram" => 0, "disk" => 0, "cpus" => 0, "instances" => 0, "volumes" => 0 }
|
34
34
|
resources.each do |resource|
|
35
35
|
totals["ram"] += resource.total_ram if resource.total_ram
|
36
|
-
totals["disk"] += resource.total_disk if resource.total_disk
|
37
36
|
totals["cpus"] += resource.total_cpus if resource.total_cpus
|
37
|
+
totals["disk"] += resource.total_disk if resource.total_disk
|
38
|
+
totals["instances"] += resource.size
|
39
|
+
totals["volumes"] += resource.size # one boot volume per VM
|
38
40
|
end
|
39
41
|
totals
|
40
42
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"quota_set": {
|
3
|
+
"injected_file_content_bytes": 10240,
|
4
|
+
"metadata_items": 128,
|
5
|
+
"ram": 204800,
|
6
|
+
"floating_ips": 10,
|
7
|
+
"key_pairs": 100,
|
8
|
+
"id": "b166027658ad441d8baee6ec8f37f853",
|
9
|
+
"instances": 40,
|
10
|
+
"security_group_rules": 20,
|
11
|
+
"injected_files": 5,
|
12
|
+
"cores": 50,
|
13
|
+
"fixed_ips": -1,
|
14
|
+
"injected_file_path_bytes": 255,
|
15
|
+
"security_groups": 10
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"quota_set": {
|
3
|
+
"gigabytes_Volume-type--tempest-1301196564": -1,
|
4
|
+
"gigabytes_volume-type--tempest-420079685": -1,
|
5
|
+
"snapshots_standard": -1,
|
6
|
+
"volumes_ssd": -1,
|
7
|
+
"snapshots": 10,
|
8
|
+
"gigabytes_standard": -1,
|
9
|
+
"volumes_standard": -1,
|
10
|
+
"volumes_Volume-type--tempest-1474277584": -1,
|
11
|
+
"gigabytes_volume-type--tempest-342896740": -1,
|
12
|
+
"volumes_Volume-type--tempest-414041718": -1,
|
13
|
+
"id": "b166027658ad441d8baee6ec8f37f853",
|
14
|
+
"gigabytes_Volume-type--tempest-1474277584": -1,
|
15
|
+
"volumes_volume-type--tempest-1608932681": -1,
|
16
|
+
"snapshots_Volume-type--tempest-1474277584": -1,
|
17
|
+
"snapshots_ssd": -1,
|
18
|
+
"gigabytes_volume-type--tempest-1608932681": -1,
|
19
|
+
"snapshots_Volume-type--tempest-1406109096": -1,
|
20
|
+
"gigabytes_Volume-type--tempest-1406109096": -1,
|
21
|
+
"snapshots_volume-type--tempest-1608932681": -1,
|
22
|
+
"snapshots_Volume-type--tempest-1301196564": -1,
|
23
|
+
"volumes_volume-type--tempest-342896740": -1,
|
24
|
+
"gigabytes": 15000,
|
25
|
+
"gigabytes_Volume-type--tempest-636458420": -1,
|
26
|
+
"volumes_Volume-type--tempest-1301196564": -1,
|
27
|
+
"snapshots_Volume-type--tempest-636458420": -1,
|
28
|
+
"snapshots_Volume-type--tempest-1799390857": -1,
|
29
|
+
"volumes_Volume-type--tempest-1799390857": -1,
|
30
|
+
"gigabytes_Volume-type--tempest-1799390857": -1,
|
31
|
+
"volumes_volume-type--tempest-1488186639": -1,
|
32
|
+
"gigabytes_Volume-type--tempest-414041718": -1,
|
33
|
+
"volumes_Volume-type--tempest-1406109096": -1,
|
34
|
+
"snapshots_Volume-type--tempest-414041718": -1,
|
35
|
+
"snapshots_volume-type--tempest-1488186639": -1,
|
36
|
+
"snapshots_volume-type--tempest-342896740": -1,
|
37
|
+
"volumes_Volume-type--tempest-636458420": -1,
|
38
|
+
"volumes": 40,
|
39
|
+
"snapshots_volume-type--tempest-420079685": -1,
|
40
|
+
"gigabytes_ssd": -1,
|
41
|
+
"volumes_volume-type--tempest-420079685": -1,
|
42
|
+
"gigabytes_volume-type--tempest-1488186639": -1
|
43
|
+
}
|
44
|
+
}
|
data/spec/limits_spec.rb
CHANGED
@@ -1,81 +1,103 @@
|
|
1
1
|
require "json"
|
2
|
+
require "fog/openstack/models/compute/flavor"
|
3
|
+
require "fog/openstack/models/compute/flavors"
|
4
|
+
require "fog/openstack/models/compute/server"
|
5
|
+
require "fog/openstack/models/volume/volume"
|
2
6
|
|
3
7
|
describe OhBoshWillItFit::Limits do
|
4
|
-
context "
|
5
|
-
let(:
|
6
|
-
let(:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
context "quotas" do
|
9
|
+
let(:tenant) do { "id" => "tenant-id" } end
|
10
|
+
let(:servers) do
|
11
|
+
[
|
12
|
+
instance_double("Fog::Compute::OpenStack::Server", flavor: {"id" => "2"}),
|
13
|
+
instance_double("Fog::Compute::OpenStack::Server", flavor: {"id" => "3"})
|
14
|
+
]
|
15
|
+
end
|
16
|
+
|
17
|
+
let(:small_flavor) { instance_double("Fog::Compute::OpenStack::Flavor", id: "2", ram: 2048, vcpus: 2) }
|
18
|
+
let(:medium_flavor) { instance_double("Fog::Compute::OpenStack::Flavor", id: "3", ram: 4096, vcpus: 1) }
|
19
|
+
let(:flavors) { instance_double("Fog::Compute::OpenStack::Flavors") }
|
20
|
+
before do
|
21
|
+
flavors.stub(:get).with("2").and_return(small_flavor)
|
22
|
+
flavors.stub(:get).with("3").and_return(medium_flavor)
|
23
|
+
end
|
24
|
+
|
25
|
+
let(:compute_quotas) { JSON.parse(File.read(spec_asset("quotas_compute.json"))) }
|
26
|
+
let(:compute_get_quota) { instance_double("Excon::Response", data: { body: compute_quotas } ) }
|
27
|
+
let(:fog_compute) {
|
28
|
+
instance_double("Fog::Compute::OpenStack::Real",
|
29
|
+
servers: servers,
|
30
|
+
flavors: flavors,
|
31
|
+
get_quota: compute_get_quota,
|
32
|
+
current_tenant: tenant)
|
11
33
|
}
|
12
|
-
|
13
|
-
|
34
|
+
|
35
|
+
let(:volumes) do
|
36
|
+
[
|
37
|
+
instance_double("Fog::Volume::OpenStack::Volume", size: 50),
|
38
|
+
instance_double("Fog::Volume::OpenStack::Volume", size: 50),
|
39
|
+
]
|
40
|
+
end
|
41
|
+
let(:volumes_quotas) { JSON.parse(File.read(spec_asset("quotas_volumes.json"))) }
|
42
|
+
let(:volumes_get_quota) { instance_double("Excon::Response", data: { body: volumes_quotas} ) }
|
43
|
+
let(:fog_volumes) {
|
44
|
+
instance_double("Fog::Volume::OpenStack::Real",
|
45
|
+
volumes: volumes,
|
46
|
+
get_quota: volumes_get_quota)
|
14
47
|
}
|
48
|
+
|
49
|
+
subject { OhBoshWillItFit::Limits.new(fog_compute, fog_volumes) }
|
50
|
+
|
15
51
|
it {
|
16
|
-
expect(subject.
|
52
|
+
expect(subject.max_total_cores).to eq(50)
|
17
53
|
}
|
18
54
|
it {
|
19
|
-
expect(subject.
|
55
|
+
expect(subject.max_total_instances).to eq(40)
|
20
56
|
}
|
21
57
|
it {
|
22
|
-
expect(subject.
|
58
|
+
expect(subject.max_total_ram_size).to eq(204800)
|
23
59
|
}
|
24
60
|
it {
|
25
|
-
expect(subject.
|
61
|
+
expect(subject.max_total_volume_size).to eq(15000)
|
26
62
|
}
|
27
|
-
|
28
63
|
it {
|
29
|
-
expect(subject.
|
64
|
+
expect(subject.max_total_volumes).to eq(40)
|
30
65
|
}
|
31
66
|
|
32
67
|
it {
|
33
|
-
expect(subject.
|
34
|
-
}
|
35
|
-
it {
|
36
|
-
expect(subject.instances_available).to eq(100)
|
37
|
-
}
|
38
|
-
it {
|
39
|
-
expect(subject.ram_size_available).to eq(1966080)
|
68
|
+
expect(subject.total_cores_used).to eq(3)
|
40
69
|
}
|
41
|
-
end
|
42
|
-
|
43
|
-
context "fog_limits - totals" do
|
44
|
-
let(:fog_limits) { JSON.parse(File.read(spec_asset("fog_limits_totals.json"))) }
|
45
|
-
let(:get_limits) { instance_double("Excon::Response", data: { body: fog_limits} ) }
|
46
|
-
let(:fog_compute) { instance_double("Fog::Compute::OpenStack::Real", get_limits: get_limits) }
|
47
|
-
subject { OhBoshWillItFit::Limits.new(fog_compute) }
|
48
70
|
it {
|
49
|
-
expect(subject.
|
71
|
+
expect(subject.total_instances_used).to eq(2)
|
50
72
|
}
|
51
73
|
it {
|
52
|
-
expect(subject.
|
74
|
+
expect(subject.total_ram_size_used).to eq(6144)
|
53
75
|
}
|
54
76
|
it {
|
55
|
-
expect(subject.
|
77
|
+
expect(subject.total_volume_size_used).to eq(100)
|
56
78
|
}
|
57
79
|
it {
|
58
|
-
expect(subject.
|
80
|
+
expect(subject.total_volumes_used).to eq(2)
|
59
81
|
}
|
82
|
+
|
60
83
|
it {
|
61
|
-
expect(subject.
|
84
|
+
expect(subject.volumes_limits_available?).to be_true
|
62
85
|
}
|
86
|
+
|
63
87
|
it {
|
64
|
-
expect(subject.
|
88
|
+
expect(subject.cores_available).to eq(50-3)
|
65
89
|
}
|
66
|
-
|
67
90
|
it {
|
68
|
-
expect(subject.
|
91
|
+
expect(subject.instances_available).to eq(40-2)
|
69
92
|
}
|
70
|
-
|
71
93
|
it {
|
72
|
-
expect(subject.
|
94
|
+
expect(subject.ram_size_available).to eq(204800-6144)
|
73
95
|
}
|
74
96
|
it {
|
75
|
-
expect(subject.
|
97
|
+
expect(subject.volume_size_available).to eq(15000-100)
|
76
98
|
}
|
77
99
|
it {
|
78
|
-
expect(subject.
|
100
|
+
expect(subject.volumes_available).to eq(40-2)
|
79
101
|
}
|
80
102
|
end
|
81
103
|
|
data/spec/resource_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe OhBoshWillItFit::Resource do
|
|
27
27
|
it { expect(subject.first.total_cpus).to eq(2) }
|
28
28
|
it {
|
29
29
|
totals = OhBoshWillItFit::Resource.resource_totals(subject)
|
30
|
-
expect(totals).to eq({"ram" => 4096, "disk" => 24, "cpus" => 2})
|
30
|
+
expect(totals).to eq({"ram" => 4096, "disk" => 24, "cpus" => 2, "volumes" => 2, "instances" => 2})
|
31
31
|
}
|
32
32
|
end
|
33
33
|
end
|
@@ -51,7 +51,7 @@ describe OhBoshWillItFit::Resource do
|
|
51
51
|
it { expect(subject.first.total_cpus).to eq(50 * 8) }
|
52
52
|
it {
|
53
53
|
totals = OhBoshWillItFit::Resource.resource_totals(subject)
|
54
|
-
expect(totals).to eq({"ram" => 50 * 16384, "disk" => 50 * 80, "cpus" => 50 * 8})
|
54
|
+
expect(totals).to eq({"ram" => 50 * 16384, "disk" => 50 * 80, "cpus" => 50 * 8, "volumes" => 50, "instances" => 50})
|
55
55
|
}
|
56
56
|
end
|
57
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohboshwillitfit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr Nic Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|
@@ -78,7 +78,9 @@ extra_rdoc_files: []
|
|
78
78
|
files:
|
79
79
|
- ".gitignore"
|
80
80
|
- ".rspec"
|
81
|
+
- ChangeLog.md
|
81
82
|
- Gemfile
|
83
|
+
- Guardfile
|
82
84
|
- LICENSE.txt
|
83
85
|
- README.md
|
84
86
|
- Rakefile
|
@@ -91,8 +93,8 @@ files:
|
|
91
93
|
- ohboshwillitfit.gemspec
|
92
94
|
- spec/assets/deployment-small.yml
|
93
95
|
- spec/assets/deployment-wontfit.yml
|
94
|
-
- spec/assets/
|
95
|
-
- spec/assets/
|
96
|
+
- spec/assets/quotas_compute.json
|
97
|
+
- spec/assets/quotas_volumes.json
|
96
98
|
- spec/fog_credentials_spec.rb
|
97
99
|
- spec/limits_spec.rb
|
98
100
|
- spec/resource_spec.rb
|
@@ -125,8 +127,8 @@ summary: Will this OpenStack BOSH deployment fit or not? If not, fail fast.
|
|
125
127
|
test_files:
|
126
128
|
- spec/assets/deployment-small.yml
|
127
129
|
- spec/assets/deployment-wontfit.yml
|
128
|
-
- spec/assets/
|
129
|
-
- spec/assets/
|
130
|
+
- spec/assets/quotas_compute.json
|
131
|
+
- spec/assets/quotas_volumes.json
|
130
132
|
- spec/fog_credentials_spec.rb
|
131
133
|
- spec/limits_spec.rb
|
132
134
|
- spec/resource_spec.rb
|
@@ -1,68 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"limits": {
|
3
|
-
"rate": [
|
4
|
-
{
|
5
|
-
"regex": ".*",
|
6
|
-
"limit": [
|
7
|
-
{
|
8
|
-
"next-available": "2014-03-17T19:30:42Z",
|
9
|
-
"unit": "MINUTE",
|
10
|
-
"verb": "POST",
|
11
|
-
"remaining": 9,
|
12
|
-
"value": 10
|
13
|
-
},
|
14
|
-
{
|
15
|
-
"next-available": "2014-03-20T00:56:41Z",
|
16
|
-
"unit": "MINUTE",
|
17
|
-
"verb": "PUT",
|
18
|
-
"remaining": 10,
|
19
|
-
"value": 10
|
20
|
-
},
|
21
|
-
{
|
22
|
-
"next-available": "2014-03-18T03:47:22Z",
|
23
|
-
"unit": "MINUTE",
|
24
|
-
"verb": "DELETE",
|
25
|
-
"remaining": 99,
|
26
|
-
"value": 100
|
27
|
-
}
|
28
|
-
],
|
29
|
-
"uri": "*"
|
30
|
-
},
|
31
|
-
{
|
32
|
-
"regex": "^/servers",
|
33
|
-
"limit": [
|
34
|
-
{
|
35
|
-
"next-available": "2014-03-20T00:56:41Z",
|
36
|
-
"unit": "DAY",
|
37
|
-
"verb": "POST",
|
38
|
-
"remaining": 50,
|
39
|
-
"value": 50
|
40
|
-
}
|
41
|
-
],
|
42
|
-
"uri": "*/servers"
|
43
|
-
},
|
44
|
-
{
|
45
|
-
"regex": ".*changes-since.*",
|
46
|
-
"limit": [
|
47
|
-
{
|
48
|
-
"next-available": "2014-03-20T00:56:41Z",
|
49
|
-
"unit": "MINUTE",
|
50
|
-
"verb": "GET",
|
51
|
-
"remaining": 3,
|
52
|
-
"value": 3
|
53
|
-
}
|
54
|
-
],
|
55
|
-
"uri": "*changes-since*"
|
56
|
-
}
|
57
|
-
],
|
58
|
-
"absolute": {
|
59
|
-
"maxServerMeta": 128,
|
60
|
-
"maxPersonality": 5,
|
61
|
-
"maxImageMeta": 128,
|
62
|
-
"maxPersonalitySize": 10240,
|
63
|
-
"maxTotalCores": 1000,
|
64
|
-
"maxTotalInstances": 100,
|
65
|
-
"maxTotalRAMSize": 1966080
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"limits": {
|
3
|
-
"rate": [
|
4
|
-
|
5
|
-
],
|
6
|
-
"absolute": {
|
7
|
-
"maxServerMeta": 128,
|
8
|
-
"maxPersonality": 5,
|
9
|
-
"maxImageMeta": 128,
|
10
|
-
"maxPersonalitySize": 10240,
|
11
|
-
"maxSecurityGroupRules": 20,
|
12
|
-
"maxTotalKeypairs": 100,
|
13
|
-
"maxSecurityGroups": 10,
|
14
|
-
"maxTotalCores": 50,
|
15
|
-
"maxTotalFloatingIps": 10,
|
16
|
-
"maxTotalInstances": 40,
|
17
|
-
"maxTotalRAMSize": 204800,
|
18
|
-
|
19
|
-
"totalSecurityGroupsUsed": 0,
|
20
|
-
"totalRAMUsed": 169472,
|
21
|
-
"totalInstancesUsed": 24,
|
22
|
-
"totalFloatingIpsUsed": 0,
|
23
|
-
"totalCoresUsed": 43
|
24
|
-
}
|
25
|
-
}
|
26
|
-
}
|