Sha256: 091edeee0848bfd41ccbb89ed4f24bde4d8fc96a79fbb8c2d93ae20af5284380

Contents?: true

Size: 791 Bytes

Versions: 10

Compression:

Stored size: 791 Bytes

Contents

module Vcloud
  module Core
    class EdgeGatewayInterface

      attr_accessor :name, :network_href, :network_name

      def initialize(gateway_interface_hash)
        if gateway_interface_hash.nil?
          raise "EdgeGatewayInterface: gateway_interface_hash cannot be nil"
        end
        unless gateway_interface_hash[:Name] && gateway_interface_hash[:Network]
          raise "EdgeGatewayInterface: bad input: #{gateway_interface_hash}"
        end
        @vcloud_gateway_interface = gateway_interface_hash
        @name = gateway_interface_hash[:Name]
        @network_href = gateway_interface_hash[:Network][:href]
        @network_name = gateway_interface_hash[:Network][:name]
      end

      def network_id
        network_href.split('/').last
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vcloud-core-0.13.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.12.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.11.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.10.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.9.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.8.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.7.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.6.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.5.0 lib/vcloud/core/edge_gateway_interface.rb
vcloud-core-0.4.0 lib/vcloud/core/edge_gateway_interface.rb