ganeti_client 0.0.5 → 0.0.6
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/README +0 -2
- data/lib/ganeti_client/client.rb +9 -6
- metadata +3 -3
data/README
CHANGED
data/lib/ganeti_client/client.rb
CHANGED
@@ -536,14 +536,17 @@ module Ganeti
|
|
536
536
|
# offline
|
537
537
|
# regular
|
538
538
|
def node_change_role(name, role, force = 0)
|
539
|
-
url = get_url("nodes/#{name}/role", {role =>
|
540
|
-
response_body = send_request("PUT", url)
|
539
|
+
url = get_url("nodes/#{name}/role", {"role" => role, "force" => force})
|
540
|
+
response_body = send_request("PUT", url, body)
|
541
541
|
|
542
542
|
return response_body
|
543
543
|
end
|
544
544
|
|
545
545
|
# Manages storage units on the node
|
546
|
-
# Requests a list of storage units on a node. Requires the parameters storage_type (one of file, lvm-pv or lvm-vg) and output_fields.
|
546
|
+
# Requests a list of storage units on a node. Requires the parameters storage_type (one of file, lvm-pv or lvm-vg) and output_fields.
|
547
|
+
# The result will be a job id, using which the result can be retrieved
|
548
|
+
#
|
549
|
+
# Return job id
|
547
550
|
def node_get_storage(name, storage_type = "", output_fields = "")
|
548
551
|
url = get_url("nodes/#{name}/storage", {"storage_type" => storage_type, "output_fields" => output_fields})
|
549
552
|
response_body = send_request("GET", url)
|
@@ -556,8 +559,8 @@ module Ganeti
|
|
556
559
|
# Parameters can be passed additionally. Currently only allocatable (bool) is supported.
|
557
560
|
#
|
558
561
|
# The result will be a job id.
|
559
|
-
def node_modify_storage(name, storage_type, allocatable = 0)
|
560
|
-
url = get_url("nodes/#{name}/storage/modify", {"storage_type" => storage_type, "allocatable" => allocatable})
|
562
|
+
def node_modify_storage(name, storage_unit_name, storage_type, allocatable = 0)
|
563
|
+
url = get_url("nodes/#{name}/storage/modify", {"name" => storage_unit_name, "storage_type" => storage_type, "allocatable" => allocatable})
|
561
564
|
response_body = send_request("PUT", url)
|
562
565
|
|
563
566
|
return response_body
|
@@ -746,7 +749,7 @@ module Ganeti
|
|
746
749
|
http.use_ssl = (uri.scheme == "http")? false : true
|
747
750
|
|
748
751
|
headers = {}
|
749
|
-
headers = authenticate(self.username, self.password)
|
752
|
+
headers = authenticate(self.username, self.password)
|
750
753
|
|
751
754
|
response = http.send_request(method, url, body, headers)
|
752
755
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ganeti_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Micha\xC3\xABl Rigart"
|