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.
Files changed (87) hide show
  1. data/LICENSE +174 -0
  2. data/NOTICE +5 -0
  3. data/README.md +26 -0
  4. data/Rakefile +20 -0
  5. data/lib/vas.rb +103 -0
  6. data/lib/vas/gemfire/agent_configuration.rb +28 -0
  7. data/lib/vas/gemfire/agent_instances.rb +49 -0
  8. data/lib/vas/gemfire/agent_live_configurations.rb +29 -0
  9. data/lib/vas/gemfire/agent_logs.rb +38 -0
  10. data/lib/vas/gemfire/agent_node_instances.rb +38 -0
  11. data/lib/vas/gemfire/agent_pending_configurations.rb +38 -0
  12. data/lib/vas/gemfire/application_code.rb +54 -0
  13. data/lib/vas/gemfire/application_code_images.rb +76 -0
  14. data/lib/vas/gemfire/cache_server_configuration.rb +28 -0
  15. data/lib/vas/gemfire/cache_server_instances.rb +57 -0
  16. data/lib/vas/gemfire/cache_server_live_configurations.rb +29 -0
  17. data/lib/vas/gemfire/cache_server_logs.rb +38 -0
  18. data/lib/vas/gemfire/cache_server_node_instances.rb +46 -0
  19. data/lib/vas/gemfire/cache_server_pending_configurations.rb +38 -0
  20. data/lib/vas/gemfire/disk_stores.rb +63 -0
  21. data/lib/vas/gemfire/gemfire.rb +47 -0
  22. data/lib/vas/gemfire/groups.rb +50 -0
  23. data/lib/vas/gemfire/installation_images.rb +38 -0
  24. data/lib/vas/gemfire/installations.rb +53 -0
  25. data/lib/vas/gemfire/live_application_codes.rb +29 -0
  26. data/lib/vas/gemfire/locator_configuration.rb +28 -0
  27. data/lib/vas/gemfire/locator_instances.rb +109 -0
  28. data/lib/vas/gemfire/locator_live_configurations.rb +29 -0
  29. data/lib/vas/gemfire/locator_logs.rb +38 -0
  30. data/lib/vas/gemfire/locator_node_instances.rb +53 -0
  31. data/lib/vas/gemfire/locator_pending_configurations.rb +38 -0
  32. data/lib/vas/gemfire/nodes.rb +61 -0
  33. data/lib/vas/gemfire/pending_application_codes.rb +34 -0
  34. data/lib/vas/gemfire/statistics.rb +66 -0
  35. data/lib/vas/rabbitmq/configuration.rb +28 -0
  36. data/lib/vas/rabbitmq/groups.rb +42 -0
  37. data/lib/vas/rabbitmq/installation_images.rb +38 -0
  38. data/lib/vas/rabbitmq/installations.rb +43 -0
  39. data/lib/vas/rabbitmq/instances.rb +53 -0
  40. data/lib/vas/rabbitmq/live_configurations.rb +29 -0
  41. data/lib/vas/rabbitmq/logs.rb +38 -0
  42. data/lib/vas/rabbitmq/node_instances.rb +38 -0
  43. data/lib/vas/rabbitmq/nodes.rb +50 -0
  44. data/lib/vas/rabbitmq/pending_configurations.rb +38 -0
  45. data/lib/vas/rabbitmq/plugin_images.rb +67 -0
  46. data/lib/vas/rabbitmq/plugins.rb +85 -0
  47. data/lib/vas/rabbitmq/rabbitmq.rb +45 -0
  48. data/lib/vas/shared/collection.rb +46 -0
  49. data/lib/vas/shared/configuration.rb +59 -0
  50. data/lib/vas/shared/groups.rb +74 -0
  51. data/lib/vas/shared/installation_images.rb +62 -0
  52. data/lib/vas/shared/installations.rb +67 -0
  53. data/lib/vas/shared/instances.rb +74 -0
  54. data/lib/vas/shared/logs.rb +89 -0
  55. data/lib/vas/shared/mutable_collection.rb +27 -0
  56. data/lib/vas/shared/node_instances.rb +58 -0
  57. data/lib/vas/shared/nodes.rb +70 -0
  58. data/lib/vas/shared/pending_configuration.rb +40 -0
  59. data/lib/vas/shared/resource.rb +44 -0
  60. data/lib/vas/shared/security.rb +51 -0
  61. data/lib/vas/shared/state_resource.rb +44 -0
  62. data/lib/vas/tc_server/applications.rb +89 -0
  63. data/lib/vas/tc_server/configuration.rb +29 -0
  64. data/lib/vas/tc_server/groups.rb +42 -0
  65. data/lib/vas/tc_server/installation_images.rb +38 -0
  66. data/lib/vas/tc_server/installations.rb +54 -0
  67. data/lib/vas/tc_server/instances.rb +102 -0
  68. data/lib/vas/tc_server/live_configurations.rb +29 -0
  69. data/lib/vas/tc_server/logs.rb +38 -0
  70. data/lib/vas/tc_server/node_applications.rb +76 -0
  71. data/lib/vas/tc_server/node_instances.rb +55 -0
  72. data/lib/vas/tc_server/node_revisions.rb +55 -0
  73. data/lib/vas/tc_server/nodes.rb +50 -0
  74. data/lib/vas/tc_server/pending_configurations.rb +38 -0
  75. data/lib/vas/tc_server/revision_images.rb +67 -0
  76. data/lib/vas/tc_server/revisions.rb +71 -0
  77. data/lib/vas/tc_server/tc_server.rb +50 -0
  78. data/lib/vas/tc_server/template_images.rb +67 -0
  79. data/lib/vas/tc_server/templates.rb +70 -0
  80. data/lib/vas/util/client.rb +159 -0
  81. data/lib/vas/util/link_utils.rb +43 -0
  82. data/lib/vas/vas_exception.rb +32 -0
  83. data/lib/vas/vfabric/agent_image.rb +50 -0
  84. data/lib/vas/vfabric/nodes.rb +47 -0
  85. data/lib/vas/vfabric/v_fabric.rb +34 -0
  86. data/lib/vas/vfabric_administration_server.rb +50 -0
  87. metadata +213 -0
