fog-openstack 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/README.md +2 -2
- data/Rakefile +1 -8
- data/docs/orchestration.md +19 -0
- data/fog-openstack.gemspec +2 -1
- data/gemfiles/Gemfile-1.9 +2 -1
- data/lib/fog/dns/openstack/v2.rb +20 -0
- data/lib/fog/dns/openstack/v2/models/recordset.rb +55 -0
- data/lib/fog/dns/openstack/v2/models/recordsets.rb +30 -0
- data/lib/fog/dns/openstack/v2/models/zone.rb +50 -0
- data/lib/fog/dns/openstack/v2/models/zones.rb +30 -0
- data/lib/fog/dns/openstack/v2/requests/delete_recordset.rb +5 -3
- data/lib/fog/dns/openstack/v2/requests/delete_zone.rb +5 -3
- data/lib/fog/dns/openstack/v2/requests/get_quota.rb +4 -2
- data/lib/fog/dns/openstack/v2/requests/get_recordset.rb +4 -2
- data/lib/fog/dns/openstack/v2/requests/get_zone.rb +5 -3
- data/lib/fog/dns/openstack/v2/requests/list_recordsets.rb +29 -5
- data/lib/fog/dns/openstack/v2/requests/list_zones.rb +4 -1
- data/lib/fog/dns/openstack/v2/requests/update_quota.rb +4 -3
- data/lib/fog/dns/openstack/v2/requests/update_recordset.rb +4 -1
- data/lib/fog/dns/openstack/v2/requests/update_zone.rb +4 -1
- data/lib/fog/introspection/openstack.rb +3 -8
- data/lib/fog/monitoring/openstack.rb +7 -1
- data/lib/fog/monitoring/openstack/models/alarm.rb +0 -1
- data/lib/fog/monitoring/openstack/models/alarm_definition.rb +1 -0
- data/lib/fog/monitoring/openstack/models/dimension_value.rb +19 -0
- data/lib/fog/monitoring/openstack/models/dimension_values.rb +16 -0
- data/lib/fog/monitoring/openstack/models/metrics.rb +8 -0
- data/lib/fog/monitoring/openstack/models/notification_method.rb +8 -1
- data/lib/fog/monitoring/openstack/models/notification_methods.rb +4 -0
- data/lib/fog/monitoring/openstack/requests/list_dimension_values.rb +21 -0
- data/lib/fog/monitoring/openstack/requests/list_notification_method_types.rb +21 -0
- data/lib/fog/monitoring/openstack/requests/{update_notification_method.rb → patch_notification_method.rb} +1 -1
- data/lib/fog/monitoring/openstack/requests/put_notification_method.rb +19 -0
- data/lib/fog/network/openstack.rb +12 -8
- data/lib/fog/network/openstack/requests/create_network.rb +54 -63
- data/lib/fog/network/openstack/requests/update_network.rb +27 -8
- data/lib/fog/openstack.rb +44 -28
- data/lib/fog/openstack/version.rb +1 -1
- data/lib/fog/orchestration/openstack.rb +1 -0
- data/lib/fog/orchestration/openstack/models/stack.rb +4 -0
- data/lib/fog/orchestration/openstack/requests/cancel_update.rb +26 -0
- metadata +13 -30
- data/tests/fixtures/introspection.yaml +0 -287
- data/tests/helper.rb +0 -24
- data/tests/helpers/collection_helper.rb +0 -97
- data/tests/helpers/compute/flavors_helper.rb +0 -32
- data/tests/helpers/compute/server_helper.rb +0 -25
- data/tests/helpers/compute/servers_helper.rb +0 -10
- data/tests/helpers/formats_helper.rb +0 -98
- data/tests/helpers/formats_helper_tests.rb +0 -110
- data/tests/helpers/mock_helper.rb +0 -17
- data/tests/helpers/model_helper.rb +0 -31
- data/tests/helpers/responds_to_helper.rb +0 -11
- data/tests/helpers/schema_validator_tests.rb +0 -107
- data/tests/helpers/succeeds_helper.rb +0 -9
@@ -1,107 +0,0 @@
|
|
1
|
-
Shindo.tests('Fog::Schema::DataValidator', 'meta') do
|
2
|
-
|
3
|
-
validator = Fog::Schema::DataValidator.new
|
4
|
-
|
5
|
-
tests('#validate') do
|
6
|
-
|
7
|
-
tests('returns true') do
|
8
|
-
|
9
|
-
returns(true, 'when value matches schema expectation') do
|
10
|
-
validator.validate({"key" => "Value"}, {"key" => String})
|
11
|
-
end
|
12
|
-
|
13
|
-
returns(true, 'when values within an array all match schema expectation') do
|
14
|
-
validator.validate({"key" => [1, 2]}, {"key" => [Integer]})
|
15
|
-
end
|
16
|
-
|
17
|
-
returns(true, 'when nested values match schema expectation') do
|
18
|
-
validator.validate({"key" => {:nested_key => "Value"}}, {"key" => {:nested_key => String}})
|
19
|
-
end
|
20
|
-
|
21
|
-
returns(true, 'when collection of values all match schema expectation') do
|
22
|
-
validator.validate([{"key" => "Value"}, {"key" => "Value"}], [{"key" => String}])
|
23
|
-
end
|
24
|
-
|
25
|
-
returns(true, 'when collection is empty although schema covers optional members') do
|
26
|
-
validator.validate([], [{"key" => String}])
|
27
|
-
end
|
28
|
-
|
29
|
-
returns(true, 'when additional keys are passed and not strict') do
|
30
|
-
validator.validate({"key" => "Value", :extra => "Bonus"}, {"key" => String}, {:allow_extra_keys => true})
|
31
|
-
end
|
32
|
-
|
33
|
-
returns(true, 'when value is nil and schema expects NilClass') do
|
34
|
-
validator.validate({"key" => nil}, {"key" => NilClass})
|
35
|
-
end
|
36
|
-
|
37
|
-
returns(true, 'when value and schema match as hashes') do
|
38
|
-
validator.validate({}, {})
|
39
|
-
end
|
40
|
-
|
41
|
-
returns(true, 'when value and schema match as arrays') do
|
42
|
-
validator.validate([], [])
|
43
|
-
end
|
44
|
-
|
45
|
-
returns(true, 'when value is a Time') do
|
46
|
-
validator.validate({"time" => Time.now}, {"time" => Time})
|
47
|
-
end
|
48
|
-
|
49
|
-
returns(true, 'when key is missing but value should be NilClass (#1477)') do
|
50
|
-
validator.validate({}, {"key" => NilClass}, {:allow_optional_rules => true})
|
51
|
-
end
|
52
|
-
|
53
|
-
returns(true, 'when key is missing but value is nullable (#1477)') do
|
54
|
-
validator.validate({}, {"key" => Fog::Nullable::String}, {:allow_optional_rules => true})
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
|
59
|
-
tests('returns false') do
|
60
|
-
|
61
|
-
returns(false, 'when value does not match schema expectation') do
|
62
|
-
validator.validate({"key" => nil}, {"key" => String})
|
63
|
-
end
|
64
|
-
|
65
|
-
returns(false, 'when key formats do not match') do
|
66
|
-
validator.validate({"key" => "Value"}, {:key => String})
|
67
|
-
end
|
68
|
-
|
69
|
-
returns(false, 'when additional keys are passed and strict') do
|
70
|
-
validator.validate({"key" => "Missing"}, {})
|
71
|
-
end
|
72
|
-
|
73
|
-
returns(false, 'when some keys do not appear') do
|
74
|
-
validator.validate({}, {"key" => String})
|
75
|
-
end
|
76
|
-
|
77
|
-
returns(false, 'when collection contains a member that does not match schema') do
|
78
|
-
validator.validate([{"key" => "Value"}, {"key" => 5}], [{"key" => String}])
|
79
|
-
end
|
80
|
-
|
81
|
-
returns(false, 'when collection has multiple schema patterns') do
|
82
|
-
validator.validate([{"key" => "Value"}], [{"key" => Integer}, {"key" => String}])
|
83
|
-
end
|
84
|
-
|
85
|
-
returns(false, 'when hash and array are compared') do
|
86
|
-
validator.validate({}, [])
|
87
|
-
end
|
88
|
-
|
89
|
-
returns(false, 'when array and hash are compared') do
|
90
|
-
validator.validate([], {})
|
91
|
-
end
|
92
|
-
|
93
|
-
returns(false, 'when a hash is expected but another data type is found') do
|
94
|
-
validator.validate({"key" => {:nested_key => []}}, {"key" => {:nested_key => {}}})
|
95
|
-
end
|
96
|
-
|
97
|
-
returns(false, 'when key is missing but value should be NilClass (#1477)') do
|
98
|
-
validator.validate({}, {"key" => NilClass}, {:allow_optional_rules => false})
|
99
|
-
end
|
100
|
-
|
101
|
-
returns(false, 'when key is missing but value is nullable (#1477)') do
|
102
|
-
validator.validate({}, {"key" => Fog::Nullable::String}, {:allow_optional_rules => false})
|
103
|
-
end
|
104
|
-
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|