Module: ResourceLocking
- Included in:
- Fog::Compute::Brightbox::DatabaseServer, Fog::Compute::Brightbox::DatabaseSnapshot, Fog::Compute::Brightbox::Image, Fog::Compute::Brightbox::LoadBalancer, Fog::Compute::Brightbox::Server
- Defined in:
- lib/fog/brightbox/compute/resource_locking.rb
Instance Method Summary collapse
Instance Method Details
#lock! ⇒ Object
10 11 12 |
# File 'lib/fog/brightbox/compute/resource_locking.rb', line 10 def lock! locking_request(:lock) end |
#locked? ⇒ Boolean
2 3 4 5 6 7 8 |
# File 'lib/fog/brightbox/compute/resource_locking.rb', line 2 def locked? if attributes.key?("locked") || attributes.key?(:locked) attributes["locked"] || attributes[:locked] || false else false end end |
#unlock! ⇒ Object
14 15 16 |
# File 'lib/fog/brightbox/compute/resource_locking.rb', line 14 def unlock! locking_request(:unlock) end |