Sha256: dde81979065d14987ff0d57404ecb1d820fcf4225f709b4d547b84aef4f7f610

Contents?: true

Size: 1.29 KB

Versions: 14

Compression:

Stored size: 1.29 KB

Contents

module Vcloud
  module Walker
    module Resource
      class Organization < Entity
        def self.catalogs
          fog_catalogs = FogInterface.get_catalogs
          Catalogs.new(fog_catalogs).to_summary
        end

        def self.vdcs
          fog_vdcs = FogInterface.get_vdcs
          Vdcs.new(fog_vdcs).to_summary
        end

        def self.edgegateways
          fog_edge_gateways = FogInterface.get_edge_gateways
          fog_edge_gateways.collect do |edge_gw|
            edge_gw[:id] = edge_gw[:href].split('/').last
            edgegw_service_configuration = edge_gw[:Configuration][:EdgeGatewayServiceConfiguration]
            if edgegw_service_configuration[:GatewayIpsecVpnService]
              edgegw_service_configuration[:GatewayIpsecVpnService] = GatewayIpsecVpnService.new(edgegw_service_configuration[:GatewayIpsecVpnService]).to_summary
            end
            edge_gw
          end
        end

        def self.networks
          fog_networks = FogInterface.get_networks
          Networks.new(fog_networks).to_summary
        end

        def self.organization
          {
            :vdcs         => vdcs,
            :networks     => networks,
            :catalogs     => catalogs,
            :edgegateways => edgegateways,
          }
        end

      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vcloud-walker-5.1.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-5.0.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-4.0.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.6.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.5.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.4.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.3.1 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.3.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.2.3 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.2.2 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.2.1 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.2.0 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.1.2 lib/vcloud/walker/resource/organization.rb
vcloud-walker-3.1.1 lib/vcloud/walker/resource/organization.rb