saklient 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.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +43 -0
- data/Rakefile +1 -0
- data/config.sh.sample +5 -0
- data/example.rb +83 -0
- data/example.sh +6 -0
- data/lib/saklient/cloud/api.rb +382 -0
- data/lib/saklient/cloud/client.rb +111 -0
- data/lib/saklient/cloud/enums/eappliance_class.rb +39 -0
- data/lib/saklient/cloud/enums/eavailability.rb +79 -0
- data/lib/saklient/cloud/enums/edisk_connection.rb +39 -0
- data/lib/saklient/cloud/enums/escope.rb +39 -0
- data/lib/saklient/cloud/enums/escript_class.rb +39 -0
- data/lib/saklient/cloud/enums/eserver_instance_status.rb +44 -0
- data/lib/saklient/cloud/enums/estorage_class.rb +34 -0
- data/lib/saklient/cloud/errors/access_api_key_disabled_exception.rb +23 -0
- data/lib/saklient/cloud/errors/access_sakura_exception.rb +23 -0
- data/lib/saklient/cloud/errors/access_staff_exception.rb +23 -0
- data/lib/saklient/cloud/errors/access_token_exception.rb +23 -0
- data/lib/saklient/cloud/errors/access_xhr_or_api_key_exception.rb +23 -0
- data/lib/saklient/cloud/errors/account_not_found_exception.rb +23 -0
- data/lib/saklient/cloud/errors/account_not_specified_exception.rb +23 -0
- data/lib/saklient/cloud/errors/ambiguous_identifier_exception.rb +23 -0
- data/lib/saklient/cloud/errors/ambiguous_zone_exception.rb +23 -0
- data/lib/saklient/cloud/errors/api_proxy_timeout_exception.rb +23 -0
- data/lib/saklient/cloud/errors/api_proxy_timeout_non_get_exception.rb +23 -0
- data/lib/saklient/cloud/errors/archive_is_incomplete_exception.rb +23 -0
- data/lib/saklient/cloud/errors/boot_failure_by_lock_exception.rb +23 -0
- data/lib/saklient/cloud/errors/boot_failure_in_group_exception.rb +23 -0
- data/lib/saklient/cloud/errors/busy_exception.rb +23 -0
- data/lib/saklient/cloud/errors/cant_resize_smaller_exception.rb +23 -0
- data/lib/saklient/cloud/errors/cdrom_device_locked_exception.rb +23 -0
- data/lib/saklient/cloud/errors/cdrom_disabled_exception.rb +23 -0
- data/lib/saklient/cloud/errors/cdrom_in_use_exception.rb +23 -0
- data/lib/saklient/cloud/errors/cdrom_is_incomplete_exception.rb +23 -0
- data/lib/saklient/cloud/errors/connect_to_same_switch_exception.rb +23 -0
- data/lib/saklient/cloud/errors/contract_creation_exception.rb +23 -0
- data/lib/saklient/cloud/errors/copy_to_itself_exception.rb +23 -0
- data/lib/saklient/cloud/errors/delete_disk_b4_template_exception.rb +23 -0
- data/lib/saklient/cloud/errors/delete_ip_v6_nets_first_exception.rb +23 -0
- data/lib/saklient/cloud/errors/delete_res_b4_account_exception.rb +23 -0
- data/lib/saklient/cloud/errors/delete_router_b4_switch_exception.rb +23 -0
- data/lib/saklient/cloud/errors/delete_static_route_first_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disabled_in_sandbox_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disconnect_b4_delete_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disconnect_b4_update_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disk_connection_limit_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disk_is_copying_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disk_is_not_available_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disk_license_mismatch_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disk_or_ss_in_migration_exception.rb +23 -0
- data/lib/saklient/cloud/errors/disk_stock_run_out_exception.rb +23 -0
- data/lib/saklient/cloud/errors/dns_aaaa_record_not_found_exception.rb +23 -0
- data/lib/saklient/cloud/errors/dns_arecord_not_found_exception.rb +23 -0
- data/lib/saklient/cloud/errors/dns_ptr_update_failure_exception.rb +23 -0
- data/lib/saklient/cloud/errors/dont_create_in_sandbox_exception.rb +23 -0
- data/lib/saklient/cloud/errors/duplicate_account_code_exception.rb +23 -0
- data/lib/saklient/cloud/errors/duplicate_entry_exception.rb +23 -0
- data/lib/saklient/cloud/errors/duplicate_user_code_exception.rb +23 -0
- data/lib/saklient/cloud/errors/file_not_uploaded_exception.rb +23 -0
- data/lib/saklient/cloud/errors/filter_array_comparison_exception.rb +23 -0
- data/lib/saklient/cloud/errors/filter_bad_operator_exception.rb +23 -0
- data/lib/saklient/cloud/errors/filter_null_comparison_exception.rb +23 -0
- data/lib/saklient/cloud/errors/filter_unknown_operator_exception.rb +23 -0
- data/lib/saklient/cloud/errors/ftp_cannot_close_exception.rb +23 -0
- data/lib/saklient/cloud/errors/ftp_is_already_close_exception.rb +23 -0
- data/lib/saklient/cloud/errors/ftp_is_already_open_exception.rb +23 -0
- data/lib/saklient/cloud/errors/ftp_must_be_closed_exception.rb +23 -0
- data/lib/saklient/cloud/errors/host_operation_failure_exception.rb +23 -0
- data/lib/saklient/cloud/errors/illegal_das_usage_exception.rb +23 -0
- data/lib/saklient/cloud/errors/in_migration_exception.rb +23 -0
- data/lib/saklient/cloud/errors/invalid_format_exception.rb +23 -0
- data/lib/saklient/cloud/errors/invalid_param_comb_exception.rb +23 -0
- data/lib/saklient/cloud/errors/invalid_range_exception.rb +23 -0
- data/lib/saklient/cloud/errors/invalid_uri_argument_exception.rb +23 -0
- data/lib/saklient/cloud/errors/ip_v6_net_already_attached_exception.rb +23 -0
- data/lib/saklient/cloud/errors/limit_count_in_account_exception.rb +23 -0
- data/lib/saklient/cloud/errors/limit_count_in_member_exception.rb +23 -0
- data/lib/saklient/cloud/errors/limit_count_in_network_exception.rb +23 -0
- data/lib/saklient/cloud/errors/limit_count_in_router_exception.rb +23 -0
- data/lib/saklient/cloud/errors/limit_count_in_zone_exception.rb +23 -0
- data/lib/saklient/cloud/errors/limit_memory_in_account_exception.rb +23 -0
- data/lib/saklient/cloud/errors/limit_size_in_account_exception.rb +23 -0
- data/lib/saklient/cloud/errors/missing_iso_image_exception.rb +23 -0
- data/lib/saklient/cloud/errors/missing_param_exception.rb +23 -0
- data/lib/saklient/cloud/errors/must_be_of_same_zone_exception.rb +23 -0
- data/lib/saklient/cloud/errors/no_display_response_exception.rb +23 -0
- data/lib/saklient/cloud/errors/not_for_router_exception.rb +23 -0
- data/lib/saklient/cloud/errors/not_replicating_exception.rb +23 -0
- data/lib/saklient/cloud/errors/not_with_hybridconn_exception.rb +23 -0
- data/lib/saklient/cloud/errors/old_storage_plan_exception.rb +23 -0
- data/lib/saklient/cloud/errors/operation_failure_exception.rb +23 -0
- data/lib/saklient/cloud/errors/operation_timeout_exception.rb +23 -0
- data/lib/saklient/cloud/errors/original_hash_mismatch_exception.rb +23 -0
- data/lib/saklient/cloud/errors/packet_filter_applying_exception.rb +23 -0
- data/lib/saklient/cloud/errors/packet_filter_version_mismatch_exception.rb +23 -0
- data/lib/saklient/cloud/errors/param_ip_not_found_exception.rb +23 -0
- data/lib/saklient/cloud/errors/param_res_not_found_exception.rb +23 -0
- data/lib/saklient/cloud/errors/payment_credit_card_exception.rb +23 -0
- data/lib/saklient/cloud/errors/payment_payment_exception.rb +23 -0
- data/lib/saklient/cloud/errors/payment_registration_exception.rb +23 -0
- data/lib/saklient/cloud/errors/payment_tel_certification_exception.rb +23 -0
- data/lib/saklient/cloud/errors/payment_unpayable_exception.rb +23 -0
- data/lib/saklient/cloud/errors/penalty_operation_exception.rb +23 -0
- data/lib/saklient/cloud/errors/replica_already_exists_exception.rb +23 -0
- data/lib/saklient/cloud/errors/replica_not_found_exception.rb +23 -0
- data/lib/saklient/cloud/errors/res_already_connected_exception.rb +23 -0
- data/lib/saklient/cloud/errors/res_already_disconnected_exception.rb +23 -0
- data/lib/saklient/cloud/errors/res_already_exists_exception.rb +23 -0
- data/lib/saklient/cloud/errors/res_used_in_zone_exception.rb +23 -0
- data/lib/saklient/cloud/errors/resource_path_not_found_exception.rb +23 -0
- data/lib/saklient/cloud/errors/run_out_of_ip_address_exception.rb +23 -0
- data/lib/saklient/cloud/errors/same_license_required_exception.rb +23 -0
- data/lib/saklient/cloud/errors/server_could_not_stop_exception.rb +23 -0
- data/lib/saklient/cloud/errors/server_is_cleaning_exception.rb +23 -0
- data/lib/saklient/cloud/errors/server_operation_failure_exception.rb +23 -0
- data/lib/saklient/cloud/errors/server_power_must_be_down_exception.rb +23 -0
- data/lib/saklient/cloud/errors/server_power_must_be_up_exception.rb +23 -0
- data/lib/saklient/cloud/errors/service_temporarily_unavailable_exception.rb +23 -0
- data/lib/saklient/cloud/errors/size_mismatch_exception.rb +23 -0
- data/lib/saklient/cloud/errors/snapshot_in_migration_exception.rb +23 -0
- data/lib/saklient/cloud/errors/still_creating_exception.rb +23 -0
- data/lib/saklient/cloud/errors/storage_abnormal_exception.rb +23 -0
- data/lib/saklient/cloud/errors/storage_operation_failure_exception.rb +23 -0
- data/lib/saklient/cloud/errors/switch_hybrid_connected_exception.rb +23 -0
- data/lib/saklient/cloud/errors/template_ftp_is_open_exception.rb +23 -0
- data/lib/saklient/cloud/errors/template_is_incomplete_exception.rb +23 -0
- data/lib/saklient/cloud/errors/too_many_request_exception.rb +23 -0
- data/lib/saklient/cloud/errors/unknown_exception.rb +23 -0
- data/lib/saklient/cloud/errors/unknown_os_type_exception.rb +23 -0
- data/lib/saklient/cloud/errors/unsupported_res_class_exception.rb +23 -0
- data/lib/saklient/cloud/errors/user_not_specified_exception.rb +23 -0
- data/lib/saklient/cloud/errors/vnc_proxy_request_failure_exception.rb +23 -0
- data/lib/saklient/cloud/models/model.rb +348 -0
- data/lib/saklient/cloud/models/model_appliance.rb +161 -0
- data/lib/saklient/cloud/models/model_archive.rb +207 -0
- data/lib/saklient/cloud/models/model_disk.rb +200 -0
- data/lib/saklient/cloud/models/model_disk_plan.rb +156 -0
- data/lib/saklient/cloud/models/model_icon.rb +178 -0
- data/lib/saklient/cloud/models/model_iface.rb +115 -0
- data/lib/saklient/cloud/models/model_ipv6_net.rb +106 -0
- data/lib/saklient/cloud/models/model_iso_image.rb +207 -0
- data/lib/saklient/cloud/models/model_router.rb +148 -0
- data/lib/saklient/cloud/models/model_router_plan.rb +106 -0
- data/lib/saklient/cloud/models/model_script.rb +178 -0
- data/lib/saklient/cloud/models/model_server.rb +237 -0
- data/lib/saklient/cloud/models/model_server_plan.rb +119 -0
- data/lib/saklient/cloud/models/model_swytch.rb +138 -0
- data/lib/saklient/cloud/models/query_params.rb +44 -0
- data/lib/saklient/cloud/product.rb +95 -0
- data/lib/saklient/cloud/resources/appliance.rb +551 -0
- data/lib/saklient/cloud/resources/archive.rb +861 -0
- data/lib/saklient/cloud/resources/disk.rb +802 -0
- data/lib/saklient/cloud/resources/disk_config.rb +353 -0
- data/lib/saklient/cloud/resources/disk_plan.rb +194 -0
- data/lib/saklient/cloud/resources/ftp_info.rb +93 -0
- data/lib/saklient/cloud/resources/icon.rb +268 -0
- data/lib/saklient/cloud/resources/iface.rb +329 -0
- data/lib/saklient/cloud/resources/ipv4_net.rb +275 -0
- data/lib/saklient/cloud/resources/ipv6_net.rb +238 -0
- data/lib/saklient/cloud/resources/iso_image.rb +666 -0
- data/lib/saklient/cloud/resources/resource.rb +287 -0
- data/lib/saklient/cloud/resources/router.rb +508 -0
- data/lib/saklient/cloud/resources/router_plan.rb +230 -0
- data/lib/saklient/cloud/resources/script.rb +554 -0
- data/lib/saklient/cloud/resources/server.rb +730 -0
- data/lib/saklient/cloud/resources/server_instance.rb +217 -0
- data/lib/saklient/cloud/resources/server_plan.rb +285 -0
- data/lib/saklient/cloud/resources/swytch.rb +521 -0
- data/lib/saklient/errors/exception_factory.rb +532 -0
- data/lib/saklient/errors/http_bad_gateway_exception.rb +21 -0
- data/lib/saklient/errors/http_bad_request_exception.rb +21 -0
- data/lib/saklient/errors/http_conflict_exception.rb +21 -0
- data/lib/saklient/errors/http_exception.rb +27 -0
- data/lib/saklient/errors/http_expectation_failed_exception.rb +21 -0
- data/lib/saklient/errors/http_failed_dependency_exception.rb +21 -0
- data/lib/saklient/errors/http_forbidden_exception.rb +21 -0
- data/lib/saklient/errors/http_gateway_timeout_exception.rb +21 -0
- data/lib/saklient/errors/http_gone_exception.rb +21 -0
- data/lib/saklient/errors/http_http_version_not_supported_exception.rb +21 -0
- data/lib/saklient/errors/http_insufficient_storage_exception.rb +21 -0
- data/lib/saklient/errors/http_internal_server_error_exception.rb +21 -0
- data/lib/saklient/errors/http_length_required_exception.rb +21 -0
- data/lib/saklient/errors/http_locked_exception.rb +21 -0
- data/lib/saklient/errors/http_method_not_allowed_exception.rb +21 -0
- data/lib/saklient/errors/http_not_acceptable_exception.rb +21 -0
- data/lib/saklient/errors/http_not_extended_exception.rb +21 -0
- data/lib/saklient/errors/http_not_found_exception.rb +21 -0
- data/lib/saklient/errors/http_not_implemented_exception.rb +21 -0
- data/lib/saklient/errors/http_payment_required_exception.rb +21 -0
- data/lib/saklient/errors/http_precondition_failed_exception.rb +21 -0
- data/lib/saklient/errors/http_proxy_authentication_required_exception.rb +21 -0
- data/lib/saklient/errors/http_request_entity_too_large_exception.rb +21 -0
- data/lib/saklient/errors/http_request_timeout_exception.rb +21 -0
- data/lib/saklient/errors/http_request_uri_too_long_exception.rb +21 -0
- data/lib/saklient/errors/http_requested_range_not_satisfiable_exception.rb +21 -0
- data/lib/saklient/errors/http_service_unavailable_exception.rb +21 -0
- data/lib/saklient/errors/http_unauthorized_exception.rb +21 -0
- data/lib/saklient/errors/http_unprocessable_entity_exception.rb +21 -0
- data/lib/saklient/errors/http_unsupported_media_type_exception.rb +21 -0
- data/lib/saklient/errors/http_upgrade_required_exception.rb +21 -0
- data/lib/saklient/errors/http_variant_also_negotiates_exception.rb +21 -0
- data/lib/saklient/errors/saklient_exception.rb +22 -0
- data/lib/saklient/util.rb +121 -0
- data/lib/saklient/version.rb +5 -0
- data/saklient.gemspec +24 -0
- data/spec/archive_spec.rb +141 -0
- data/spec/enum_spec.rb +24 -0
- data/spec/exception_spec.rb +25 -0
- data/spec/iso_image_spec.rb +172 -0
- data/spec/router_spec.rb +124 -0
- data/spec/server_spec.rb +261 -0
- data/spec/util_spec.rb +72 -0
- data/test-sshkey.txt +27 -0
- metadata +281 -0
data/spec/server_spec.rb
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
$: << File.dirname(__dir__) + '/lib'
|
2
|
+
require 'saklient/cloud/api'
|
3
|
+
require 'date'
|
4
|
+
require 'SecureRandom'
|
5
|
+
|
6
|
+
describe 'Server' do
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
before do
|
11
|
+
|
12
|
+
# load config file
|
13
|
+
root = File.dirname(__dir__)
|
14
|
+
test_ok_file = root + '/testok'
|
15
|
+
expect(File).to exist(test_ok_file)
|
16
|
+
config_file = root + '/config.sh'
|
17
|
+
expect(File).to exist(config_file)
|
18
|
+
@config = {}
|
19
|
+
fh = open(config_file)
|
20
|
+
fh.each {|line|
|
21
|
+
if /^\s*export\s+(\w+)\s*=\s*(.+?)\s*$/.match(line) then
|
22
|
+
key = $1
|
23
|
+
value = $2
|
24
|
+
@config[key.to_sym] = value.gsub(/'([^']*)'|"([^"]*)"|\\(.)|(.)/) {|m|
|
25
|
+
$1 || $2 || $3 || $4
|
26
|
+
}
|
27
|
+
end
|
28
|
+
}
|
29
|
+
fh.close
|
30
|
+
expect(@config[:SACLOUD_TOKEN]).not_to be_empty #'SACLOUD_TOKEN must be defined in config.sh'
|
31
|
+
expect(@config[:SACLOUD_SECRET]).not_to be_empty #'SACLOUD_SECRET must be defined in config.sh'
|
32
|
+
#expect(@config[:SACLOUD_ZONE]).not_to be_empty #'SACLOUD_ZONE must be defined in config.sh'
|
33
|
+
|
34
|
+
# authorize
|
35
|
+
@api = Saklient::Cloud::API::authorize(@config[:SACLOUD_TOKEN], @config[:SACLOUD_SECRET])
|
36
|
+
@api = @api.in_zone(@config[:SACLOUD_ZONE]) if @config[:SACLOUD_ZONE]
|
37
|
+
expect(@api).to be_an_instance_of Saklient::Cloud::API
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
it 'should be found' do
|
44
|
+
|
45
|
+
servers = @api.server.sort_by_memory.find
|
46
|
+
expect(servers).to be_an_instance_of Array
|
47
|
+
expect(servers.length).to be > 0
|
48
|
+
|
49
|
+
mem = 0
|
50
|
+
servers.each {|server|
|
51
|
+
expect(server).to be_an_instance_of Saklient::Cloud::Resources::Server
|
52
|
+
expect(server.plan).to be_an_instance_of Saklient::Cloud::Resources::ServerPlan
|
53
|
+
expect(server.plan.cpu).to be > 0
|
54
|
+
expect(server.plan.memory_mib).to be > 0
|
55
|
+
expect(server.plan.memory_gib).to be > 0
|
56
|
+
expect(server.plan.memory_mib / server.plan.memory_gib).to eq 1024
|
57
|
+
expect(server.tags).to be_an_instance_of Array
|
58
|
+
server.tags.each {|tag|
|
59
|
+
expect(tag).to be_an_instance_of String
|
60
|
+
}
|
61
|
+
expect(server.plan.memory_gib).to be >= mem
|
62
|
+
mem = server.plan.memory_gib
|
63
|
+
}
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
it 'should be CRUDed' do
|
70
|
+
name = '!ruby_rspec-' + DateTime.now.strftime('%Y%m%d_%H%M%S') + '-' + SecureRandom.uuid[0, 8]
|
71
|
+
description = 'This instance was created by saklient.ruby rspec'
|
72
|
+
tag = 'saklient-test'
|
73
|
+
cpu = 1
|
74
|
+
mem = 2
|
75
|
+
host_name = 'saklient-test'
|
76
|
+
ssh_public_key = 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3sSg8Vfxrs3eFTx3G//wMRlgqmFGxh5Ia8DZSSf2YrkZGqKbL1t2AsiUtIMwxGiEVVBc0K89lORzra7qoHQj5v5Xlcdqodgcs9nwuSeS38XWO6tXNF4a8LvKnfGS55+uzmBmVUwAztr3TIJR5TTWxZXpcxSsSEHx7nIcr31zcvosjgdxqvSokAsIgJyPQyxCxsPK8SFIsUV+aATqBCWNyp+R1jECPkd74ipEBoccnA0pYZnRhIsKNWR9phBRXIVd5jx/gK5jHqouhFWvCucUs0gwilEGwpng3b/YxrinNskpfOpMhOD9zjNU58OCoMS8MA17yqoZv59l3u16CrnrD saklient-test@local'
|
77
|
+
ssh_private_key_file = File.dirname(__dir__) + '/test-sshkey.txt'
|
78
|
+
|
79
|
+
# search archives
|
80
|
+
puts 'searching archives...'
|
81
|
+
archives = @api.archive.with_name_like('CentOS 6.5 64bit').with_size_gib(20).with_shared_scope.limit(1).find
|
82
|
+
# printf "found %d archive(s)\n", archives.length
|
83
|
+
archive = archives[0]
|
84
|
+
# p archive.dump
|
85
|
+
|
86
|
+
# search scripts
|
87
|
+
puts 'searching scripts...'
|
88
|
+
scripts = @api.script.with_name_like('WordPress').with_shared_scope.limit(1).find
|
89
|
+
# printf "found %d script(s)\n", scripts.length
|
90
|
+
script = scripts[0]
|
91
|
+
# p script.dump
|
92
|
+
|
93
|
+
# create a disk
|
94
|
+
puts 'creating a disk...'
|
95
|
+
disk = @api.disk.create
|
96
|
+
ok = false
|
97
|
+
begin
|
98
|
+
disk.save
|
99
|
+
rescue Saklient::Errors::SaklientException
|
100
|
+
ok = true
|
101
|
+
end
|
102
|
+
fail 'Requiredフィールドが未set時は SaklientException がスローされなければなりません' unless ok
|
103
|
+
disk.name = '!ruby_rspec-' + DateTime.now.strftime('%Y%m%d_%H%M%S') + '-' + SecureRandom.uuid[0, 8]
|
104
|
+
disk.description = 'This instance was created by saklient.ruby rspec'
|
105
|
+
disk.tags = ['saklient-test']
|
106
|
+
disk.plan = @api.product.disk.ssd
|
107
|
+
disk.source = archive
|
108
|
+
disk.save
|
109
|
+
# p disk.dump
|
110
|
+
|
111
|
+
# check an immutable field
|
112
|
+
puts 'updating the disk...'
|
113
|
+
ok = false
|
114
|
+
begin
|
115
|
+
disk.size_mib = 20480
|
116
|
+
disk.save
|
117
|
+
rescue Saklient::Errors::SaklientException
|
118
|
+
ok = true
|
119
|
+
end
|
120
|
+
fail 'Immutableフィールドの再set時は SaklientException がスローされなければなりません' unless ok
|
121
|
+
|
122
|
+
# create a server
|
123
|
+
puts 'creating a server...'
|
124
|
+
server = @api.server.create
|
125
|
+
expect(server).to be_an_instance_of Saklient::Cloud::Resources::Server
|
126
|
+
server.name = name
|
127
|
+
server.description = description
|
128
|
+
server.tags = [tag]
|
129
|
+
server.plan = @api.product.server.get_by_spec(cpu, mem)
|
130
|
+
server.save
|
131
|
+
|
132
|
+
# check the server properties
|
133
|
+
expect(server.id.to_i).to be > 0
|
134
|
+
expect(server.name).to eq name
|
135
|
+
expect(server.description).to eq description
|
136
|
+
expect(server.tags).to be_an_instance_of Array
|
137
|
+
expect(server.tags.length).to eq 1
|
138
|
+
expect(server.tags[0]).to eq tag
|
139
|
+
expect(server.plan.cpu).to eq cpu
|
140
|
+
expect(server.plan.memory_gib).to eq mem
|
141
|
+
|
142
|
+
# connect to shared segment
|
143
|
+
puts 'connecting the server to shared segment...'
|
144
|
+
iface = server.add_iface
|
145
|
+
expect(iface).to be_an_instance_of Saklient::Cloud::Resources::Iface
|
146
|
+
expect(iface.id.to_i).to be > 0
|
147
|
+
iface.connect_to_shared_segment
|
148
|
+
|
149
|
+
# wait disk copy
|
150
|
+
puts 'waiting disk copy...'
|
151
|
+
fail 'アーカイブからディスクへのコピーがタイムアウトしました' unless disk.sleep_while_copying
|
152
|
+
# p disk.dump
|
153
|
+
disk.source = nil
|
154
|
+
disk.reload
|
155
|
+
expect(disk.source).to be_an_instance_of Saklient::Cloud::Resources::Archive
|
156
|
+
expect(disk.source.id).to eq archive.id
|
157
|
+
expect(disk.size_gib).to eq archive.size_gib
|
158
|
+
|
159
|
+
# connect the disk to the server
|
160
|
+
puts 'connecting the disk to the server...'
|
161
|
+
disk.connect_to(server)
|
162
|
+
|
163
|
+
# config the disk
|
164
|
+
puts 'writing configuration to the disk...'
|
165
|
+
diskconf = disk.create_config
|
166
|
+
diskconf.host_name = 'saklient-test'
|
167
|
+
diskconf.password = SecureRandom.uuid[0, 8]
|
168
|
+
diskconf.ssh_key = ssh_public_key
|
169
|
+
diskconf.scripts.push(script)
|
170
|
+
diskconf.write
|
171
|
+
|
172
|
+
# boot
|
173
|
+
puts 'booting the server...'
|
174
|
+
server.boot
|
175
|
+
sleep 3
|
176
|
+
server.reload
|
177
|
+
expect(server.instance.status).to eq Saklient::Cloud::Enums::EServerInstanceStatus::up
|
178
|
+
|
179
|
+
# boot conflict
|
180
|
+
puts 'checking the server power conflicts...'
|
181
|
+
ok = false
|
182
|
+
begin
|
183
|
+
server.boot
|
184
|
+
rescue Saklient::Errors::HttpConflictException
|
185
|
+
ok = true
|
186
|
+
end
|
187
|
+
fail 'サーバ起動中の起動試行時は HttpConflictException がスローされなければなりません' unless ok
|
188
|
+
|
189
|
+
# ssh
|
190
|
+
ip_address = server.ifaces[0].ip_address
|
191
|
+
expect(ip_address).not_to be_empty
|
192
|
+
cmd = '| ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -i' + ssh_private_key_file +
|
193
|
+
' root@' + ip_address + ' hostname 2>/dev/null'
|
194
|
+
ssh_success = false
|
195
|
+
puts 'trying to SSH to the server...'
|
196
|
+
for i in 0..9 do
|
197
|
+
sleep 5
|
198
|
+
sh = open cmd
|
199
|
+
host_name_got = ''
|
200
|
+
while !sh.eof
|
201
|
+
host_name_got += sh.gets
|
202
|
+
end
|
203
|
+
sh.close
|
204
|
+
host_name_got.strip!
|
205
|
+
next unless host_name == host_name_got
|
206
|
+
ssh_success = true
|
207
|
+
break
|
208
|
+
end
|
209
|
+
fail '作成したサーバへ正常にSSHできません' unless ssh_success
|
210
|
+
|
211
|
+
# stop
|
212
|
+
sleep 1
|
213
|
+
puts 'stopping the server...'
|
214
|
+
server.stop
|
215
|
+
fail 'サーバが正常に停止しません' unless server.sleep_until_down
|
216
|
+
|
217
|
+
# disconnect the disk from the server
|
218
|
+
puts 'disconnecting the disk from the server...'
|
219
|
+
disk.disconnect
|
220
|
+
|
221
|
+
# delete the server
|
222
|
+
puts 'deleting the server...'
|
223
|
+
server.destroy
|
224
|
+
|
225
|
+
# duplicate the disk
|
226
|
+
puts 'duplicating the disk (expanding to 40GiB)...'
|
227
|
+
disk2 = @api.disk.create
|
228
|
+
disk2.name = name + "-copy"
|
229
|
+
disk2.description = description
|
230
|
+
disk2.tags = [tag]
|
231
|
+
disk2.plan = @api.product.disk.hdd
|
232
|
+
disk2.source = disk
|
233
|
+
disk2.size_gib = 40
|
234
|
+
disk2.save
|
235
|
+
|
236
|
+
# wait disk duplication
|
237
|
+
puts 'waiting disk duplication...'
|
238
|
+
fail 'ディスクの複製がタイムアウトしました' unless disk2.sleep_while_copying
|
239
|
+
disk2.source = nil
|
240
|
+
disk2.reload
|
241
|
+
expect(disk2.source).to be_an_instance_of Saklient::Cloud::Resources::Disk
|
242
|
+
expect(disk2.source.id).to eq disk.id
|
243
|
+
expect(disk2.size_gib).to eq 40
|
244
|
+
|
245
|
+
# delete the disks
|
246
|
+
puts 'deleting the disks...'
|
247
|
+
disk2.destroy
|
248
|
+
disk.destroy
|
249
|
+
|
250
|
+
end
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
after do
|
255
|
+
@config = nil
|
256
|
+
@api = nil
|
257
|
+
end
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
end
|
data/spec/util_spec.rb
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
$: << File.dirname(__dir__) + '/lib'
|
2
|
+
require 'saklient/util'
|
3
|
+
require 'saklient/cloud/api'
|
4
|
+
|
5
|
+
Util = Saklient::Util
|
6
|
+
|
7
|
+
describe 'Util' do
|
8
|
+
|
9
|
+
it 'should access objects by path' do
|
10
|
+
test = {}
|
11
|
+
Util::set_by_path(test, 'top', 123)
|
12
|
+
expect(test[:top]).to eq 123
|
13
|
+
Util::set_by_path(test, 'first.second', 456)
|
14
|
+
expect(test[:first][:second]).to eq 456
|
15
|
+
Util::set_by_path(test, '.weird..path', 789)
|
16
|
+
expect(test[:weird][:path]).to eq 789
|
17
|
+
Util::set_by_path(test, 'existing.nil', nil)
|
18
|
+
expect(Util::get_by_path(test, 'existing')).to be_a Object
|
19
|
+
expect(Util::get_by_path(test, 'existing.nil')).to be_nil
|
20
|
+
#
|
21
|
+
expect(Util::get_by_path(test, 'top')).to eq 123
|
22
|
+
expect(Util::get_by_path(test, 'first.second')).to eq 456
|
23
|
+
expect(Util::get_by_path(test, '.weird..path')).to eq 789
|
24
|
+
#
|
25
|
+
expect(Util::get_by_path(test, 'nothing')).to be_nil
|
26
|
+
expect(Util::get_by_path(test, 'nothing.child')).to be_nil
|
27
|
+
expect(Util::get_by_path(test, 'top.child')).to be_nil
|
28
|
+
#
|
29
|
+
expect(Util::exists_path(test, 'top')).to be true
|
30
|
+
expect(Util::exists_path(test, 'top.child')).to be false
|
31
|
+
expect(Util::exists_path(test, 'first.second')).to be true
|
32
|
+
expect(Util::exists_path(test, '.weird..path')).to be true
|
33
|
+
expect(Util::exists_path(test, 'nothing')).to be false
|
34
|
+
expect(Util::exists_path(test, 'nothing.child')).to be false
|
35
|
+
expect(Util::exists_path(test, 'existing')).to be true
|
36
|
+
expect(Util::exists_path(test, 'existing.nil')).to be true
|
37
|
+
#
|
38
|
+
test[:first][:second] *= 10
|
39
|
+
expect(Util::get_by_path(test, 'first.second')).to eq 4560
|
40
|
+
|
41
|
+
#
|
42
|
+
Util::validate_type(1, 'Fixnum')
|
43
|
+
Util::validate_type(1, 'Float')
|
44
|
+
Util::validate_type(1, 'String')
|
45
|
+
Util::validate_type(1.1, 'Float')
|
46
|
+
Util::validate_type(1.1, 'String')
|
47
|
+
ex = Saklient::Errors::SaklientException.new('a','a')
|
48
|
+
Util::validate_type(ex, 'Saklient::Errors::SaklientException')
|
49
|
+
Util::validate_type(ex, 'StandardError')
|
50
|
+
|
51
|
+
#
|
52
|
+
ok = false
|
53
|
+
begin
|
54
|
+
Saklient::Cloud::API::authorize('abc', [])
|
55
|
+
rescue Saklient::Errors::SaklientException
|
56
|
+
ok = true
|
57
|
+
end
|
58
|
+
fail '引数の型が異なる時は SaklientException がスローされなければなりません' unless ok
|
59
|
+
|
60
|
+
#
|
61
|
+
ok = false
|
62
|
+
begin
|
63
|
+
server = Saklient::Cloud::API::authorize('a', 'a').server.create
|
64
|
+
server.availability = 'available'
|
65
|
+
rescue NoMethodError
|
66
|
+
ok = true
|
67
|
+
end
|
68
|
+
fail '未定義または読み取り専用フィールドへのset時は NoMethodError がスローされなければなりません' unless ok
|
69
|
+
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
data/test-sshkey.txt
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIEowIBAAKCAQEAt7EoPFX8a7N3hU8dxv/8DEZYKphRsYeSGvA2Ukn9mK5GRqim
|
3
|
+
y9bdgLIlLSDMMRohFVQXNCvPZTkc62u6qB0I+b+V5XHaqHYHLPZ8Lknkt/F1jurV
|
4
|
+
zReGvC7yp3xkuefrs5gZlVMAM7a90yCUeU01sWV6XMUrEhB8e5yHK99c3L6LI4Hc
|
5
|
+
ar0qJALCICcj0MsQsbDyvEhSLFFfmgE6gQljcqfkdYxAj5He+IqRAaHHJwNKWGZ0
|
6
|
+
YSLCjVkfaYQUVyFXeY8f4CuYx6qLoRVrwrnFLNIMIpRBsKZ4N2/2Ma4pzbJKXzqT
|
7
|
+
ITg/c4zVOfDgqDEvDANe8qqGb+fZd7tegq56wwIDAQABAoIBABZhhmZ7j4rLzgc3
|
8
|
+
EYi6jcotE/b0oheATiPsGqJCE5zztupLCC+T2V8h1Xe/JEHjTh6cJUuc/uL1Z3mj
|
9
|
+
oZV0HDDZz/ipu5uE7fDjg1PcevqSd+FW6X/Ymvj4u2X+uQMRp9007gEMoNysKkq8
|
10
|
+
EHsLFjysAZGmEE5eJdylwK5uw5C9jai2gPEjzD98eEZd4GtGX8iGmz77znOcqoHK
|
11
|
+
+fc6WcW6rFiTtsC5LHy1jiQv14W39YzQswVefXPXt8tbxXxwde3CztHP080y//Yu
|
12
|
+
evn6A6ms17FOT9aQgiH0jNMzYlVlUMvX5Q+0xVrS4Pzy28I0Bdu31407Z1C6lA/e
|
13
|
+
XP4BDekCgYEA5OY/QRaljm30rL+vsoxmTgdqcH0mMKblrxDVJu/IV8/U8SM8RVJ1
|
14
|
+
1+3I42uXlq1IfPFBtmNI9mtsHwAqxP1mqbIwZznWQlFgUcceu6/StEf1D6P+R79a
|
15
|
+
QNzY2mjjlkrzgs6cD6/r7SUeftkYwEtKbvTRJ3FLVncmtcoeCexNgu8CgYEAzXC2
|
16
|
+
IWIcX23VJwPfQoz7/HDPq1Qpv07BIEAn4mFxO1bDXenTnBH9sR/qNPPAhkhPQ52j
|
17
|
+
QbE+JrlGr3UQkg+TbOoA3NuYtVvxYdtLxS/SNNflDbzxT5x0nyZPdhLX7ZtQhMdS
|
18
|
+
2smAOZGnUHPkkzt4PLdxNM9X7JvxnveQSVKR9W0CgYEAoOsBQwfhwbypSxzDLvmn
|
19
|
+
Hmn2OTiyNXfPdwCVaPcfWCRi5ldIEtACypd/J+pGuoX9tOCCuu8Xpy0j6LNcXfpr
|
20
|
+
RxdfEeLGLv84gKVEhNv5fAYuUR2QMO5kS782sG0WulzcznPjoN+jM6dpxfFnhiAo
|
21
|
+
JtLzixAJz7KaQyjhb0Zxw38CgYBUF5DVtV07yq93WuRmT2NN/7dhv/+eqVPwKZKp
|
22
|
+
3Y0F5wvtQys1NUAM4q1xo1zpGmwnlz0eRLjWDPzcESUJRIrqCBb2UIT/p3T0w1kO
|
23
|
+
i/aVXtIJf4+fMMGj64CXKjtsrSiWUSifGd/8sJw2GFo10h/zantSTJUG6wZKNbe/
|
24
|
+
66aHOQKBgDUcQLANuRY0+gcWswIlTQjqzP4uoRfw9iCk1kCGsFHO0cwUxvQ3mBa/
|
25
|
+
bdofeETuh9dlYknCvwpNavR7ipOEujvkVE1Rt2hJXdXpkh+K2m8Z+62O9kiktTEu
|
26
|
+
zR+Plh585Lb4Sem8tcH0TcLULRkUa3Zky0cEhy/qGJ1R/5YljoGN
|
27
|
+
-----END RSA PRIVATE KEY-----
|
metadata
ADDED
@@ -0,0 +1,281 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: saklient
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- townewgokgok
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description: An easy interface to control your resources on SAKURA Cloud.
|
28
|
+
email:
|
29
|
+
- dev-support-ml@sakura.ad.jp
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- .gitignore
|
35
|
+
- Gemfile
|
36
|
+
- LICENSE.txt
|
37
|
+
- README.md
|
38
|
+
- Rakefile
|
39
|
+
- config.sh.sample
|
40
|
+
- example.rb
|
41
|
+
- example.sh
|
42
|
+
- lib/saklient/cloud/api.rb
|
43
|
+
- lib/saklient/cloud/client.rb
|
44
|
+
- lib/saklient/cloud/enums/eappliance_class.rb
|
45
|
+
- lib/saklient/cloud/enums/eavailability.rb
|
46
|
+
- lib/saklient/cloud/enums/edisk_connection.rb
|
47
|
+
- lib/saklient/cloud/enums/escope.rb
|
48
|
+
- lib/saklient/cloud/enums/escript_class.rb
|
49
|
+
- lib/saklient/cloud/enums/eserver_instance_status.rb
|
50
|
+
- lib/saklient/cloud/enums/estorage_class.rb
|
51
|
+
- lib/saklient/cloud/errors/access_api_key_disabled_exception.rb
|
52
|
+
- lib/saklient/cloud/errors/access_sakura_exception.rb
|
53
|
+
- lib/saklient/cloud/errors/access_staff_exception.rb
|
54
|
+
- lib/saklient/cloud/errors/access_token_exception.rb
|
55
|
+
- lib/saklient/cloud/errors/access_xhr_or_api_key_exception.rb
|
56
|
+
- lib/saklient/cloud/errors/account_not_found_exception.rb
|
57
|
+
- lib/saklient/cloud/errors/account_not_specified_exception.rb
|
58
|
+
- lib/saklient/cloud/errors/ambiguous_identifier_exception.rb
|
59
|
+
- lib/saklient/cloud/errors/ambiguous_zone_exception.rb
|
60
|
+
- lib/saklient/cloud/errors/api_proxy_timeout_exception.rb
|
61
|
+
- lib/saklient/cloud/errors/api_proxy_timeout_non_get_exception.rb
|
62
|
+
- lib/saklient/cloud/errors/archive_is_incomplete_exception.rb
|
63
|
+
- lib/saklient/cloud/errors/boot_failure_by_lock_exception.rb
|
64
|
+
- lib/saklient/cloud/errors/boot_failure_in_group_exception.rb
|
65
|
+
- lib/saklient/cloud/errors/busy_exception.rb
|
66
|
+
- lib/saklient/cloud/errors/cant_resize_smaller_exception.rb
|
67
|
+
- lib/saklient/cloud/errors/cdrom_device_locked_exception.rb
|
68
|
+
- lib/saklient/cloud/errors/cdrom_disabled_exception.rb
|
69
|
+
- lib/saklient/cloud/errors/cdrom_in_use_exception.rb
|
70
|
+
- lib/saklient/cloud/errors/cdrom_is_incomplete_exception.rb
|
71
|
+
- lib/saklient/cloud/errors/connect_to_same_switch_exception.rb
|
72
|
+
- lib/saklient/cloud/errors/contract_creation_exception.rb
|
73
|
+
- lib/saklient/cloud/errors/copy_to_itself_exception.rb
|
74
|
+
- lib/saklient/cloud/errors/delete_disk_b4_template_exception.rb
|
75
|
+
- lib/saklient/cloud/errors/delete_ip_v6_nets_first_exception.rb
|
76
|
+
- lib/saklient/cloud/errors/delete_res_b4_account_exception.rb
|
77
|
+
- lib/saklient/cloud/errors/delete_router_b4_switch_exception.rb
|
78
|
+
- lib/saklient/cloud/errors/delete_static_route_first_exception.rb
|
79
|
+
- lib/saklient/cloud/errors/disabled_in_sandbox_exception.rb
|
80
|
+
- lib/saklient/cloud/errors/disconnect_b4_delete_exception.rb
|
81
|
+
- lib/saklient/cloud/errors/disconnect_b4_update_exception.rb
|
82
|
+
- lib/saklient/cloud/errors/disk_connection_limit_exception.rb
|
83
|
+
- lib/saklient/cloud/errors/disk_is_copying_exception.rb
|
84
|
+
- lib/saklient/cloud/errors/disk_is_not_available_exception.rb
|
85
|
+
- lib/saklient/cloud/errors/disk_license_mismatch_exception.rb
|
86
|
+
- lib/saklient/cloud/errors/disk_or_ss_in_migration_exception.rb
|
87
|
+
- lib/saklient/cloud/errors/disk_stock_run_out_exception.rb
|
88
|
+
- lib/saklient/cloud/errors/dns_aaaa_record_not_found_exception.rb
|
89
|
+
- lib/saklient/cloud/errors/dns_arecord_not_found_exception.rb
|
90
|
+
- lib/saklient/cloud/errors/dns_ptr_update_failure_exception.rb
|
91
|
+
- lib/saklient/cloud/errors/dont_create_in_sandbox_exception.rb
|
92
|
+
- lib/saklient/cloud/errors/duplicate_account_code_exception.rb
|
93
|
+
- lib/saklient/cloud/errors/duplicate_entry_exception.rb
|
94
|
+
- lib/saklient/cloud/errors/duplicate_user_code_exception.rb
|
95
|
+
- lib/saklient/cloud/errors/file_not_uploaded_exception.rb
|
96
|
+
- lib/saklient/cloud/errors/filter_array_comparison_exception.rb
|
97
|
+
- lib/saklient/cloud/errors/filter_bad_operator_exception.rb
|
98
|
+
- lib/saklient/cloud/errors/filter_null_comparison_exception.rb
|
99
|
+
- lib/saklient/cloud/errors/filter_unknown_operator_exception.rb
|
100
|
+
- lib/saklient/cloud/errors/ftp_cannot_close_exception.rb
|
101
|
+
- lib/saklient/cloud/errors/ftp_is_already_close_exception.rb
|
102
|
+
- lib/saklient/cloud/errors/ftp_is_already_open_exception.rb
|
103
|
+
- lib/saklient/cloud/errors/ftp_must_be_closed_exception.rb
|
104
|
+
- lib/saklient/cloud/errors/host_operation_failure_exception.rb
|
105
|
+
- lib/saklient/cloud/errors/illegal_das_usage_exception.rb
|
106
|
+
- lib/saklient/cloud/errors/in_migration_exception.rb
|
107
|
+
- lib/saklient/cloud/errors/invalid_format_exception.rb
|
108
|
+
- lib/saklient/cloud/errors/invalid_param_comb_exception.rb
|
109
|
+
- lib/saklient/cloud/errors/invalid_range_exception.rb
|
110
|
+
- lib/saklient/cloud/errors/invalid_uri_argument_exception.rb
|
111
|
+
- lib/saklient/cloud/errors/ip_v6_net_already_attached_exception.rb
|
112
|
+
- lib/saklient/cloud/errors/limit_count_in_account_exception.rb
|
113
|
+
- lib/saklient/cloud/errors/limit_count_in_member_exception.rb
|
114
|
+
- lib/saklient/cloud/errors/limit_count_in_network_exception.rb
|
115
|
+
- lib/saklient/cloud/errors/limit_count_in_router_exception.rb
|
116
|
+
- lib/saklient/cloud/errors/limit_count_in_zone_exception.rb
|
117
|
+
- lib/saklient/cloud/errors/limit_memory_in_account_exception.rb
|
118
|
+
- lib/saklient/cloud/errors/limit_size_in_account_exception.rb
|
119
|
+
- lib/saklient/cloud/errors/missing_iso_image_exception.rb
|
120
|
+
- lib/saklient/cloud/errors/missing_param_exception.rb
|
121
|
+
- lib/saklient/cloud/errors/must_be_of_same_zone_exception.rb
|
122
|
+
- lib/saklient/cloud/errors/no_display_response_exception.rb
|
123
|
+
- lib/saklient/cloud/errors/not_for_router_exception.rb
|
124
|
+
- lib/saklient/cloud/errors/not_replicating_exception.rb
|
125
|
+
- lib/saklient/cloud/errors/not_with_hybridconn_exception.rb
|
126
|
+
- lib/saklient/cloud/errors/old_storage_plan_exception.rb
|
127
|
+
- lib/saklient/cloud/errors/operation_failure_exception.rb
|
128
|
+
- lib/saklient/cloud/errors/operation_timeout_exception.rb
|
129
|
+
- lib/saklient/cloud/errors/original_hash_mismatch_exception.rb
|
130
|
+
- lib/saklient/cloud/errors/packet_filter_applying_exception.rb
|
131
|
+
- lib/saklient/cloud/errors/packet_filter_version_mismatch_exception.rb
|
132
|
+
- lib/saklient/cloud/errors/param_ip_not_found_exception.rb
|
133
|
+
- lib/saklient/cloud/errors/param_res_not_found_exception.rb
|
134
|
+
- lib/saklient/cloud/errors/payment_credit_card_exception.rb
|
135
|
+
- lib/saklient/cloud/errors/payment_payment_exception.rb
|
136
|
+
- lib/saklient/cloud/errors/payment_registration_exception.rb
|
137
|
+
- lib/saklient/cloud/errors/payment_tel_certification_exception.rb
|
138
|
+
- lib/saklient/cloud/errors/payment_unpayable_exception.rb
|
139
|
+
- lib/saklient/cloud/errors/penalty_operation_exception.rb
|
140
|
+
- lib/saklient/cloud/errors/replica_already_exists_exception.rb
|
141
|
+
- lib/saklient/cloud/errors/replica_not_found_exception.rb
|
142
|
+
- lib/saklient/cloud/errors/res_already_connected_exception.rb
|
143
|
+
- lib/saklient/cloud/errors/res_already_disconnected_exception.rb
|
144
|
+
- lib/saklient/cloud/errors/res_already_exists_exception.rb
|
145
|
+
- lib/saklient/cloud/errors/res_used_in_zone_exception.rb
|
146
|
+
- lib/saklient/cloud/errors/resource_path_not_found_exception.rb
|
147
|
+
- lib/saklient/cloud/errors/run_out_of_ip_address_exception.rb
|
148
|
+
- lib/saklient/cloud/errors/same_license_required_exception.rb
|
149
|
+
- lib/saklient/cloud/errors/server_could_not_stop_exception.rb
|
150
|
+
- lib/saklient/cloud/errors/server_is_cleaning_exception.rb
|
151
|
+
- lib/saklient/cloud/errors/server_operation_failure_exception.rb
|
152
|
+
- lib/saklient/cloud/errors/server_power_must_be_down_exception.rb
|
153
|
+
- lib/saklient/cloud/errors/server_power_must_be_up_exception.rb
|
154
|
+
- lib/saklient/cloud/errors/service_temporarily_unavailable_exception.rb
|
155
|
+
- lib/saklient/cloud/errors/size_mismatch_exception.rb
|
156
|
+
- lib/saklient/cloud/errors/snapshot_in_migration_exception.rb
|
157
|
+
- lib/saklient/cloud/errors/still_creating_exception.rb
|
158
|
+
- lib/saklient/cloud/errors/storage_abnormal_exception.rb
|
159
|
+
- lib/saklient/cloud/errors/storage_operation_failure_exception.rb
|
160
|
+
- lib/saklient/cloud/errors/switch_hybrid_connected_exception.rb
|
161
|
+
- lib/saklient/cloud/errors/template_ftp_is_open_exception.rb
|
162
|
+
- lib/saklient/cloud/errors/template_is_incomplete_exception.rb
|
163
|
+
- lib/saklient/cloud/errors/too_many_request_exception.rb
|
164
|
+
- lib/saklient/cloud/errors/unknown_exception.rb
|
165
|
+
- lib/saklient/cloud/errors/unknown_os_type_exception.rb
|
166
|
+
- lib/saklient/cloud/errors/unsupported_res_class_exception.rb
|
167
|
+
- lib/saklient/cloud/errors/user_not_specified_exception.rb
|
168
|
+
- lib/saklient/cloud/errors/vnc_proxy_request_failure_exception.rb
|
169
|
+
- lib/saklient/cloud/models/model.rb
|
170
|
+
- lib/saklient/cloud/models/model_appliance.rb
|
171
|
+
- lib/saklient/cloud/models/model_archive.rb
|
172
|
+
- lib/saklient/cloud/models/model_disk.rb
|
173
|
+
- lib/saklient/cloud/models/model_disk_plan.rb
|
174
|
+
- lib/saklient/cloud/models/model_icon.rb
|
175
|
+
- lib/saklient/cloud/models/model_iface.rb
|
176
|
+
- lib/saklient/cloud/models/model_ipv6_net.rb
|
177
|
+
- lib/saklient/cloud/models/model_iso_image.rb
|
178
|
+
- lib/saklient/cloud/models/model_router.rb
|
179
|
+
- lib/saklient/cloud/models/model_router_plan.rb
|
180
|
+
- lib/saklient/cloud/models/model_script.rb
|
181
|
+
- lib/saklient/cloud/models/model_server.rb
|
182
|
+
- lib/saklient/cloud/models/model_server_plan.rb
|
183
|
+
- lib/saklient/cloud/models/model_swytch.rb
|
184
|
+
- lib/saklient/cloud/models/query_params.rb
|
185
|
+
- lib/saklient/cloud/product.rb
|
186
|
+
- lib/saklient/cloud/resources/appliance.rb
|
187
|
+
- lib/saklient/cloud/resources/archive.rb
|
188
|
+
- lib/saklient/cloud/resources/disk.rb
|
189
|
+
- lib/saklient/cloud/resources/disk_config.rb
|
190
|
+
- lib/saklient/cloud/resources/disk_plan.rb
|
191
|
+
- lib/saklient/cloud/resources/ftp_info.rb
|
192
|
+
- lib/saklient/cloud/resources/icon.rb
|
193
|
+
- lib/saklient/cloud/resources/iface.rb
|
194
|
+
- lib/saklient/cloud/resources/ipv4_net.rb
|
195
|
+
- lib/saklient/cloud/resources/ipv6_net.rb
|
196
|
+
- lib/saklient/cloud/resources/iso_image.rb
|
197
|
+
- lib/saklient/cloud/resources/resource.rb
|
198
|
+
- lib/saklient/cloud/resources/router.rb
|
199
|
+
- lib/saklient/cloud/resources/router_plan.rb
|
200
|
+
- lib/saklient/cloud/resources/script.rb
|
201
|
+
- lib/saklient/cloud/resources/server.rb
|
202
|
+
- lib/saklient/cloud/resources/server_instance.rb
|
203
|
+
- lib/saklient/cloud/resources/server_plan.rb
|
204
|
+
- lib/saklient/cloud/resources/swytch.rb
|
205
|
+
- lib/saklient/errors/exception_factory.rb
|
206
|
+
- lib/saklient/errors/http_bad_gateway_exception.rb
|
207
|
+
- lib/saklient/errors/http_bad_request_exception.rb
|
208
|
+
- lib/saklient/errors/http_conflict_exception.rb
|
209
|
+
- lib/saklient/errors/http_exception.rb
|
210
|
+
- lib/saklient/errors/http_expectation_failed_exception.rb
|
211
|
+
- lib/saklient/errors/http_failed_dependency_exception.rb
|
212
|
+
- lib/saklient/errors/http_forbidden_exception.rb
|
213
|
+
- lib/saklient/errors/http_gateway_timeout_exception.rb
|
214
|
+
- lib/saklient/errors/http_gone_exception.rb
|
215
|
+
- lib/saklient/errors/http_http_version_not_supported_exception.rb
|
216
|
+
- lib/saklient/errors/http_insufficient_storage_exception.rb
|
217
|
+
- lib/saklient/errors/http_internal_server_error_exception.rb
|
218
|
+
- lib/saklient/errors/http_length_required_exception.rb
|
219
|
+
- lib/saklient/errors/http_locked_exception.rb
|
220
|
+
- lib/saklient/errors/http_method_not_allowed_exception.rb
|
221
|
+
- lib/saklient/errors/http_not_acceptable_exception.rb
|
222
|
+
- lib/saklient/errors/http_not_extended_exception.rb
|
223
|
+
- lib/saklient/errors/http_not_found_exception.rb
|
224
|
+
- lib/saklient/errors/http_not_implemented_exception.rb
|
225
|
+
- lib/saklient/errors/http_payment_required_exception.rb
|
226
|
+
- lib/saklient/errors/http_precondition_failed_exception.rb
|
227
|
+
- lib/saklient/errors/http_proxy_authentication_required_exception.rb
|
228
|
+
- lib/saklient/errors/http_request_entity_too_large_exception.rb
|
229
|
+
- lib/saklient/errors/http_request_timeout_exception.rb
|
230
|
+
- lib/saklient/errors/http_request_uri_too_long_exception.rb
|
231
|
+
- lib/saklient/errors/http_requested_range_not_satisfiable_exception.rb
|
232
|
+
- lib/saklient/errors/http_service_unavailable_exception.rb
|
233
|
+
- lib/saklient/errors/http_unauthorized_exception.rb
|
234
|
+
- lib/saklient/errors/http_unprocessable_entity_exception.rb
|
235
|
+
- lib/saklient/errors/http_unsupported_media_type_exception.rb
|
236
|
+
- lib/saklient/errors/http_upgrade_required_exception.rb
|
237
|
+
- lib/saklient/errors/http_variant_also_negotiates_exception.rb
|
238
|
+
- lib/saklient/errors/saklient_exception.rb
|
239
|
+
- lib/saklient/util.rb
|
240
|
+
- lib/saklient/version.rb
|
241
|
+
- saklient.gemspec
|
242
|
+
- spec/archive_spec.rb
|
243
|
+
- spec/enum_spec.rb
|
244
|
+
- spec/exception_spec.rb
|
245
|
+
- spec/iso_image_spec.rb
|
246
|
+
- spec/router_spec.rb
|
247
|
+
- spec/server_spec.rb
|
248
|
+
- spec/util_spec.rb
|
249
|
+
- test-sshkey.txt
|
250
|
+
homepage: http://sakura-internet.github.io/saklient.doc/
|
251
|
+
licenses:
|
252
|
+
- MIT
|
253
|
+
metadata: {}
|
254
|
+
post_install_message:
|
255
|
+
rdoc_options: []
|
256
|
+
require_paths:
|
257
|
+
- lib
|
258
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
259
|
+
requirements:
|
260
|
+
- - '>='
|
261
|
+
- !ruby/object:Gem::Version
|
262
|
+
version: '0'
|
263
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
|
+
requirements:
|
265
|
+
- - '>='
|
266
|
+
- !ruby/object:Gem::Version
|
267
|
+
version: '0'
|
268
|
+
requirements: []
|
269
|
+
rubyforge_project:
|
270
|
+
rubygems_version: 2.0.14
|
271
|
+
signing_key:
|
272
|
+
specification_version: 4
|
273
|
+
summary: SAKURA Internet API Client Library for Ruby
|
274
|
+
test_files:
|
275
|
+
- spec/archive_spec.rb
|
276
|
+
- spec/enum_spec.rb
|
277
|
+
- spec/exception_spec.rb
|
278
|
+
- spec/iso_image_spec.rb
|
279
|
+
- spec/router_spec.rb
|
280
|
+
- spec/server_spec.rb
|
281
|
+
- spec/util_spec.rb
|