Class: Azure::Compute::Profiles::V2019_03_01_Hybrid::Mgmt::ComputeManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb

Overview

ComputeManagementClass

Direct Known Subclasses

Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ComputeManagementClass

Returns a new instance of ComputeManagementClass.



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 228

def initialize(options = {})
  if options.is_a?(Hash) && options.length == 0
    @options = setup_default_options
  else
    @options = options
  end

  reset!(options)

  @configurable = self
  @base_url = options[:base_url].nil? ? nil:options[:base_url]
  @options = options[:options].nil? ? nil:options[:options]

  @client_0 = Azure::Compute::Mgmt::V2017_03_30::ComputeManagementClient.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)
  @resource_skus = @client_0.resource_skus
  @disks = @client_0.disks
  @snapshots = @client_0.snapshots

  @client_1 = Azure::Compute::Mgmt::V2017_12_01::ComputeManagementClient.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)
  @operations = @client_1.operations
  @availability_sets = @client_1.availability_sets
  @virtual_machine_extension_images = @client_1.virtual_machine_extension_images
  @virtual_machine_extensions = @client_1.virtual_machine_extensions
  @virtual_machines = @client_1.virtual_machines
  @virtual_machine_images = @client_1.virtual_machine_images
  @usage_operations = @client_1.usage_operations
  @virtual_machine_sizes = @client_1.virtual_machine_sizes
  @images = @client_1.images
  @virtual_machine_scale_sets = @client_1.virtual_machine_scale_sets
  @virtual_machine_scale_set_extensions = @client_1.virtual_machine_scale_set_extensions
  @virtual_machine_scale_set_rolling_upgrades = @client_1.virtual_machine_scale_set_rolling_upgrades
  @virtual_machine_scale_set_vms = @client_1.virtual_machine_scale_set_vms
  @log_analytics = @client_1.log_analytics
  @virtual_machine_run_commands = @client_1.virtual_machine_run_commands

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



279
280
281
282
283
284
285
286
287
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 279

def method_missing(method, *args)
  if @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

#availability_setsObject (readonly)

Returns the value of attribute availability_sets.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def availability_sets
  @availability_sets
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def base_url
  @base_url
end

#configurableObject (readonly)

Returns the value of attribute configurable.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def configurable
  @configurable
end

#disksObject (readonly)

Returns the value of attribute disks.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def disks
  @disks
end

#imagesObject (readonly)

Returns the value of attribute images.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def images
  @images
end

#log_analyticsObject (readonly)

Returns the value of attribute log_analytics.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def log_analytics
  @log_analytics
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def options
  @options
end

#resource_skusObject (readonly)

Returns the value of attribute resource_skus.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def resource_skus
  @resource_skus
end

#snapshotsObject (readonly)

Returns the value of attribute snapshots.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def snapshots
  @snapshots
end

#usage_operationsObject (readonly)

Returns the value of attribute usage_operations.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def usage_operations
  @usage_operations
end

#virtual_machine_extension_imagesObject (readonly)

Returns the value of attribute virtual_machine_extension_images.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_extension_images
  @virtual_machine_extension_images
end

#virtual_machine_extensionsObject (readonly)

Returns the value of attribute virtual_machine_extensions.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_extensions
  @virtual_machine_extensions
end

#virtual_machine_imagesObject (readonly)

Returns the value of attribute virtual_machine_images.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_images
  @virtual_machine_images
end

#virtual_machine_run_commandsObject (readonly)

Returns the value of attribute virtual_machine_run_commands.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_run_commands
  @virtual_machine_run_commands
end

#virtual_machine_scale_set_extensionsObject (readonly)

Returns the value of attribute virtual_machine_scale_set_extensions.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_scale_set_extensions
  @virtual_machine_scale_set_extensions
end

#virtual_machine_scale_set_rolling_upgradesObject (readonly)

Returns the value of attribute virtual_machine_scale_set_rolling_upgrades.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_scale_set_rolling_upgrades
  @virtual_machine_scale_set_rolling_upgrades
end

#virtual_machine_scale_set_vmsObject (readonly)

Returns the value of attribute virtual_machine_scale_set_vms.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_scale_set_vms
  @virtual_machine_scale_set_vms
end

#virtual_machine_scale_setsObject (readonly)

Returns the value of attribute virtual_machine_scale_sets.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_scale_sets
  @virtual_machine_scale_sets
end

#virtual_machine_sizesObject (readonly)

Returns the value of attribute virtual_machine_sizes.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machine_sizes
  @virtual_machine_sizes
end

#virtual_machinesObject (readonly)

Returns the value of attribute virtual_machines.



226
227
228
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 226

def virtual_machines
  @virtual_machines
end

Instance Method Details

#add_telemetry(client) ⇒ Object



274
275
276
277
# File 'lib/profiles/v2019_03_01_hybrid/modules/compute_profile_module.rb', line 274

def add_telemetry(client)
  profile_information = 'Profiles/V2019_03_01_Hybrid/Compute/Mgmt'
  client.add_user_agent_information(profile_information)
end