Class: Saklient::Cloud::Models::Model_Appliance
- Defined in:
- lib/saklient/cloud/models/model_appliance.rb
Overview
アプライアンスを検索・作成するための機能を備えたクラス.
Instance Attribute Summary
Attributes inherited from Model
#client, #count, #query, #total
Instance Method Summary collapse
- #create_load_balancer(swytch, vrid, realIps, isHighSpec = false) ⇒ Saklient::Cloud::Resources::LoadBalancer
- #create_vpc_router ⇒ Saklient::Cloud::Resources::VpcRouter
-
#filter_by(key, value, multiple = false) ⇒ Model_Appliance
Web APIのフィルタリング設定を直接指定します.
-
#find ⇒ Array<Saklient::Cloud::Resources::Appliance>
リソースの検索リクエストを実行し, 結果をリストで取得します.
-
#get_by_id(id) ⇒ Saklient::Cloud::Resources::Appliance
指定したIDを持つ唯一のリソースを取得します.
-
#initialize(client) ⇒ Model_Appliance
constructor
A new instance of Model_Appliance.
-
#limit(count) ⇒ Model_Appliance
次に取得するリストの上限レコード数を指定します.
-
#offset(offset) ⇒ Model_Appliance
次に取得するリストの開始オフセットを指定します.
-
#reset ⇒ Model_Appliance
次のリクエストのために設定されているステートをすべて破棄します.
-
#sort_by_name(reverse = false) ⇒ Model_Appliance
名前でソートします.
-
#with_name_like(name) ⇒ Model_Appliance
指定した文字列を名前に含むリソースに絞り込みます.
-
#with_tag(tag) ⇒ Model_Appliance
指定したタグを持つリソースに絞り込みます.
-
#with_tag_dnf(dnf) ⇒ Model_Appliance
指定したDNFに合致するタグを持つリソースに絞り込みます.
-
#with_tags(tags) ⇒ Model_Appliance
指定したすべてのタグを持つリソースに絞り込みます.
Constructor Details
#initialize(client) ⇒ Model_Appliance
Returns a new instance of Model_Appliance.
191 192 193 194 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 191 def initialize(client) super(client) Saklient::Util::validate_type(client, 'Saklient::Cloud::Client') end |
Instance Method Details
#create_load_balancer(swytch, vrid, realIps, isHighSpec = false) ⇒ Saklient::Cloud::Resources::LoadBalancer
103 104 105 106 107 108 109 110 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 103 def create_load_balancer(swytch, vrid, realIps, isHighSpec = false) Saklient::Util::validate_type(swytch, 'Saklient::Cloud::Resources::Swytch') Saklient::Util::validate_type(vrid, 'Fixnum') Saklient::Util::validate_type(realIps, 'Array') Saklient::Util::validate_type(isHighSpec, 'bool') ret = Saklient::Cloud::Resources::LoadBalancer.new(@_client, nil) return ret.set_initial_params(swytch, vrid, realIps, isHighSpec) end |
#create_vpc_router ⇒ Saklient::Cloud::Resources::VpcRouter
113 114 115 116 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 113 def create_vpc_router ret = Saklient::Cloud::Resources::VpcRouter.new(@_client, nil) return ret end |
#filter_by(key, value, multiple = false) ⇒ Model_Appliance
Web APIのフィルタリング設定を直接指定します.
85 86 87 88 89 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 85 def filter_by(key, value, multiple = false) Saklient::Util::validate_type(key, 'String') Saklient::Util::validate_type(multiple, 'bool') return _filter_by(key, value, multiple) end |
#find ⇒ Array<Saklient::Cloud::Resources::Appliance>
リソースの検索リクエストを実行し, 結果をリストで取得します.
130 131 132 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 130 def find return _find end |
#get_by_id(id) ⇒ Saklient::Cloud::Resources::Appliance
指定したIDを持つ唯一のリソースを取得します.
122 123 124 125 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 122 def get_by_id(id) Saklient::Util::validate_type(id, 'String') return _get_by_id(id) end |
#limit(count) ⇒ Model_Appliance
次に取得するリストの上限レコード数を指定します.
74 75 76 77 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 74 def limit(count) Saklient::Util::validate_type(count, 'Fixnum') return _limit(count) end |
#offset(offset) ⇒ Model_Appliance
次に取得するリストの開始オフセットを指定します.
65 66 67 68 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 65 def offset(offset) Saklient::Util::validate_type(offset, 'Fixnum') return _offset(offset) end |
#reset ⇒ Model_Appliance
次のリクエストのために設定されているステートをすべて破棄します.
94 95 96 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 94 def reset return _reset end |
#sort_by_name(reverse = false) ⇒ Model_Appliance
Implement test case
名前でソートします.
184 185 186 187 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 184 def sort_by_name(reverse = false) Saklient::Util::validate_type(reverse, 'bool') return _sort_by_name(reverse) end |
#with_name_like(name) ⇒ Model_Appliance
Implement test case
指定した文字列を名前に含むリソースに絞り込みます.
大文字・小文字は区別されません. 半角スペースで区切られた複数の文字列は, それらをすべて含むことが条件とみなされます.
142 143 144 145 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 142 def with_name_like(name) Saklient::Util::validate_type(name, 'String') return _with_name_like(name) end |
#with_tag(tag) ⇒ Model_Appliance
Implement test case
指定したタグを持つリソースに絞り込みます.
複数のタグを指定する場合は withTags() を利用してください.
154 155 156 157 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 154 def with_tag(tag) Saklient::Util::validate_type(tag, 'String') return _with_tag(tag) end |
#with_tag_dnf(dnf) ⇒ Model_Appliance
Implement test case
指定したDNFに合致するタグを持つリソースに絞り込みます.
174 175 176 177 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 174 def with_tag_dnf(dnf) Saklient::Util::validate_type(dnf, 'Array') return _with_tag_dnf(dnf) end |
#with_tags(tags) ⇒ Model_Appliance
Implement test case
指定したすべてのタグを持つリソースに絞り込みます.
164 165 166 167 |
# File 'lib/saklient/cloud/models/model_appliance.rb', line 164 def () Saklient::Util::validate_type(, 'Array') return () end |