Class: Rubineti::Cluster
- Inherits:
-
Object
- Object
- Rubineti::Cluster
- Defined in:
- lib/rubineti/cluster.rb
Instance Method Summary collapse
-
#features ⇒ Object
Returns a list of features supported by the RAPI server.
-
#info ⇒ Object
Returns a list of cluster information.
-
#initialize(connection) ⇒ Cluster
constructor
A new instance of Cluster.
-
#os_list ⇒ Object
Return a list of all OSes.
-
#redistribute_config ⇒ Object
Redistribute configuration to all nodes.
-
#tags_create(params = {}) ⇒ Object
Adds a set of tags.
-
#tags_delete(params = {}) ⇒ Object
Delete tags.
-
#tags_list ⇒ Object
Returns the cluster tags.
-
#version ⇒ Object
Returns the cluster API version.
Constructor Details
#initialize(connection) ⇒ Cluster
Returns a new instance of Cluster.
3 4 5 |
# File 'lib/rubineti/cluster.rb', line 3 def initialize connection @connection = connection end |
Instance Method Details
#features ⇒ Object
Returns a list of features supported by the RAPI server.
10 11 12 13 |
# File 'lib/rubineti/cluster.rb', line 10 def features warn "WARNING: Cluster#features not implemented." # get "/#{Ganeti::Version}/features" end |
#info ⇒ Object
Returns a list of cluster information.
18 19 20 |
# File 'lib/rubineti/cluster.rb', line 18 def info @connection.get "/#{Ganeti::Version}/info" end |
#os_list ⇒ Object
Return a list of all OSes.
74 75 76 |
# File 'lib/rubineti/cluster.rb', line 74 def os_list @connection.get "/#{Ganeti::Version}/os" end |
#redistribute_config ⇒ Object
Redistribute configuration to all nodes. Returns a job_id.
26 27 28 |
# File 'lib/rubineti/cluster.rb', line 26 def redistribute_config @connection.put "/#{Ganeti::Version}/redistribute-config" end |
#tags_create(params = {}) ⇒ Object
Adds a set of tags. Returns a job_id.
If the optional dry-run parameter (?dry-run=1) is provided, the job will not be actually executed, only the pre-execution checks will be done.
38 39 40 41 |
# File 'lib/rubineti/cluster.rb', line 38 def params = {} warn "WARNING: Cluster#tags_create not implemented." # put "/#{Ganeti::Version}/tags", params end |
#tags_delete(params = {}) ⇒ Object
Delete tags. Returns a job_id.
If the optional dry-run parameter (?dry-run=1) is provided, the job will not be actually executed, only the pre-execution checks will be done.
51 52 53 54 |
# File 'lib/rubineti/cluster.rb', line 51 def params = {} warn "WARNING: Cluster#tags_delete not implemented." # delete "/#{Ganeti::Version}/tags", params end |
#tags_list ⇒ Object
Returns the cluster tags.
59 60 61 62 |
# File 'lib/rubineti/cluster.rb', line 59 def warn "WARNING: Cluster#tags_list not implemented." # get "/#{Ganeti::Version}/tags" end |
#version ⇒ Object
Returns the cluster API version.
67 68 69 |
# File 'lib/rubineti/cluster.rb', line 67 def version @connection.get "/version" end |