Class: Fog::Compute::IBM::Key
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::IBM::Key
- Defined in:
- lib/fog/ibm/models/compute/key.rb
Instance Method Summary collapse
Instance Method Details
#default? ⇒ Boolean
25 26 27 |
# File 'lib/fog/ibm/models/compute/key.rb', line 25 def default? default end |
#destroy ⇒ Object
20 21 22 23 |
# File 'lib/fog/ibm/models/compute/key.rb', line 20 def destroy data = service.delete_key(identity) data.body['success'] end |
#instances ⇒ Object
29 30 31 |
# File 'lib/fog/ibm/models/compute/key.rb', line 29 def instances instance_ids.map { Fog::Compute[:ibm].servers.get(instance_id) } end |
#save ⇒ Object
13 14 15 16 17 18 |
# File 'lib/fog/ibm/models/compute/key.rb', line 13 def save requires :name data = service.create_key(name, public_key) merge_attributes(data.body) data.body['keyName'] == name end |