fog/fog-core — pull request #56 by plribeiro3000 (2014-07-16 03:23:15+00:00)
Title: Default value  of attribute definition

@geemus once you merge fog/fog-core#55 this pull request will become smaller because I picked the commits from there.

The main idea behind is:
* return the default value on new objects
* return the currently value on persisted objects.
* return nil in case the attribute is not defined but the object is persisted

This feature will make easier to refactor code like [this](https://github.com/fog/fog-xenserver/blob/master/lib/fog/compute/xen_server/requests/create_server.rb#L33) (at least i hope so) and [this](https://github.com/fog/fog-xenserver/blob/master/lib/fog/compute/xen_server/models/vdi.rb#L53). Also will be possible to create new objects that need some configs by just doing something like:

``` ruby
@connection.servers.create #no need for attributes unless you need a custom configuration
```

I don't think this code might break some provider since is a new feature and attributes without a default value definition will behave just like before (I tested this as well to make sure), but let me know of any concerns. :beers: