schemata-health_manager 0.0.1.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/lib/schemata/common/error.rb +18 -0
  2. data/lib/schemata/common/msgbase.rb +282 -0
  3. data/lib/schemata/common/msgtypebase.rb +144 -0
  4. data/lib/schemata/common/parsed_msg.rb +43 -0
  5. data/lib/schemata/health_manager/health_request/health_request_v1.rb +41 -0
  6. data/lib/schemata/health_manager/health_request.rb +13 -0
  7. data/lib/schemata/health_manager/health_response/health_response.rb +37 -0
  8. data/lib/schemata/health_manager/health_response.rb +13 -0
  9. data/lib/schemata/health_manager/status_crashed_response/status_crashed_response_v1.rb +41 -0
  10. data/lib/schemata/health_manager/status_crashed_response.rb +13 -0
  11. data/lib/schemata/health_manager/status_flapping_response/status_flapping_response_v1.rb +39 -0
  12. data/lib/schemata/health_manager/status_flapping_response.rb +13 -0
  13. data/lib/schemata/health_manager/status_request/status_request_v1.rb +37 -0
  14. data/lib/schemata/health_manager/status_request.rb +13 -0
  15. data/lib/schemata/health_manager/version.rb +5 -0
  16. data/lib/schemata/health_manager.rb +29 -0
  17. data/lib/schemata/helpers/hash_copy.rb +28 -0
  18. data/lib/schemata/helpers/stringify.rb +26 -0
  19. data/spec/cloud_controller/cloud_controller_spec.rb +6 -0
  20. data/spec/cloud_controller/droplet_updated_message_spec.rb +10 -0
  21. data/spec/cloud_controller/hm_start_request_spec.rb +11 -0
  22. data/spec/cloud_controller/hm_stop_request_spec.rb +12 -0
  23. data/spec/common/helpers_spec.rb +115 -0
  24. data/spec/common/parsed_msg_spec.rb +46 -0
  25. data/spec/component/aux_data_spec.rb +37 -0
  26. data/spec/component/component_bar_spec.rb +140 -0
  27. data/spec/component/component_foo_spec.rb +630 -0
  28. data/spec/component/foo_spec.rb +214 -0
  29. data/spec/component2/component2_bar_spec.rb +140 -0
  30. data/spec/dea/advertise_message_spec.rb +10 -0
  31. data/spec/dea/dea_spec.rb +6 -0
  32. data/spec/dea/dea_status_response_spec.rb +10 -0
  33. data/spec/dea/discover_request_spec.rb +10 -0
  34. data/spec/dea/droplet_status_response_spec.rb +10 -0
  35. data/spec/dea/exit_message_spec.rb +10 -0
  36. data/spec/dea/find_droplet_request_spec.rb +27 -0
  37. data/spec/dea/find_droplet_response_spec.rb +10 -0
  38. data/spec/dea/heartbeat_response_spec.rb +10 -0
  39. data/spec/dea/hello_message_spec.rb +10 -0
  40. data/spec/dea/start_request_spec.rb +10 -0
  41. data/spec/dea/stop_request_spec.rb +10 -0
  42. data/spec/dea/update_request_spec.rb +0 -0
  43. data/spec/health_manager/health_manager_spec.rb +6 -0
  44. data/spec/health_manager/health_request_spec.rb +12 -0
  45. data/spec/health_manager/health_response_spec.rb +12 -0
  46. data/spec/health_manager/status_crashed_response_spec.rb +12 -0
  47. data/spec/health_manager/status_flapping_response_spec.rb +12 -0
  48. data/spec/health_manager/status_request_spec.rb +12 -0
  49. data/spec/router/register_request_spec.rb +10 -0
  50. data/spec/router/router_spec.rb +6 -0
  51. data/spec/router/start_message_spec.rb +10 -0
  52. data/spec/spec_helper.rb +1 -0
  53. data/spec/staging/staging_message_spec.rb +14 -0
  54. data/spec/staging/staging_spec.rb +6 -0
  55. data/spec/support/component_helpers.rb +51 -0
  56. data/spec/support/helpers.rb +102 -0
  57. data/spec/support/message_helpers.rb +135 -0
  58. data/spec/support/message_type_helpers.rb +171 -0
  59. metadata +240 -0
