Sha256: 01493942f23a3640673b6b869de75f74cfbf82ad693e8530494aea700e9bab00

Contents?: true

Size: 936 Bytes

Versions: 26

Compression:

Stored size: 936 Bytes

Contents

module Yao::Resources
  class LoadBalancerListener < Base
    friendly_attributes :description, :admin_state_up,
                        :protocol, :protocol_port, :provisioning_status,
                        :default_tls_container_ref, :insert_headers,
                        :operating_status, :sni_container_refs,
                        :l7policies, :name

    map_attribute_to_resources loadbalancers: LoadBalancer

    def project
      if project_id = self["project_id"]
        Yao::Tenant.find project_id
      end
    end
    alias :tenant :project

    def default_pool
      if default_pool_id = self["default_pool_id"]
        Yao::LoadBalancerPool.find default_pool_id
      end
    end
    alias pool default_pool

    self.service        = "load-balancer"
    self.api_version    = "v2.0"
    self.resource_name  = "listener"
    self.resources_name = "listeners"
    self.resources_path = "lbaas/listeners"
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
yao-0.5.0 lib/yao/resources/loadbalancer_listener.rb
yao-0.4.3 lib/yao/resources/loadbalancer_listener.rb
yao-0.4.2 lib/yao/resources/loadbalancer_listener.rb
yao-0.4.1 lib/yao/resources/loadbalancer_listener.rb
yao-0.4.0 lib/yao/resources/loadbalancer_listener.rb
yao-0.3.8 lib/yao/resources/loadbalancer_listener.rb