Sha256: d21592c9fbdbb5c02e3a7ba4918f2629c6dbcceddc14a89c2b950548f2bb6821

Contents?: true

Size: 1 KB

Versions: 5

Compression:

Stored size: 1 KB

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

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

    # @return [Yao::Resources::LoadBalancerPool]
    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

5 entries across 5 versions & 1 rubygems

Version Path
yao-0.18.0 lib/yao/resources/loadbalancer_listener.rb
yao-0.17.0 lib/yao/resources/loadbalancer_listener.rb
yao-0.16.0 lib/yao/resources/loadbalancer_listener.rb
yao-0.15.0 lib/yao/resources/loadbalancer_listener.rb
yao-0.14.0 lib/yao/resources/loadbalancer_listener.rb