Class: Dcmgr::Models::VlanLease

Inherits:
AccountResource show all
Defined in:
lib/dcmgr/models/vlan_lease.rb

Overview

VLAN lease information

Constant Summary

Constants inherited from BaseNew

BaseNew::LOCK_TABLES_KEY

Instance Method Summary collapse

Methods inherited from AccountResource

#account

Methods inherited from BaseNew

Proxy, dataset, default_row_lock_mode=, install_data, install_data_hooks, lock!, unlock!, #with_timestamps?

Instance Method Details

#validateObject



17
18
19
20
21
22
23
# File 'lib/dcmgr/models/vlan_lease.rb', line 17

def validate

  unless 1 <= self.tag_id.to_i && self.tag_id.to_i <= 4095
    errors.add(:tag_id, "Tag ID is out of range (1-4095)")
  end
  
end