vas 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vas/gemfire/cache_server_node_instances.rb +10 -0
- data/lib/vas/gemfire/locator_instances.rb +25 -1
- data/lib/vas/gemfire/locator_node_instances.rb +7 -1
- data/lib/vas/shared/instance.rb +16 -0
- data/lib/vas/sqlfire/server_node_instances.rb +10 -0
- data/lib/vas/web_server/installation_images.rb +8 -0
- metadata +75 -93
@@ -38,6 +38,16 @@ module Gemfire
|
|
38
38
|
@statistics_location = Util::LinkUtils.get_link_href(details, 'statistics')
|
39
39
|
|
40
40
|
end
|
41
|
+
|
42
|
+
# Starts the cache server node instance, optionally triggering a rebalance
|
43
|
+
#
|
44
|
+
# @param rebalance [Boolean] +true+ if the start should trigger a rebalance, +false+ if it
|
45
|
+
# should not
|
46
|
+
#
|
47
|
+
# @return [void]
|
48
|
+
def start(rebalance = false)
|
49
|
+
client.post(@state_location, { :status => 'STARTED', :rebalance => rebalance })
|
50
|
+
end
|
41
51
|
|
42
52
|
# @return [DiskStores] the instance's disk stores
|
43
53
|
def disk_stores
|
@@ -25,12 +25,18 @@ module Gemfire
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# Creates a new locator instance
|
28
|
+
#
|
28
29
|
# @param installation [Installation] the installation that the instance will use
|
29
30
|
# @param name [String] the name of the instance
|
30
31
|
# @param options [Hash] optional configuration for the instance
|
32
|
+
#
|
33
|
+
# @option options :address [String] the property in a node's metadata to use to determine the
|
34
|
+
# address of the network card on which the locator should listen. If omitted or nil the locator
|
35
|
+
# will listen on the address of the default network card
|
31
36
|
# @option options :peer (true) +true+ if the locator should act as a peer, otherwise +false+
|
32
37
|
# @option options :port [Integer] (10334) the port that the locator will listen on
|
33
38
|
# @option options :server (true) +true+ if the locator should act as a server, otherwise +false+
|
39
|
+
#
|
34
40
|
# @return [LocatorInstance] the new instance
|
35
41
|
def create(installation, name, options = {})
|
36
42
|
payload = { :installation => installation.location, :name => name }
|
@@ -46,6 +52,10 @@ module Gemfire
|
|
46
52
|
if options.has_key?(:server)
|
47
53
|
payload[:server] = options[:server]
|
48
54
|
end
|
55
|
+
|
56
|
+
if options.has_key?(:address)
|
57
|
+
payload[:address] = options[:address]
|
58
|
+
end
|
49
59
|
|
50
60
|
super(payload, 'locator-group-instance')
|
51
61
|
end
|
@@ -55,6 +65,11 @@ module Gemfire
|
|
55
65
|
# A locator instance
|
56
66
|
class LocatorInstance < Shared::Instance
|
57
67
|
|
68
|
+
# @return [String, nil] the property in a node's metadata used to determine the address
|
69
|
+
# of the network card on which the locator will listen. If nil the locator will listen
|
70
|
+
# on the address of the default network card
|
71
|
+
attr_reader :address
|
72
|
+
|
58
73
|
# @return [Integer] the port that the locator will listen on
|
59
74
|
attr_reader :port
|
60
75
|
|
@@ -74,6 +89,10 @@ module Gemfire
|
|
74
89
|
#
|
75
90
|
# @param options [Hash] optional configuration for the instance
|
76
91
|
#
|
92
|
+
# @option options :address [String] the property in a node's metadata to use to determine
|
93
|
+
# the address that the locator instance will bind to. If omitted or nil, the configuration
|
94
|
+
# will not be changed. If an empty string is specified, the locator instance will bind to
|
95
|
+
# the default network address
|
77
96
|
# @option options :installation [Installation] the installation to be used by the instance.
|
78
97
|
# If omitted or nil, the installation configuration will not be changed
|
79
98
|
# @option options :peer +true+ if the locator should act as a peer, otherwise +false+.
|
@@ -101,6 +120,10 @@ module Gemfire
|
|
101
120
|
payload[:server] = options[:server]
|
102
121
|
end
|
103
122
|
|
123
|
+
if options.has_key?(:address)
|
124
|
+
payload[:address] = options[:address]
|
125
|
+
end
|
126
|
+
|
104
127
|
client.post(location, payload)
|
105
128
|
reload
|
106
129
|
end
|
@@ -112,11 +135,12 @@ module Gemfire
|
|
112
135
|
@port = details['port']
|
113
136
|
@peer = details['peer']
|
114
137
|
@server = details['server']
|
138
|
+
@address = details['address']
|
115
139
|
end
|
116
140
|
|
117
141
|
# @return [String] a string representation of the instance
|
118
142
|
def to_s
|
119
|
-
"#<#{self.class} name=#{name} port='#@port' peer='#@peer' server='#@server'>"
|
143
|
+
"#<#{self.class} name=#{name} address='#@address' port='#@port' peer='#@peer' server='#@server'>"
|
120
144
|
end
|
121
145
|
|
122
146
|
end
|
@@ -29,6 +29,11 @@ module Gemfire
|
|
29
29
|
# A locator node instance
|
30
30
|
class LocatorNodeInstance < Shared::NodeInstance
|
31
31
|
|
32
|
+
# @return [String, nil] the property in a node's metadata used to determine the address
|
33
|
+
# of the network card on which the locator will listen. If nil the locator will listen
|
34
|
+
# on the address of the default network card
|
35
|
+
attr_reader :address
|
36
|
+
|
32
37
|
# @return [Integer] the port that the locator will listen on
|
33
38
|
attr_reader :port
|
34
39
|
|
@@ -50,11 +55,12 @@ module Gemfire
|
|
50
55
|
@port = details['port']
|
51
56
|
@peer = details['peer']
|
52
57
|
@server = details['server']
|
58
|
+
@address = details['address']
|
53
59
|
end
|
54
60
|
|
55
61
|
# @return [String] a string representation of the instance
|
56
62
|
def to_s
|
57
|
-
"#<#{self.class} name=#{name} port='#@port' peer='#@peer' server='#@server'>"
|
63
|
+
"#<#{self.class} name=#{name} address='#@address' port='#@port' peer='#@peer' server='#@server'>"
|
58
64
|
end
|
59
65
|
|
60
66
|
end
|
data/lib/vas/shared/instance.rb
CHANGED
@@ -83,6 +83,22 @@ module Shared
|
|
83
83
|
def pending_configurations
|
84
84
|
@pending_configurations ||= @pending_configurations_class.new(@pending_configurations_location, client)
|
85
85
|
end
|
86
|
+
|
87
|
+
# Starts the instance
|
88
|
+
#
|
89
|
+
# @param serial [Boolean] +true+ if the starting of the individual instances represented by
|
90
|
+
# this group instance should happen serially, +false+ if they should happen in parallel
|
91
|
+
def start(serial = false)
|
92
|
+
client.post(@state_location, { :status => 'STARTED', :serial => serial })
|
93
|
+
end
|
94
|
+
|
95
|
+
# Stops the instance
|
96
|
+
#
|
97
|
+
# @param serial [Boolean] +true+ if the stoping of the individual instances represented by this
|
98
|
+
# group instance should happen serially, +false+ if they should happen in parallel
|
99
|
+
def stop(serial = false)
|
100
|
+
client.post(@state_location, { :status => 'STOPPED', :serial => serial })
|
101
|
+
end
|
86
102
|
|
87
103
|
# @return [String] a string representation of the instance
|
88
104
|
def to_s
|
@@ -76,6 +76,16 @@ module Sqlfire
|
|
76
76
|
@run_netserver = details['run-netserver']
|
77
77
|
end
|
78
78
|
|
79
|
+
# Starts the server node instance, optionally triggering a rebalance
|
80
|
+
#
|
81
|
+
# @param rebalance [Boolean] +true+ if the start should trigger a rebalance, +false+ if it
|
82
|
+
# should not
|
83
|
+
#
|
84
|
+
# @return [void]
|
85
|
+
def start(rebalance = false)
|
86
|
+
client.post(@state_location, { :status => 'STARTED', :rebalance => rebalance })
|
87
|
+
end
|
88
|
+
|
79
89
|
# @return [String] a string representation of the instance
|
80
90
|
def to_s
|
81
91
|
"#<#{self.class} name='#{name}' bind_address='#@bind_address' client_bind_address='#@client_bind_address' client_port='#@client_port' critical_heap_percentage='#@critical_heap_percentage' initial_heap='#@initial_heap' jvm_options='#@jvm_options' max_heap='#@max_heap' run_netserver='#@run_netserver'>"
|
@@ -43,10 +43,18 @@ module WebServer
|
|
43
43
|
|
44
44
|
# A Web Server installation image
|
45
45
|
class InstallationImage < Shared::InstallationImage
|
46
|
+
|
47
|
+
# @return [String] the operating system of the installation image
|
48
|
+
attr_reader :operating_system
|
49
|
+
|
50
|
+
# @return [String] the architecture of the installation image
|
51
|
+
attr_reader :architecture
|
46
52
|
|
47
53
|
# @private
|
48
54
|
def initialize(location, client)
|
49
55
|
super(location, client, Installation)
|
56
|
+
@operating_system = details['operating-system']
|
57
|
+
@architecture = details['architecture']
|
50
58
|
end
|
51
59
|
|
52
60
|
end
|
metadata
CHANGED
@@ -1,113 +1,105 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: vas
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
version: 1.0.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- VMware
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2012-11-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: json_pure
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
23
17
|
none: false
|
24
|
-
requirements:
|
18
|
+
requirements:
|
25
19
|
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
hash: 13
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 7
|
31
|
-
- 3
|
20
|
+
- !ruby/object:Gem::Version
|
32
21
|
version: 1.7.3
|
33
22
|
type: :runtime
|
34
|
-
name: json_pure
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.7.3
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: multipart-post
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
39
33
|
none: false
|
40
|
-
requirements:
|
34
|
+
requirements:
|
41
35
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
hash: 25
|
44
|
-
segments:
|
45
|
-
- 1
|
46
|
-
- 1
|
47
|
-
- 5
|
36
|
+
- !ruby/object:Gem::Version
|
48
37
|
version: 1.1.5
|
49
38
|
type: :runtime
|
50
|
-
name: multipart-post
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
39
|
prerelease: false
|
54
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
41
|
none: false
|
56
|
-
requirements:
|
42
|
+
requirements:
|
57
43
|
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.1.5
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rubyzip
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
64
53
|
version: 0.9.9
|
65
54
|
type: :runtime
|
66
|
-
name: rubyzip
|
67
|
-
version_requirements: *id003
|
68
|
-
- !ruby/object:Gem::Dependency
|
69
55
|
prerelease: false
|
70
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
57
|
none: false
|
72
|
-
requirements:
|
58
|
+
requirements:
|
73
59
|
- - ~>
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.9
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: simplecov
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
80
69
|
version: 0.6.4
|
81
70
|
type: :development
|
82
|
-
name: simplecov
|
83
|
-
version_requirements: *id004
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
71
|
prerelease: false
|
86
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
87
73
|
none: false
|
88
|
-
requirements:
|
74
|
+
requirements:
|
89
75
|
- - ~>
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 0.6.4
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: fakeweb
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ~>
|
84
|
+
- !ruby/object:Gem::Version
|
96
85
|
version: 1.3.0
|
97
86
|
type: :development
|
98
|
-
|
99
|
-
version_requirements:
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.3.0
|
100
94
|
description: A Ruby API for VMware vFabric Administration Server
|
101
95
|
email: support@vmware.com
|
102
96
|
executables: []
|
103
|
-
|
104
97
|
extensions: []
|
105
|
-
|
106
|
-
extra_rdoc_files:
|
98
|
+
extra_rdoc_files:
|
107
99
|
- README.md
|
108
100
|
- LICENSE
|
109
101
|
- NOTICE
|
110
|
-
files:
|
102
|
+
files:
|
111
103
|
- LICENSE
|
112
104
|
- NOTICE
|
113
105
|
- README.md
|
@@ -235,36 +227,26 @@ files:
|
|
235
227
|
- lib/vas.rb
|
236
228
|
homepage: http://vfabric.co
|
237
229
|
licenses: []
|
238
|
-
|
239
230
|
post_install_message:
|
240
231
|
rdoc_options: []
|
241
|
-
|
242
|
-
require_paths:
|
232
|
+
require_paths:
|
243
233
|
- lib
|
244
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
234
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
245
235
|
none: false
|
246
|
-
requirements:
|
247
|
-
- -
|
248
|
-
- !ruby/object:Gem::Version
|
249
|
-
|
250
|
-
|
251
|
-
- 0
|
252
|
-
version: "0"
|
253
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
|
+
requirements:
|
237
|
+
- - ! '>='
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
version: '0'
|
240
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
254
241
|
none: false
|
255
|
-
requirements:
|
256
|
-
- -
|
257
|
-
- !ruby/object:Gem::Version
|
258
|
-
|
259
|
-
segments:
|
260
|
-
- 0
|
261
|
-
version: "0"
|
242
|
+
requirements:
|
243
|
+
- - ! '>='
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '0'
|
262
246
|
requirements: []
|
263
|
-
|
264
247
|
rubyforge_project:
|
265
248
|
rubygems_version: 1.8.24
|
266
249
|
signing_key:
|
267
250
|
specification_version: 3
|
268
251
|
summary: vFabric Administration Server Ruby API
|
269
252
|
test_files: []
|
270
|
-
|