Sha256: f08557d1fb21ff121d7dae3581e76a89c9ffa4a183199524193e8774b6bb6bfc

Contents?: true

Size: 540 Bytes

Versions: 15

Compression:

Stored size: 540 Bytes

Contents

module Yao::Resources
  class Subnet < Base

    include NetworkAssociationable
    include TenantAssociationable

    friendly_attributes :name, :cidr, :gateway_ip, :network_id, :ip_version,
                        :dns_nameservers, :host_routes, :enable_dhcp

    def allocation_pools
      self["allocation_pools"].map do |pool|
        pool["start"]..pool["end"]
      end
    end

    alias dhcp_enabled? enable_dhcp

    self.service        = "network"
    self.resource_name  = "subnet"
    self.resources_name = "subnets"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
yao-0.13.4 lib/yao/resources/subnet.rb
yao-0.13.3 lib/yao/resources/subnet.rb
yao-0.13.2 lib/yao/resources/subnet.rb
yao-0.13.1 lib/yao/resources/subnet.rb
yao-0.13.0 lib/yao/resources/subnet.rb
yao-0.12.0 lib/yao/resources/subnet.rb
yao-0.11.3 lib/yao/resources/subnet.rb
yao-0.11.2 lib/yao/resources/subnet.rb
yao-0.11.1 lib/yao/resources/subnet.rb
yao-0.11.0 lib/yao/resources/subnet.rb
yao-0.10.1 lib/yao/resources/subnet.rb
yao-0.10.0 lib/yao/resources/subnet.rb
yao-0.9.1 lib/yao/resources/subnet.rb
yao-0.9.0 lib/yao/resources/subnet.rb
yao-0.8.0 lib/yao/resources/subnet.rb