rboss 0.9.1 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +5 -0
- data/.idea/modules.xml +9 -0
- data/.idea/rboss.iml +65 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/Gemfile +2 -2
- data/README.md +34 -397
- data/bin/rboss-cli +77 -28
- data/lib/rboss.rb +10 -12
- data/lib/rboss/cli/invoker.rb +31 -18
- data/lib/rboss/cli/mappings.rb +11 -10
- data/lib/rboss/cli/mappings/resources/connector.yaml +2 -2
- data/lib/rboss/cli/mappings/resources/datasource.yaml +5 -5
- data/lib/rboss/cli/mappings/resources/deployment-scanner.yaml +3 -3
- data/lib/rboss/cli/mappings/resources/interface.yaml +2 -2
- data/lib/rboss/cli/mappings/resources/jdbc-driver.yaml +12 -0
- data/lib/rboss/cli/mappings/resources/jms-queue.yaml +44 -0
- data/lib/rboss/cli/mappings/resources/runtime.yaml +34 -0
- data/lib/rboss/cli/mappings/resources/server.yaml +8 -8
- data/lib/rboss/cli/resource.rb +60 -37
- data/lib/rboss/cli/result_parser.rb +29 -5
- data/lib/rboss/plaftorm.rb +2 -25
- data/lib/rboss/utils.rb +2 -8
- data/lib/rboss/version.rb +1 -1
- data/lib/rboss/view/colorizers.rb +4 -2
- data/lib/rboss/view/formatters.rb +37 -0
- data/lib/rboss/view/table_builder.rb +2 -2
- data/rboss-cli-bash-completion +82 -0
- data/rboss.gemspec +12 -12
- data/rboss.iml +6 -7
- data/rboss.ipr +2 -11
- metadata +23 -53
- data/bin/rboss-profile +0 -125
- data/bin/rboss-twiddle +0 -204
- data/lib/rboss/bin/command_actions.rb +0 -125
- data/lib/rboss/cli/mappings/resources/jdbc_driver.yaml +0 -12
- data/lib/rboss/component_processor.rb +0 -179
- data/lib/rboss/components/component.rb +0 -58
- data/lib/rboss/components/datasource.rb +0 -179
- data/lib/rboss/components/deploy_folder.rb +0 -104
- data/lib/rboss/components/hypersonic_replacer.rb +0 -58
- data/lib/rboss/components/jbossweb.rb +0 -119
- data/lib/rboss/components/jmx.rb +0 -88
- data/lib/rboss/components/mod_cluster.rb +0 -81
- data/lib/rboss/components/org/6.0/deploy_folder.rb +0 -33
- data/lib/rboss/components/org/jmx.rb +0 -59
- data/lib/rboss/components/profile_folder.rb +0 -44
- data/lib/rboss/components/resource.rb +0 -52
- data/lib/rboss/components/restore_slimming.rb +0 -46
- data/lib/rboss/components/run_conf.rb +0 -90
- data/lib/rboss/components/run_conf.yaml +0 -22
- data/lib/rboss/components/service_script.rb +0 -55
- data/lib/rboss/components/slimming.rb +0 -107
- data/lib/rboss/components/slimming.yaml +0 -110
- data/lib/rboss/components/soa-p/hypersonic_replacer.rb +0 -79
- data/lib/rboss/components/soa-p/jmx.rb +0 -47
- data/lib/rboss/components/xadatasource.rb +0 -67
- data/lib/rboss/file_processor.rb +0 -111
- data/lib/rboss/jboss_path.rb +0 -74
- data/lib/rboss/jboss_profile.rb +0 -350
- data/lib/rboss/resources/jboss_init_redhat.sh.erb +0 -140
- data/lib/rboss/resources/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml +0 -282
- data/lib/rboss/resources/mod_cluster.sar/mod_cluster-1.1.2.Final.jar +0 -0
- data/lib/rboss/resources/run.conf.bat.erb +0 -60
- data/lib/rboss/resources/run.conf.erb +0 -62
- data/lib/rboss/twiddle.rb +0 -25
- data/lib/rboss/twiddle/base_monitor.rb +0 -88
- data/lib/rboss/twiddle/mbean.rb +0 -148
- data/lib/rboss/twiddle/monitor.rb +0 -222
- data/lib/rboss/twiddle/twiddle.rb +0 -87
@@ -1,87 +0,0 @@
|
|
1
|
-
# The MIT License
|
2
|
-
#
|
3
|
-
# Copyright (c) 2011-2012 Marcelo Guimarães <ataxexe@gmail.com>
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
|
-
require 'logger'
|
24
|
-
|
25
|
-
module RBoss
|
26
|
-
module Twiddle
|
27
|
-
class Invoker
|
28
|
-
include RBoss::Platform
|
29
|
-
|
30
|
-
attr_reader :server, :host, :port, :user, :password
|
31
|
-
attr_accessor :command
|
32
|
-
|
33
|
-
def initialize params = {}
|
34
|
-
params = {
|
35
|
-
:jboss_home => ENV["JBOSS_HOME"],
|
36
|
-
:server => nil,
|
37
|
-
:host => '127.0.0.1',
|
38
|
-
:port => 1099,
|
39
|
-
:user => "admin",
|
40
|
-
:password => "admin"
|
41
|
-
}.merge! params
|
42
|
-
@jboss_home = params[:jboss_home]
|
43
|
-
|
44
|
-
@server = params[:server]
|
45
|
-
@host = params[:host]
|
46
|
-
@port = params[:port]
|
47
|
-
@server ||= [@host, @port].join ':'
|
48
|
-
|
49
|
-
@user = params[:user]
|
50
|
-
@password = params[:password]
|
51
|
-
|
52
|
-
@command = "#{twiddle} -s #{@server} -u '#{@user}' -p '#{@password}'"
|
53
|
-
|
54
|
-
@logger = params[:logger]
|
55
|
-
unless @logger
|
56
|
-
@logger = Logger::new STDOUT
|
57
|
-
@logger.level = params[:log_level] || Logger::INFO
|
58
|
-
formatter = Logger::Formatter.new
|
59
|
-
|
60
|
-
def formatter.call(severity, time, program_name, message)
|
61
|
-
"#{severity} : #{message}\n"
|
62
|
-
end
|
63
|
-
|
64
|
-
@logger.formatter = formatter
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def home
|
69
|
-
@jboss_home
|
70
|
-
end
|
71
|
-
|
72
|
-
def shell operation, *arguments
|
73
|
-
"#{command} #{operation} #{arguments.join " "}"
|
74
|
-
end
|
75
|
-
|
76
|
-
def execute command, *arguments
|
77
|
-
exec = shell command, arguments
|
78
|
-
@logger.debug exec
|
79
|
-
result = `#{exec}`.chomp
|
80
|
-
return nil if result["ERROR [Twiddle] Command failure"]
|
81
|
-
result
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
end
|
87
|
-
end
|