class Saklient::Cloud::Resources::Appliance

アプライアンスの実体1つに対応し, 属性の取得や操作を行うためのクラス.

Attributes

availability[R]

有効状態 {Saklient::Cloud::Enums::EAvailability}

@return [String]

clazz[RW]

クラス {Saklient::Cloud::Enums::EApplianceClass}

@return [String]

description[RW]

説明

@return [String]

icon[RW]

アイコン

@return [Icon]

id[R]

ID

@return [String]

ifaces[R]

インタフェース {Iface} の配列

@return [Array<Iface>]

m_availability[RW]

有効状態 {Saklient::Cloud::Enums::EAvailability}

@return [String]

m_clazz[RW]

クラス {Saklient::Cloud::Enums::EApplianceClass}

@return [String]

m_description[RW]

説明

@return [String]

m_icon[RW]

アイコン

@return [Icon]

m_id[RW]

ID

@return [String]

m_ifaces[RW]

インタフェース {Iface} の配列

@return [Array<Iface>]

m_name[RW]

名前

@return [String]

m_plan_id[RW]

プラン

@return [Fixnum]

m_raw_annotation[RW]

注釈

@return [any]

m_raw_settings[RW]

設定の生データ

@return [any]

m_raw_settings_hash[RW]

@private @return [String]

m_service_class[RW]

サービスクラス

@return [String]

m_status[RW]

起動状態 {Saklient::Cloud::Enums::EServerInstanceStatus}

@return [String]

m_swytch_id[RW]

接続先スイッチID

@return [String]

m_tags[RW]

タグ文字列の配列

@return [Array<String>]

n_availability[RW]

@return [bool]

n_clazz[RW]

@return [bool]

n_description[RW]

@return [bool]

n_icon[RW]

@return [bool]

n_id[RW]

@return [bool]

n_ifaces[RW]

@return [bool]

n_name[RW]

@return [bool]

n_plan_id[RW]

@return [bool]

n_raw_annotation[RW]

@return [bool]

n_raw_settings[RW]

@return [bool]

n_raw_settings_hash[RW]

@return [bool]

n_service_class[RW]

@return [bool]

n_status[RW]

@return [bool]

n_swytch_id[RW]

@return [bool]

n_tags[RW]

@return [bool]

name[RW]

名前

@return [String]

plan_id[RW]

プラン

@return [Fixnum]

raw_annotation[RW]

注釈

@return [any]

raw_settings[RW]

設定の生データ

@return [any]

raw_settings_hash[R]

@private @return [String]

service_class[R]

サービスクラス

@return [String]

status[R]

起動状態 {Saklient::Cloud::Enums::EServerInstanceStatus}

@return [String]

swytch_id[R]

接続先スイッチID

@return [String]

tags[RW]

タグ文字列の配列

@return [Array<String>]

Public Class Methods

new(client, obj, wrapped = false) click to toggle source

@private @param [Saklient::Cloud::Client] client @param [any] obj @param [bool] wrapped

# File lib/saklient/cloud/resources/appliance.rb, line 149
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

Public Instance Methods

_class_name() click to toggle source

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 121
def _class_name
  return 'Appliance'
end
_id() click to toggle source

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 127
def _id
  return get_id
end
apply() click to toggle source

アプライアンスの設定を反映します.

@return [Appliance] this

# File lib/saklient/cloud/resources/appliance.rb, line 179
def apply
  @_client.request('PUT', _api_path + '/' + Saklient::Util::url_encode(_id) + '/config')
  return self
end
boot() click to toggle source

アプライアンスを起動します.

@return [Appliance] this

# File lib/saklient/cloud/resources/appliance.rb, line 187
def boot
  @_client.request('PUT', _api_path + '/' + Saklient::Util::url_encode(_id) + '/power')
  return self
end
clazz=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 342
def clazz=(v)
  set_clazz(v)
end
description=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 422
def description=(v)
  set_description(v)
end
get_swytch() click to toggle source

このルータが接続されているスイッチを取得します.

@return [Swytch]

# File lib/saklient/cloud/resources/appliance.rb, line 170
def get_swytch
  model = Saklient::Util::create_class_instance('saklient.cloud.models.Model_Swytch', [@_client])
  id = get_swytch_id
  return model.get_by_id(id)
end
icon=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 503
def icon=(v)
  set_icon(v)
end
name=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 382
def name=(v)
  set_name(v)
end
plan_id=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 544
def plan_id=(v)
  set_plan_id(v)
