right_infrastructure_agent 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +10 -0
- data/README.rdoc +65 -0
- data/Rakefile +86 -0
- data/lib/right_infrastructure_agent.rb +26 -0
- data/lib/right_infrastructure_agent/command_constants.rb +34 -0
- data/lib/right_infrastructure_agent/global_object_replicator_sink.rb +337 -0
- data/lib/right_infrastructure_agent/global_object_replicator_source.rb +117 -0
- data/lib/right_infrastructure_agent/infrastructure_auth_client.rb +88 -0
- data/lib/right_infrastructure_agent/infrastructure_helpers.rb +85 -0
- data/lib/right_infrastructure_agent/login_policy_factory.rb +137 -0
- data/lib/right_infrastructure_agent/models_helper.rb +483 -0
- data/lib/right_infrastructure_agent/rainbows_agent_controller.rb +192 -0
- data/lib/right_infrastructure_agent/scripts/infrastructure_agent_deployer.rb +278 -0
- data/right_infrastructure_agent.gemspec +54 -0
- data/spec/global_object_replicator_sink_spec.rb +305 -0
- data/spec/global_object_replicator_source_spec.rb +113 -0
- data/spec/infrastructure_auth_client_spec.rb +140 -0
- data/spec/infrastructure_helpers_spec.rb +80 -0
- data/spec/login_policy_factory_spec.rb +279 -0
- data/spec/models_helper_spec.rb +546 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +85 -0
- metadata +116 -0
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# Copyright (c) 2009-2011 RightScale, Inc, All Rights Reserved Worldwide.
|
2
|
+
#
|
3
|
+
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
|
4
|
+
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
|
5
|
+
# reproduction, modification, or disclosure of this program is
|
6
|
+
# strictly prohibited. Any use of this program by an authorized
|
7
|
+
# licensee is strictly subject to the terms and conditions,
|
8
|
+
# including confidentiality obligations, set forth in the applicable
|
9
|
+
# License Agreement between RightScale.com, Inc. and
|
10
|
+
# the licensee.
|
11
|
+
|
12
|
+
require 'rubygems'
|
13
|
+
require 'bundler/setup'
|
14
|
+
|
15
|
+
require 'flexmock'
|
16
|
+
require 'rspec'
|
17
|
+
require 'eventmachine'
|
18
|
+
require 'fileutils'
|
19
|
+
|
20
|
+
module ActiveRecord
|
21
|
+
class ActiveRecordError < Exception; end
|
22
|
+
class StatementInvalid < ActiveRecordError; end
|
23
|
+
class RecordNotFound < Exception; end
|
24
|
+
class Base; end
|
25
|
+
module ConnectionAdapters
|
26
|
+
class AbstractAdapter; end
|
27
|
+
class MysqlAdapter < AbstractAdapter
|
28
|
+
LOST_CONNECTION_ERROR_MESSAGES = []
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
class MysqlError < Exception; end
|
34
|
+
|
35
|
+
# This lets us avoid putting right_agent into the Gemfile, which helps us keep
|
36
|
+
# r_a separate from right_infrastructure_agent
|
37
|
+
lib_dir = File.expand_path('../../../right_agent/lib', __FILE__)
|
38
|
+
$: << lib_dir if File.exist?(lib_dir)
|
39
|
+
|
40
|
+
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'right_infrastructure_agent'))
|
41
|
+
|
42
|
+
RSpec.configure do |c|
|
43
|
+
c.mock_with(:flexmock)
|
44
|
+
end
|
45
|
+
|
46
|
+
RightScale::Log.init
|
47
|
+
|
48
|
+
$TESTING = true
|
49
|
+
$VERBOSE = nil # Disable constant redefined warning
|
50
|
+
TEST_SOCKET_PORT = 80000
|
51
|
+
|
52
|
+
module RightScale
|
53
|
+
|
54
|
+
module SpecHelper
|
55
|
+
|
56
|
+
# Create test certificate
|
57
|
+
def issue_cert
|
58
|
+
test_dn = { 'C' => 'US',
|
59
|
+
'ST' => 'California',
|
60
|
+
'L' => 'Santa Barbara',
|
61
|
+
'O' => 'Agent',
|
62
|
+
'OU' => 'Certification Services',
|
63
|
+
'CN' => 'Agent test' }
|
64
|
+
dn = DistinguishedName.new(test_dn)
|
65
|
+
key = RsaKeyPair.new
|
66
|
+
[ Certificate.new(key, dn, dn), key ]
|
67
|
+
end
|
68
|
+
|
69
|
+
end # SpecHelper
|
70
|
+
|
71
|
+
class Log
|
72
|
+
|
73
|
+
# Monkey path RightAgent logger to not log by default
|
74
|
+
# Define env var RS_LOG to override this behavior and have the logger log normally
|
75
|
+
class << self
|
76
|
+
alias :original_method_missing :method_missing
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.method_missing(m, *args)
|
80
|
+
original_method_missing(m, *args) unless [:debug, :info, :warn, :warning, :error, :fatal].include?(m) && ENV['RS_LOG'].nil?
|
81
|
+
end
|
82
|
+
|
83
|
+
end # Log
|
84
|
+
|
85
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: right_infrastructure_agent
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lee Kirchhoff
|
8
|
+
- Raphael Simon
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: right_support
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.1'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.1'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: right_amqp
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0.4'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.4'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: right_agent
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.0'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.0'
|
56
|
+
description: |2
|
57
|
+
RightInfrastructureAgent provides the foundation for RightScale infrastructure
|
58
|
+
servers that connect into the RightScale system via the RabbitMQ message bus.
|
59
|
+
It extends RightAgent in configuration, monitoring, and packet handling areas
|
60
|
+
as needed generically by infrastructure servers.
|
61
|
+
email: lee@rightscale.com
|
62
|
+
executables: []
|
63
|
+
extensions: []
|
64
|
+
extra_rdoc_files:
|
65
|
+
- README.rdoc
|
66
|
+
files:
|
67
|
+
- LICENSE
|
68
|
+
- README.rdoc
|
69
|
+
- Rakefile
|
70
|
+
- lib/right_infrastructure_agent.rb
|
71
|
+
- lib/right_infrastructure_agent/command_constants.rb
|
72
|
+
- lib/right_infrastructure_agent/global_object_replicator_sink.rb
|
73
|
+
- lib/right_infrastructure_agent/global_object_replicator_source.rb
|
74
|
+
- lib/right_infrastructure_agent/infrastructure_auth_client.rb
|
75
|
+
- lib/right_infrastructure_agent/infrastructure_helpers.rb
|
76
|
+
- lib/right_infrastructure_agent/login_policy_factory.rb
|
77
|
+
- lib/right_infrastructure_agent/models_helper.rb
|
78
|
+
- lib/right_infrastructure_agent/rainbows_agent_controller.rb
|
79
|
+
- lib/right_infrastructure_agent/scripts/infrastructure_agent_deployer.rb
|
80
|
+
- right_infrastructure_agent.gemspec
|
81
|
+
- spec/global_object_replicator_sink_spec.rb
|
82
|
+
- spec/global_object_replicator_source_spec.rb
|
83
|
+
- spec/infrastructure_auth_client_spec.rb
|
84
|
+
- spec/infrastructure_helpers_spec.rb
|
85
|
+
- spec/login_policy_factory_spec.rb
|
86
|
+
- spec/models_helper_spec.rb
|
87
|
+
- spec/spec.opts
|
88
|
+
- spec/spec_helper.rb
|
89
|
+
homepage: https://github.com/rightscale/right_infrastructure_agent
|
90
|
+
licenses: []
|
91
|
+
metadata: {}
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options:
|
94
|
+
- "--main"
|
95
|
+
- README.rdoc
|
96
|
+
- "--title"
|
97
|
+
- RightInfrastructureAgent
|
98
|
+
require_paths:
|
99
|
+
- lib
|
100
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 1.8.7
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
requirements: []
|
111
|
+
rubyforge_project:
|
112
|
+
rubygems_version: 2.2.2
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: RightAgent extension for use by RightScale infrastructure servers
|
116
|
+
test_files: []
|