lib/process/cloud/providers/openstack/openstack.rb in lorj_cloud-0.1.1 vs lib/process/cloud/providers/openstack/openstack.rb in lorj_cloud-0.1.2

- old
+ new

@@ -207,16 +207,21 @@ } ) define_obj :server def_attr_mapping :status, :state - attr_value_mapping :create, 'BUILD' - attr_value_mapping :boot, :boot - attr_value_mapping :active, 'ACTIVE' - attr_value_mapping :error, 'ERROR' + attr_value_mapping :create, 'BUILD' + attr_value_mapping :boot, :boot + attr_value_mapping :active, 'ACTIVE' + attr_value_mapping :error, 'ERROR' + attr_value_mapping :shutdown, 'SHUTOFF' - def_attr_mapping :private_ip_address, :accessIPv4 - def_attr_mapping :public_ip_address, :accessIPv4 + def_attr_mapping :private_ip_addresses, + [:addresses, '{/.*/}', + '<%= data["OS-EXT-IPS:type"] == "fixed" %>|addr'] + def_attr_mapping :public_ip_address, + [:addresses, '{/.*/}', + '<%= data["OS-EXT-IPS:type"] == "floating" %>|addr'] def_attr_mapping :image_id, [:image, 'id'] define_obj :router obj_needs_optional obj_needs :data, :router_name, :mapping => :name