Class: MistApi::UpgradeOrgDevicesDownloadStrategyEnum
- Inherits:
-
Object
- Object
- MistApi::UpgradeOrgDevicesDownloadStrategyEnum
- Defined in:
- lib/mist_api/models/upgrade_org_devices_download_strategy_enum.rb
Overview
enum: * ‘big_bang`: download all at once, no orchestration * `serial`: one at a time’ * ‘canary`: upgrade in phases
Constant Summary collapse
- UPGRADE_ORG_DEVICES_DOWNLOAD_STRATEGY_ENUM =
[ # TODO: Write general description for CANARY CANARY = 'canary'.freeze, # TODO: Write general description for BIG_BANG BIG_BANG = 'big_bang'.freeze, # TODO: Write general description for SERIAL SERIAL = 'serial'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CANARY) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/mist_api/models/upgrade_org_devices_download_strategy_enum.rb', line 27 def self.from_value(value, default_value = CANARY) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'canary' then CANARY when 'big_bang' then BIG_BANG when 'serial' then SERIAL else default_value end end |
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/mist_api/models/upgrade_org_devices_download_strategy_enum.rb', line 21 def self.validate(value) return false if value.nil? UPGRADE_ORG_DEVICES_DOWNLOAD_STRATEGY_ENUM.include?(value) end |