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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -1
  3. data/README.md +2 -2
  4. data/Rakefile +1 -8
  5. data/docs/orchestration.md +19 -0
  6. data/fog-openstack.gemspec +2 -1
  7. data/gemfiles/Gemfile-1.9 +2 -1
  8. data/lib/fog/dns/openstack/v2.rb +20 -0
  9. data/lib/fog/dns/openstack/v2/models/recordset.rb +55 -0
  10. data/lib/fog/dns/openstack/v2/models/recordsets.rb +30 -0
  11. data/lib/fog/dns/openstack/v2/models/zone.rb +50 -0
  12. data/lib/fog/dns/openstack/v2/models/zones.rb +30 -0
  13. data/lib/fog/dns/openstack/v2/requests/delete_recordset.rb +5 -3
  14. data/lib/fog/dns/openstack/v2/requests/delete_zone.rb +5 -3
  15. data/lib/fog/dns/openstack/v2/requests/get_quota.rb +4 -2
  16. data/lib/fog/dns/openstack/v2/requests/get_recordset.rb +4 -2
  17. data/lib/fog/dns/openstack/v2/requests/get_zone.rb +5 -3
  18. data/lib/fog/dns/openstack/v2/requests/list_recordsets.rb +29 -5
  19. data/lib/fog/dns/openstack/v2/requests/list_zones.rb +4 -1
  20. data/lib/fog/dns/openstack/v2/requests/update_quota.rb +4 -3
  21. data/lib/fog/dns/openstack/v2/requests/update_recordset.rb +4 -1
  22. data/lib/fog/dns/openstack/v2/requests/update_zone.rb +4 -1
  23. data/lib/fog/introspection/openstack.rb +3 -8
  24. data/lib/fog/monitoring/openstack.rb +7 -1
  25. data/lib/fog/monitoring/openstack/models/alarm.rb +0 -1
  26. data/lib/fog/monitoring/openstack/models/alarm_definition.rb +1 -0
  27. data/lib/fog/monitoring/openstack/models/dimension_value.rb +19 -0
  28. data/lib/fog/monitoring/openstack/models/dimension_values.rb +16 -0
  29. data/lib/fog/monitoring/openstack/models/metrics.rb +8 -0
  30. data/lib/fog/monitoring/openstack/models/notification_method.rb +8 -1
  31. data/lib/fog/monitoring/openstack/models/notification_methods.rb +4 -0
  32. data/lib/fog/monitoring/openstack/requests/list_dimension_values.rb +21 -0
  33. data/lib/fog/monitoring/openstack/requests/list_notification_method_types.rb +21 -0
  34. data/lib/fog/monitoring/openstack/requests/{update_notification_method.rb → patch_notification_method.rb} +1 -1
  35. data/lib/fog/monitoring/openstack/requests/put_notification_method.rb +19 -0
  36. data/lib/fog/network/openstack.rb +12 -8
  37. data/lib/fog/network/openstack/requests/create_network.rb +54 -63
  38. data/lib/fog/network/openstack/requests/update_network.rb +27 -8
  39. data/lib/fog/openstack.rb +44 -28
  40. data/lib/fog/openstack/version.rb +1 -1
  41. data/lib/fog/orchestration/openstack.rb +1 -0
  42. data/lib/fog/orchestration/openstack/models/stack.rb +4 -0
  43. data/lib/fog/orchestration/openstack/requests/cancel_update.rb +26 -0
  44. metadata +13 -30
  45. data/tests/fixtures/introspection.yaml +0 -287
  46. data/tests/helper.rb +0 -24
  47. data/tests/helpers/collection_helper.rb +0 -97
  48. data/tests/helpers/compute/flavors_helper.rb +0 -32
  49. data/tests/helpers/compute/server_helper.rb +0 -25
  50. data/tests/helpers/compute/servers_helper.rb +0 -10
  51. data/tests/helpers/formats_helper.rb +0 -98
  52. data/tests/helpers/formats_helper_tests.rb +0 -110
  53. data/tests/helpers/mock_helper.rb +0 -17
  54. data/tests/helpers/model_helper.rb +0 -31
  55. data/tests/helpers/responds_to_helper.rb +0 -11
  56. data/tests/helpers/schema_validator_tests.rb +0 -107
  57. data/tests/helpers/succeeds_helper.rb +0 -9
@@ -1,11 +0,0 @@
1
- module Shindo
2
- class Tests
3
- def responds_to(method_names)
4
- for method_name in [*method_names]
5
- tests("#respond_to?(:#{method_name})").returns(true) do
6
- @instance.respond_to?(method_name)
7
- end
8
- end
9
- end
10
- end
11
- end
@@ -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
@@ -1,9 +0,0 @@
1
- module Shindo
2
- class Tests
3
- def succeeds
4
- test('succeeds') do
5
- !!instance_eval(&Proc.new)
6
- end
7
- end
8
- end
9
- end