Class: Saklient::Cloud::Resources::IsoImage
- Defined in:
- lib/saklient/cloud/resources/iso_image.rb
Overview
ISOイメージの実体1つに対応し, 属性の取得や操作を行うためのクラス.
Instance Attribute Summary collapse
-
#description ⇒ String
説明.
-
#display_order ⇒ Fixnum
表示順序.
-
#ftp_info ⇒ FtpInfo
readonly
FTP情報.
-
#icon ⇒ Icon
アイコン.
-
#id ⇒ String
readonly
ID.
-
#name ⇒ String
名前.
-
#scope ⇒ String
スコープ Enums::EScope.
-
#service_class ⇒ String
readonly
サービスクラス.
-
#size_gib ⇒ Fixnum
サイズ.
-
#size_mib ⇒ Fixnum
サイズ.
-
#tags ⇒ Array<String>
タグ文字列の配列.
Attributes inherited from Resource
Instance Method Summary collapse
- #_class_name ⇒ String
- #_id ⇒ String
-
#close_ftp ⇒ IsoImage
FTPSを終了し, ISOイメージを利用可能な状態にします.
- #get_ftp_info ⇒ FtpInfo
-
#initialize(client, obj, wrapped = false) ⇒ IsoImage
constructor
A new instance of IsoImage.
-
#open_ftp(reset = false) ⇒ IsoImage
FTPSを開始し, イメージファイルをアップロード・ダウンロードできる状態にします.
-
#reload ⇒ IsoImage
最新のリソース情報を再取得します.
-
#save ⇒ IsoImage
このローカルオブジェクトに現在設定されているリソース情報をAPIに送信し, 新規作成または上書き保存します.
Methods inherited from Resource
#api_deserialize, #api_serialize, create_with, #destroy, #dump, #exists, #request_retry, #set_param
Constructor Details
#initialize(client, obj, wrapped = false) ⇒ IsoImage
Returns a new instance of IsoImage.
116 117 118 119 120 121 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 116 def initialize(client, obj, wrapped = false) super(client) Saklient::Util::validate_type(client, 'Saklient::Cloud::Client') Saklient::Util::validate_type(wrapped, 'bool') api_deserialize(obj, wrapped) end |
Instance Attribute Details
#description ⇒ String
説明
351 352 353 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 351 def description @description end |
#display_order ⇒ Fixnum
表示順序
472 473 474 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 472 def display_order @display_order end |
#ftp_info ⇒ FtpInfo (readonly)
FTP情報
185 186 187 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 185 def ftp_info @ftp_info end |
#icon ⇒ Icon
アイコン
432 433 434 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 432 def icon @icon end |
#id ⇒ String (readonly)
ID
235 236 237 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 235 def id @id end |
#name ⇒ String
名前
311 312 313 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 311 def name @name end |
#scope ⇒ String
スコープ Enums::EScope
271 272 273 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 271 def scope @scope end |
#service_class ⇒ String (readonly)
サービスクラス
541 542 543 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 541 def service_class @service_class end |
#size_gib ⇒ Fixnum
158 159 160 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 158 def size_gib @size_gib end |
#size_mib ⇒ Fixnum
513 514 515 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 513 def size_mib @size_mib end |
#tags ⇒ Array<String>
タグ文字列の配列
392 393 394 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 392 def @tags end |
Instance Method Details
#_class_name ⇒ String
88 89 90 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 88 def _class_name return 'IsoImage' end |
#_id ⇒ String
94 95 96 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 94 def _id return get_id end |
#close_ftp ⇒ IsoImage
FTPSを終了し, ISOイメージを利用可能な状態にします.
210 211 212 213 214 215 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 210 def close_ftp path = _api_path + '/' + Saklient::Util::url_encode(_id) + '/ftp' @_client.request('DELETE', path) @_ftp_info = nil return self end |
#get_ftp_info ⇒ FtpInfo
178 179 180 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 178 def get_ftp_info return @_ftp_info end |
#open_ftp(reset = false) ⇒ IsoImage
FTPSを開始し, イメージファイルをアップロード・ダウンロードできる状態にします.
アカウント情報は, ftpInfo プロパティから取得することができます.
197 198 199 200 201 202 203 204 205 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 197 def open_ftp(reset = false) Saklient::Util::validate_type(reset, 'bool') path = _api_path + '/' + Saklient::Util::url_encode(_id) + '/ftp' q = {} Saklient::Util::set_by_path(q, 'ChangePassword', reset) result = @_client.request('PUT', path, q) _on_after_api_deserialize(nil, result) return self end |
#reload ⇒ IsoImage
最新のリソース情報を再取得します.
108 109 110 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 108 def reload return _reload end |
#save ⇒ IsoImage
このローカルオブジェクトに現在設定されているリソース情報をAPIに送信し, 新規作成または上書き保存します.
101 102 103 |
# File 'lib/saklient/cloud/resources/iso_image.rb', line 101 def save return _save end |