@@ -0,0 +1,51 @@
1
+ require 'support/helpers'
2
+
3
+ shared_examples "a schemata component" do
4
+
5
+ described_class.constants.select { |x| x != :VERSION }.each do |msg_type|
6
+ describe ".mock_#{decamelize(msg_type.to_s)}" do
7
+ versions = described_class::const_get(msg_type).constants.select { |x| x =~ /V[0-9]+/ }
8
+ versions.map { |x| x = x.to_s[1..-1].to_i }.each do |version|
9
+ it_behaves_like "a mocking method", version do
10
+ let(:message_type) { described_class::const_get(msg_type) }
11
+ let(:message_type_name) { msg_type.to_s }
12
+ let(:component) { described_class }
13
+ let(:component_name) { component.name.split("::")[1] }
14
+
15
+ let(:mock_method) { "mock_#{decamelize(msg_type)}"}
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ shared_examples "a mocking method" do |version|
23
+
24
+ context "when current_version is #{version}" do
25
+ before :each do
26
+ set_current_version(message_type, version)
27
+ end
28
+
29
+ after :each do
30
+ reset_version(message_type)
31
+ end
32
+
33
+ it "should return a V#{version} object if called with no argument" do
34
+ msg_obj = component.send(mock_method)
35
+ msg_obj.class.should == message_type::const_get("V#{version}")
36
+ end
37
+
38
+ 1.upto(version) do |i|
39
+ it "should return a V#{i} object if called with input #{i}" do
40
+ msg_obj = component.send(mock_method, i)
41
+ msg_obj.class.should == message_type::const_get("V#{i}")
42
+ end
43
+ end
44
+
45
+ it "should raise an error if called with input > #{version}" do
46
+ expect {
47
+ msg_obj = component.send(mock_method, version + 1)
48
+ }.to raise_error(NameError)
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,102 @@
1
+ def set_current_version(msg_type, version)
2
+ msg_type.stub(:current_version).and_return(version)
3
+ @curr_class = msg_type.current_class
4
+
5
+ @future_versions = {}
6
+ msg_type::constants.each do |v|
7
+ next if !is_message_version?(v) || !greater_version?(v, version)
8
+ @future_versions[v] = msg_type::const_get(v)
9
+ msg_type.send(:remove_const, v)
10
+ end
11
+ end
12
+
13
+ def reset_version(msg_type)
14
+ @future_versions.each do |v, klass|
15
+ msg_type::const_set(v, klass)
16
+ end
17
+ @future_versions
18
+ end
19
+
20
+ def is_message_version?(constant)
21
+ !!(constant =~ /^V[0-9]+$/)
22
+ end
23
+
24
+ def greater_version?(version, benchmark)
25
+ version = version[1..-1].to_i
26
+ version > benchmark
27
+ end
28
+
29
+ def decamelize(str)
30
+ words = []
31
+ curr_word = ""
32
+ 0.upto(str.length - 1) do |i|
33
+ ch = str[i]
34
+ if ch =~ /[A-Z]/
35
+ words.push(curr_word)
36
+ curr_word = ""
37
+ end
38
+ curr_word += ch
39
+ end
40
+ words.push(curr_word)
41
+ words.map! { |x| x.downcase }
42
+
43
+ # If the first letter is capitalized, then the first word here is empty
44
+ words.shift if words[0] == ""
45
+
46
+ words.join('_')
47
+ end
48
+
49
+ def num_mandatory_fields(msg_obj)
50
+ optional = msg_obj.class.schema.optional_keys
51
+ mandatory = Set.new(msg_obj.class.schema.schemas.keys)
52
+ diff = mandatory - optional
53
+ return diff.size
54
+ end
55
+
56
+ def all_classes
57
+ all_classes = Set.new([Integer, String, Float, TrueClass, FalseClass, NilClass, Hash, Array])
58
+ end
59
+
60
+ def get_allowed_classes(schema)
61
+ case schema
62
+ when Membrane::Schema::Bool
63
+ return Set.new([TrueClass, FalseClass])
64
+ when Membrane::Schema::Enum
65
+ return Set.new(schema.elem_schemas.map {|x| get_allowed_classes(x)}).flatten
66
+ when Membrane::Schema::Class
67
+ return Set.new([schema.klass])
68
+ when Membrane::Schema::Record
69
+ return Set.new([Hash])
70
+ when Membrane::Schema::List
71
+ return Set.new([Array])
72
+ when Membrane::Schema::Value
73
+ return Set.new([schema.value.class])
74
+ end
75
+ end
76
+
77
+ def get_unallowed_classes(schema)
78
+ allowed_classes = get_allowed_classes(schema)
79
+ all_classes - allowed_classes
80
+ end
81
+
82
+ def default_value(klass)
83
+ # Yes this is silly
84
+ if klass == Integer
85
+ return 0
86
+ elsif klass == String
87
+ return "foo"
88
+ elsif klass == Float
89
+ return 3.14
90
+ elsif klass == TrueClass
91
+ return true
92
+ elsif klass == FalseClass
93
+ return false
94
+ elsif klass == NilClass
95
+ return nil
96
+ elsif klass == Hash
97
+ return {}
98
+ elsif klass == Array
99
+ return []
100
+ else
101
+ end
102
+ end
@@ -0,0 +1,135 @@
1
+ shared_examples "a message" do
2
+
3
+ version = described_class.version
4
+
5
+ let(:component_name) { described_class.name.split("::")[1] }
6
+ let(:message_type_name) { described_class.name.split("::")[2] }
7
+ let(:message_name) { described_class.name.split("::")[3] }
8
+
9
+ let(:component) { Schemata::const_get(component_name) }
10
+ let(:message_type) { component::const_get(message_type_name) }
11
+ let(:message) { described_class }
12
+
13
+ let(:mock_method) { "mock_#{decamelize(message_type_name)}" }
14
+
15
+ before :each do
16
+ set_current_version(message_type, version)
17
+ end
18
+
19
+ after :each do
20
+ reset_version(message_type)
21
+ end
22
+
23
+ describe "#new" do
24
+ it "should create a #{described_class} object with an incomplete hash" do
25
+ mock_hash = component.send(mock_method, 1).contents
26
+ first_key = mock_hash.keys[0]
27
+ first_value = mock_hash[first_key]
28
+
29
+ msg_obj = message.new({first_key => first_value})
30
+ msg_obj.class.should == message
31
+ msg_obj.send(first_key).should == first_value
32
+ end
33
+
34
+ it "should raise an error if the hash contains incorrect types" do
35
+ mock_hash = component.send(mock_method, 1).contents
36
+ first_key = mock_hash.keys[0]
37
+ first_value = mock_hash[first_key]
38
+
39
+ schema = message.schema.schemas[first_key]
40
+ unallowed_classes = get_unallowed_classes(schema)
41
+ bad_value = default_value(unallowed_classes.to_a[0])
42
+
43
+ expect {
44
+ msg_obj = message.new({first_key => bad_value})
45
+ }.to raise_error(Schemata::UpdateAttributeError)
46
+ end
47
+ end
48
+
49
+ describe "#encode" do
50
+ if version == 1
51
+ it "should return a Schemata-encoded json string, with a V1 hash also in the raw payload" do
52
+ msg_obj = component.send(mock_method, 1)
53
+ json = msg_obj.encode
54
+ json_hash = Yajl::Parser.parse(json)
55
+
56
+ json_hash.should have_key "V1"
57
+ json_hash.should have_key "min_version"
58
+
59
+ data = Schemata::HashCopyHelpers.deep_copy(json_hash["V1"])
60
+
61
+ json_hash.delete("V1")
62
+ json_hash.delete("min_version")
63
+
64
+ json_hash.should == data
65
+ end
66
+ else
67
+ it "should return a Schemata-encoded json string, with no raw payload" do
68
+ msg_obj = component.send(mock_method, version)
69
+ json = msg_obj.encode
70
+ json_hash = Yajl::Parser.parse(json)
71
+
72
+ 1.upto(version) do |i|
73
+ json_hash.should have_key "V#{i}"
74
+ end
75
+ json_hash.should have_key "min_version"
76
+
77
+ data = Schemata::HashCopyHelpers.deep_copy(json_hash["V#{version}"])
78
+ 1.upto(version) do |i|
79
+ json_hash.delete("V#{i}")
80
+ end
81
+ json_hash.delete("min_version")
82
+
83
+ json_hash.should be_empty
84
+ end
85
+ end
86
+ end
87
+
88
+ described_class.schema.schemas.keys.each do |attr|
89
+ describe "##{attr}" do
90
+ it "should the attribute if it was specified at instantiation" do
91
+ mock_value = component.send(mock_method, version).contents[attr]
92
+ msg_obj = message.new({ attr => mock_value })
93
+ msg_obj.send(attr).should == mock_value
94
+ end
95
+
96
+ it "should return the attribute if it was set with an attr writer" do
97
+ mock_value = component.send(mock_method, version).contents[attr]
98
+ msg_obj = message.new
99
+ msg_obj.send("#{attr}=", mock_value)
100
+ msg_obj.send(attr).should == mock_value
101
+ end
102
+
103
+ it "should return nil if the attribute was never set" do
104
+ msg_obj = message.new
105
+ msg_obj.send(attr).should be_nil
106
+ end
107
+ end
108
+
109
+ describe "##{attr}=" do
110
+ it "should change the attribute and return the new value" do
111
+ mock_value = component.send(mock_method, version).contents[attr]
112
+ msg_obj = message.new({ attr => mock_value })
113
+ ret = (msg_obj.send("#{attr}=", mock_value))
114
+ msg_obj.send(attr).should == mock_value
115
+ ret.should == mock_value
116
+ end
117
+
118
+ unless described_class.schema.schemas[attr].kind_of? Membrane::Schema::Any
119
+ it "should raise an error if the wrong type is written" do
120
+ mock_value = component.send(mock_method, version).contents[attr]
121
+
122
+ schema = message.schema.schemas[attr]
123
+ unallowed_classes = get_unallowed_classes(schema)
124
+ bad_value = default_value(unallowed_classes.to_a[0])
125
+
126
+ msg_obj = message.new
127
+
128
+ expect {
129
+ msg_obj.send("#{attr}=", bad_value)
130
+ }.to raise_error(Schemata::UpdateAttributeError)
131
+ end
132
+ end
133
+ end
134
+ end
135
+ end
@@ -0,0 +1,171 @@
1
+ shared_examples "a message type" do
2
+
3
+ versions = described_class.constants.select {|x| x =~ /V[0-9]+/ }
4
+ .map {|x| x.to_s[1..-1].to_i}
5
+
6
+ let(:message_type_name) { described_class.name.split("::")[2] }
7
+ let(:message_type) { described_class }
8
+ let(:component_name) { described_class.name.split("::")[1] }
9
+ let(:component) { Schemata::const_get(component_name) }
10
+
11
+ let(:mock_method) { "mock_#{decamelize(message_type_name)}" }
12
+
13
+ describe ".decode" do
14
+ context "when the current version is 1" do
15
+ before :each do
16
+ set_current_version(message_type, 1)
17
+ end
18
+
19
+ after :each do
20
+ reset_version(message_type)
21
+ end
22
+
23
+ it "should return a V1 object given a flat hash" do
24
+ data = component.send(mock_method, 1).contents
25
+ json = Yajl::Encoder.encode(data)
26
+ msg_obj = message_type.decode(json)
27
+ msg_obj.class.should == message_type::V1
28
+
29
+ message_type::V1.schema.schemas.keys do |key|
30
+ msg_obj.send(key).should == data[key]
31
+ end
32
+ end
33
+
34
+ it "should return a V1 object given a V1-encoded json" do
35
+ data = component.send(mock_method, 1).contents
36
+
37
+ msg_hash = {"V1" => data, "min_version" => 1}
38
+ json = Yajl::Encoder.encode(msg_hash)
39
+
40
+ msg_obj = message_type.decode(json)
41
+ msg_obj.class.should == message_type::V1
42
+
43
+ message_type::V1.schema.schemas.keys do |key|
44
+ msg_obj.send(key).should == data[key]
45
+ end
46
+ end
47
+
48
+ it "should return a V1 object given a mixed (V1-encoded + flat hash) json" do
49
+ data = component.send(mock_method, 1).contents
50
+ msg_hash = {
51
+ "V1" => data,
52
+ "min_version" => 1
53
+ }.merge(Schemata::HashCopyHelpers.deep_copy(data))
54
+ json = Yajl::Encoder.encode(msg_hash)
55
+
56
+ msg_obj = message_type.decode(json)
57
+ msg_obj.class.should == message_type::V1
58
+
59
+ message_type::V1.schema.schemas.keys do |key|
60
+ msg_obj.send(key).should == data[key]
61
+ end
62
+ end
63
+
64
+ it "should return a V1 object when given a V2-encoded json" do
65
+ v2_hash = component.send(mock_method, 1).contents
66
+ msg_hash = {
67
+ "V2" => v2_hash,
68
+ "V1" => {},
69
+ "min_version" => 1
70
+ }
71
+ json = Yajl::Encoder.encode(msg_hash)
72
+
73
+ msg_obj = message_type.decode(json)
74
+ msg_obj.class.should == message_type::V1
75
+
76
+ message_type::V1.schema.schemas.keys do |key|
77
+ msg_obj.send(key).should == data[key]
78
+ end
79
+ end
80
+
81
+ it "should raise an error if the input does not have the valid Schemata \
82
+ structure or a complete flash hash" do
83
+ mock_obj = component.send(mock_method, 1)
84
+ mock_hash = mock_obj.contents
85
+
86
+ if num_mandatory_fields(mock_obj) > 1
87
+ first_key = mock_hash.keys[0]
88
+ first_value = mock_hash[first_key]
89
+
90
+ json = Yajl::Encoder.encode({ first_key => first_value})
91
+ else
92
+ json = Yajl::Encoder.encode({})
93
+ end
94
+ expect {
95
+ msg_obj = message_type.decode(json)
96
+ }.to raise_error(Schemata::DecodeError)
97
+ end
98
+ end
99
+ end
100
+
101
+ if versions.include?(2)
102
+ context "when current version is 2" do
103
+ before :each do
104
+ set_current_version(message_type, 2)
105
+ end
106
+
107
+ after :each do
108
+ reset_version(message_type)
109
+ end
110
+
111
+ it "should raise an error given a flat hash" do
112
+ data = component.send(mock_method, 2).contents
113
+ json = Yajl::Encoder.encode(data)
114
+ expect {
115
+ msg_obj = message_type.decode(json)
116
+ }.to raise_error(Schemata::DecodeError)
117
+ end
118
+
119
+ it "should return a V2 object a given a mixed (flat hash + V1-encoded) json" do
120
+ msg_hash = component.send(mock_method, 2).contents
121
+ v1_hash = Schemata::HashCopyHelpers.deep_copy(msg_hash)
122
+ msg_hash["V1"] = v1_hash
123
+ msg_hash["min_version"] = 1
124
+
125
+ json = Yajl::Encoder.encode(msg_hash)
126
+
127
+ msg_obj = message_type.decode(json)
128
+ msg_obj.class.should == message_type::V2
129
+
130
+ message_type::V2.schema.schemas.keys.each do |key|
131
+ msg_obj.send(key).should == v1_hash[key]
132
+ end
133
+ end
134
+
135
+ it "should return a V2 object given a V1-encoded json" do
136
+ v1_hash = component.send(mock_method, 1).contents
137
+ msg_hash = {"V1" => v1_hash, 'min_version' => 1}
138
+
139
+ json = Yajl::Encoder.encode(msg_hash)
140
+
141
+ msg_obj = message_type.decode(json)
142
+ msg_obj.class.should == message_type::V2
143
+
144
+ message_type::V2.schema.schemas.keys.each do |key|
145
+ msg_obj.send(key).should == v1_hash[key]
146
+ end
147
+ end
148
+
149
+ it "should return a V2 object given a V2-encoded object" do
150
+ data = component.send(mock_method, 2).contents
151
+ v2_hash = Schemata::HashCopyHelpers.deep_copy(data)
152
+ msg_hash = {"V2" => v2_hash, "V1" => {}, "min_version" => 1}
153
+
154
+ json = Yajl::Encoder.encode(msg_hash)
155
+
156
+ msg_obj = message_type.decode(json)
157
+ msg_obj.class.should == message_type::V2
158
+
159
+ message_type::V2.schema.schemas.keys.each do |key|
160
+ msg_obj.send(key).should == data[key]
161
+ end
162
+ end
163
+ end
164
+ end
165
+
166
+ # The first two versions have exceptional behavior, starting from
167
+ # version 3, all versions should have the same unit tests
168
+ versions.select { |x| x > 2 }.each do |version|
169
+
170
+ end
171
+ end
metadata ADDED
@@ -0,0 +1,240 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: schemata-health_manager
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.beta1
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - dsabeti
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-12-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: membrane
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: yajl-ruby
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: vcap_common
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: ci_reporter
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: rake
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rspec
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ description: ! " Specify schema for Health Manager messages and validate messages\n
111
+ \ against defined schema\n"
112
+ email:
113
+ - support@cloudfoundry.org
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - lib/schemata/health_manager/status_request.rb
119
+ - lib/schemata/health_manager/status_crashed_response.rb
120
+ - lib/schemata/health_manager/status_flapping_response.rb
121
+ - lib/schemata/health_manager/status_flapping_response/status_flapping_response_v1.rb
122
+ - lib/schemata/health_manager/health_request/health_request_v1.rb
123
+ - lib/schemata/health_manager/health_response/health_response.rb
124
+ - lib/schemata/health_manager/version.rb
125
+ - lib/schemata/health_manager/health_request.rb
126
+ - lib/schemata/health_manager/health_response.rb
127
+ - lib/schemata/health_manager/status_request/status_request_v1.rb
128
+ - lib/schemata/health_manager/status_crashed_response/status_crashed_response_v1.rb
129
+ - lib/schemata/health_manager.rb
130
+ - lib/schemata/common/msgtypebase.rb
131
+ - lib/schemata/common/parsed_msg.rb
132
+ - lib/schemata/common/msgbase.rb
133
+ - lib/schemata/common/error.rb
134
+ - lib/schemata/helpers/stringify.rb
135
+ - lib/schemata/helpers/hash_copy.rb
136
+ - spec/cloud_controller/cloud_controller_spec.rb
137
+ - spec/cloud_controller/droplet_updated_message_spec.rb
138
+ - spec/cloud_controller/hm_start_request_spec.rb
139
+ - spec/cloud_controller/hm_stop_request_spec.rb
140
+ - spec/common/helpers_spec.rb
141
+ - spec/common/parsed_msg_spec.rb
142
+ - spec/component/aux_data_spec.rb
143
+ - spec/component/component_bar_spec.rb
144
+ - spec/component/component_foo_spec.rb
145
+ - spec/component/foo_spec.rb
146
+ - spec/component2/component2_bar_spec.rb
147
+ - spec/dea/advertise_message_spec.rb
148
+ - spec/dea/dea_spec.rb
149
+ - spec/dea/dea_status_response_spec.rb
150
+ - spec/dea/discover_request_spec.rb
151
+ - spec/dea/droplet_status_response_spec.rb
152
+ - spec/dea/exit_message_spec.rb
153
+ - spec/dea/find_droplet_request_spec.rb
154
+ - spec/dea/find_droplet_response_spec.rb
155
+ - spec/dea/heartbeat_response_spec.rb
156
+ - spec/dea/hello_message_spec.rb
157
+ - spec/dea/start_request_spec.rb
158
+ - spec/dea/stop_request_spec.rb
159
+ - spec/dea/update_request_spec.rb
160
+ - spec/health_manager/health_manager_spec.rb
161
+ - spec/health_manager/health_request_spec.rb
162
+ - spec/health_manager/health_response_spec.rb
163
+ - spec/health_manager/status_crashed_response_spec.rb
164
+ - spec/health_manager/status_flapping_response_spec.rb
165
+ - spec/health_manager/status_request_spec.rb
166
+ - spec/router/register_request_spec.rb
167
+ - spec/router/router_spec.rb
168
+ - spec/router/start_message_spec.rb
169
+ - spec/spec_helper.rb
170
+ - spec/staging/staging_message_spec.rb
171
+ - spec/staging/staging_spec.rb
172
+ - spec/support/component_helpers.rb
173
+ - spec/support/helpers.rb
174
+ - spec/support/message_helpers.rb
175
+ - spec/support/message_type_helpers.rb
176
+ homepage: http://www.cloudfoundry.org
177
+ licenses: []
178
+ post_install_message:
179
+ rdoc_options: []
180
+ require_paths:
181
+ - lib
182
+ required_ruby_version: !ruby/object:Gem::Requirement
183
+ none: false
184
+ requirements:
185
+ - - ! '>='
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
+ none: false
190
+ requirements:
191
+ - - ! '>'
192
+ - !ruby/object:Gem::Version
193
+ version: 1.3.1
194
+ requirements: []
195
+ rubyforge_project:
196
+ rubygems_version: 1.8.24
197
+ signing_key:
198
+ specification_version: 3
199
+ summary: validation for cloundfoundry health manager messages
200
+ test_files:
201
+ - spec/cloud_controller/cloud_controller_spec.rb
202
+ - spec/cloud_controller/droplet_updated_message_spec.rb
203
+ - spec/cloud_controller/hm_start_request_spec.rb
204
+ - spec/cloud_controller/hm_stop_request_spec.rb
205
+ - spec/common/helpers_spec.rb
206
+ - spec/common/parsed_msg_spec.rb
207
+ - spec/component/aux_data_spec.rb
208
+ - spec/component/component_bar_spec.rb
209
+ - spec/component/component_foo_spec.rb
210
+ - spec/component/foo_spec.rb
211
+ - spec/component2/component2_bar_spec.rb
212
+ - spec/dea/advertise_message_spec.rb
213
+ - spec/dea/dea_spec.rb
214
+ - spec/dea/dea_status_response_spec.rb
215
+ - spec/dea/discover_request_spec.rb
216
+ - spec/dea/droplet_status_response_spec.rb
217
+ - spec/dea/exit_message_spec.rb
218
+ - spec/dea/find_droplet_request_spec.rb
219
+ - spec/dea/find_droplet_response_spec.rb
220
+ - spec/dea/heartbeat_response_spec.rb
221
+ - spec/dea/hello_message_spec.rb
222
+ - spec/dea/start_request_spec.rb
223
+ - spec/dea/stop_request_spec.rb
224
+ - spec/dea/update_request_spec.rb
225
+ - spec/health_manager/health_manager_spec.rb
226
+ - spec/health_manager/health_request_spec.rb
227
+ - spec/health_manager/health_response_spec.rb
228
+ - spec/health_manager/status_crashed_response_spec.rb
229
+ - spec/health_manager/status_flapping_response_spec.rb
230
+ - spec/health_manager/status_request_spec.rb
231
+ - spec/router/register_request_spec.rb
232
+ - spec/router/router_spec.rb
233
+ - spec/router/start_message_spec.rb
234
+ - spec/spec_helper.rb
235
+ - spec/staging/staging_message_spec.rb
236
+ - spec/staging/staging_spec.rb
237
+ - spec/support/component_helpers.rb
238
+ - spec/support/helpers.rb
239
+ - spec/support/message_helpers.rb
240
+ - spec/support/message_type_helpers.rb