Module: Asca::Tools
- Defined in:
- lib/asca/tools/log.rb,
lib/asca/tools/token.rb,
lib/asca/tools/tools.rb,
lib/asca/tools/configuration.rb
Defined Under Namespace
Classes: Configuration, Log, Token
Class Method Summary collapse
-
.register_device(options = {}) ⇒ Object
register a new device and update corresponding profiles.
Class Method Details
.register_device(options = {}) ⇒ Object
register a new device and update corresponding profiles
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/asca/tools/tools.rb', line 7 def self.register_device( = {}) device_info = [:device_info] profile_names = [:profile_names] if !device_info || !profile_names Asca::Tools::Log.error('Wrong parameters for register device') return end Asca::REST::Provisioning::Devices.register_new_device :udid => device_info[:udid], :name => device_info[:name] profile_names.each { |profile_name| Asca::REST::Provisioning::Profiles.update_profile :name => profile_name } end |