Class: Clusterfuck::BGPPeer
- Defined in:
- lib/clusterfuck/bgp_peer.rb
Direct Known Subclasses
Defined Under Namespace
Classes: ASNFactory, RouterIDFactory
Instance Attribute Summary collapse
-
#bgp_announce ⇒ Object
Returns the value of attribute bgp_announce.
-
#bgp_asn ⇒ Object
Returns the value of attribute bgp_asn.
-
#bgp_router_id ⇒ Object
Returns the value of attribute bgp_router_id.
Attributes inherited from Machine
#cluster, #gateway, #ips, #name, #routes, #ssh_port
Instance Method Summary collapse
- #bgp_neighbors ⇒ Object
-
#initialize(name, **args) ⇒ BGPPeer
constructor
A new instance of BGPPeer.
Methods inherited from Machine
Constructor Details
#initialize(name, **args) ⇒ BGPPeer
Returns a new instance of BGPPeer.
7 8 9 10 11 12 13 |
# File 'lib/clusterfuck/bgp_peer.rb', line 7 def initialize(name, **args) super @bgp_announce = args[:announce] ? Array(args[:announce]) : [] @bgp_asn = args[:asn] || ASNFactory.next @bgp_router_id = args[:router_id] || RouterIDFactory.next end |
Instance Attribute Details
#bgp_announce ⇒ Object
Returns the value of attribute bgp_announce.
3 4 5 |
# File 'lib/clusterfuck/bgp_peer.rb', line 3 def bgp_announce @bgp_announce end |
#bgp_asn ⇒ Object
Returns the value of attribute bgp_asn.
3 4 5 |
# File 'lib/clusterfuck/bgp_peer.rb', line 3 def bgp_asn @bgp_asn end |
#bgp_router_id ⇒ Object
Returns the value of attribute bgp_router_id.
3 4 5 |
# File 'lib/clusterfuck/bgp_peer.rb', line 3 def bgp_router_id @bgp_router_id end |
Instance Method Details
#bgp_neighbors ⇒ Object
15 16 17 |
# File 'lib/clusterfuck/bgp_peer.rb', line 15 def bgp_neighbors cluster.bgp_neighbors(self) end |