lib/vcloud-rest/vcloud/org.rb
def get_organization(orgId)
      params = {
        'method' => :get,
        'command' => "/org/#{orgId}"
      }

      response, headers = send_request(params)
      catalogs = {}
      response.css("Link[type='application/vnd.vmware.vcloud.catalog+xml']").each do |item|
        catalogs[item['name']] = item['href'].gsub(/.*\/catalog\//, "")
      end

      vdcs = {}
      response.css("Link[type='application/vnd.vmware.vcloud.vdc+xml']").each do |item|
        vdcs[item['name']] = item['href'].gsub(/.*\/vdc\//, "")
      end

      networks = {}
      response.css("Link[type='application/vnd.vmware.vcloud.orgNetwork+xml']").each do |item|
        networks[item['name']] = item['href'].gsub(/.*\/network\//, "")
      end

      tasklists = {}
      response.css("Link[type='application/vnd.vmware.vcloud.tasksList+xml']").each do |item|
        tasklists[item['name']] = item['href'].gsub(/.*\/tasksList\//, "")
      end

      { :catalogs => catalogs, :vdcs => vdcs, :networks => networks, :tasklists => tasklists }
    end
def get_organization(orgId)
      params = {
        'method' => :get,
        'command' => "/org/#{orgId}"
      }

      response, headers = send_request(params)
      catalogs = {}
      response.css("Link[type='application/vnd.vmware.vcloud.catalog+xml']").each do |item|
        catalogs[item['name']] = item['href'].gsub(/.*\/catalog\//, "")
      end

      vdcs = {}
      response.css("Link[type='application/vnd.vmware.vcloud.vdc+xml']").each do |item|
        vdcs[item['name']] = item['href'].gsub(/.*\/vdc\//, "")
      end

      networks = {}
      response.css("Link[type='application/vnd.vmware.vcloud.orgNetwork+xml']").each do |item|
        networks[item['name']] = item['href'].gsub(/.*\/network\//, "")
      end

      tasklists = {}
      response.css("Link[type='application/vnd.vmware.vcloud.tasksList+xml']").each do |item|
        tasklists[item['name']] = item['href'].gsub(/.*\/tasksList\//, "")
      end

      { :catalogs => catalogs, :vdcs => vdcs, :networks => networks, :tasklists => tasklists }
    end
def get_organization ( orgId ) params = { 'method' => :get , 'command' => "/org/#{orgId}" } response , headers = send_request ( params ) catalogs = { } response . css ( "Link[type='application/vnd.vmware.vcloud.catalog+xml']" ) . each do | item | catalogs [ item [ 'name' ] ] = item [ 'href' ] . gsub ( / \/ \/ / , "" ) end vdcs = { } response . css ( "Link[type='application/vnd.vmware.vcloud.vdc+xml']" ) . each do | item | vdcs [ item [ 'name' ] ] = item [ 'href' ] . gsub ( / \/ \/ / , "" ) end networks = { } response . css ( "Link[type='application/vnd.vmware.vcloud.orgNetwork+xml']" ) . each do | item | networks [ item [ 'name' ] ] = item [ 'href' ] . gsub ( / \/ \/ / , "" ) end tasklists = { } response . css ( "Link[type='application/vnd.vmware.vcloud.tasksList+xml']" ) . each do | item | tasklists [ item [ 'name' ] ] = item [ 'href' ] . gsub ( / \/ \/ / , "" ) end { :catalogs => catalogs , :vdcs => vdcs , :networks => networks , :tasklists => tasklists } end
Fetch details about an organization:
 - catalogs
 - vdcs
 - networks
 - task lists
Fetch details about an organization : - catalogs - vdcs - networks - task lists