Class: Staypuft::VipNic
- Inherits:
-
Nic::Managed
- Object
- Nic::Managed
- Staypuft::VipNic
- Defined in:
- app/models/staypuft/vip_nic.rb
Instance Method Summary collapse
-
#require_host? ⇒ Boolean
VIP nic is associated with the deployment, not the host.
- #reserve_ip ⇒ Object
Instance Method Details
#require_host? ⇒ Boolean
VIP nic is associated with the deployment, not the host
9 10 11 |
# File 'app/models/staypuft/vip_nic.rb', line 9 def require_host? false end |
#reserve_ip ⇒ Object
12 13 14 15 16 |
# File 'app/models/staypuft/vip_nic.rb', line 12 def reserve_ip if self.subnet.present? && self.subnet.ipam? && (!self.ip || self.subnet_id_changed?) self.ip = self.subnet.unused_ip end end |