Sha256: 3e62765f8ddbd4074b68ffda34bb1b9374be4986ce134f169ec1c8d7efa69e8e

Contents?: true

Size: 599 Bytes

Versions: 10

Compression:

Stored size: 599 Bytes

Contents

module Yao::Resources
  class Network < Base
    include TenantAssociationable

    friendly_attributes :name, :status, :shared, :subnets, :admin_state_up
    map_attribute_to_attribute "provider:physical_network" => :physical_network
    map_attribute_to_attribute "provider:network_type"     => :type
    map_attribute_to_attribute "provider:segmentation_id"  => :segmentation_id

    alias shared? shared

    self.service        = "network"
    self.resource_name  = "network"
    self.resources_name = "networks"

    def ports
      @ports ||= Yao::Port.list(network_id: id)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
yao-0.13.4 lib/yao/resources/network.rb
yao-0.13.3 lib/yao/resources/network.rb
yao-0.13.2 lib/yao/resources/network.rb
yao-0.13.1 lib/yao/resources/network.rb
yao-0.13.0 lib/yao/resources/network.rb
yao-0.12.0 lib/yao/resources/network.rb
yao-0.11.3 lib/yao/resources/network.rb
yao-0.11.2 lib/yao/resources/network.rb
yao-0.11.1 lib/yao/resources/network.rb
yao-0.11.0 lib/yao/resources/network.rb