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 a locator node instance's logs
|
|
21
|
+
class LocatorLogs < Shared::Logs
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, LocatorLog)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A log file in a locator node instance
|
|
30
|
+
class LocatorLog < Shared::Log
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, 'locator-node-instance', LocatorNodeInstance)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
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 locator instances on an individual node
|
|
21
|
+
class LocatorNodeInstances < Shared::NodeInstances
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "locator-node-instances", LocatorNodeInstance)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A locator node instance
|
|
30
|
+
class LocatorNodeInstance < Shared::NodeInstance
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, Node, LocatorLogs, LocatorInstance, 'locator-group-instance')
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# The port that the locator will listen on
|
|
37
|
+
def port
|
|
38
|
+
client.get(location)['port']
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# +true+ if the locator will act as a peer, +false+ if it will not
|
|
42
|
+
def peer
|
|
43
|
+
client.get(location)['peer']
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# +true+ if the locator will act as a server, +false+ if it will not
|
|
47
|
+
def server
|
|
48
|
+
client.get(location)['server']
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
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 locator instance's pending configuration
|
|
21
|
+
class LocatorPendingConfigurations < Shared::PendingConfigurations
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, 'pending-configurations', LocatorPendingConfiguration)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A configuration file that is pending
|
|
30
|
+
class LocatorPendingConfiguration < Shared::PendingConfiguration
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, 'locator-group-instance', LocatorInstance)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
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 GemFire nodes
|
|
21
|
+
class Nodes < Shared::Collection
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "nodes", Node)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A GemFire node
|
|
30
|
+
class Node < Shared::GroupableNode
|
|
31
|
+
|
|
32
|
+
# The Node's Java home
|
|
33
|
+
attr_reader :java_home
|
|
34
|
+
|
|
35
|
+
def initialize(location, client) #:nodoc:
|
|
36
|
+
super(location, client, Group)
|
|
37
|
+
@java_home = details["java-home"]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# The node's agent instances
|
|
41
|
+
def agent_instances
|
|
42
|
+
@instances = AgentNodeInstances.new(Util::LinkUtils.get_link_href(details, "agent-node-instances"), client)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# The node's cache server instances
|
|
46
|
+
def cache_server_instances
|
|
47
|
+
@instances = CacheServerNodeInstances.new(Util::LinkUtils.get_link_href(details, "cache-server-node-instances"), client)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# The node's locator instances
|
|
51
|
+
def locator_instances
|
|
52
|
+
@instances = LocatorNodeInstances.new(Util::LinkUtils.get_link_href(details, "locator-node-instances"), client)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def to_s #:nodoc:
|
|
56
|
+
"#<#{self.class} host_names='#{host_names}' ip_addresses='#{ip_addresses}' operating_system='#{operating_system}' architecture='#{architecture}' agent_home='#{agent_home}' java_home='#{java_home}' metadata='#{metadata}'>"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
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 a cache server's pending application code.
|
|
21
|
+
class PendingApplicationCodes < Shared::MutableCollection
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "pending-application-code", ApplicationCode)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Creates pending application code from the +image+
|
|
28
|
+
def create(image)
|
|
29
|
+
ApplicationCode.new(client.post(location, { :image => image.location}), client)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
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 and delete a cache server's statistics.
|
|
21
|
+
class Statistics < Shared::MutableCollection
|
|
22
|
+
|
|
23
|
+
def initialize(location, client)
|
|
24
|
+
super(location, client, 'statistics', Statistic)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A statistic of a cache server
|
|
30
|
+
class Statistic < Shared::Resource
|
|
31
|
+
|
|
32
|
+
# The last modified time of the disk store
|
|
33
|
+
attr_reader :last_modified
|
|
34
|
+
|
|
35
|
+
# The path of statistic
|
|
36
|
+
attr_reader :path
|
|
37
|
+
|
|
38
|
+
# The size of the statistic
|
|
39
|
+
attr_reader :size
|
|
40
|
+
|
|
41
|
+
# The statistic's cache server node instance
|
|
42
|
+
attr_reader :instance
|
|
43
|
+
|
|
44
|
+
def initialize(location, client)
|
|
45
|
+
super(location, client)
|
|
46
|
+
|
|
47
|
+
@last_modified = details['last-modified']
|
|
48
|
+
@path = details['path']
|
|
49
|
+
@size = details['size']
|
|
50
|
+
|
|
51
|
+
@instance = CacheServerNodeInstance.new(Util::LinkUtils.get_link_href(details, 'cache-server-node-instance'), client)
|
|
52
|
+
@content_location = Util::LinkUtils.get_link_href(details, 'content')
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Retrieves the statistic's content and passes it to the +block+
|
|
56
|
+
def content(&block)
|
|
57
|
+
client.get_stream(@content_location, &block)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def to_s
|
|
61
|
+
"#<#{self.class} path='#@path'>"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
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 RabbitMq
|
|
19
|
+
|
|
20
|
+
# A configuration file in a Rabbit instance
|
|
21
|
+
class Configuration < Shared::Configuration
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, "group-instance", Instance)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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 RabbitMq
|
|
19
|
+
|
|
20
|
+
# Used to enumerate, create, and delete Rabbit groups.
|
|
21
|
+
class Groups < Shared::Groups
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:#
|
|
24
|
+
super(location, client, Group)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A Rabbit group
|
|
30
|
+
class Group < Shared::Group
|
|
31
|
+
|
|
32
|
+
# The group's instances
|
|
33
|
+
attr_reader :instances
|
|
34
|
+
|
|
35
|
+
def initialize(location, client) #:nodoc:#
|
|
36
|
+
super(location, client, Node, Installations)
|
|
37
|
+
@instances = Instances.new(Util::LinkUtils.get_link_href(details, "group-instances"), client)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
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 RabbitMq
|
|
19
|
+
|
|
20
|
+
# Used to enumerate, create, and delete Rabbit installation images.
|
|
21
|
+
class InstallationImages < Shared::InstallationImages
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, InstallationImage)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A Rabbit installation image
|
|
30
|
+
class InstallationImage < Shared::InstallationImage
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, Installation)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
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 RabbitMq
|
|
19
|
+
|
|
20
|
+
# Used to enumerate, create, and delete Rabbit installations.
|
|
21
|
+
class Installations < Shared::Installations
|
|
22
|
+
|
|
23
|
+
def initialize(location, client) #:nodoc:
|
|
24
|
+
super(location, client, Installation)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# A Rabbit installation
|
|
30
|
+
class Installation < Shared::Installation
|
|
31
|
+
|
|
32
|
+
def initialize(location, client) #:nodoc:
|
|
33
|
+
super(location, client, InstallationImage, Group)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array of the instances that are using the installation
|
|
37
|
+
def instances
|
|
38
|
+
retrieve_instances("group-instance", Instance);
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
end
|