Sha256: dbf7f82f79269da653edd3f8c2ff00e3315dce36dc7efe302f6158da1aebca37

Contents?: true

Size: 355 Bytes

Versions: 2

Compression:

Stored size: 355 Bytes

Contents

# -*- coding: utf-8 -*-

module Dcmgr::Models
  # VLAN  lease information
  class VlanLease < AccountResource
    taggable 'vlan'

    one_to_many :networks

    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
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wakame-vdc-agents-11.12.0 lib/dcmgr/models/vlan_lease.rb
wakame-vdc-dcmgr-11.12.0 lib/dcmgr/models/vlan_lease.rb