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!, #to_hash, unlock!, #with_timestamps?

Instance Method Details

#validateObject



10
11
12
13
14
15
16
17
# File 'lib/dcmgr/models/vlan_lease.rb', line 10

def validate
  super
  
  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