data/LICENSE ADDED
@@ -0,0 +1,174 @@
1
+ Apache License
2
+
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the
14
+ copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all other
17
+ entities that control, are controlled by, or are under common control
18
+ with that entity. For the purposes of this definition, "control" means
19
+ (i) the power, direct or indirect, to cause the direction or management
20
+ of such entity, whether by contract or otherwise, or (ii) ownership
21
+ of fifty percent (50%) or more of the outstanding shares, or (iii)
22
+ beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
25
+ permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation source,
29
+ and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical transformation
32
+ or translation of a Source form, including but not limited to compiled
33
+ object code, generated documentation, and conversions to other media
34
+ types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a copyright
38
+ notice that is included in or attached to the work (an example is provided
39
+ in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object form,
42
+ that is based on (or derived from) the Work and for which the editorial
43
+ revisions, annotations, elaborations, or other modifications represent,
44
+ as a whole, an original work of authorship. For the purposes of this
45
+ License, Derivative Works shall not include works that remain separable
46
+ from, or merely link (or bind by name) to the interfaces of, the Work
47
+ and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including the
50
+ original version of the Work and any modifications or additions to
51
+ that Work or Derivative Works thereof, that is intentionally submitted
52
+ to Licensor for inclusion in the Work by the copyright owner or by an
53
+ individual or Legal Entity authorized to submit on behalf of the copyright
54
+ owner. For the purposes of this definition, "submitted" means any form of
55
+ electronic, verbal, or written communication sent to the Licensor or its
56
+ representatives, including but not limited to communication on electronic
57
+ mailing lists, source code control systems, and issue tracking systems
58
+ that are managed by, or on behalf of, the Licensor for the purpose of
59
+ discussing and improving the Work, but excluding communication that is
60
+ conspicuously marked or otherwise designated in writing by the copyright
61
+ owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License.
68
+ Subject to the terms and conditions of this License, each Contributor
69
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
70
+ royalty-free, irrevocable copyright license to reproduce, prepare
71
+ Derivative Works of, publicly display, publicly perform, sublicense, and
72
+ distribute the Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License.
75
+ Subject to the terms and conditions of this License, each Contributor
76
+ hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
77
+ royalty- free, irrevocable (except as stated in this section) patent
78
+ license to make, have made, use, offer to sell, sell, import, and
79
+ otherwise transfer the Work, where such license applies only to those
80
+ patent claims licensable by such Contributor that are necessarily
81
+ infringed by their Contribution(s) alone or by combination of
82
+ their Contribution(s) with the Work to which such Contribution(s)
83
+ was submitted. If You institute patent litigation against any entity
84
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the
85
+ Work or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses granted
87
+ to You under this License for that Work shall terminate as of the date
88
+ such litigation is filed.
89
+
90
+ 4. Redistribution.
91
+ You may reproduce and distribute copies of the Work or Derivative Works
92
+ thereof in any medium, with or without modifications, and in Source or
93
+ Object form, provided that You meet the following conditions:
94
+
95
+ a. You must give any other recipients of the Work or Derivative Works
96
+ a copy of this License; and
97
+
98
+ b. You must cause any modified files to carry prominent notices stating
99
+ that You changed the files; and
100
+
101
+ c. You must retain, in the Source form of any Derivative Works that
102
+ You distribute, all copyright, patent, trademark, and attribution
103
+ notices from the Source form of the Work, excluding those notices
104
+ that do not pertain to any part of the Derivative Works; and
105
+
106
+ d. If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one of
111
+ the following places: within a NOTICE text file distributed as part
112
+ of the Derivative Works; within the Source form or documentation,
113
+ if provided along with the Derivative Works; or, within a display
114
+ generated by the Derivative Works, if and wherever such third-party
115
+ notices normally appear. The contents of the NOTICE file are for
116
+ informational purposes only and do not modify the License. You
117
+ may add Your own attribution notices within Derivative Works that
118
+ You distribute, alongside or as an addendum to the NOTICE text
119
+ from the Work, provided that such additional attribution notices
120
+ cannot be construed as modifying the License. You may add Your own
121
+ copyright statement to Your modifications and may provide additional
122
+ or different license terms and conditions for use, reproduction, or
123
+ distribution of Your modifications, or for any such Derivative Works
124
+ as a whole, provided Your use, reproduction, and distribution of the
125
+ Work otherwise complies with the conditions stated in this License.
126
+
127
+ 5. Submission of Contributions.
128
+ Unless You explicitly state otherwise, any Contribution intentionally
129
+ submitted for inclusion in the Work by You to the Licensor shall be
130
+ under the terms and conditions of this License, without any additional
131
+ terms or conditions. Notwithstanding the above, nothing herein shall
132
+ supersede or modify the terms of any separate license agreement you may
133
+ have executed with Licensor regarding such Contributions.
134
+
135
+ 6. Trademarks.
136
+ This License does not grant permission to use the trade names, trademarks,
137
+ service marks, or product names of the Licensor, except as required for
138
+ reasonable and customary use in describing the origin of the Work and
139
+ reproducing the content of the NOTICE file.
140
+
141
+ 7. Disclaimer of Warranty.
142
+ Unless required by applicable law or agreed to in writing, Licensor
143
+ provides the Work (and each Contributor provides its Contributions) on
144
+ an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
145
+ express or implied, including, without limitation, any warranties or
146
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
147
+ A PARTICULAR PURPOSE. You are solely responsible for determining the
148
+ appropriateness of using or redistributing the Work and assume any risks
149
+ associated with Your exercise of permissions under this License.
150
+
151
+ 8. Limitation of Liability.
152
+ In no event and under no legal theory, whether in tort (including
153
+ negligence), contract, or otherwise, unless required by applicable law
154
+ (such as deliberate and grossly negligent acts) or agreed to in writing,
155
+ shall any Contributor be liable to You for damages, including any direct,
156
+ indirect, special, incidental, or consequential damages of any character
157
+ arising as a result of this License or out of the use or inability to
158
+ use the Work (including but not limited to damages for loss of goodwill,
159
+ work stoppage, computer failure or malfunction, or any and all other
160
+ commercial damages or losses), even if such Contributor has been advised
161
+ of the possibility of such damages.
162
+
163
+ 9. Accepting Warranty or Additional Liability.
164
+ While redistributing the Work or Derivative Works thereof, You may
165
+ choose to offer, and charge a fee for, acceptance of support, warranty,
166
+ indemnity, or other liability obligations and/or rights consistent with
167
+ this License. However, in accepting such obligations, You may act only
168
+ on Your own behalf and on Your sole responsibility, not on behalf of
169
+ any other Contributor, and only if You agree to indemnify, defend, and
170
+ hold each Contributor harmless for any liability incurred by, or claims
171
+ asserted against, such Contributor by reason of your accepting any such
172
+ warranty or additional liability.
173
+
174
+ END OF TERMS AND CONDITIONS
data/NOTICE ADDED
@@ -0,0 +1,5 @@
1
+ vFabric Administration Server API
2
+ Copyright (c) 2012 VMware, Inc. All Rights Reserved.
3
+
4
+ This product is licensed to you under the Apache License, Version 2.0 (the "License").
5
+ You may not use this product except in compliance with the License.
data/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # vFabric Administration Server Ruby API
2
+
3
+ The vFabric Administration Server (VAS) API is a Ruby library used for interacting with the
4
+ [vFabric Administration Server](http://www.vmware.com/support/pubs/vfabric-vas.html).
5
+
6
+ VAS's primary mode of interaction is via RESTful interface. This API enables the use of VAS using
7
+ rich Ruby types, eliminating the need for a detailed understanding of the REST API and its JSON
8
+ payloads.
9
+
10
+ ## Requirements
11
+
12
+ The VAS Ruby API requires Ruby 1.8.7 or 1.9.x. It has been built and tested on 1.8.7 and 1.9.3.
13
+
14
+ ## Installation
15
+
16
+ The VAS Ruby API is not yet available on [RubyGems](https://rubygems.org/). However, pre-built
17
+ gems can be [downloaded](https://github.com/vFabric/vas-ruby-api/downloads) and installed. For
18
+ example:
19
+
20
+ gem install vas-<version>.gem
21
+
22
+ ## Licence
23
+
24
+ The VAS Ruby API is licensed under the [Apache Licence, Version 2.0][asl2].
25
+
26
+ [asl2]: http://www.apache.org/licenses/LICENSE-2.0.html
data/Rakefile ADDED
@@ -0,0 +1,20 @@
1
+ require 'rubygems'
2
+ require 'rubygems/package_task'
3
+ require 'rake/clean'
4
+ require 'rake/testtask'
5
+
6
+ CLEAN.include("pkg", "coverage")
7
+
8
+ spec = Gem::Specification.load('vas.gemspec')
9
+
10
+ Gem::PackageTask.new(spec) do |pkg|
11
+ pkg.need_zip = true
12
+ pkg.need_tar = true
13
+ end
14
+
15
+ Rake::TestTask.new do |t|
16
+ t.pattern = "test/**/test_*.rb"
17
+ end
18
+
19
+
20
+ task :default => [:clean, :test, :package]
data/lib/vas.rb ADDED
@@ -0,0 +1,103 @@
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
+ require 'json'
19
+ require 'net/http'
20
+ require 'net/https'
21
+ require 'net/http/post/multipart'
22
+ require 'vas/shared/resource'
23
+ require 'vas/shared/collection'
24
+ require 'vas/shared/mutable_collection'
25
+ require 'vas/shared/configuration'
26
+ require 'vas/shared/groups'
27
+ require 'vas/shared/installations'
28
+ require 'vas/shared/installation_images'
29
+ require 'vas/shared/pending_configuration'
30
+ require 'vas/shared/security'
31
+ require 'vas/shared/state_resource'
32
+ require 'vas/shared/instances'
33
+ require 'vas/shared/logs'
34
+ require 'vas/shared/node_instances'
35
+ require 'vas/shared/nodes'
36
+ require 'vas/gemfire/agent_configuration'
37
+ require 'vas/gemfire/agent_instances'
38
+ require 'vas/gemfire/agent_live_configurations'
39
+ require 'vas/gemfire/agent_logs'
40
+ require 'vas/gemfire/agent_node_instances'
41
+ require 'vas/gemfire/agent_pending_configurations'
42
+ require 'vas/gemfire/application_code_images'
43
+ require 'vas/gemfire/application_code'
44
+ require 'vas/gemfire/cache_server_configuration'
45
+ require 'vas/gemfire/cache_server_instances'
46
+ require 'vas/gemfire/cache_server_live_configurations'
47
+ require 'vas/gemfire/cache_server_logs'
48
+ require 'vas/gemfire/cache_server_node_instances'
49
+ require 'vas/gemfire/cache_server_pending_configurations'
50
+ require 'vas/gemfire/disk_stores'
51
+ require 'vas/gemfire/gemfire'
52
+ require 'vas/gemfire/groups'
53
+ require 'vas/gemfire/installation_images'
54
+ require 'vas/gemfire/installations'
55
+ require 'vas/gemfire/live_application_codes'
56
+ require 'vas/gemfire/locator_configuration'
57
+ require 'vas/gemfire/locator_instances'
58
+ require 'vas/gemfire/locator_live_configurations'
59
+ require 'vas/gemfire/locator_logs'
60
+ require 'vas/gemfire/locator_node_instances'
61
+ require 'vas/gemfire/locator_pending_configurations'
62
+ require 'vas/gemfire/nodes'
63
+ require 'vas/gemfire/pending_application_codes'
64
+ require 'vas/gemfire/statistics'
65
+ require 'vas/rabbitmq/configuration'
66
+ require 'vas/rabbitmq/groups'
67
+ require 'vas/rabbitmq/installation_images'
68
+ require 'vas/rabbitmq/plugin_images'
69
+ require 'vas/rabbitmq/plugins'
70
+ require 'vas/rabbitmq/installations'
71
+ require 'vas/rabbitmq/instances'
72
+ require 'vas/rabbitmq/live_configurations'
73
+ require 'vas/rabbitmq/logs'
74
+ require 'vas/rabbitmq/node_instances'
75
+ require 'vas/rabbitmq/nodes'
76
+ require 'vas/rabbitmq/pending_configurations'
77
+ require 'vas/rabbitmq/rabbitmq'
78
+ require 'vas/tc_server/applications'
79
+ require 'vas/tc_server/configuration'
80
+ require 'vas/tc_server/groups'
81
+ require 'vas/tc_server/installation_images'
82
+ require 'vas/tc_server/installations'
83
+ require 'vas/tc_server/instances'
84
+ require 'vas/tc_server/live_configurations'
85
+ require 'vas/tc_server/logs'
86
+ require 'vas/tc_server/node_applications'
87
+ require 'vas/tc_server/node_instances'
88
+ require 'vas/tc_server/node_revisions'
89
+ require 'vas/tc_server/nodes'
90
+ require 'vas/tc_server/pending_configurations'
91
+ require 'vas/tc_server/revision_images'
92
+ require 'vas/tc_server/revisions'
93
+ require 'vas/tc_server/tc_server'
94
+ require 'vas/tc_server/template_images'
95
+ require 'vas/tc_server/templates'
96
+ require 'vas/util/client'
97
+ require 'vas/util/link_utils'
98
+ require 'vas/vas_exception'
99
+ require 'vas/vfabric/agent_image'
100
+ require 'vas/vfabric/nodes'
101
+ require 'vas/vfabric/v_fabric'
102
+ require 'vas/vfabric_administration_server'
103
+ require 'zip/zipfilesystem'
@@ -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 an agent instance
21
+ class AgentConfiguration < Shared::Configuration
22
+
23
+ def initialize(location, client) #:nodoc:
24
+ super(location, client, "agent-group-instance", AgentInstance)
25
+ end
26
+
27
+ end
28
+ end
@@ -0,0 +1,49 @@
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 agent instances.
21
+ class AgentInstances < Shared::MutableCollection
22
+
23
+ def initialize(location, client) #:nodoc:
24
+ super(location, client, "agent-group-instances", AgentInstance)
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
+ AgentInstance.new(client.post(location, payload, "agent-group-instance"), client)
31
+ end
32
+
33
+ end
34
+
35
+ # An agent instance
36
+ class AgentInstance < Shared::Instance
37
+
38
+ def initialize(location, client) #:nodoc:
39
+ super(location, client, Group, Installation, AgentLiveConfigurations, AgentPendingConfigurations, AgentNodeInstance, 'agent-node-instance')
40
+ end
41
+
42
+ # Updates the instance to use the given +installation+
43
+ def update(installation)
44
+ client.post(location, { :installation => installation.location });
45
+ end
46
+
47
+ end
48
+
49
+ 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 an agent instance's live configuration
21
+ class AgentLiveConfigurations < Shared::Collection
22
+
23
+ def initialize(location, client) #:nodoc:
24
+ super(location, client, "live-configurations", AgentConfiguration)
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 an agent node instance's logs
21
+ class AgentLogs < Shared::Logs
22
+
23
+ def initialize(location, client) #:nodoc:
24
+ super(location, client, AgentLog)
25
+ end
26
+
27
+ end
28
+
29
+ # A log file in an agent node instance
30
+ class AgentLog < Shared::Log
31
+
32
+ def initialize(location, client) #:nodoc:
33
+ super(location, client, 'agent-node-instance', AgentNodeInstance)
34
+ end
35
+
36
+ end
37
+
38
+ end