vas 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +25 -5
- data/lib/vas.rb +2 -7
- data/lib/vas/gemfire/agent_instances.rb +16 -6
- data/lib/vas/gemfire/agent_live_configurations.rb +14 -4
- data/lib/vas/gemfire/agent_logs.rb +5 -4
- data/lib/vas/gemfire/agent_node_instances.rb +5 -4
- data/lib/vas/gemfire/agent_pending_configurations.rb +5 -4
- data/lib/vas/gemfire/application_code.rb +7 -6
- data/lib/vas/gemfire/application_code_images.rb +19 -11
- data/lib/vas/gemfire/cache_server_instances.rb +18 -8
- data/lib/vas/gemfire/cache_server_live_configurations.rb +14 -4
- data/lib/vas/gemfire/cache_server_logs.rb +5 -4
- data/lib/vas/gemfire/cache_server_node_instances.rb +7 -6
- data/lib/vas/gemfire/cache_server_pending_configurations.rb +6 -5
- data/lib/vas/gemfire/disk_stores.rb +23 -13
- data/lib/vas/gemfire/gemfire.rb +8 -7
- data/lib/vas/gemfire/groups.rb +9 -8
- data/lib/vas/gemfire/installation_images.rb +5 -4
- data/lib/vas/gemfire/installations.rb +11 -10
- data/lib/vas/gemfire/live_application_codes.rb +3 -3
- data/lib/vas/gemfire/locator_instances.rb +25 -20
- data/lib/vas/gemfire/locator_live_configurations.rb +14 -4
- data/lib/vas/gemfire/locator_logs.rb +5 -4
- data/lib/vas/gemfire/locator_node_instances.rb +7 -6
- data/lib/vas/gemfire/locator_pending_configurations.rb +6 -5
- data/lib/vas/gemfire/nodes.rb +20 -21
- data/lib/vas/gemfire/pending_application_codes.rb +8 -4
- data/lib/vas/gemfire/statistics.rb +21 -13
- data/lib/vas/rabbitmq/groups.rb +8 -7
- data/lib/vas/rabbitmq/installation_images.rb +7 -6
- data/lib/vas/rabbitmq/installations.rb +8 -7
- data/lib/vas/rabbitmq/instances.rb +20 -10
- data/lib/vas/rabbitmq/live_configurations.rb +15 -5
- data/lib/vas/rabbitmq/logs.rb +7 -6
- data/lib/vas/rabbitmq/node_instances.rb +7 -6
- data/lib/vas/rabbitmq/nodes.rb +13 -15
- data/lib/vas/rabbitmq/pending_configurations.rb +7 -6
- data/lib/vas/rabbitmq/plugin_images.rb +14 -8
- data/lib/vas/rabbitmq/plugins.rb +24 -23
- data/lib/vas/rabbitmq/rabbitmq.rb +10 -7
- data/lib/vas/shared/collection.rb +12 -6
- data/lib/vas/shared/configuration.rb +16 -8
- data/lib/vas/shared/groups.rb +28 -10
- data/lib/vas/shared/installation_images.rb +20 -8
- data/lib/vas/shared/installations.rb +23 -12
- data/lib/vas/shared/{instances.rb → instance.rb} +11 -12
- data/lib/vas/shared/logs.rb +30 -21
- data/lib/vas/shared/mutable_collection.rb +5 -3
- data/lib/vas/shared/node_instances.rb +12 -7
- data/lib/vas/shared/nodes.rb +14 -12
- data/lib/vas/shared/pending_configuration.rb +12 -5
- data/lib/vas/shared/resource.rb +10 -6
- data/lib/vas/shared/security.rb +15 -11
- data/lib/vas/shared/state_resource.rb +12 -6
- data/lib/vas/tc_server/applications.rb +24 -21
- data/lib/vas/tc_server/configuration.rb +3 -3
- data/lib/vas/tc_server/groups.rb +7 -6
- data/lib/vas/tc_server/installation_images.rb +5 -4
- data/lib/vas/tc_server/installations.rb +11 -12
- data/lib/vas/tc_server/instances.rb +28 -20
- data/lib/vas/tc_server/live_configurations.rb +3 -3
- data/lib/vas/tc_server/logs.rb +1 -2
- data/lib/vas/tc_server/node_applications.rb +19 -19
- data/lib/vas/tc_server/node_instances.rb +9 -8
- data/lib/vas/tc_server/node_revisions.rb +12 -10
- data/lib/vas/tc_server/nodes.rb +11 -9
- data/lib/vas/tc_server/pending_configurations.rb +5 -4
- data/lib/vas/tc_server/revision_images.rb +19 -11
- data/lib/vas/tc_server/revisions.rb +22 -18
- data/lib/vas/tc_server/tc_server.rb +9 -8
- data/lib/vas/tc_server/template_images.rb +19 -11
- data/lib/vas/tc_server/templates.rb +19 -17
- data/lib/vas/util/client.rb +4 -3
- data/lib/vas/util/link_utils.rb +4 -3
- data/lib/vas/vas_exception.rb +6 -6
- data/lib/vas/vfabric/agent_image.rb +14 -3
- data/lib/vas/vfabric/nodes.rb +16 -10
- data/lib/vas/vfabric/v_fabric.rb +6 -3
- data/lib/vas/vfabric_administration_server.rb +11 -11
- metadata +13 -17
- data/lib/vas/gemfire/agent_configuration.rb +0 -28
- data/lib/vas/gemfire/cache_server_configuration.rb +0 -28
- data/lib/vas/gemfire/locator_configuration.rb +0 -28
- data/lib/vas/rabbitmq/configuration.rb +0 -28
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,15 +12,26 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate a cache server instance's live configuration
|
21
20
|
class CacheServerLiveConfigurations < Shared::Collection
|
22
21
|
|
23
|
-
|
24
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
|
+
super(location, client, "live-configurations", CacheServerLiveConfiguration)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
29
|
+
# A live configuration file in a cache server instance
|
30
|
+
class CacheServerLiveConfiguration < Shared::Configuration
|
31
|
+
|
32
|
+
# @private
|
33
|
+
def initialize(location, client)
|
34
|
+
super(location, client, "cache-server-group-instance", CacheServerInstance)
|
25
35
|
end
|
26
36
|
|
27
37
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,14 +12,15 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate a cache server node instance's logs
|
21
20
|
class CacheServerLogs < Shared::Logs
|
22
21
|
|
23
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, CacheServerLog)
|
25
25
|
end
|
26
26
|
|
@@ -29,7 +29,8 @@ module Gemfire
|
|
29
29
|
# A log file in a cache server node instance
|
30
30
|
class CacheServerLog < Shared::Log
|
31
31
|
|
32
|
-
|
32
|
+
# @private
|
33
|
+
def initialize(location, client)
|
33
34
|
super(location, client, 'cache-server-node-instance', CacheServerNodeInstance)
|
34
35
|
end
|
35
36
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,14 +12,15 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate cache server instances on an individual node
|
21
20
|
class CacheServerNodeInstances < Shared::NodeInstances
|
22
21
|
|
23
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, "cache-server-node-instances", CacheServerNodeInstance)
|
25
25
|
end
|
26
26
|
|
@@ -29,13 +29,14 @@ module Gemfire
|
|
29
29
|
# A cache server node instance
|
30
30
|
class CacheServerNodeInstance < Shared::NodeInstance
|
31
31
|
|
32
|
-
#
|
32
|
+
# @return [DiskStores] the instance's disk stores
|
33
33
|
attr_reader :disk_stores
|
34
34
|
|
35
|
-
#
|
35
|
+
# @return [Statistics] the instance's statistics
|
36
36
|
attr_reader :statistics
|
37
37
|
|
38
|
-
|
38
|
+
# @private
|
39
|
+
def initialize(location, client)
|
39
40
|
super(location, client, Node, CacheServerLogs, CacheServerInstance, 'cache-server-group-instance')
|
40
41
|
@disk_stores = DiskStores.new(Util::LinkUtils.get_link_href(details, 'disk-stores'), client)
|
41
42
|
@statistics = Statistics.new(Util::LinkUtils.get_link_href(details, 'statistics'), client)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,23 +12,25 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate a cache server instance's pending configuration
|
21
20
|
class CacheServerPendingConfigurations < Shared::PendingConfigurations
|
22
21
|
|
23
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, 'pending-configurations', CacheServerPendingConfiguration)
|
25
25
|
end
|
26
26
|
|
27
27
|
end
|
28
28
|
|
29
|
-
# A configuration file that is pending
|
29
|
+
# A cache server configuration file that is pending
|
30
30
|
class CacheServerPendingConfiguration < Shared::PendingConfiguration
|
31
31
|
|
32
|
-
|
32
|
+
# @private
|
33
|
+
def initialize(location, client)
|
33
34
|
super(location, client, 'cache-server-group-instance', CacheServerInstance)
|
34
35
|
end
|
35
36
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,47 +12,58 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
19
|
+
# Provides access to a cache server node instance's disk stores
|
20
20
|
class DiskStores < Shared::MutableCollection
|
21
21
|
|
22
|
+
# @private
|
22
23
|
def initialize(location, client)
|
23
24
|
super(location, client, 'disk-stores', DiskStore)
|
24
25
|
end
|
25
26
|
|
26
27
|
end
|
27
28
|
|
29
|
+
# A disk store in a cache server node instance
|
28
30
|
class DiskStore < Shared::Resource
|
29
31
|
|
30
|
-
#
|
31
|
-
attr_reader :last_modified
|
32
|
-
|
33
|
-
# The name of the disk store
|
32
|
+
# @return [String] the name of the disk store
|
34
33
|
attr_reader :name
|
35
34
|
|
36
|
-
#
|
37
|
-
attr_reader :size
|
38
|
-
|
39
|
-
# The disk store's cache server node instance
|
35
|
+
# @return [CacheServerNodeInstance] the disk store's cache server node instance
|
40
36
|
attr_reader :instance
|
41
37
|
|
38
|
+
# @private
|
42
39
|
def initialize(location, client)
|
43
40
|
super(location, client)
|
44
41
|
|
45
|
-
@last_modified = details['last-modified']
|
46
42
|
@name = details['name']
|
47
|
-
@size = details['size']
|
48
43
|
@instance = CacheServerNodeInstance.new(Util::LinkUtils.get_link_href(details, 'cache-server-node-instance'), client)
|
49
44
|
@content_location = Util::LinkUtils.get_link_href(details, 'content')
|
50
45
|
end
|
51
46
|
|
52
|
-
# Retrieves the disk store's content
|
47
|
+
# Retrieves the disk store's content
|
48
|
+
#
|
49
|
+
# @yield [chunk] a chunk of the disk store's content
|
50
|
+
#
|
51
|
+
# @return [void]
|
53
52
|
def content(&block)
|
54
53
|
client.get_stream(@content_location, &block)
|
55
54
|
end
|
55
|
+
|
56
|
+
# @return [Integer] the size of the disk store
|
57
|
+
def size
|
58
|
+
client.get(location)['size']
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [Integer] the last modified stamp of the disk store
|
62
|
+
def last_modified
|
63
|
+
client.get(location)['last-modified']
|
64
|
+
end
|
56
65
|
|
66
|
+
# @return [String] a string representation of the disk store
|
57
67
|
def to_s
|
58
68
|
"#<#{self.class} name='#@name'>"
|
59
69
|
end
|
data/lib/vas/gemfire/gemfire.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,26 +12,28 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
#++
|
17
15
|
|
16
|
+
|
17
|
+
# API for administering GemFire
|
18
18
|
module Gemfire
|
19
19
|
|
20
20
|
# The entry point to the API for administering GemFire
|
21
21
|
class Gemfire
|
22
22
|
|
23
|
-
#
|
23
|
+
# @return [Groups] the GemFire groups
|
24
24
|
attr_reader :groups
|
25
25
|
|
26
|
-
#
|
26
|
+
# @return [InstallationImages] the GemFire installation images
|
27
27
|
attr_reader :installation_images
|
28
28
|
|
29
|
-
#
|
29
|
+
# @return [Nodes] the GemFire nodes
|
30
30
|
attr_reader :nodes
|
31
31
|
|
32
|
-
#
|
32
|
+
# @return [ApplicationCodeImages] the GemFire application code images
|
33
33
|
attr_reader :application_code_images
|
34
34
|
|
35
|
-
|
35
|
+
# @private
|
36
|
+
def initialize(location, client)
|
36
37
|
|
37
38
|
json = client.get(location)
|
38
39
|
|
data/lib/vas/gemfire/groups.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,32 +12,34 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate, create, and delete GemFire groups.
|
21
20
|
class Groups < Shared::Groups
|
22
21
|
|
23
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, Group)
|
25
25
|
end
|
26
26
|
|
27
27
|
end
|
28
28
|
|
29
|
-
# A
|
29
|
+
# A GemFire group
|
30
30
|
class Group < Shared::MutableGroup
|
31
31
|
|
32
|
-
#
|
32
|
+
# @return [AgentInstances] the group's agent instances
|
33
33
|
attr_reader :agent_instances
|
34
34
|
|
35
|
-
#
|
35
|
+
# @return [CacheServerInstances] the group's cache server instances
|
36
36
|
attr_reader :cache_server_instances
|
37
37
|
|
38
|
-
#
|
38
|
+
# @return [LocatorInstances] the group's locator instances
|
39
39
|
attr_reader :locator_instances
|
40
40
|
|
41
|
-
|
41
|
+
# @private
|
42
|
+
def initialize(location, client)
|
42
43
|
super(location, client, Node, Installations)
|
43
44
|
@agent_instances = AgentInstances.new(Util::LinkUtils.get_link_href(details, "agent-group-instances"), client)
|
44
45
|
@cache_server_instances = CacheServerInstances.new(Util::LinkUtils.get_link_href(details, "cache-server-group-instances"), client)
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,14 +12,15 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate, create, and delete GemFire installation images.
|
21
20
|
class InstallationImages < Shared::InstallationImages
|
22
21
|
|
23
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, InstallationImage)
|
25
25
|
end
|
26
26
|
|
@@ -29,7 +29,8 @@ module Gemfire
|
|
29
29
|
# A GemFire installation image
|
30
30
|
class InstallationImage < Shared::InstallationImage
|
31
31
|
|
32
|
-
|
32
|
+
# @private
|
33
|
+
def initialize(location, client)
|
33
34
|
super(location, client, Installation)
|
34
35
|
end
|
35
36
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,37 +12,39 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate, create, and delete GemFire installations.
|
21
20
|
class Installations < Shared::Installations
|
22
|
-
|
23
|
-
|
21
|
+
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, Installation)
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
# A GemFire installation
|
30
30
|
class Installation < Shared::Installation
|
31
31
|
|
32
|
-
|
32
|
+
# @private
|
33
|
+
def initialize(location, client)
|
33
34
|
super(location, client, InstallationImage, Group)
|
34
35
|
end
|
35
36
|
|
36
|
-
#
|
37
|
+
# @return [AgentInstance[]] the agent instances that are using the installation
|
37
38
|
def agent_instances
|
38
39
|
retrieve_instances("agent-group-instance", AgentInstance);
|
39
40
|
end
|
40
41
|
|
41
|
-
#
|
42
|
+
# @return [CacheServerInstance[]] the cache server instances that are using the installation
|
42
43
|
def cache_server_instances
|
43
44
|
retrieve_instances("cache-server-group-instance", CacheServerInstance);
|
44
45
|
end
|
45
46
|
|
46
|
-
#
|
47
|
+
# @return [LocatorInstance[]] the locator instances that are using the installation
|
47
48
|
def locator_instances
|
48
49
|
retrieve_instances("locator-group-instance", LocatorInstance);
|
49
50
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,14 +12,15 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate a cache server's live application code.
|
21
20
|
class LiveApplicationCodes < Shared::Collection
|
22
21
|
|
23
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, "live-application-code", ApplicationCode)
|
25
25
|
end
|
26
26
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
#--
|
2
1
|
# vFabric Administration Server Ruby API
|
3
2
|
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
4
3
|
#
|
@@ -13,25 +12,26 @@
|
|
13
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
13
|
# See the License for the specific language governing permissions and
|
15
14
|
# limitations under the License.
|
16
|
-
|
15
|
+
|
17
16
|
|
18
17
|
module Gemfire
|
19
18
|
|
20
19
|
# Used to enumerate, create, and delete locator instances.
|
21
20
|
class LocatorInstances < Shared::MutableCollection
|
22
21
|
|
23
|
-
|
22
|
+
# @private
|
23
|
+
def initialize(location, client)
|
24
24
|
super(location, client, "locator-group-instances", LocatorInstance)
|
25
25
|
end
|
26
26
|
|
27
|
-
# Creates a new instance
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
27
|
+
# Creates a new locator instance
|
28
|
+
# @param installation [Installation] the installation that the instance will use
|
29
|
+
# @param name [String] the name of the instance
|
30
|
+
# @param options [Hash] optional configuration for the instance
|
31
|
+
# @option options :peer (true) +true+ if the locator should act as a peer, otherwise +false+
|
32
|
+
# @option options :port [Integer] (10334) the port that the locator will listen on
|
33
|
+
# @option options :server (true) +true+ if the locator should act as a server, otherwise +false+
|
34
|
+
# @return [LocatorInstance] the new instance
|
35
35
|
def create(installation, name, options = {})
|
36
36
|
payload = { :installation => installation.location, :name => name }
|
37
37
|
|
@@ -55,18 +55,23 @@ module Gemfire
|
|
55
55
|
# A locator instance
|
56
56
|
class LocatorInstance < Shared::Instance
|
57
57
|
|
58
|
-
|
58
|
+
# @private
|
59
|
+
def initialize(location, client)
|
59
60
|
super(location, client, Group, Installation, LocatorLiveConfigurations, LocatorPendingConfigurations, LocatorNodeInstance, 'locator-node-instance')
|
60
61
|
end
|
61
62
|
|
62
63
|
# Updates the instance using the supplied +options+.
|
63
64
|
#
|
64
|
-
#
|
65
|
+
# @param options [Hash] optional configuration for the instance
|
65
66
|
#
|
66
|
-
# installation
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
67
|
+
# @option options :installation [Installation] the installation to be used by the instance.
|
68
|
+
# If omitted or nil, the installation configuration will not be changed
|
69
|
+
# @option options :peer +true+ if the locator should act as a peer, otherwise +false+.
|
70
|
+
# If omitted or nil, the installation configuration will not be changed
|
71
|
+
# @option options :port [Integer] the port that the locator will listen on.
|
72
|
+
# If omitted or nil, the installation configuration will not be changed
|
73
|
+
# @option options :server +true+ if the locator should act as a server, otherwise +false+.
|
74
|
+
# If omitted or nil, the installation configuration will not be changed
|
70
75
|
def update(options)
|
71
76
|
payload = {}
|
72
77
|
|
@@ -89,17 +94,17 @@ module Gemfire
|
|
89
94
|
client.post(location, payload)
|
90
95
|
end
|
91
96
|
|
92
|
-
#
|
97
|
+
# @return [Integer] the port that the locator will listen on
|
93
98
|
def port
|
94
99
|
client.get(location)['port']
|
95
100
|
end
|
96
101
|
|
97
|
-
# +true+ if the locator will act as a peer, +false+ if it will not
|
102
|
+
# @return [Boolean] +true+ if the locator will act as a peer, +false+ if it will not
|
98
103
|
def peer
|
99
104
|
client.get(location)['peer']
|
100
105
|
end
|
101
106
|
|
102
|
-
# +true+ if the locator will act as a server, +false+ if it will not
|
107
|
+
# @return [Boolean] +true+ if the locator will act as a server, +false+ if it will not
|
103
108
|
def server
|
104
109
|
client.get(location)['server']
|
105
110
|
end
|