vas 0.3.0
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.
- data/LICENSE +174 -0
- data/NOTICE +5 -0
- data/README.md +26 -0
- data/Rakefile +20 -0
- data/lib/vas.rb +103 -0
- data/lib/vas/gemfire/agent_configuration.rb +28 -0
- data/lib/vas/gemfire/agent_instances.rb +49 -0
- data/lib/vas/gemfire/agent_live_configurations.rb +29 -0
- data/lib/vas/gemfire/agent_logs.rb +38 -0
- data/lib/vas/gemfire/agent_node_instances.rb +38 -0
- data/lib/vas/gemfire/agent_pending_configurations.rb +38 -0
- data/lib/vas/gemfire/application_code.rb +54 -0
- data/lib/vas/gemfire/application_code_images.rb +76 -0
- data/lib/vas/gemfire/cache_server_configuration.rb +28 -0
- data/lib/vas/gemfire/cache_server_instances.rb +57 -0
- data/lib/vas/gemfire/cache_server_live_configurations.rb +29 -0
- data/lib/vas/gemfire/cache_server_logs.rb +38 -0
- data/lib/vas/gemfire/cache_server_node_instances.rb +46 -0
- data/lib/vas/gemfire/cache_server_pending_configurations.rb +38 -0
- data/lib/vas/gemfire/disk_stores.rb +63 -0
- data/lib/vas/gemfire/gemfire.rb +47 -0
- data/lib/vas/gemfire/groups.rb +50 -0
- data/lib/vas/gemfire/installation_images.rb +38 -0
- data/lib/vas/gemfire/installations.rb +53 -0
- data/lib/vas/gemfire/live_application_codes.rb +29 -0
- data/lib/vas/gemfire/locator_configuration.rb +28 -0
- data/lib/vas/gemfire/locator_instances.rb +109 -0
- data/lib/vas/gemfire/locator_live_configurations.rb +29 -0
- data/lib/vas/gemfire/locator_logs.rb +38 -0
- data/lib/vas/gemfire/locator_node_instances.rb +53 -0
- data/lib/vas/gemfire/locator_pending_configurations.rb +38 -0
- data/lib/vas/gemfire/nodes.rb +61 -0
- data/lib/vas/gemfire/pending_application_codes.rb +34 -0
- data/lib/vas/gemfire/statistics.rb +66 -0
- data/lib/vas/rabbitmq/configuration.rb +28 -0
- data/lib/vas/rabbitmq/groups.rb +42 -0
- data/lib/vas/rabbitmq/installation_images.rb +38 -0
- data/lib/vas/rabbitmq/installations.rb +43 -0
- data/lib/vas/rabbitmq/instances.rb +53 -0
- data/lib/vas/rabbitmq/live_configurations.rb +29 -0
- data/lib/vas/rabbitmq/logs.rb +38 -0
- data/lib/vas/rabbitmq/node_instances.rb +38 -0
- data/lib/vas/rabbitmq/nodes.rb +50 -0
- data/lib/vas/rabbitmq/pending_configurations.rb +38 -0
- data/lib/vas/rabbitmq/plugin_images.rb +67 -0
- data/lib/vas/rabbitmq/plugins.rb +85 -0
- data/lib/vas/rabbitmq/rabbitmq.rb +45 -0
- data/lib/vas/shared/collection.rb +46 -0
- data/lib/vas/shared/configuration.rb +59 -0
- data/lib/vas/shared/groups.rb +74 -0
- data/lib/vas/shared/installation_images.rb +62 -0
- data/lib/vas/shared/installations.rb +67 -0
- data/lib/vas/shared/instances.rb +74 -0
- data/lib/vas/shared/logs.rb +89 -0
- data/lib/vas/shared/mutable_collection.rb +27 -0
- data/lib/vas/shared/node_instances.rb +58 -0
- data/lib/vas/shared/nodes.rb +70 -0
- data/lib/vas/shared/pending_configuration.rb +40 -0
- data/lib/vas/shared/resource.rb +44 -0
- data/lib/vas/shared/security.rb +51 -0
- data/lib/vas/shared/state_resource.rb +44 -0
- data/lib/vas/tc_server/applications.rb +89 -0
- data/lib/vas/tc_server/configuration.rb +29 -0
- data/lib/vas/tc_server/groups.rb +42 -0
- data/lib/vas/tc_server/installation_images.rb +38 -0
- data/lib/vas/tc_server/installations.rb +54 -0
- data/lib/vas/tc_server/instances.rb +102 -0
- data/lib/vas/tc_server/live_configurations.rb +29 -0
- data/lib/vas/tc_server/logs.rb +38 -0
- data/lib/vas/tc_server/node_applications.rb +76 -0
- data/lib/vas/tc_server/node_instances.rb +55 -0
- data/lib/vas/tc_server/node_revisions.rb +55 -0
- data/lib/vas/tc_server/nodes.rb +50 -0
- data/lib/vas/tc_server/pending_configurations.rb +38 -0
- data/lib/vas/tc_server/revision_images.rb +67 -0
- data/lib/vas/tc_server/revisions.rb +71 -0
- data/lib/vas/tc_server/tc_server.rb +50 -0
- data/lib/vas/tc_server/template_images.rb +67 -0
- data/lib/vas/tc_server/templates.rb +70 -0
- data/lib/vas/util/client.rb +159 -0
- data/lib/vas/util/link_utils.rb +43 -0
- data/lib/vas/vas_exception.rb +32 -0
- data/lib/vas/vfabric/agent_image.rb +50 -0
- data/lib/vas/vfabric/nodes.rb +47 -0
- data/lib/vas/vfabric/v_fabric.rb +34 -0
- data/lib/vas/vfabric_administration_server.rb +50 -0
- metadata +213 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate agent instances on an individual node
|
|
21
|
+
class AgentNodeInstances < Shared::NodeInstances
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "agent-node-instances", AgentNodeInstance)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# An agent node instance
|
|
30
|
+
class AgentNodeInstance < Shared::NodeInstance
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, Node, AgentLogs, AgentInstance, 'agent-group-instance')
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate an agent instance's pending configuration
|
|
21
|
+
class AgentPendingConfigurations < Shared::PendingConfigurations
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, 'pending-configurations', AgentPendingConfiguration)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A configuration file that is pending
|
|
30
|
+
class AgentPendingConfiguration < Shared::PendingConfiguration
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, 'agent-group-instance', AgentInstance)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Application code in a cache server instance
|
|
21
|
+
class ApplicationCode < Shared::Resource
|
|
22
|
+
|
|
23
|
+
# The name of the application code
|
|
24
|
+
attr_reader :name
|
|
25
|
+
|
|
26
|
+
# The version of the application code
|
|
27
|
+
attr_reader :version
|
|
28
|
+
|
|
29
|
+
# The image that was used to create this application code
|
|
30
|
+
attr_reader :application_code_image
|
|
31
|
+
|
|
32
|
+
# The cache server instance that contains this application code
|
|
33
|
+
attr_reader :instance
|
|
34
|
+
|
|
35
|
+
def initialize(location, client)
|
|
36
|
+
super(location, client)
|
|
37
|
+
|
|
38
|
+
@name = details["name"]
|
|
39
|
+
@version = details["version"]
|
|
40
|
+
|
|
41
|
+
@application_code_image = ApplicationCodeImage.new(
|
|
42
|
+
Util::LinkUtils.get_link_href(details, 'application-code-image'), client)
|
|
43
|
+
|
|
44
|
+
@instance = CacheServerInstance.new(
|
|
45
|
+
Util::LinkUtils.get_link_href(details, 'cache-server-group-instance'), client)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def to_s #:nodoc:
|
|
49
|
+
"#<#{self.class} name='#@name' version=#@version>"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate, create, and delete GemFire application code images.
|
|
21
|
+
class ApplicationCodeImages < Shared::MutableCollection
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "application-code-images", ApplicationCodeImage)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Creates an application code image named +name+ with the version +version+ by uploading the file at the given +path+
|
|
28
|
+
def create(path, name, version)
|
|
29
|
+
ApplicationCodeImage.new(client.post_image(location, path, { :name => name, :version => version }), client)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An application code image
|
|
35
|
+
class ApplicationCodeImage < Shared::Resource
|
|
36
|
+
|
|
37
|
+
# The application code image's name
|
|
38
|
+
attr_reader :name
|
|
39
|
+
|
|
40
|
+
# The application code image's version
|
|
41
|
+
attr_reader :version
|
|
42
|
+
|
|
43
|
+
# The application code image's size
|
|
44
|
+
attr_reader :size
|
|
45
|
+
|
|
46
|
+
def initialize(location, client) #:nodoc:
|
|
47
|
+
super(location, client)
|
|
48
|
+
|
|
49
|
+
@name = details['name']
|
|
50
|
+
@version = details['version']
|
|
51
|
+
@size = details['size']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# An array of the live application code that has been created from this application code image
|
|
55
|
+
def live_application_code
|
|
56
|
+
application_codes = []
|
|
57
|
+
Util::LinkUtils.get_link_hrefs(client.get(location), "live-application-code").each {
|
|
58
|
+
|application_code_location| application_codes << ApplicationCode.new(application_code_location, client)}
|
|
59
|
+
application_codes
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# An array of the pending application code that has been created from this application code image
|
|
63
|
+
def pending_application_code
|
|
64
|
+
application_codes = []
|
|
65
|
+
Util::LinkUtils.get_link_hrefs(client.get(location), "pending-application-code").each {
|
|
66
|
+
|application_code_location| application_codes << ApplicationCode.new(application_code_location, client)}
|
|
67
|
+
application_codes
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def to_s #:nodoc:
|
|
71
|
+
"#<#{self.class} name='#@name' version='#@version'>"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# A configuration file in a cache server instance
|
|
21
|
+
class CacheServerConfiguration < Shared::Configuration
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "cache-server-group-instance", CacheServerInstance)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate, create, and delete cache server instances.
|
|
21
|
+
class CacheServerInstances < Shared::MutableCollection
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "cache-server-group-instances", CacheServerInstance)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Creates a new instance named +name+, using the given +installation+.
|
|
28
|
+
def create(installation, name)
|
|
29
|
+
payload = { :installation => installation.location, :name => name }
|
|
30
|
+
CacheServerInstance.new(client.post(location, payload, "cache-server-group-instance"), client)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# A cache server instance
|
|
36
|
+
class CacheServerInstance < Shared::Instance
|
|
37
|
+
|
|
38
|
+
# The instance's live application code
|
|
39
|
+
attr_reader :live_application_code
|
|
40
|
+
|
|
41
|
+
# The instance's pending application code
|
|
42
|
+
attr_reader :pending_application_code
|
|
43
|
+
|
|
44
|
+
def initialize(location, client) #:nodoc:
|
|
45
|
+
super(location, client, Group, Installation, CacheServerLiveConfigurations, CacheServerPendingConfigurations, CacheServerNodeInstance, 'cache-server-node-instance')
|
|
46
|
+
@live_application_code = LiveApplicationCodes.new(Util::LinkUtils.get_link_href(details, 'live-application-code'), client)
|
|
47
|
+
@pending_application_code = PendingApplicationCodes.new(Util::LinkUtils.get_link_href(details, 'pending-application-code'), client)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Updates the instance to use the given +installation+
|
|
51
|
+
def update(installation)
|
|
52
|
+
client.post(location, { :installation => installation.location });
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate a cache server instance's live configuration
|
|
21
|
+
class CacheServerLiveConfigurations < Shared::Collection
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "live-configurations", CacheServerConfiguration)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate a cache server node instance's logs
|
|
21
|
+
class CacheServerLogs < Shared::Logs
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, CacheServerLog)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A log file in a cache server node instance
|
|
30
|
+
class CacheServerLog < Shared::Log
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, 'cache-server-node-instance', CacheServerNodeInstance)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate cache server instances on an individual node
|
|
21
|
+
class CacheServerNodeInstances < Shared::NodeInstances
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "cache-server-node-instances", CacheServerNodeInstance)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A cache server node instance
|
|
30
|
+
class CacheServerNodeInstance < Shared::NodeInstance
|
|
31
|
+
|
|
32
|
+
# The instance's disk stores
|
|
33
|
+
attr_reader :disk_stores
|
|
34
|
+
|
|
35
|
+
# The instance's statistics
|
|
36
|
+
attr_reader :statistics
|
|
37
|
+
|
|
38
|
+
def initialize(location, client) #:nodoc:
|
|
39
|
+
super(location, client, Node, CacheServerLogs, CacheServerInstance, 'cache-server-group-instance')
|
|
40
|
+
@disk_stores = DiskStores.new(Util::LinkUtils.get_link_href(details, 'disk-stores'), client)
|
|
41
|
+
@statistics = Statistics.new(Util::LinkUtils.get_link_href(details, 'statistics'), client)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#--
|
|
2
|
+
# vFabric Administration Server Ruby API
|
|
3
|
+
# Copyright (c) 2012 VMware, Inc. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#++
|
|
17
|
+
|
|
18
|
+
module Gemfire
|
|
19
|
+
|
|
20
|
+
# Used to enumerate a cache server instance's pending configuration
|
|
21
|
+
class CacheServerPendingConfigurations < Shared::PendingConfigurations
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, 'pending-configurations', CacheServerPendingConfiguration)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A configuration file that is pending
|
|
30
|
+
class CacheServerPendingConfiguration < Shared::PendingConfiguration
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, 'cache-server-group-instance', CacheServerInstance)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|