profitbricks 0.0.1

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 (108) hide show
  1. data/.autotest +23 -0
  2. data/.gemtest +0 -0
  3. data/.rspec +3 -0
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile +8 -0
  6. data/Gemfile.lock +53 -0
  7. data/Manifest.txt +106 -0
  8. data/README.md +70 -0
  9. data/Rakefile +31 -0
  10. data/bin/profitbricks +3 -0
  11. data/examples/create_datacenter.rb +57 -0
  12. data/lib/profitbricks/config.rb +16 -0
  13. data/lib/profitbricks/data_center.rb +100 -0
  14. data/lib/profitbricks/extensions.rb +9 -0
  15. data/lib/profitbricks/image.rb +47 -0
  16. data/lib/profitbricks/ip_block.rb +49 -0
  17. data/lib/profitbricks/model.rb +102 -0
  18. data/lib/profitbricks/nic.rb +103 -0
  19. data/lib/profitbricks/profitbricks.rb +86 -0
  20. data/lib/profitbricks/server.rb +83 -0
  21. data/lib/profitbricks/storage.rb +84 -0
  22. data/lib/profitbricks.rb +15 -0
  23. data/profitbricks.gemspec +34 -0
  24. data/spec/fixtures/add_public_ip_to_nic/success.json +10 -0
  25. data/spec/fixtures/add_public_ip_to_nic/success.xml +1 -0
  26. data/spec/fixtures/clear_data_center/success.json +10 -0
  27. data/spec/fixtures/clear_data_center/success.xml +1 -0
  28. data/spec/fixtures/connect_storage_to_server/success.json +10 -0
  29. data/spec/fixtures/connect_storage_to_server/success.xml +1 -0
  30. data/spec/fixtures/create_data_center/success.json +10 -0
  31. data/spec/fixtures/create_data_center/success.xml +1 -0
  32. data/spec/fixtures/create_nic/success.json +11 -0
  33. data/spec/fixtures/create_nic/success.xml +1 -0
  34. data/spec/fixtures/create_server/minimal.json +11 -0
  35. data/spec/fixtures/create_server/minimal.xml +1 -0
  36. data/spec/fixtures/create_storage/success.json +11 -0
  37. data/spec/fixtures/create_storage/success.xml +1 -0
  38. data/spec/fixtures/delete_data_center/success.json +8 -0
  39. data/spec/fixtures/delete_data_center/success.xml +1 -0
  40. data/spec/fixtures/delete_nic/success.json +10 -0
  41. data/spec/fixtures/delete_nic/success.xml +1 -0
  42. data/spec/fixtures/delete_server/success.json +10 -0
  43. data/spec/fixtures/delete_server/success.xml +1 -0
  44. data/spec/fixtures/delete_storage/failture.json +16 -0
  45. data/spec/fixtures/delete_storage/failture.xml +1 -0
  46. data/spec/fixtures/delete_storage/success.json +10 -0
  47. data/spec/fixtures/delete_storage/success.xml +1 -0
  48. data/spec/fixtures/disconnect_storage_from_server/failture.json +16 -0
  49. data/spec/fixtures/disconnect_storage_from_server/failture.xml +1 -0
  50. data/spec/fixtures/disconnect_storage_from_server/success.json +10 -0
  51. data/spec/fixtures/disconnect_storage_from_server/success.xml +1 -0
  52. data/spec/fixtures/get_all_data_centers/empty.json +1 -0
  53. data/spec/fixtures/get_all_data_centers/empty.xml +1 -0
  54. data/spec/fixtures/get_all_data_centers/test_datacenter.json +10 -0
  55. data/spec/fixtures/get_all_data_centers/test_datacenter.xml +1 -0
  56. data/spec/fixtures/get_all_images/success.json +100 -0
  57. data/spec/fixtures/get_all_images/success.xml +1 -0
  58. data/spec/fixtures/get_all_public_ip_blocks/success.json +16 -0
  59. data/spec/fixtures/get_all_public_ip_blocks/success.xml +1 -0
  60. data/spec/fixtures/get_data_center/create.json +147 -0
  61. data/spec/fixtures/get_data_center/create.xml +1 -0
  62. data/spec/fixtures/get_data_center/two_servers_with_storage.json +147 -0
  63. data/spec/fixtures/get_data_center/two_servers_with_storage.xml +1 -0
  64. data/spec/fixtures/get_data_center_state/in_process.json +1 -0
  65. data/spec/fixtures/get_data_center_state/in_process.xml +1 -0
  66. data/spec/fixtures/get_data_center_state/success.json +1 -0
  67. data/spec/fixtures/get_data_center_state/success.xml +1 -0
  68. data/spec/fixtures/get_image/success.json +15 -0
  69. data/spec/fixtures/get_image/success.xml +1 -0
  70. data/spec/fixtures/get_nic/success.json +16 -0
  71. data/spec/fixtures/get_nic/success.xml +1 -0
  72. data/spec/fixtures/get_nic/two_ips.json +19 -0
  73. data/spec/fixtures/get_nic/two_ips.xml +1 -0
  74. data/spec/fixtures/get_server/after_create.json +17 -0
  75. data/spec/fixtures/get_server/after_create.xml +1 -0
  76. data/spec/fixtures/get_server/connected_storage.json +26 -0
  77. data/spec/fixtures/get_server/connected_storage.xml +1 -0
  78. data/spec/fixtures/get_storage/success.json +14 -0
  79. data/spec/fixtures/get_storage/success.xml +1 -0
  80. data/spec/fixtures/reboot_server/success.json +1 -0
  81. data/spec/fixtures/reboot_server/success.xml +1 -0
  82. data/spec/fixtures/release_public_ip_block/success.json +1 -0
  83. data/spec/fixtures/release_public_ip_block/success.xml +1 -0
  84. data/spec/fixtures/remove_public_ip_from_nic/success.json +10 -0
  85. data/spec/fixtures/remove_public_ip_from_nic/success.xml +1 -0
  86. data/spec/fixtures/reserve_public_ip_block/success.json +13 -0
  87. data/spec/fixtures/reserve_public_ip_block/success.xml +1 -0
  88. data/spec/fixtures/set_image_os_type/success.json +1 -0
  89. data/spec/fixtures/set_image_os_type/success.xml +1 -0
  90. data/spec/fixtures/set_internet_access/success.json +10 -0
  91. data/spec/fixtures/set_internet_access/success.xml +1 -0
  92. data/spec/fixtures/update_data_center/success.json +10 -0
  93. data/spec/fixtures/update_data_center/success.xml +1 -0
  94. data/spec/fixtures/update_nic/success.json +10 -0
  95. data/spec/fixtures/update_nic/success.xml +1 -0
  96. data/spec/fixtures/update_server/basic.json +10 -0
  97. data/spec/fixtures/update_server/basic.xml +1 -0
  98. data/spec/fixtures/update_storage/success.json +10 -0
  99. data/spec/fixtures/update_storage/success.xml +1 -0
  100. data/spec/profitbricks/data_center_spec.rb +95 -0
  101. data/spec/profitbricks/image_spec.rb +23 -0
  102. data/spec/profitbricks/ip_block_spec.rb +26 -0
  103. data/spec/profitbricks/model_spec.rb +68 -0
  104. data/spec/profitbricks/nic_spec.rb +55 -0
  105. data/spec/profitbricks/server_spec.rb +41 -0
  106. data/spec/profitbricks/storage_spec.rb +47 -0
  107. data/spec/spec_helper.rb +45 -0
  108. metadata +193 -0
