Class: Saklient::Cloud::Resources::Iface
- Inherits:
-
Resource
- Object
- Resource
- Saklient::Cloud::Resources::Iface
- Defined in:
- lib/saklient/cloud/resources/iface.rb
Overview
インタフェースの実体1つに対応し, 属性の取得や操作を行うためのクラス.
Instance Attribute Summary (collapse)
-
- (IfaceActivity) activity
readonly
アクティビティ.
-
- (String) id
readonly
ID.
-
- (String) ip_address
readonly
IPv4アドレス(共有セグメントによる自動割当).
-
- (String) mac_address
readonly
MACアドレス.
-
- (String) server_id
このインタフェースが取り付けられているサーバのID.
-
- (String) user_ip_address
ユーザ設定IPv4アドレス.
Instance Method Summary (collapse)
-
- (Iface) connect_to_shared_segment
共有セグメントに接続します.
-
- (Iface) connect_to_swytch(swytch)
スイッチに接続します.
-
- (Iface) disconnect_from_swytch
スイッチから切断します.
-
- (Iface) reload
最新のリソース情報を再取得します.
-
- (Iface) save
このローカルオブジェクトに現在設定されているリソース情報をAPIに送信し, 新規作成または上書き保存します.
Instance Attribute Details
- (IfaceActivity) activity (readonly)
アクティビティ
108 109 110 |
# File 'lib/saklient/cloud/resources/iface.rb', line 108 def activity @activity end |
- (String) id (readonly)
ID
182 183 184 |
# File 'lib/saklient/cloud/resources/iface.rb', line 182 def id @id end |
- (String) ip_address (readonly)
IPv4アドレス(共有セグメントによる自動割当)
230 231 232 |
# File 'lib/saklient/cloud/resources/iface.rb', line 230 def ip_address @ip_address end |
- (String) mac_address (readonly)
MACアドレス
206 207 208 |
# File 'lib/saklient/cloud/resources/iface.rb', line 206 def mac_address @mac_address end |
- (String) server_id
このインタフェースが取り付けられているサーバのID
307 308 309 |
# File 'lib/saklient/cloud/resources/iface.rb', line 307 def server_id @server_id end |
- (String) user_ip_address
ユーザ設定IPv4アドレス
266 267 268 |
# File 'lib/saklient/cloud/resources/iface.rb', line 266 def user_ip_address @user_ip_address end |
Instance Method Details
- (Iface) connect_to_shared_segment
共有セグメントに接続します.
151 152 153 154 |
# File 'lib/saklient/cloud/resources/iface.rb', line 151 def connect_to_shared_segment @_client.request('PUT', _api_path + '/' + Saklient::Util::url_encode(_id) + '/to/switch/shared') return reload end |
- (Iface) connect_to_swytch(swytch)
スイッチに接続します.
142 143 144 145 146 |
# File 'lib/saklient/cloud/resources/iface.rb', line 142 def connect_to_swytch(swytch) Saklient::Util::validate_type(swytch, 'Saklient::Cloud::Resources::Swytch') @_client.request('PUT', _api_path + '/' + Saklient::Util::url_encode(_id) + '/to/switch/' + Saklient::Util::url_encode(swytch._id)) return reload end |
- (Iface) disconnect_from_swytch
スイッチから切断します.
159 160 161 162 |
# File 'lib/saklient/cloud/resources/iface.rb', line 159 def disconnect_from_swytch @_client.request('DELETE', _api_path + '/' + Saklient::Util::url_encode(_id) + '/to/switch') return reload end |
- (Iface) reload
最新のリソース情報を再取得します.
87 88 89 |
# File 'lib/saklient/cloud/resources/iface.rb', line 87 def reload return _reload end |
- (Iface) save
このローカルオブジェクトに現在設定されているリソース情報をAPIに送信し, 新規作成または上書き保存します.
80 81 82 |
# File 'lib/saklient/cloud/resources/iface.rb', line 80 def save return _save end |