Class: Azure::Profiles::Latest::ContainerService::Mgmt::ContainerServiceManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/latest/modules/containerservice_profile_module.rb

Defined Under Namespace

Classes: ModelClasses

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configurable, base_url = nil, options = nil) ⇒ ContainerServiceManagementClass

Returns a new instance of ContainerServiceManagementClass.



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/latest/modules/containerservice_profile_module.rb', line 116

def initialize(configurable, base_url=nil, options=nil)
  @configurable, @base_url, @options = configurable, base_url, options

  @client_0 = Azure::ContainerService::Mgmt::V2017_07_01::ContainerServiceClient.new(configurable.credentials, base_url, options)
  if(@client_0.respond_to?(:subscription_id))
    @client_0.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_0)

  @client_1 = Azure::ContainerService::Mgmt::V2019_04_01::ContainerServiceClient.new(configurable.credentials, base_url, options)
  if(@client_1.respond_to?(:subscription_id))
    @client_1.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_1)

  @client_2 = Azure::ContainerService::Mgmt::V2019_04_30::ContainerServiceClient.new(configurable.credentials, base_url, options)
  if(@client_2.respond_to?(:subscription_id))
    @client_2.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_2)
  @open_shift_managed_clusters = @client_2.open_shift_managed_clusters

  @client_3 = Azure::ContainerService::Mgmt::V2019_08_01::ContainerServiceClient.new(configurable.credentials, base_url, options)
  if(@client_3.respond_to?(:subscription_id))
    @client_3.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_3)
  @container_services = @client_3.container_services

  @client_4 = Azure::ContainerService::Mgmt::V2020_07_01::ContainerServiceClient.new(configurable.credentials, base_url, options)
  if(@client_4.respond_to?(:subscription_id))
    @client_4.subscription_id = configurable.subscription_id
  end
  add_telemetry(@client_4)
  @operations = @client_4.operations
  @managed_clusters = @client_4.managed_clusters
  @agent_pools = @client_4.agent_pools
  @private_endpoint_connections = @client_4.private_endpoint_connections

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/latest/modules/containerservice_profile_module.rb', line 163

def method_missing(method, *args)
  if @client_4.respond_to?method
    @client_4.send(method, *args)
  elsif @client_3.respond_to?method
    @client_3.send(method, *args)
  elsif @client_2.respond_to?method
    @client_2.send(method, *args)
  elsif @client_1.respond_to?method
    @client_1.send(method, *args)
  elsif @client_0.respond_to?method
    @client_0.send(method, *args)
  else
    super
  end
end

Instance Attribute Details

#agent_poolsObject (readonly)

Returns the value of attribute agent_pools.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def agent_pools
  @agent_pools
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def base_url
  @base_url
end

#configurableObject (readonly)

Returns the value of attribute configurable.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def configurable
  @configurable
end

#container_servicesObject (readonly)

Returns the value of attribute container_services.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def container_services
  @container_services
end

#managed_clustersObject (readonly)

Returns the value of attribute managed_clusters.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def managed_clusters
  @managed_clusters
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def model_classes
  @model_classes
end

#open_shift_managed_clustersObject (readonly)

Returns the value of attribute open_shift_managed_clusters.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def open_shift_managed_clusters
  @open_shift_managed_clusters
end

#operationsObject (readonly)

Returns the value of attribute operations.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def options
  @options
end

#private_endpoint_connectionsObject (readonly)

Returns the value of attribute private_endpoint_connections.



114
115
116
# File 'lib/latest/modules/containerservice_profile_module.rb', line 114

def private_endpoint_connections
  @private_endpoint_connections
end

Instance Method Details

#add_telemetry(client) ⇒ Object



158
159
160
161
# File 'lib/latest/modules/containerservice_profile_module.rb', line 158

def add_telemetry(client)
  profile_information = "Profiles/azure_sdk/#{Azure::VERSION}/Latest/ContainerService/Mgmt"
  client.add_user_agent_information(profile_information)
end