fog-profitbricks 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/.rubocop.yml +21 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +25 -0
- data/CONTRIBUTING.md +18 -0
- data/CONTRIBUTORS.md +2 -0
- data/Gemfile +4 -0
- data/LICENSE.md +20 -0
- data/README.md +29 -0
- data/Rakefile +21 -0
- data/examples/pb_demo.rb +53 -0
- data/fog-profitbricks.gemspec +31 -0
- data/gemfiles/Gemfile.1.8.7 +7 -0
- data/gemfiles/Gemfile.1.9.2+ +6 -0
- data/lib/fog/bin/profitbricks.rb +29 -0
- data/lib/fog/profitbricks.rb +13 -0
- data/lib/fog/profitbricks/compute.rb +215 -0
- data/lib/fog/profitbricks/core.rb +18 -0
- data/lib/fog/profitbricks/models/compute/datacenter.rb +59 -0
- data/lib/fog/profitbricks/models/compute/datacenters.rb +24 -0
- data/lib/fog/profitbricks/models/compute/flavor.rb +27 -0
- data/lib/fog/profitbricks/models/compute/flavors.rb +24 -0
- data/lib/fog/profitbricks/models/compute/image.rb +30 -0
- data/lib/fog/profitbricks/models/compute/images.rb +23 -0
- data/lib/fog/profitbricks/models/compute/interface.rb +64 -0
- data/lib/fog/profitbricks/models/compute/interfaces.rb +24 -0
- data/lib/fog/profitbricks/models/compute/region.rb +15 -0
- data/lib/fog/profitbricks/models/compute/regions.rb +24 -0
- data/lib/fog/profitbricks/models/compute/server.rb +107 -0
- data/lib/fog/profitbricks/models/compute/servers.rb +23 -0
- data/lib/fog/profitbricks/models/compute/volume.rb +74 -0
- data/lib/fog/profitbricks/models/compute/volumes.rb +24 -0
- data/lib/fog/profitbricks/parsers/base.rb +49 -0
- data/lib/fog/profitbricks/parsers/compute/clear_data_center.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/connect_storage_to_server.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/create_data_center.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/create_nic.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/create_server.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/create_storage.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/delete_data_center.rb +20 -0
- data/lib/fog/profitbricks/parsers/compute/delete_nic.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/delete_server.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/delete_storage.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/disconnect_storage_from_server.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/get_all_data_centers.rb +26 -0
- data/lib/fog/profitbricks/parsers/compute/get_all_images.rb +30 -0
- data/lib/fog/profitbricks/parsers/compute/get_all_nic.rb +30 -0
- data/lib/fog/profitbricks/parsers/compute/get_all_servers.rb +56 -0
- data/lib/fog/profitbricks/parsers/compute/get_all_storages.rb +33 -0
- data/lib/fog/profitbricks/parsers/compute/get_data_center.rb +23 -0
- data/lib/fog/profitbricks/parsers/compute/get_data_center_state.rb +20 -0
- data/lib/fog/profitbricks/parsers/compute/get_image.rb +26 -0
- data/lib/fog/profitbricks/parsers/compute/get_nic.rb +27 -0
- data/lib/fog/profitbricks/parsers/compute/get_server.rb +55 -0
- data/lib/fog/profitbricks/parsers/compute/get_storage.rb +30 -0
- data/lib/fog/profitbricks/parsers/compute/reset_server.rb +20 -0
- data/lib/fog/profitbricks/parsers/compute/set_internet_access.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/update_data_center.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/update_nic.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/update_server.rb +22 -0
- data/lib/fog/profitbricks/parsers/compute/update_storage.rb +22 -0
- data/lib/fog/profitbricks/requests/compute/clear_data_center.rb +53 -0
- data/lib/fog/profitbricks/requests/compute/connect_storage_to_server.rb +85 -0
- data/lib/fog/profitbricks/requests/compute/create_data_center.rb +64 -0
- data/lib/fog/profitbricks/requests/compute/create_flavor.rb +40 -0
- data/lib/fog/profitbricks/requests/compute/create_nic.rb +81 -0
- data/lib/fog/profitbricks/requests/compute/create_server.rb +107 -0
- data/lib/fog/profitbricks/requests/compute/create_storage.rb +98 -0
- data/lib/fog/profitbricks/requests/compute/delete_data_center.rb +62 -0
- data/lib/fog/profitbricks/requests/compute/delete_nic.rb +66 -0
- data/lib/fog/profitbricks/requests/compute/delete_server.rb +66 -0
- data/lib/fog/profitbricks/requests/compute/delete_storage.rb +66 -0
- data/lib/fog/profitbricks/requests/compute/disconnect_storage_from_server.rb +78 -0
- data/lib/fog/profitbricks/requests/compute/get_all_data_centers.rb +32 -0
- data/lib/fog/profitbricks/requests/compute/get_all_flavors.rb +77 -0
- data/lib/fog/profitbricks/requests/compute/get_all_images.rb +67 -0
- data/lib/fog/profitbricks/requests/compute/get_all_locations.rb +44 -0
- data/lib/fog/profitbricks/requests/compute/get_all_nic.rb +55 -0
- data/lib/fog/profitbricks/requests/compute/get_all_servers.rb +58 -0
- data/lib/fog/profitbricks/requests/compute/get_all_storages.rb +58 -0
- data/lib/fog/profitbricks/requests/compute/get_data_center.rb +40 -0
- data/lib/fog/profitbricks/requests/compute/get_data_center_state.rb +43 -0
- data/lib/fog/profitbricks/requests/compute/get_flavor.rb +82 -0
- data/lib/fog/profitbricks/requests/compute/get_image.rb +71 -0
- data/lib/fog/profitbricks/requests/compute/get_location.rb +48 -0
- data/lib/fog/profitbricks/requests/compute/get_nic.rb +65 -0
- data/lib/fog/profitbricks/requests/compute/get_server.rb +100 -0
- data/lib/fog/profitbricks/requests/compute/get_storage.rb +65 -0
- data/lib/fog/profitbricks/requests/compute/reset_server.rb +51 -0
- data/lib/fog/profitbricks/requests/compute/set_internet_access.rb +61 -0
- data/lib/fog/profitbricks/requests/compute/start_server.rb +59 -0
- data/lib/fog/profitbricks/requests/compute/stop_server.rb +59 -0
- data/lib/fog/profitbricks/requests/compute/update_data_center.rb +55 -0
- data/lib/fog/profitbricks/requests/compute/update_nic.rb +76 -0
- data/lib/fog/profitbricks/requests/compute/update_server.rb +81 -0
- data/lib/fog/profitbricks/requests/compute/update_storage.rb +75 -0
- data/lib/fog/profitbricks/version.rb +5 -0
- data/spec/minitest_helper.rb +33 -0
- data/tests/helper.rb +19 -0
- data/tests/helpers/formats_helper.rb +23 -0
- data/tests/helpers/mock_helper.rb +8 -0
- data/tests/profitbricks/requests/compute/flavor_tests.rb +43 -0
- data/tests/profitbricks/requests/compute/image_tests.rb +50 -0
- data/tests/profitbricks/requests/compute/interface_tests.rb +101 -0
- data/tests/profitbricks/requests/compute/location_tests.rb +33 -0
- data/tests/profitbricks/requests/compute/server_tests.rb +246 -0
- metadata +293 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetAllImages < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@image = {}
|
8
|
+
@response = { 'getAllImagesResponse' => [] }
|
9
|
+
end
|
10
|
+
|
11
|
+
def end_element(name)
|
12
|
+
case name
|
13
|
+
when 'imageId', 'imageName', 'imageType', 'writeable',
|
14
|
+
'osType', 'serverIds', 'cpuHotPlug', 'description',
|
15
|
+
'cpuHotUnPlug', 'ramHotPlug', 'ramHotUnPlug',
|
16
|
+
'discVirtioHotPlug', 'discVirtioHotUnPlug', 'public',
|
17
|
+
'nicHotPlug', 'nicHotUnPlug', 'bootable', 'location'
|
18
|
+
@image[name] = value
|
19
|
+
when 'imageSize'
|
20
|
+
@image[name] = value.to_i
|
21
|
+
when 'return'
|
22
|
+
@response['getAllImagesResponse'] << @image
|
23
|
+
@image = {}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetAllNic < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@nic = { 'firewall' => {} }
|
8
|
+
@response = { 'getAllNicResponse' => [] }
|
9
|
+
end
|
10
|
+
|
11
|
+
def end_element(name)
|
12
|
+
case name
|
13
|
+
when 'dataCenterId', 'nicId', 'nicName', 'serverId',
|
14
|
+
'internetAccess', 'serverId', 'ips', 'macAddress',
|
15
|
+
'dhcpActive', 'gatewayIp', 'provisioningState'
|
16
|
+
@nic[name] = value
|
17
|
+
when 'dataCenterVersion', 'lanId'
|
18
|
+
@nic[name] = value.to_i
|
19
|
+
when 'active', 'firewallId', 'firewallRules'
|
20
|
+
@nic['firewall'][name] = value
|
21
|
+
when 'return'
|
22
|
+
@response['getAllNicResponse'] << @nic
|
23
|
+
@nic = { 'firewall' => {} }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetAllServers < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'getAllServersResponse' => [] }
|
8
|
+
@server = { 'connectedStorages' => [], 'nics' => [] }
|
9
|
+
@storage = {}
|
10
|
+
@nic = {}
|
11
|
+
end
|
12
|
+
|
13
|
+
def end_element(name)
|
14
|
+
case name
|
15
|
+
when 'requestId', 'dataCenterId', 'dataCenterName',
|
16
|
+
'serverId', 'serverName', 'internetAccess',
|
17
|
+
'provisioningState', 'virtualMachineState',
|
18
|
+
'osType', 'availabilityZone', 'ips', 'cpuHotPlug',
|
19
|
+
'ramHotPlug', 'nicHotPlug', 'nicHotUnPlug',
|
20
|
+
'discVirtioHotPlug', 'discVirtioHotUnPlug'
|
21
|
+
@server[name] = value
|
22
|
+
when 'dataCenterVersion', 'cores', 'ram'
|
23
|
+
@server[name] = value.to_i
|
24
|
+
when 'creationTime', 'lastModificationTime'
|
25
|
+
@server[name] = Time.parse(value)
|
26
|
+
when 'storageId'
|
27
|
+
@storage['id'] = value
|
28
|
+
when 'storageName'
|
29
|
+
@storage['name'] = value
|
30
|
+
when 'busType'
|
31
|
+
@storage['bus_type'] = value
|
32
|
+
when 'bootDevice'
|
33
|
+
@storage['boot_device'] = value
|
34
|
+
when 'deviceNumber'
|
35
|
+
@storage['device_number'] = value.to_i
|
36
|
+
when 'size'
|
37
|
+
@storage['size'] = value.to_i
|
38
|
+
when 'connectedStorages'
|
39
|
+
@server['connectedStorages'] << @storage
|
40
|
+
when 'nicId', 'nicName', 'macAddress', 'gatewayIp',
|
41
|
+
'dhcpActive', 'ips'
|
42
|
+
@nic[name] = value
|
43
|
+
when 'lanId'
|
44
|
+
@nic[name] = value.to_i
|
45
|
+
when 'nics'
|
46
|
+
@server['nics'] << @nic
|
47
|
+
when 'return'
|
48
|
+
@response['getAllServersResponse'] << @server
|
49
|
+
@server = { 'connectedStorages' => [], 'nics' => [] }
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetAllStorages < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@storage = { 'mountImage' => {} }
|
8
|
+
@response = { 'getAllStoragesResponse' => [] }
|
9
|
+
end
|
10
|
+
|
11
|
+
def end_element(name)
|
12
|
+
case name
|
13
|
+
when 'dataCenterId', 'storageId', 'storageName',
|
14
|
+
'serverIds', 'provisioningState'
|
15
|
+
@storage[name] = value
|
16
|
+
when 'imageId'
|
17
|
+
@storage['mountImage']['id'] = value
|
18
|
+
when 'imageName'
|
19
|
+
@storage['mountImage']['name'] = value
|
20
|
+
when 'dataCenterVersion', 'size'
|
21
|
+
@storage[name] = value.to_i
|
22
|
+
when 'creationTime', 'lastModificationTime'
|
23
|
+
@storage[name] = Time.parse(value)
|
24
|
+
when 'return'
|
25
|
+
@response['getAllStoragesResponse'] << @storage
|
26
|
+
@storage = { 'mountImage' => {} }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetDataCenter < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'getDataCenterResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'requestId', 'dataCenterId', 'dataCenterName',
|
13
|
+
'provisioningState', 'location'
|
14
|
+
@response['getDataCenterResponse'][name] = value
|
15
|
+
when 'dataCenterVersion'
|
16
|
+
@response['getDataCenterResponse'][name] = value.to_i
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetDataCenterState < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'getDataCenterStateResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'return'
|
13
|
+
@response['getDataCenterStateResponse'][name] = value
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetImage < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'getImageResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'imageId', 'imageName', 'imageType', 'writeable',
|
13
|
+
'osType', 'pubic', 'serverIds', 'cpuHotPlug', 'public',
|
14
|
+
'cpuHotUnPlug', 'ramHotPlug', 'ramHotUnPlug', 'bootable',
|
15
|
+
'discVirtioHotPlug', 'discVirtioHotUnPlug', 'location',
|
16
|
+
'nicHotPlug', 'nicHotUnPlug', 'description'
|
17
|
+
@response['getImageResponse'][name] = value
|
18
|
+
when 'imageSize'
|
19
|
+
@response['getImageResponse'][name] = value.to_i
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetNic < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'getNicResponse' => {} }
|
8
|
+
@response['getNicResponse']['firewall'] = {}
|
9
|
+
end
|
10
|
+
|
11
|
+
def end_element(name)
|
12
|
+
case name
|
13
|
+
when 'dataCenterId', 'nicId', 'nicName', 'serverId',
|
14
|
+
'internetAccess', 'serverId', 'ips', 'macAddress',
|
15
|
+
'dhcpActive', 'gatewayIp', 'provisioningState'
|
16
|
+
@response['getNicResponse'][name] = value
|
17
|
+
when 'dataCenterVersion', 'lanId'
|
18
|
+
@response['getNicResponse'][name] = value.to_i
|
19
|
+
when 'active', 'firewallId', 'firewallRules'
|
20
|
+
@response['getNicResponse']['firewall'][name] = value
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetServer < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'getServerResponse' => {} }
|
8
|
+
@response['getServerResponse'] = {
|
9
|
+
'connectedStorages' => [],
|
10
|
+
'nics' => []
|
11
|
+
}
|
12
|
+
@storage = {}
|
13
|
+
@nic = {}
|
14
|
+
end
|
15
|
+
|
16
|
+
def end_element(name)
|
17
|
+
case name
|
18
|
+
when 'requestId', 'dataCenterId', 'dataCenterName', 'serverId',
|
19
|
+
'serverName', 'internetAccess', 'provisioningState',
|
20
|
+
'virtualMachineState', 'osType', 'availabilityZone', 'ips',
|
21
|
+
'cpuHotPlug', 'ramHotPlug', 'nicHotPlug', 'nicHotUnPlug',
|
22
|
+
'discVirtioHotPlug', 'discVirtioHotUnPlug'
|
23
|
+
@response['getServerResponse'][name] = value
|
24
|
+
when 'dataCenterVersion', 'cores', 'ram'
|
25
|
+
@response['getServerResponse'][name] = value.to_i
|
26
|
+
when 'creationTime', 'lastModificationTime'
|
27
|
+
@response['getServerResponse'][name] = Time.parse(value)
|
28
|
+
when 'storageId'
|
29
|
+
@storage['id'] = value
|
30
|
+
when 'storageName'
|
31
|
+
@storage['name'] = value
|
32
|
+
when 'busType'
|
33
|
+
@storage['bus_type'] = value
|
34
|
+
when 'bootDevice'
|
35
|
+
@storage['boot_device'] = value
|
36
|
+
when 'deviceNumber'
|
37
|
+
@storage['device_number'] = value.to_i
|
38
|
+
when 'size'
|
39
|
+
@storage['size'] = value.to_i
|
40
|
+
when 'connectedStorages'
|
41
|
+
@response['getServerResponse']['connectedStorages'] << @storage
|
42
|
+
when 'nicId', 'nicName', 'macAddress', 'gatewayIp',
|
43
|
+
'dhcpActive', 'ips'
|
44
|
+
@nic[name] = value
|
45
|
+
when 'lanId'
|
46
|
+
@nic[name] = value.to_i
|
47
|
+
when 'nics'
|
48
|
+
@response['getServerResponse']['nics'] << @nic
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class GetStorage < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'getStorageResponse' => {} }
|
8
|
+
@response['getStorageResponse']['mountImage'] = {}
|
9
|
+
end
|
10
|
+
|
11
|
+
def end_element(name)
|
12
|
+
case name
|
13
|
+
when 'requestId', 'dataCenterId', 'storageId', 'storageName',
|
14
|
+
'serverIds', 'provisioningState'
|
15
|
+
@response['getStorageResponse'][name] = value
|
16
|
+
when 'imageId'
|
17
|
+
@response['getStorageResponse']['mountImage']['id'] = value
|
18
|
+
when 'imageName'
|
19
|
+
@response['getStorageResponse']['mountImage']['name'] = value
|
20
|
+
when 'dataCenterVersion', 'size'
|
21
|
+
@response['getStorageResponse'][name] = value.to_i
|
22
|
+
when 'creationTime', 'lastModificationTime'
|
23
|
+
@response['getStorageResponse'][name] = Time.parse(value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class ResetServer < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'resetServerResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'requestId'
|
13
|
+
@response['resetServerResponse'][name] = value.to_i
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class SetInternetAccess < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'setInternetAccessResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'requestId', 'dataCenterId'
|
13
|
+
@response['setInternetAccessResponse'][name] = value
|
14
|
+
when 'dataCenterVersion'
|
15
|
+
@response['setInternetAccessResponse'][name] = value.to_i
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class UpdateDataCenter < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'updateDataCenterResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'requestId', 'dataCenterId'
|
13
|
+
@response['updateDataCenterResponse'][name] = value
|
14
|
+
when 'dataCenterVersion'
|
15
|
+
@response['updateDataCenterResponse'][name] = value.to_i
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class UpdateNic < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'updateNicResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'requestId', 'dataCenterId'
|
13
|
+
@response['updateNicResponse'][name] = value
|
14
|
+
when 'dataCenterVersion'
|
15
|
+
@response['updateNicResponse'][name] = value.to_i
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Fog
|
2
|
+
module Parsers
|
3
|
+
module Compute
|
4
|
+
module ProfitBricks
|
5
|
+
class UpdateServer < Fog::Parsers::ProfitBricks::Base
|
6
|
+
def reset
|
7
|
+
@response = { 'updateServerResponse' => {} }
|
8
|
+
end
|
9
|
+
|
10
|
+
def end_element(name)
|
11
|
+
case name
|
12
|
+
when 'requestId', 'dataCenterId'
|
13
|
+
@response['updateServerResponse'][name] = value
|
14
|
+
when 'dataCenterVersion'
|
15
|
+
@response['updateServerResponse'][name] = value.to_i
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|