Sha256: c6dd89c56a7ff45f81b6ad13940c9b2b996972d5f268d2e887d90cfd5a442211

Contents?: true

Size: 1.1 KB

Versions: 22

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

require 'fog/core/model'
module Fog
  module Compute
    class Aliyun
      class VRouter < Fog::Model
        identity :id, aliases: 'VRouterId'

        attribute :name, aliases: 'VRouterName'
        attribute :route_table_ids, aliases: 'RouteTableIds'
        attribute :created_at, aliases: 'CreationTime'
        attribute :description, aliases: 'Description'
        attribute :region_id, aliases: 'RegionId'
        attribute :vpc_id, aliases: 'VpcId'

        def vpc
          requires :vpc_id
          $vpc = Fog::Compute::Aliyun::Vpcs.new(service: service).all('vpcId' => vpc_id)[0]
        end

        def route_tables
          @route_tables ||= begin
            Fog::Compute::Aliyun::RouteTables.new(
              v_router: self,
              service: service
            )
          end
        end
      end
    end
  end
end

# "VRouters"=>{"VRouter"=>[{"VRouterName"=>"", "RouteTableIds"=>{"RouteTableId"=>["vtb-2504onoxh"]},
# "CreationTime"=>"2015-08-03T11:23:35Z", "Description"=>"", "RegionId"=>"cn-beijing",
# "VRouterId"=>"vrt-25azmd2wm", "VpcId"=>"vpc-25mj6mguq"}]}

Version data entries

22 entries across 20 versions & 2 rubygems

Version Path
fog-aliyun-0.4.0 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.19 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.18 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.17 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.16 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.15 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.13 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.12 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.11 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.10 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.9 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.8 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.7 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.6 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.5 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.4 lib/fog/aliyun/models/compute/vrouter.rb
fog-aliyun-0.3.3 lib/fog/aliyun/models/compute/vrouter.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/vrouter.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/vrouter.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/vrouter.rb