Sha256: ecd017f3a014e35223890469793ff46d8442a1bfe0b40a7e41be1630b81dc2fa

Contents?: true

Size: 739 Bytes

Versions: 1

Compression:

Stored size: 739 Bytes

Contents

module Yao::Resources
  class FloatingIP < Base
    friendly_attributes :router_id, :description, :dns_domain, :dns_name,
                        :revision_number, :project_id, :tenant_id,
                        :floating_network_id, :fixed_ip_address,
                        :floating_ip_address, :port_id,
                        :status, :port_details, :tags, :port_forwardings

    self.service        = "network"
    self.resource_name  = "floatingip"
    self.resources_name = "floatingips"

    def router
      @router ||= Yao::Router.get(router_id)
    end

    def project
      @project ||= Yao::Tenant.get(project_id)
    end
    alias :tenant :project

    def port
      @port ||= Yao::Port.find(port_id)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yao-0.7.0 lib/yao/resources/floating_ip.rb