Class: Fog::Compute::Softlayer::KeyPair
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Softlayer::KeyPair
- Defined in:
- lib/fog/softlayer/models/compute/key_pair.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
26 27 28 29 30 31 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 26 def create requires :key, :label response = service.create_key_pair(attributes).body merge_attributes(response) self end |
#destroy ⇒ Object
39 40 41 42 43 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 39 def destroy requires :id service.delete_key_pair(self.id) true end |
#save ⇒ Object
22 23 24 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 22 def save identity ? update : create end |
#update ⇒ Object
33 34 35 36 37 |
# File 'lib/fog/softlayer/models/compute/key_pair.rb', line 33 def update requires :id merge_attributes(service.update_key_pair(self.id, self.attributes).body) self end |