opennebula 4.2.0 → 4.3.80.beta

Sign up to get free protection for your applications and to get access to all the features.
data/lib/opennebula.rb CHANGED
@@ -54,5 +54,5 @@ require 'opennebula/system'
54
54
  module OpenNebula
55
55
 
56
56
  # OpenNebula version
57
- VERSION = '4.2.0'
57
+ VERSION = '4.3.80'
58
58
  end
@@ -34,6 +34,7 @@ module OpenNebula
34
34
  :addvnet => "cluster.addvnet",
35
35
  :delvnet => "cluster.delvnet",
36
36
  :update => "cluster.update",
37
+ :rename => "cluster.rename"
37
38
  }
38
39
 
39
40
  # Creates a Cluster description with just its identifier
@@ -171,6 +172,16 @@ module OpenNebula
171
172
  super(CLUSTER_METHODS[:update], new_template, append ? 1 : 0)
172
173
  end
173
174
 
175
+ # Renames this Cluster
176
+ #
177
+ # @param name [String] New name for the Cluster.
178
+ #
179
+ # @return [nil, OpenNebula::Error] nil in case of success, Error
180
+ # otherwise
181
+ def rename(name)
182
+ return call(CLUSTER_METHODS[:rename], @pe_id, name)
183
+ end
184
+
174
185
  # ---------------------------------------------------------------------
175
186
  # Helpers to get information
176
187
  # ---------------------------------------------------------------------
@@ -29,7 +29,8 @@ module OpenNebula
29
29
  :delete => "datastore.delete",
30
30
  :update => "datastore.update",
31
31
  :chown => "datastore.chown",
32
- :chmod => "datastore.chmod"
32
+ :chmod => "datastore.chmod",
33
+ :rename => "datastore.rename"
33
34
  }
34
35
 
35
36
  DATASTORE_TYPES=%w{IMAGE SYSTEM FILE}
@@ -146,6 +147,16 @@ module OpenNebula
146
147
  group_m, group_a, other_u, other_m, other_a)
147
148
  end
148
149
 
150
+ # Renames this datastore
151
+ #
152
+ # @param name [String] New name for the datastore
153
+ #
154
+ # @return [nil, OpenNebula::Error] nil in case of success, Error
155
+ # otherwise
156
+ def rename(name)
157
+ return call(DATASTORE_METHODS[:rename], @pe_id, name)
158
+ end
159
+
149
160
  # ---------------------------------------------------------------------
150
161
  # Helpers to get information
151
162
  # ---------------------------------------------------------------------
@@ -30,7 +30,8 @@ module OpenNebula
30
30
  :delete => "host.delete",
31
31
  :enable => "host.enable",
32
32
  :update => "host.update",
33
- :monitoring => "host.monitoring"
33
+ :monitoring => "host.monitoring",
34
+ :rename => "host.rename"
34
35
  }
35
36
 
36
37
  HOST_STATES=%w{INIT MONITORING_MONITORED MONITORED ERROR DISABLED MONITORING_ERROR MONITORING_INIT MONITORING_DISABLED}
@@ -176,6 +177,16 @@ module OpenNebula
176
177
  return @client.call(HOST_METHODS[:monitoring], @pe_id)
177
178
  end
178
179
 
180
+ # Renames this Host
181
+ #
182
+ # @param name [String] New name for the Host.
183
+ #
184
+ # @return [nil, OpenNebula::Error] nil in case of success, Error
185
+ # otherwise
186
+ def rename(name)
187
+ return call(HOST_METHODS[:rename], @pe_id, name)
188
+ end
189
+
179
190
  #######################################################################
180
191
  # Helpers to get Host information
181
192
  #######################################################################
@@ -29,6 +29,8 @@ module OpenNebula
29
29
  :delete => "user.delete",
30
30
  :passwd => "user.passwd",
31
31
  :chgrp => "user.chgrp",
32
+ :addgroup => "user.addgroup",
33
+ :delgroup => "user.delgroup",
32
34
  :update => "user.update",
33
35
  :chauth => "user.chauth",
34
36
  :quota => "user.quota"
@@ -124,7 +126,7 @@ module OpenNebula
124
126
  return rc
125
127
  end
126
128
 
127
- # Changes the main group
129
+ # Changes the primary group
128
130
  # gid:: _Integer_ the new group id. Set to -1 to leave the current one
129
131
  # [return] nil in case of success or an Error object
130
132
  def chgrp(gid)
@@ -136,6 +138,23 @@ module OpenNebula
136
138
  return rc
137
139
  end
138
140
 
141
+ # Adds the User to a secondary group
142
+ # @param gid [Integer] the new group id.
143
+ # @return [nil, OpenNebula::Error] nil in case of success, Error
144
+ # otherwise
145
+ def addgroup(gid)
146
+ return call(USER_METHODS[:addgroup], @pe_id, gid)
147
+ end
148
+
149
+ # Removes the User from a secondary group. Fails if the
150
+ # group is the main one
151
+ # @param gid [Integer] the group id.
152
+ # @return [nil, OpenNebula::Error] nil in case of success, Error
153
+ # otherwise
154
+ def delgroup(gid)
155
+ return call(USER_METHODS[:delgroup], @pe_id, gid)
156
+ end
157
+
139
158
  # Changes the auth driver and the password of the given User
140
159
  #
141
160
  # @param auth [String] the new auth driver
@@ -216,11 +216,13 @@ module OpenNebula
216
216
  # @param enforce [true|false] If it is set to true, the host capacity
217
217
  # will be checked, and the deployment will fail if the host is
218
218
  # overcommited. Defaults to false
219
+ # @param ds_id [Integer] The System Datastore where to deploy the VM. To
220
+ # use the default, set it to -1
219
221
  #
220
222
  # @return [nil, OpenNebula::Error] nil in case of success, Error
221
223
  # otherwise
222
- def deploy(host_id, enforce=false)
223
- return call(VM_METHODS[:deploy], @pe_id, host_id.to_i, enforce)
224
+ def deploy(host_id, enforce=false, ds_id=-1)
225
+ return call(VM_METHODS[:deploy], @pe_id, host_id.to_i, enforce, ds_id)
224
226
  end
225
227
 
226
228
  # Shutdowns an already deployed VM
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opennebula
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
5
- prerelease:
4
+ version: 4.3.80.beta
5
+ prerelease: 7
6
6
  platform: ruby
7
7
  authors:
8
8
  - OpenNebula
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-26 00:00:00.000000000 Z
12
+ date: 2013-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -106,9 +106,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
- - - ! '>='
109
+ - - ! '>'
110
110
  - !ruby/object:Gem::Version
111
- version: '0'
111
+ version: 1.3.1
112
112
  requirements: []
113
113
  rubyforge_project:
114
114
  rubygems_version: 1.8.25