@@ -0,0 +1,84 @@
1
+ module Profitbricks
2
+ class Storage < Profitbricks::Model
3
+
4
+ # Deletes an existing virtual storage device.
5
+ #
6
+ # @return [Boolean] true on success, false otherwise
7
+ def delete
8
+ response = Profitbricks.request :delete_storage, "<storageId>#{self.id}</storageId>"
9
+ return true if response.to_hash[:delete_storage_response][:return]
10
+ end
11
+
12
+ # Connects a virtual storage device to an existing server.
13
+ #
14
+ # @param [Hash] options Parameters to connect the Storage
15
+ # @option options [:server_id] Identifier of the target virtual server (required)
16
+ # @option options [:bus_type] Bus type to which the storage will be connected. Type can be IDE, SCSI or VIRTIO (required)
17
+ # @option options [:device_number] Defines the device number of the virtual storage. If no device number is set, a device number will be automatically assigned
18
+ # @return [Boolean] true on success, false otherwise
19
+ def connect(options = {})
20
+ xml = "<arg0>"
21
+ xml += get_xml_and_update_attributes options.merge(:storage_id => self.id), [:server_id, :storage_id, :bus_type, :device_number]
22
+ xml += "</arg0>"
23
+ response = Profitbricks.request :connect_storage_to_server, xml
24
+ return true if response.to_hash[:connect_storage_to_server_response][:return]
25
+ end
26
+
27
+ # Disconnects a virtual storage device from a connected server.
28
+ #
29
+ # @param [Hash] options Parameters to disconnect the Storage
30
+ # @option options [:server_id] Identifier of the connected virtual server (required)
31
+ # @return [Boolean] true on success, false otherwise
32
+ def disconnect(options = {})
33
+ response = Profitbricks.request :disconnect_storage_from_server,
34
+ "<storageId>#{self.id}</storageId><serverId>#{options[:server_id]}</serverId>"
35
+ return true if response.to_hash[:disconnect_storage_from_server_response][:return]
36
+ end
37
+
38
+ # Updates parameters of an existing virtual storage device.
39
+ #
40
+ # @param [Hash] options Parameters to update the Storage
41
+ # @option options [:size] Storage size (in GiB)
42
+ # @option options [:name] Name of the storage to be created
43
+ # @option options [:mount_image_id] Specifies the image to be assigned to the storage by its ID. Either choose a HDD or a CD-ROM/DVD (ISO) image
44
+ # @return [Boolean] true on success, false otherwise
45
+ def update(options = {})
46
+ xml = "<arg0>"
47
+ xml += get_xml_and_update_attributes options.merge(:storage_id => self.id), [:storage_id, :name, :size, :mount_image_id]
48
+ xml += "</arg0>"
49
+ response = Profitbricks.request :update_storage, xml
50
+ return true if response.to_hash[:update_storage_response][:return]
51
+ end
52
+
53
+ class << self
54
+ # Creates a virtual storage within an existing virtual data center. Additional parameters can be
55
+ # specified, e.g. for assigning a HDD image to the storage.
56
+ #
57
+ # @param [Hash] options Parameters for the new Storage
58
+ # @option options [:size] Storage size (in GiB) (required)
59
+ # @option options [:data_center_id] Defines the data center wherein the storage is to be created. If left empty, the storage will be created in a new data center
60
+ # @option options [:name] Name of the storage to be created
61
+ # @option options [:mount_image_id] Specifies the image to be assigned to the storage by its ID. Either choose a HDD or a CD-ROM/DVD (ISO) image
62
+ # @return [Storage] The created Storage
63
+ def create(options = {})
64
+ raise ArgumentError.new("You must provide a :data_center_id") if options[:data_center_id].nil?
65
+ xml = "<arg0>"
66
+ xml += get_xml_and_update_attributes options, [:data_center_id, :name, :size, :mount_image_id]
67
+ xml += "</arg0>"
68
+ response = Profitbricks.request :create_storage, xml
69
+ self.find(:id => response.to_hash[:create_storage_return][:return][:storage_id])
70
+ end
71
+
72
+ # Finds a storage device
73
+ #
74
+ # @param [Hash] options currently just :id is supported
75
+ # @option options [String] The id of the storage to locate
76
+ # @return [Storage]
77
+ def find(options = {})
78
+ raise "Unable to locate the storage named '#{options[:name]}'" unless options[:id]
79
+ response = Profitbricks.request :get_storage, "<storageId>#{options[:id]}</storageId>"
80
+ Profitbricks::Storage.new(response.to_hash[:get_storage_response][:return])
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,15 @@
1
+ require 'profitbricks/profitbricks'
2
+ require 'profitbricks/extensions'
3
+ require 'profitbricks/config'
4
+ require 'profitbricks/model'
5
+ require 'profitbricks/data_center'
6
+ require 'profitbricks/server'
7
+ require 'profitbricks/image'
8
+ require 'profitbricks/storage'
9
+ require 'profitbricks/ip_block'
10
+
11
+ module Profitbricks
12
+ VERSION = '0.0.1'
13
+ end
14
+
15
+ PB = Profitbricks
@@ -0,0 +1,34 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "profitbricks"
5
+ s.version = "0.0.1.20120306225911"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Dominik Sander"]
9
+ s.date = "2012-03-06"
10
+ s.description = "A Ruby client for the ProfitBricks API.\n\nBE AWARE: This software is in a very early state of development, the methods and responses will very likely change over time."
11
+ s.email = ["git@dsander.de"]
12
+ s.extra_rdoc_files = ["Manifest.txt"]
13
+ s.files = [".autotest", ".rspec", "CHANGELOG.md", "Gemfile", "Gemfile.lock", "Manifest.txt", "README.md", "Rakefile", "examples/create_datacenter.rb", "lib/profitbricks.rb", "lib/profitbricks/config.rb", "lib/profitbricks/data_center.rb", "lib/profitbricks/extensions.rb", "lib/profitbricks/image.rb", "lib/profitbricks/ip_block.rb", "lib/profitbricks/model.rb", "lib/profitbricks/nic.rb", "lib/profitbricks/profitbricks.rb", "lib/profitbricks/server.rb", "lib/profitbricks/storage.rb", "spec/fixtures/add_public_ip_to_nic/success.json", "spec/fixtures/add_public_ip_to_nic/success.xml", "spec/fixtures/clear_data_center/success.json", "spec/fixtures/clear_data_center/success.xml", "spec/fixtures/connect_storage_to_server/success.json", "spec/fixtures/connect_storage_to_server/success.xml", "spec/fixtures/create_data_center/success.json", "spec/fixtures/create_data_center/success.xml", "spec/fixtures/create_nic/success.json", "spec/fixtures/create_nic/success.xml", "spec/fixtures/create_server/minimal.json", "spec/fixtures/create_server/minimal.xml", "spec/fixtures/create_storage/success.json", "spec/fixtures/create_storage/success.xml", "spec/fixtures/delete_data_center/success.json", "spec/fixtures/delete_data_center/success.xml", "spec/fixtures/delete_nic/success.json", "spec/fixtures/delete_nic/success.xml", "spec/fixtures/delete_server/success.json", "spec/fixtures/delete_server/success.xml", "spec/fixtures/delete_storage/failture.json", "spec/fixtures/delete_storage/failture.xml", "spec/fixtures/delete_storage/success.json", "spec/fixtures/delete_storage/success.xml", "spec/fixtures/disconnect_storage_from_server/failture.json", "spec/fixtures/disconnect_storage_from_server/failture.xml", "spec/fixtures/disconnect_storage_from_server/success.json", "spec/fixtures/disconnect_storage_from_server/success.xml", "spec/fixtures/get_all_data_centers/empty.json", "spec/fixtures/get_all_data_centers/empty.xml", "spec/fixtures/get_all_data_centers/test_datacenter.json", "spec/fixtures/get_all_data_centers/test_datacenter.xml", "spec/fixtures/get_all_images/success.json", "spec/fixtures/get_all_images/success.xml", "spec/fixtures/get_all_public_ip_blocks/success.json", "spec/fixtures/get_all_public_ip_blocks/success.xml", "spec/fixtures/get_data_center/create.json", "spec/fixtures/get_data_center/create.xml", "spec/fixtures/get_data_center/two_servers_with_storage.json", "spec/fixtures/get_data_center/two_servers_with_storage.xml", "spec/fixtures/get_data_center_state/in_process.json", "spec/fixtures/get_data_center_state/in_process.xml", "spec/fixtures/get_data_center_state/success.json", "spec/fixtures/get_data_center_state/success.xml", "spec/fixtures/get_image/success.json", "spec/fixtures/get_image/success.xml", "spec/fixtures/get_nic/success.json", "spec/fixtures/get_nic/success.xml", "spec/fixtures/get_nic/two_ips.json", "spec/fixtures/get_nic/two_ips.xml", "spec/fixtures/get_server/after_create.json", "spec/fixtures/get_server/after_create.xml", "spec/fixtures/get_server/connected_storage.json", "spec/fixtures/get_server/connected_storage.xml", "spec/fixtures/get_storage/success.json", "spec/fixtures/get_storage/success.xml", "spec/fixtures/reboot_server/success.json", "spec/fixtures/reboot_server/success.xml", "spec/fixtures/release_public_ip_block/success.json", "spec/fixtures/release_public_ip_block/success.xml", "spec/fixtures/remove_public_ip_from_nic/success.json", "spec/fixtures/remove_public_ip_from_nic/success.xml", "spec/fixtures/reserve_public_ip_block/success.json", "spec/fixtures/reserve_public_ip_block/success.xml", "spec/fixtures/set_image_os_type/success.json", "spec/fixtures/set_image_os_type/success.xml", "spec/fixtures/set_internet_access/success.json", "spec/fixtures/set_internet_access/success.xml", "spec/fixtures/update_data_center/success.json", "spec/fixtures/update_data_center/success.xml", "spec/fixtures/update_nic/success.json", "spec/fixtures/update_nic/success.xml", "spec/fixtures/update_server/basic.json", "spec/fixtures/update_server/basic.xml", "spec/fixtures/update_storage/success.json", "spec/fixtures/update_storage/success.xml", "spec/profitbricks/data_center_spec.rb", "spec/profitbricks/image_spec.rb", "spec/profitbricks/ip_block_spec.rb", "spec/profitbricks/model_spec.rb", "spec/profitbricks/nic_spec.rb", "spec/profitbricks/server_spec.rb", "spec/profitbricks/storage_spec.rb", "spec/spec_helper.rb", ".gemtest"]
14
+ s.rdoc_options = ["--main", "README.md"]
15
+ s.require_paths = ["lib"]
16
+ s.rubyforge_project = "profitbricks"
17
+ s.rubygems_version = "1.8.11"
18
+ s.summary = "A Ruby client for the ProfitBricks API"
19
+
20
+ if s.respond_to? :specification_version then
21
+ s.specification_version = 3
22
+
23
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
24
+ s.add_development_dependency(%q<rdoc>, ["~> 3.10"])
25
+ s.add_development_dependency(%q<hoe>, ["~> 2.14"])
26
+ else
27
+ s.add_dependency(%q<rdoc>, ["~> 3.10"])
28
+ s.add_dependency(%q<hoe>, ["~> 2.14"])
29
+ end
30
+ else
31
+ s.add_dependency(%q<rdoc>, ["~> 3.10"])
32
+ s.add_dependency(%q<hoe>, ["~> 2.14"])
33
+ end
34
+ end
@@ -0,0 +1,10 @@
1
+ {
2
+ "add_public_ip_to_nic_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "57",
7
+ "request_id": "1427"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:addPublicIpToNicResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1427</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>57</dataCenterVersion></return></ns2:addPublicIpToNicResponse></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "clear_data_center_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "10",
7
+ "request_id": "1179"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:clearDataCenterResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1179</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>10</dataCenterVersion></return></ns2:clearDataCenterResponse></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "connect_storage_to_server_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "34",
7
+ "request_id": "1233"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:connectStorageToServerResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1233</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>34</dataCenterVersion></return></ns2:connectStorageToServerResponse></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "create_data_center_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "a897fbd7-9f24-4eed-bd56-cadae6117755",
6
+ "data_center_version": "1",
7
+ "request_id": "1182"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:createDataCenterResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1182</requestId><dataCenterId>a897fbd7-9f24-4eed-bd56-cadae6117755</dataCenterId><dataCenterVersion>1</dataCenterVersion></return></ns2:createDataCenterResponse></S:Body></S:Envelope>
@@ -0,0 +1,11 @@
1
+ {
2
+ "create_nic_return": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "54",
7
+ "nic_id": "cba8af39-b5de-477b-9795-2f02ea9cf04f",
8
+ "request_id": "1408"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:createNicReturn xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1408</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>54</dataCenterVersion><nicId>cba8af39-b5de-477b-9795-2f02ea9cf04f</nicId></return></ns2:createNicReturn></S:Body></S:Envelope>
@@ -0,0 +1,11 @@
1
+ {
2
+ "create_server_return": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "14",
7
+ "request_id": "1184",
8
+ "server_id": "b7a5f3d1-324a-4490-aa8e-56cdec436e3f"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:createServerReturn xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1184</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>14</dataCenterVersion><serverId>b7a5f3d1-324a-4490-aa8e-56cdec436e3f</serverId></return></ns2:createServerReturn></S:Body></S:Envelope>
@@ -0,0 +1,11 @@
1
+ {
2
+ "create_storage_return": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "32",
7
+ "request_id": "1229",
8
+ "storage_id": "f55952bc-da27-4e29-af89-ed212ea28e11"
9
+ }
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:createStorageReturn xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1229</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>32</dataCenterVersion><storageId>f55952bc-da27-4e29-af89-ed212ea28e11</storageId></return></ns2:createStorageReturn></S:Body></S:Envelope>
@@ -0,0 +1,8 @@
1
+ {
2
+ "delete_data_center_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "request_id": "1183"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:deleteDataCenterResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1183</requestId></return></ns2:deleteDataCenterResponse></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "delete_nic_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "52",
7
+ "request_id": "1400"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:deleteNicResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1400</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>52</dataCenterVersion></return></ns2:deleteNicResponse></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "delete_server_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "18",
7
+ "request_id": "1186"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:deleteServerResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1186</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>18</dataCenterVersion></return></ns2:deleteServerResponse></S:Body></S:Envelope>
@@ -0,0 +1,16 @@
1
+ {
2
+ "fault": {
3
+ "@xmlns:ns4": "http://www.w3.org/2003/05/soap-envelope",
4
+ "detail": {
5
+ "profitbricks_service_fault": {
6
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
7
+ "fault_code": "BAD_REQUEST",
8
+ "http_code": "400",
9
+ "message": "The following mandatory parameters are null: storageId",
10
+ "request_id": "1252"
11
+ }
12
+ },
13
+ "faultcode": "S:Server",
14
+ "faultstring": "The following mandatory parameters are null: storageId"
15
+ }
16
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>The following mandatory parameters are null: storageId</faultstring><detail><ns2:ProfitbricksServiceFault xmlns:ns2="http://ws.api.profitbricks.com/"><faultCode>BAD_REQUEST</faultCode><httpCode>400</httpCode><message>The following mandatory parameters are null: storageId</message><requestId>1252</requestId></ns2:ProfitbricksServiceFault></detail></S:Fault></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "delete_storage_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "38",
7
+ "request_id": "1265"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:deleteStorageResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1265</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>38</dataCenterVersion></return></ns2:deleteStorageResponse></S:Body></S:Envelope>
@@ -0,0 +1,16 @@
1
+ {
2
+ "fault": {
3
+ "@xmlns:ns4": "http://www.w3.org/2003/05/soap-envelope",
4
+ "detail": {
5
+ "profitbricks_service_fault": {
6
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
7
+ "fault_code": "PROVISIONING_NO_CHANGES",
8
+ "http_code": "409",
9
+ "message": "Nothing changes. The new provisioning request does not differ from the current active one. The storage is not mounted to the server. So no needs to unmount it",
10
+ "request_id": "1216"
11
+ }
12
+ },
13
+ "faultcode": "S:Server",
14
+ "faultstring": "Nothing changes. The new provisioning request does not differ from the current active one. The storage is not mounted to the server. So no needs to unmount it"
15
+ }
16
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>Nothing changes. The new provisioning request does not differ from the current active one. The storage is not mounted to the server. So no needs to unmount it</faultstring><detail><ns2:ProfitbricksServiceFault xmlns:ns2="http://ws.api.profitbricks.com/"><faultCode>PROVISIONING_NO_CHANGES</faultCode><httpCode>409</httpCode><message>Nothing changes. The new provisioning request does not differ from the current active one. The storage is not mounted to the server. So no needs to unmount it</message><requestId>1216</requestId></ns2:ProfitbricksServiceFault></detail></S:Fault></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "disconnect_storage_from_server_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_version": "36",
7
+ "request_id": "1250"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:disconnectStorageFromServerResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><requestId>1250</requestId><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterVersion>36</dataCenterVersion></return></ns2:disconnectStorageFromServerResponse></S:Body></S:Envelope>
@@ -0,0 +1 @@
1
+ {"get_all_data_centers_response":{"@xmlns:ns2":"http://ws.api.profitbricks.com/"}}
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getAllDataCentersResponse xmlns:ns2="http://ws.api.profitbricks.com/"/></S:Body></S:Envelope>
@@ -0,0 +1,10 @@
1
+ {
2
+ "get_all_data_centers_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": {
5
+ "data_center_id": "b3eebede-5c78-417c-b1bc-ff5de01a0602",
6
+ "data_center_name": "Test",
7
+ "data_center_version": "9"
8
+ }
9
+ }
10
+ }
@@ -0,0 +1 @@
1
+ <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getAllDataCentersResponse xmlns:ns2="http://ws.api.profitbricks.com/"><return><dataCenterId>b3eebede-5c78-417c-b1bc-ff5de01a0602</dataCenterId><dataCenterName>Test</dataCenterName><dataCenterVersion>9</dataCenterVersion></return></ns2:getAllDataCentersResponse></S:Body></S:Envelope>
@@ -0,0 +1,100 @@
1
+ {
2
+ "get_all_images_response": {
3
+ "@xmlns:ns2": "http://ws.api.profitbricks.com/",
4
+ "return": [
5
+ {
6
+ "cpu_hotpluggable": false,
7
+ "image_id": "5f58656e-66c3-11e1-8c6f-0025901dfe2a",
8
+ "image_name": "Windows8-ConsumerPreview-64bit-English.iso",
9
+ "image_size": "6",
10
+ "image_type": "CDROM",
11
+ "memory_hotpluggable": false,
12
+ "os_type": "UNKNOWN",
13
+ "writeable": true
14
+ },
15
+ {
16
+ "cpu_hotpluggable": false,
17
+ "image_id": "9de62e6e-ff1c-11e0-a1a7-0025901dfe2a",
18
+ "image_name": "grml64_2011.05.iso",
19
+ "image_size": "698",
20
+ "image_type": "CDROM",
21
+ "memory_hotpluggable": false,
22
+ "os_type": "OTHER",
23
+ "server_ids": [
24
+ "cab5b774-b33d-2027-eae1-85d58adeb5e8",
25
+ "b09cc7b2-fcc7-16de-88c7-0ddd7c5aefff",
26
+ "ccbc8485-35cd-2d62-016a-a1f74557b379",
27
+ "6a9160c9-c1f6-5464-d894-720b9c75e369",
28
+ "c9c01a18-d7c1-6c4c-4cbc-f8711cf52b20",
29
+ "805eae83-595f-925d-8621-d4cbd1f4686a",
30
+ "1180df13-b753-4ed1-5b40-37ee02c1a9b4",
31
+ "997d954e-6c64-4255-a9a6-345b01956959",
32
+ "c7a9af7d-7626-7b44-4e96-21d03ca424bd",
33
+ "f04b39f4-afcf-b3b3-dc63-21c4b7c96648",
34
+ "1f924812-3e58-2085-a861-42c5fb7f0cce",
35
+ "7b77d8dc-f7e1-b59d-5939-0ed48749954e",
36
+ "4dfc0b6b-9f47-1d8f-43c5-0b8588300715"
37
+ ],
38
+ "writeable": true
39
+ },
40
+ {
41
+ "cpu_hotpluggable": false,
42
+ "image_id": "3fbd84d1-226d-11e1-a5a8-0025901e3c62",
43
+ "image_name": "WinPE-VirtIO-Driver.iso",
44
+ "image_size": "247",
45
+ "image_type": "CDROM",
46
+ "memory_hotpluggable": false,
47
+ "os_type": "WINDOWS",
48
+ "server_ids": [
49
+ "cb12122a-c52b-62e4-44c4-dae11e26cb93",
50
+ "eb1bac3c-e93b-3a5b-a2e4-306fa96a37cc",
51
+ "1f5fe5fc-6941-4829-9a0e-c3954aa86d22",
52
+ "6cbe83ff-b504-601b-1008-d88b15108116",
53
+ "e4a997b4-4f6f-6dff-7eef-aa93a0f1f42a",
54
+ "b61c8de3-f636-727d-7d11-2f7eb1dd7098"
55
+ ],
56
+ "writeable": true
57
+ },
58
+ {
59
+ "cpu_hotpluggable": false,
60
+ "image_id": "d09207ec-2be2-11e1-9cf2-0025901dfe2a",
61
+ "image_name": "PB-Win2012-Preview-EN-RDP.img",
62
+ "image_size": "13312",
63
+ "image_type": "HDD",
64
+ "memory_hotpluggable": false,
65
+ "os_type": "WINDOWS",
66
+ "writeable": true
67
+ },
68
+ {
69
+ "cpu_hotpluggable": false,
70
+ "image_id": "d1d8747f-fa56-11e0-a1a7-0025901dfe2a",
71
+ "image_name": "profitbricks-debian-squeeze-EN-6.0.1a-amd64.img",
72
+ "image_size": "1024",
73
+ "image_type": "HDD",
74
+ "memory_hotpluggable": false,
75
+ "os_type": "OTHER",
76
+ "writeable": true
77
+ },
78
+ {
79
+ "cpu_hotpluggable": false,
80
+ "image_id": "1cf5f820-58cc-11e1-9e36-0025901dfe2a",
81
+ "image_name": "PB-Win-2008-R2-DE-RDP-2.12.img",
82
+ "image_size": "9216",
83
+ "image_type": "HDD",
84
+ "memory_hotpluggable": false,
85
+ "os_type": "WINDOWS",
86
+ "writeable": true
87
+ },
88
+ {
89
+ "cpu_hotpluggable": false,
90
+ "image_id": "5256ccd8-58c4-11e1-9e36-0025901dfe2a",
91
+ "image_name": "PB-Win-2008-R2-EN-RDP-2.12.img",
92
+ "image_size": "8704",
93
+ "image_type": "HDD",
94
+ "memory_hotpluggable": false,
95
+ "os_type": "WINDOWS",
96
+ "writeable": true
97
+ }
98
+ ]
99
+ }
100
+ }