Class: Fog::Compute::Packet::BgpSession
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::Packet::BgpSession
- Defined in:
- lib/fog/compute/packet/models/bgp_session.rb
Overview
BgpSession Model
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes = {}) ⇒ BgpSession
constructor
A new instance of BgpSession.
- #save ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ BgpSession
Returns a new instance of BgpSession.
17 18 19 |
# File 'lib/fog/compute/packet/models/bgp_session.rb', line 17 def initialize(attributes = {}) super end |
Instance Method Details
#destroy ⇒ Object
27 28 29 30 31 |
# File 'lib/fog/compute/packet/models/bgp_session.rb', line 27 def destroy requires :id response = service.delete_bgp_session(id) true if response.status == 204 end |
#save ⇒ Object
21 22 23 24 25 |
# File 'lib/fog/compute/packet/models/bgp_session.rb', line 21 def save requires :device_id, :address_family response = service.create_bgp_session(device_id, address_family) merge_attributes(response.body) end |