Method: Azure::AGs#load

Defined in:
lib/azure/service_management/ag.rb

#loadObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/azure/service_management/ag.rb', line 25

def load
  @ags ||= begin
    @ags = {}
    response = @connection.query_azure("affinitygroups",
      "get",
      "",
      "",
      true,
      false)
    response.css("AffinityGroup").each do |ag|
      item = AG.new(@connection).parse(ag)
      @ags[item.name] = item
    end
    @ags
  end
end