schemata-cloud_controller 0.0.1.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/schemata/cloud_controller/droplet_updated_message/droplet_updated_message_v1.rb +35 -0
- data/lib/schemata/cloud_controller/droplet_updated_message.rb +13 -0
- data/lib/schemata/cloud_controller/hm_start_request/hm_start_request_v1.rb +41 -0
- data/lib/schemata/cloud_controller/hm_start_request.rb +13 -0
- data/lib/schemata/cloud_controller/hm_stop_request/hm_stop_request_v1.rb +39 -0
- data/lib/schemata/cloud_controller/hm_stop_request.rb +13 -0
- data/lib/schemata/cloud_controller/version.rb +5 -0
- data/lib/schemata/cloud_controller.rb +19 -0
- data/lib/schemata/common/error.rb +18 -0
- data/lib/schemata/common/msgbase.rb +282 -0
- data/lib/schemata/common/msgtypebase.rb +144 -0
- data/lib/schemata/common/parsed_msg.rb +43 -0
- data/lib/schemata/helpers/hash_copy.rb +28 -0
- data/lib/schemata/helpers/stringify.rb +26 -0
- data/spec/cloud_controller/cloud_controller_spec.rb +6 -0
- data/spec/cloud_controller/droplet_updated_message_spec.rb +10 -0
- data/spec/cloud_controller/hm_start_request_spec.rb +11 -0
- data/spec/cloud_controller/hm_stop_request_spec.rb +12 -0
- data/spec/common/helpers_spec.rb +115 -0
- data/spec/common/parsed_msg_spec.rb +46 -0
- data/spec/component/aux_data_spec.rb +37 -0
- data/spec/component/component_bar_spec.rb +140 -0
- data/spec/component/component_foo_spec.rb +630 -0
- data/spec/component/foo_spec.rb +214 -0
- data/spec/component2/component2_bar_spec.rb +140 -0
- data/spec/dea/advertise_message_spec.rb +10 -0
- data/spec/dea/dea_spec.rb +6 -0
- data/spec/dea/dea_status_response_spec.rb +10 -0
- data/spec/dea/discover_request_spec.rb +10 -0
- data/spec/dea/droplet_status_response_spec.rb +10 -0
- data/spec/dea/exit_message_spec.rb +10 -0
- data/spec/dea/find_droplet_request_spec.rb +27 -0
- data/spec/dea/find_droplet_response_spec.rb +10 -0
- data/spec/dea/heartbeat_response_spec.rb +10 -0
- data/spec/dea/hello_message_spec.rb +10 -0
- data/spec/dea/start_request_spec.rb +10 -0
- data/spec/dea/stop_request_spec.rb +10 -0
- data/spec/dea/update_request_spec.rb +0 -0
- data/spec/health_manager/health_manager_spec.rb +6 -0
- data/spec/health_manager/health_request_spec.rb +12 -0
- data/spec/health_manager/health_response_spec.rb +12 -0
- data/spec/health_manager/status_crashed_response_spec.rb +12 -0
- data/spec/health_manager/status_flapping_response_spec.rb +12 -0
- data/spec/health_manager/status_request_spec.rb +12 -0
- data/spec/router/register_request_spec.rb +10 -0
- data/spec/router/router_spec.rb +6 -0
- data/spec/router/start_message_spec.rb +10 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/staging/staging_message_spec.rb +14 -0
- data/spec/staging/staging_spec.rb +6 -0
- data/spec/support/component_helpers.rb +51 -0
- data/spec/support/helpers.rb +102 -0
- data/spec/support/message_helpers.rb +135 -0
- data/spec/support/message_type_helpers.rb +171 -0
- metadata +220 -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,220 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: schemata-cloud_controller
|
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-11-21 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: ci_reporter
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
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: rake
|
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: rspec
|
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
|
+
description: ! " Specify schema for cloud controller messages and validate messages\n
|
95
|
+
\ against defined schema\n"
|
96
|
+
email:
|
97
|
+
- support@cloudfoundry.org
|
98
|
+
executables: []
|
99
|
+
extensions: []
|
100
|
+
extra_rdoc_files: []
|
101
|
+
files:
|
102
|
+
- lib/schemata/cloud_controller.rb
|
103
|
+
- lib/schemata/common/msgtypebase.rb
|
104
|
+
- lib/schemata/common/parsed_msg.rb
|
105
|
+
- lib/schemata/common/msgbase.rb
|
106
|
+
- lib/schemata/common/error.rb
|
107
|
+
- lib/schemata/cloud_controller/hm_start_request.rb
|
108
|
+
- lib/schemata/cloud_controller/version.rb
|
109
|
+
- lib/schemata/cloud_controller/hm_stop_request/hm_stop_request_v1.rb
|
110
|
+
- lib/schemata/cloud_controller/hm_start_request/hm_start_request_v1.rb
|
111
|
+
- lib/schemata/cloud_controller/hm_stop_request.rb
|
112
|
+
- lib/schemata/cloud_controller/droplet_updated_message/droplet_updated_message_v1.rb
|
113
|
+
- lib/schemata/cloud_controller/droplet_updated_message.rb
|
114
|
+
- lib/schemata/helpers/stringify.rb
|
115
|
+
- lib/schemata/helpers/hash_copy.rb
|
116
|
+
- spec/cloud_controller/cloud_controller_spec.rb
|
117
|
+
- spec/cloud_controller/droplet_updated_message_spec.rb
|
118
|
+
- spec/cloud_controller/hm_start_request_spec.rb
|
119
|
+
- spec/cloud_controller/hm_stop_request_spec.rb
|
120
|
+
- spec/common/helpers_spec.rb
|
121
|
+
- spec/common/parsed_msg_spec.rb
|
122
|
+
- spec/component/aux_data_spec.rb
|
123
|
+
- spec/component/component_bar_spec.rb
|
124
|
+
- spec/component/component_foo_spec.rb
|
125
|
+
- spec/component/foo_spec.rb
|
126
|
+
- spec/component2/component2_bar_spec.rb
|
127
|
+
- spec/dea/advertise_message_spec.rb
|
128
|
+
- spec/dea/dea_spec.rb
|
129
|
+
- spec/dea/dea_status_response_spec.rb
|
130
|
+
- spec/dea/discover_request_spec.rb
|
131
|
+
- spec/dea/droplet_status_response_spec.rb
|
132
|
+
- spec/dea/exit_message_spec.rb
|
133
|
+
- spec/dea/find_droplet_request_spec.rb
|
134
|
+
- spec/dea/find_droplet_response_spec.rb
|
135
|
+
- spec/dea/heartbeat_response_spec.rb
|
136
|
+
- spec/dea/hello_message_spec.rb
|
137
|
+
- spec/dea/start_request_spec.rb
|
138
|
+
- spec/dea/stop_request_spec.rb
|
139
|
+
- spec/dea/update_request_spec.rb
|
140
|
+
- spec/health_manager/health_manager_spec.rb
|
141
|
+
- spec/health_manager/health_request_spec.rb
|
142
|
+
- spec/health_manager/health_response_spec.rb
|
143
|
+
- spec/health_manager/status_crashed_response_spec.rb
|
144
|
+
- spec/health_manager/status_flapping_response_spec.rb
|
145
|
+
- spec/health_manager/status_request_spec.rb
|
146
|
+
- spec/router/register_request_spec.rb
|
147
|
+
- spec/router/router_spec.rb
|
148
|
+
- spec/router/start_message_spec.rb
|
149
|
+
- spec/spec_helper.rb
|
150
|
+
- spec/staging/staging_message_spec.rb
|
151
|
+
- spec/staging/staging_spec.rb
|
152
|
+
- spec/support/component_helpers.rb
|
153
|
+
- spec/support/helpers.rb
|
154
|
+
- spec/support/message_helpers.rb
|
155
|
+
- spec/support/message_type_helpers.rb
|
156
|
+
homepage: http://www.cloudfoundry.org
|
157
|
+
licenses: []
|
158
|
+
post_install_message:
|
159
|
+
rdoc_options: []
|
160
|
+
require_paths:
|
161
|
+
- lib
|
162
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - ! '>='
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ! '>'
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 1.3.1
|
174
|
+
requirements: []
|
175
|
+
rubyforge_project:
|
176
|
+
rubygems_version: 1.8.24
|
177
|
+
signing_key:
|
178
|
+
specification_version: 3
|
179
|
+
summary: validation for cloundfoundry cloud controller messages
|
180
|
+
test_files:
|
181
|
+
- spec/cloud_controller/cloud_controller_spec.rb
|
182
|
+
- spec/cloud_controller/droplet_updated_message_spec.rb
|
183
|
+
- spec/cloud_controller/hm_start_request_spec.rb
|
184
|
+
- spec/cloud_controller/hm_stop_request_spec.rb
|
185
|
+
- spec/common/helpers_spec.rb
|
186
|
+
- spec/common/parsed_msg_spec.rb
|
187
|
+
- spec/component/aux_data_spec.rb
|
188
|
+
- spec/component/component_bar_spec.rb
|
189
|
+
- spec/component/component_foo_spec.rb
|
190
|
+
- spec/component/foo_spec.rb
|
191
|
+
- spec/component2/component2_bar_spec.rb
|
192
|
+
- spec/dea/advertise_message_spec.rb
|
193
|
+
- spec/dea/dea_spec.rb
|
194
|
+
- spec/dea/dea_status_response_spec.rb
|
195
|
+
- spec/dea/discover_request_spec.rb
|
196
|
+
- spec/dea/droplet_status_response_spec.rb
|
197
|
+
- spec/dea/exit_message_spec.rb
|
198
|
+
- spec/dea/find_droplet_request_spec.rb
|
199
|
+
- spec/dea/find_droplet_response_spec.rb
|
200
|
+
- spec/dea/heartbeat_response_spec.rb
|
201
|
+
- spec/dea/hello_message_spec.rb
|
202
|
+
- spec/dea/start_request_spec.rb
|
203
|
+
- spec/dea/stop_request_spec.rb
|
204
|
+
- spec/dea/update_request_spec.rb
|
205
|
+
- spec/health_manager/health_manager_spec.rb
|
206
|
+
- spec/health_manager/health_request_spec.rb
|
207
|
+
- spec/health_manager/health_response_spec.rb
|
208
|
+
- spec/health_manager/status_crashed_response_spec.rb
|
209
|
+
- spec/health_manager/status_flapping_response_spec.rb
|
210
|
+
- spec/health_manager/status_request_spec.rb
|
211
|
+
- spec/router/register_request_spec.rb
|
212
|
+
- spec/router/router_spec.rb
|
213
|
+
- spec/router/start_message_spec.rb
|
214
|
+
- spec/spec_helper.rb
|
215
|
+
- spec/staging/staging_message_spec.rb
|
216
|
+
- spec/staging/staging_spec.rb
|
217
|
+
- spec/support/component_helpers.rb
|
218
|
+
- spec/support/helpers.rb
|
219
|
+
- spec/support/message_helpers.rb
|
220
|
+
- spec/support/message_type_helpers.rb
|