end
raw_annotation=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 608
def raw_annotation=(v)
  set_raw_annotation(v)
end
raw_settings=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 648
def raw_settings=(v)
  set_raw_settings(v)
end
reboot() click to toggle source

アプライアンスを強制再起動します.

@return [Appliance] this

# File lib/saklient/cloud/resources/appliance.rb, line 211
def reboot
  @_client.request('PUT', _api_path + '/' + Saklient::Util::url_encode(_id) + '/reset')
  return self
end
reload() click to toggle source

最新のリソース情報を再取得します.

@return [Appliance] this

# File lib/saklient/cloud/resources/appliance.rb, line 141
def reload
  return _reload
end
save() click to toggle source

このローカルオブジェクトに現在設定されているリソース情報をAPIに送信し, 新規作成または上書き保存します.

@return [Appliance] this

# File lib/saklient/cloud/resources/appliance.rb, line 134
def save
  return _save
end
shutdown() click to toggle source

アプライアンスをシャットダウンします.

@return [Appliance] this

# File lib/saklient/cloud/resources/appliance.rb, line 195
def shutdown
  @_client.request('DELETE', _api_path + '/' + Saklient::Util::url_encode(_id) + '/power')
  return self
end
sleep_until_down(timeoutSec = 600) click to toggle source

アプライアンスが停止するまで待機します.

@param [Fixnum] timeoutSec @return [bool] 成功時はtrue, タイムアウトやエラーによる失敗時はfalseを返します.

# File lib/saklient/cloud/resources/appliance.rb, line 251
def sleep_until_down(timeoutSec = 600)
  Saklient::Util::validate_type(timeoutSec, 'Fixnum')
  return sleep_until(Saklient::Cloud::Enums::EServerInstanceStatus::down, timeoutSec)
end
sleep_until_up(timeoutSec = 600) click to toggle source

アプライアンスが起動するまで待機します.

@param [Fixnum] timeoutSec @return [bool]

# File lib/saklient/cloud/resources/appliance.rb, line 242
def sleep_until_up(timeoutSec = 600)
  Saklient::Util::validate_type(timeoutSec, 'Fixnum')
  return sleep_until(Saklient::Cloud::Enums::EServerInstanceStatus::up, timeoutSec)
end
sleep_while_creating(timeoutSec = 600) click to toggle source

作成中のアプライアンスが利用可能になるまで待機します.

@param [Fixnum] timeoutSec @return [bool] 成功時はtrue, タイムアウトやエラーによる失敗時はfalseを返します.

# File lib/saklient/cloud/resources/appliance.rb, line 220
def sleep_while_creating(timeoutSec = 600)
  Saklient::Util::validate_type(timeoutSec, 'Fixnum')
  step = 10
  while 0 < timeoutSec do
    begin
      reload
    rescue Saklient::Errors::HttpException
      {}
    end
    a = get_availability
    return true if a == Saklient::Cloud::Enums::EAvailability::available
    timeoutSec = 0 if a != Saklient::Cloud::Enums::EAvailability::migrating
    timeoutSec -= step
    sleep(step) if 0 < timeoutSec
  end
  return false
end
stop() click to toggle source

アプライアンスを強制停止します.

@return [Appliance] this

# File lib/saklient/cloud/resources/appliance.rb, line 203
def stop
  @_client.request('DELETE', _api_path + '/' + Saklient::Util::url_encode(_id) + '/power', { Force: true })
  return self
end
tags=(v) click to toggle source
# File lib/saklient/cloud/resources/appliance.rb, line 463
def tags=(v)
  set_tags(v)
end

Protected Instance Methods

_api_path() click to toggle source

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 101
def _api_path
  return '/appliance'
end
_on_before_save(query) click to toggle source

@private @param [any] query @return [void]

# File lib/saklient/cloud/resources/appliance.rb, line 161
def _on_before_save(query)
  Saklient::Util::set_by_path(query, 'OriginalSettingsHash', get_raw_settings_hash)
end
_root_key() click to toggle source

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 107
def _root_key
  return 'Appliance'
end
_root_key_m() click to toggle source

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 113
def _root_key_m
  return 'Appliances'
end
api_deserialize_impl(r) click to toggle source

