lib/yao/resources/subnet.rb in yao-0.7.0 vs lib/yao/resources/subnet.rb in yao-0.8.0

- old
+ new

@@ -1,17 +1,17 @@ module Yao::Resources class Subnet < Base - friendly_attributes :name, :cidr, :gateway_ip, :network_id, :tenant_id, :ip_version, + + 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 - - def network - Yao::Network.find network_id end alias dhcp_enabled? enable_dhcp self.service = "network"