Method: CIMI::Model::VolumeConfiguration.create_from_json
- Defined in:
- lib/cimi/models/volume_configuration.rb
.create_from_json(body, context) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/cimi/models/volume_configuration.rb', line 28 def self.create_from_json(body, context) json = JSON.parse(body) new_config = current_db.add_volume_configuration( :name => json['name'], :description => json['description'], :format => json['format'], :capacity => json['capacity'], :ent_properties => (json['properties'] || {}).to_json ) from_db(new_config, context) end |