(This method is generated in Translator_default#buildImpl)

@param [any] r

# File lib/saklient/cloud/resources/appliance.rb, line 776
def api_deserialize_impl(r)
  @is_new = (r).nil?
  r = {} if @is_new
  @is_incomplete = false
  if Saklient::Util::exists_path(r, 'ID')
    @m_id = (Saklient::Util::get_by_path(r, 'ID')).nil? ? nil : Saklient::Util::get_by_path(r, 'ID').to_s
  else
    @m_id = nil
    @is_incomplete = true
  end
  @n_id = false
  if Saklient::Util::exists_path(r, 'Class')
    @m_clazz = (Saklient::Util::get_by_path(r, 'Class')).nil? ? nil : Saklient::Util::get_by_path(r, 'Class').to_s
  else
    @m_clazz = nil
    @is_incomplete = true
  end
  @n_clazz = false
  if Saklient::Util::exists_path(r, 'Name')
    @m_name = (Saklient::Util::get_by_path(r, 'Name')).nil? ? nil : Saklient::Util::get_by_path(r, 'Name').to_s
  else
    @m_name = nil
    @is_incomplete = true
  end
  @n_name = false
  if Saklient::Util::exists_path(r, 'Description')
    @m_description = (Saklient::Util::get_by_path(r, 'Description')).nil? ? nil : Saklient::Util::get_by_path(r, 'Description').to_s
  else
    @m_description = nil
    @is_incomplete = true
  end
  @n_description = false
  if Saklient::Util::exists_path(r, 'Tags')
    if (Saklient::Util::get_by_path(r, 'Tags')).nil?
      @m_tags = []
    else
      @m_tags = []
      for t in Saklient::Util::get_by_path(r, 'Tags')
        v1 = nil
        v1 = (t).nil? ? nil : t.to_s
        @m_tags << v1
      end
    end
  else
    @m_tags = nil
    @is_incomplete = true
  end
  @n_tags = false
  if Saklient::Util::exists_path(r, 'Icon')
    @m_icon = (Saklient::Util::get_by_path(r, 'Icon')).nil? ? nil : Saklient::Cloud::Resources::Icon.new(@_client, Saklient::Util::get_by_path(r, 'Icon'))
  else
    @m_icon = nil
    @is_incomplete = true
  end
  @n_icon = false
  if Saklient::Util::exists_path(r, 'Plan.ID')
    @m_plan_id = (Saklient::Util::get_by_path(r, 'Plan.ID')).nil? ? nil : (Saklient::Util::get_by_path(r, 'Plan.ID').to_s).to_s().to_i(10)
  else
    @m_plan_id = nil
    @is_incomplete = true
  end
  @n_plan_id = false
  if Saklient::Util::exists_path(r, 'Interfaces')
    if (Saklient::Util::get_by_path(r, 'Interfaces')).nil?
      @m_ifaces = []
    else
      @m_ifaces = []
      for t in Saklient::Util::get_by_path(r, 'Interfaces')
        v2 = nil
        v2 = (t).nil? ? nil : Saklient::Cloud::Resources::Iface.new(@_client, t)
        @m_ifaces << v2
      end
    end
  else
    @m_ifaces = nil
    @is_incomplete = true
  end
  @n_ifaces = false
  if Saklient::Util::exists_path(r, 'Remark')
    @m_raw_annotation = Saklient::Util::get_by_path(r, 'Remark')
  else
    @m_raw_annotation = nil
    @is_incomplete = true
  end
  @n_raw_annotation = false
  if Saklient::Util::exists_path(r, 'Settings')
    @m_raw_settings = Saklient::Util::get_by_path(r, 'Settings')
  else
    @m_raw_settings = nil
    @is_incomplete = true
  end
  @n_raw_settings = false
  if Saklient::Util::exists_path(r, 'SettingsHash')
    @m_raw_settings_hash = (Saklient::Util::get_by_path(r, 'SettingsHash')).nil? ? nil : Saklient::Util::get_by_path(r, 'SettingsHash').to_s
  else
    @m_raw_settings_hash = nil
    @is_incomplete = true
  end
  @n_raw_settings_hash = false
  if Saklient::Util::exists_path(r, 'Instance.Status')
    @m_status = (Saklient::Util::get_by_path(r, 'Instance.Status')).nil? ? nil : Saklient::Util::get_by_path(r, 'Instance.Status').to_s
  else
    @m_status = nil
    @is_incomplete = true
  end
  @n_status = false
  if Saklient::Util::exists_path(r, 'ServiceClass')
    @m_service_class = (Saklient::Util::get_by_path(r, 'ServiceClass')).nil? ? nil : Saklient::Util::get_by_path(r, 'ServiceClass').to_s
  else
    @m_service_class = nil
    @is_incomplete = true
  end
  @n_service_class = false
  if Saklient::Util::exists_path(r, 'Availability')
    @m_availability = (Saklient::Util::get_by_path(r, 'Availability')).nil? ? nil : Saklient::Util::get_by_path(r, 'Availability').to_s
  else
    @m_availability = nil
    @is_incomplete = true
  end
  @n_availability = false
  if Saklient::Util::exists_path(r, 'Switch.ID')
    @m_swytch_id = (Saklient::Util::get_by_path(r, 'Switch.ID')).nil? ? nil : Saklient::Util::get_by_path(r, 'Switch.ID').to_s
  else
    @m_swytch_id = nil
    @is_incomplete = true
  end
  @n_swytch_id = false
end
api_serialize_impl(withClean = false) click to toggle source

@private @param [bool] withClean @return [any]

# File lib/saklient/cloud/resources/appliance.rb, line 908
def api_serialize_impl(withClean = false)
  Saklient::Util::validate_type(withClean, 'bool')
  missing = []
  ret = {}
  Saklient::Util::set_by_path(ret, 'ID', @m_id) if withClean || @n_id
  if withClean || @n_clazz
    Saklient::Util::set_by_path(ret, 'Class', @m_clazz)
  else
    missing << 'clazz' if @is_new
  end
  if withClean || @n_name
    Saklient::Util::set_by_path(ret, 'Name', @m_name)
  else
    missing << 'name' if @is_new
  end
  Saklient::Util::set_by_path(ret, 'Description', @m_description) if withClean || @n_description
  if withClean || @n_tags
    Saklient::Util::set_by_path(ret, 'Tags', [])
    for r1 in @m_tags
      v = nil
      v = r1
      ret[:Tags] << v
    end
  end
  Saklient::Util::set_by_path(ret, 'Icon', withClean ? ((@m_icon).nil? ? nil : @m_icon.api_serialize(withClean)) : ((@m_icon).nil? ? { ID: '0' } : @m_icon.api_serialize_id)) if withClean || @n_icon
  if withClean || @n_plan_id
    Saklient::Util::set_by_path(ret, 'Plan.ID', @m_plan_id)
  else
    missing << 'plan_id' if @is_new
  end
  if withClean || @n_ifaces
    Saklient::Util::set_by_path(ret, 'Interfaces', [])
    for r2 in @m_ifaces
      v = nil
      v = withClean ? ((r2).nil? ? nil : r2.api_serialize(withClean)) : ((r2).nil? ? { ID: '0' } : r2.api_serialize_id)
      ret[:Interfaces] << v
    end
  end
  if withClean || @n_raw_annotation
    Saklient::Util::set_by_path(ret, 'Remark', @m_raw_annotation)
  else
    missing << 'raw_annotation' if @is_new
  end
  Saklient::Util::set_by_path(ret, 'Settings', @m_raw_settings) if withClean || @n_raw_settings
  Saklient::Util::set_by_path(ret, 'SettingsHash', @m_raw_settings_hash) if withClean || @n_raw_settings_hash
  Saklient::Util::set_by_path(ret, 'Instance.Status', @m_status) if withClean || @n_status
  Saklient::Util::set_by_path(ret, 'ServiceClass', @m_service_class) if withClean || @n_service_class
  Saklient::Util::set_by_path(ret, 'Availability', @m_availability) if withClean || @n_availability
  Saklient::Util::set_by_path(ret, 'Switch.ID', @m_swytch_id) if withClean || @n_swytch_id
  raise Saklient::Errors::SaklientException.new('required_field', 'Required fields must be set before the Appliance creation: ' + missing.join(', ')) if missing.length > 0
  return ret
end
get_availability() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 732
def get_availability
  return @m_availability
end
get_clazz() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 314
def get_clazz
  return @m_clazz
end
get_description() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 395
def get_description
  return @m_description
end
get_icon() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [Icon]

# File lib/saklient/cloud/resources/appliance.rb, line 476
def get_icon
  return @m_icon
end
get_id() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 290
def get_id
  return @m_id
end
get_ifaces() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [Array<Iface>]

# File lib/saklient/cloud/resources/appliance.rb, line 557
def get_ifaces
  return @m_ifaces
end
get_name() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 355
def get_name
  return @m_name
end
get_plan_id() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [Fixnum]

# File lib/saklient/cloud/resources/appliance.rb, line 516
def get_plan_id
  return @m_plan_id
end
get_raw_annotation() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [any]

# File lib/saklient/cloud/resources/appliance.rb, line 581
def get_raw_annotation
  return @m_raw_annotation
end
get_raw_settings() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [any]

# File lib/saklient/cloud/resources/appliance.rb, line 621
def get_raw_settings
  @n_raw_settings = true
  return @m_raw_settings
end
get_raw_settings_hash() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 661
def get_raw_settings_hash
  return @m_raw_settings_hash
end
get_service_class() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 708
def get_service_class
  return @m_service_class
end
get_status() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 684
def get_status
  return @m_status
end
get_swytch_id() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 756
def get_swytch_id
  return @m_swytch_id
end
get_tags() click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @return [Array<String>]

# File lib/saklient/cloud/resources/appliance.rb, line 435
def get_tags
  @n_tags = true
  return @m_tags
end
set_clazz(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [String] v @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 323
def set_clazz(v)
  Saklient::Util::validate_type(v, 'String')
  raise Saklient::Errors::SaklientException.new('immutable_field', 'Immutable fields cannot be modified after the resource creation: ' + 'Saklient::Cloud::Resources::Appliance#clazz') if !@is_new
  @m_clazz = v
  @n_clazz = true
  return @m_clazz
end
set_description(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [String] v @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 404
def set_description(v)
  Saklient::Util::validate_type(v, 'String')
  @m_description = v
  @n_description = true
  return @m_description
end
set_icon(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [Icon] v @return [Icon]

# File lib/saklient/cloud/resources/appliance.rb, line 485
def set_icon(v)
  Saklient::Util::validate_type(v, 'Saklient::Cloud::Resources::Icon')
  @m_icon = v
  @n_icon = true
  return @m_icon
end
set_name(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [String] v @return [String]

# File lib/saklient/cloud/resources/appliance.rb, line 364
def set_name(v)
  Saklient::Util::validate_type(v, 'String')
  @m_name = v
  @n_name = true
  return @m_name
end
set_plan_id(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [Fixnum] v @return [Fixnum]

# File lib/saklient/cloud/resources/appliance.rb, line 525
def set_plan_id(v)
  Saklient::Util::validate_type(v, 'Fixnum')
  raise Saklient::Errors::SaklientException.new('immutable_field', 'Immutable fields cannot be modified after the resource creation: ' + 'Saklient::Cloud::Resources::Appliance#plan_id') if !@is_new
  @m_plan_id = v
  @n_plan_id = true
  return @m_plan_id
end
set_raw_annotation(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [any] v @return [any]

# File lib/saklient/cloud/resources/appliance.rb, line 590
def set_raw_annotation(v)
  raise Saklient::Errors::SaklientException.new('immutable_field', 'Immutable fields cannot be modified after the resource creation: ' + 'Saklient::Cloud::Resources::Appliance#raw_annotation') if !@is_new
  @m_raw_annotation = v
  @n_raw_annotation = true
  return @m_raw_annotation
end
set_raw_settings(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [any] v @return [any]

# File lib/saklient/cloud/resources/appliance.rb, line 631
def set_raw_settings(v)
  @m_raw_settings = v
  @n_raw_settings = true
  return @m_raw_settings
end
set_tags(v) click to toggle source

(This method is generated in Translator_default#buildImpl)

@private @param [Array<String>] v @return [Array<String>]

# File lib/saklient/cloud/resources/appliance.rb, line 445
def set_tags(v)
  Saklient::Util::validate_type(v, 'Array')
  @m_tags = v
  @n_tags = true
  return @m_tags
end
sleep_until(status, timeoutSec = 600) click to toggle source

アプライアンスが指定のステータスに遷移するまで待機します.

@private @param [String] status @param [Fixnum] timeoutSec @return [bool]

# File lib/saklient/cloud/resources/appliance.rb, line 264
def sleep_until(status, timeoutSec = 600)
  Saklient::Util::validate_type(status, 'String')
  Saklient::Util::validate_type(timeoutSec, 'Fixnum')
  step = 10
  while 0 < timeoutSec do
    begin
      reload
    rescue Saklient::Errors::HttpException
      {}
    end
    s = get_status
    s = Saklient::Cloud::Enums::EServerInstanceStatus::down if (s).nil?
    return true if s == status
    timeoutSec -= step
    sleep(step) if 0 < timeoutSec
  end
  return false
end