lib/yao/resources/server.rb in yao-0.3.7 vs lib/yao/resources/server.rb in yao-0.3.8
- old
+ new
@@ -2,13 +2,13 @@
require 'yao/resources/action'
module Yao::Resources
class Server < Base
friendly_attributes :addresses, :metadata, :name, :progress,
:status, :tenant_id, :user_id, :key_name
- map_attribute_to_attribute :hostId => :host_id
- map_attribute_to_resource :flavor => Flavor
- map_attribute_to_resource :image => Image
- map_attribute_to_resources :security_groups => SecurityGroup
+ map_attribute_to_attribute hostId: :host_id
+ map_attribute_to_resource flavor: Flavor
+ map_attribute_to_resource image: Image
+ map_attribute_to_resources security_groups: SecurityGroup
map_attribute_to_attribute 'OS-EXT-AZ:availability_zone' => :availability_zone
map_attribute_to_attribute 'OS-DCF:diskConfig' => :dcf_disk_config
map_attribute_to_attribute 'OS-EXT-SRV-ATTR:host' => :ext_srv_attr_host
map_attribute_to_attribute 'OS-EXT-SRV-ATTR:hypervisor_hostname' => :ext_srv_attr_hypervisor_hostname