Class: Bosh::Director::Models::PersistentDisk
- Defined in:
- lib/bosh/director/models/persistent_disk.rb
Instance Method Summary collapse
Instance Method Details
#cloud_properties ⇒ Object
13 14 15 16 |
# File 'lib/bosh/director/models/persistent_disk.rb', line 13 def cloud_properties result = self.cloud_properties_json result ? JSON.parse(result) : {} end |
#cloud_properties=(cloud_properties) ⇒ Object
18 19 20 |
# File 'lib/bosh/director/models/persistent_disk.rb', line 18 def cloud_properties=(cloud_properties) self.cloud_properties_json = JSON.generate(cloud_properties) end |
#validate ⇒ Object
8 9 10 11 |
# File 'lib/bosh/director/models/persistent_disk.rb', line 8 def validate validates_presence [:instance_id, :disk_cid] validates_unique [:disk_cid] end |