Class: Azure::Compute::Profiles::Latest::Mgmt::ComputeManagementClass

Inherits:
Object
  • Object
show all
Defined in:
lib/profiles/latest/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.



455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 455

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::V2019_04_01::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

  @client_1 = Azure::Compute::Mgmt::V2019_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)
  @galleries = @client_1.galleries
  @gallery_images = @client_1.gallery_images
  @gallery_image_versions = @client_1.gallery_image_versions
  @gallery_applications = @client_1.gallery_applications
  @gallery_application_versions = @client_1.gallery_application_versions

  @client_2 = Azure::Compute::Mgmt::V2020_09_30::ComputeManagementClient.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)
  @disks = @client_2.disks
  @snapshots = @client_2.snapshots
  @disk_encryption_sets = @client_2.disk_encryption_sets
  @disk_accesses = @client_2.disk_accesses
  @disk_restore_point_operations = @client_2.disk_restore_point_operations

  @client_3 = Azure::Compute::Mgmt::V2020_10_01_preview::ComputeManagementClient.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)
  @cloud_service_role_instances = @client_3.cloud_service_role_instances
  @cloud_service_roles = @client_3.cloud_service_roles
  @cloud_services = @client_3.cloud_services
  @cloud_services_update_domain = @client_3.cloud_services_update_domain

  @client_4 = Azure::Compute::Mgmt::V2020_12_01::ComputeManagementClient.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
  @availability_sets = @client_4.availability_sets
  @proximity_placement_groups = @client_4.proximity_placement_groups
  @dedicated_host_groups = @client_4.dedicated_host_groups
  @dedicated_hosts = @client_4.dedicated_hosts
  @ssh_public_keys = @client_4.ssh_public_keys
  @virtual_machine_extension_images = @client_4.virtual_machine_extension_images
  @virtual_machine_extensions = @client_4.virtual_machine_extensions
  @virtual_machine_images = @client_4.virtual_machine_images
  @virtual_machine_images_edge_zone = @client_4.virtual_machine_images_edge_zone
  @usage_operations = @client_4.usage_operations
  @virtual_machines = @client_4.virtual_machines
  @virtual_machine_scale_sets = @client_4.virtual_machine_scale_sets
  @virtual_machine_sizes = @client_4.virtual_machine_sizes
  @images = @client_4.images
  @virtual_machine_scale_set_extensions = @client_4.virtual_machine_scale_set_extensions
  @virtual_machine_scale_set_rolling_upgrades = @client_4.virtual_machine_scale_set_rolling_upgrades
  @virtual_machine_scale_set_vmextensions = @client_4.virtual_machine_scale_set_vmextensions
  @virtual_machine_scale_set_vms = @client_4.virtual_machine_scale_set_vms
  @log_analytics = @client_4.log_analytics
  @virtual_machine_run_commands = @client_4.virtual_machine_run_commands
  @virtual_machine_scale_set_vmrun_commands = @client_4.virtual_machine_scale_set_vmrun_commands

  @model_classes = ModelClasses.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 543

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

#availability_setsObject (readonly)

Returns the value of attribute availability_sets.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def availability_sets
  @availability_sets
end

#base_urlObject (readonly)

Returns the value of attribute base_url.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def base_url
  @base_url
end

#cloud_service_role_instancesObject (readonly)

Returns the value of attribute cloud_service_role_instances.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def cloud_service_role_instances
  @cloud_service_role_instances
end

#cloud_service_rolesObject (readonly)

Returns the value of attribute cloud_service_roles.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def cloud_service_roles
  @cloud_service_roles
end

#cloud_servicesObject (readonly)

Returns the value of attribute cloud_services.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def cloud_services
  @cloud_services
end

#cloud_services_update_domainObject (readonly)

Returns the value of attribute cloud_services_update_domain.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def cloud_services_update_domain
  @cloud_services_update_domain
end

#configurableObject (readonly)

Returns the value of attribute configurable.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def configurable
  @configurable
end

#dedicated_host_groupsObject (readonly)

Returns the value of attribute dedicated_host_groups.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def dedicated_host_groups
  @dedicated_host_groups
end

#dedicated_hostsObject (readonly)

Returns the value of attribute dedicated_hosts.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def dedicated_hosts
  @dedicated_hosts
end

#disk_accessesObject (readonly)

Returns the value of attribute disk_accesses.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def disk_accesses
  @disk_accesses
end

#disk_encryption_setsObject (readonly)

Returns the value of attribute disk_encryption_sets.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def disk_encryption_sets
  @disk_encryption_sets
end

#disk_restore_point_operationsObject (readonly)

Returns the value of attribute disk_restore_point_operations.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def disk_restore_point_operations
  @disk_restore_point_operations
end

#disksObject (readonly)

Returns the value of attribute disks.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def disks
  @disks
end

#galleriesObject (readonly)

Returns the value of attribute galleries.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def galleries
  @galleries
end

Returns the value of attribute gallery_application_versions.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def gallery_application_versions
  @gallery_application_versions
end

Returns the value of attribute gallery_applications.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def gallery_applications
  @gallery_applications
end

Returns the value of attribute gallery_image_versions.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def gallery_image_versions
  @gallery_image_versions
end

Returns the value of attribute gallery_images.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def gallery_images
  @gallery_images
end

#imagesObject (readonly)

Returns the value of attribute images.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def images
  @images
end

#log_analyticsObject (readonly)

Returns the value of attribute log_analytics.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def log_analytics
  @log_analytics
end

#model_classesObject (readonly)

Returns the value of attribute model_classes.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def model_classes
  @model_classes
end

#operationsObject (readonly)

Returns the value of attribute operations.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def operations
  @operations
end

#optionsObject (readonly)

Returns the value of attribute options.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def options
  @options
end

#proximity_placement_groupsObject (readonly)

Returns the value of attribute proximity_placement_groups.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def proximity_placement_groups
  @proximity_placement_groups
end

#resource_skusObject (readonly)

Returns the value of attribute resource_skus.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def resource_skus
  @resource_skus
end

#snapshotsObject (readonly)

Returns the value of attribute snapshots.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def snapshots
  @snapshots
end

#ssh_public_keysObject (readonly)

Returns the value of attribute ssh_public_keys.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def ssh_public_keys
  @ssh_public_keys
end

#usage_operationsObject (readonly)

Returns the value of attribute usage_operations.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def usage_operations
  @usage_operations
end

#virtual_machine_extension_imagesObject (readonly)

Returns the value of attribute virtual_machine_extension_images.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_extension_images
  @virtual_machine_extension_images
end

#virtual_machine_extensionsObject (readonly)

Returns the value of attribute virtual_machine_extensions.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_extensions
  @virtual_machine_extensions
end

#virtual_machine_imagesObject (readonly)

Returns the value of attribute virtual_machine_images.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_images
  @virtual_machine_images
end

#virtual_machine_images_edge_zoneObject (readonly)

Returns the value of attribute virtual_machine_images_edge_zone.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_images_edge_zone
  @virtual_machine_images_edge_zone
end

#virtual_machine_run_commandsObject (readonly)

Returns the value of attribute virtual_machine_run_commands.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

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.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

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.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_scale_set_rolling_upgrades
  @virtual_machine_scale_set_rolling_upgrades
end

#virtual_machine_scale_set_vmextensionsObject (readonly)

Returns the value of attribute virtual_machine_scale_set_vmextensions.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_scale_set_vmextensions
  @virtual_machine_scale_set_vmextensions
end

#virtual_machine_scale_set_vmrun_commandsObject (readonly)

Returns the value of attribute virtual_machine_scale_set_vmrun_commands.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_scale_set_vmrun_commands
  @virtual_machine_scale_set_vmrun_commands
end

#virtual_machine_scale_set_vmsObject (readonly)

Returns the value of attribute virtual_machine_scale_set_vms.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

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.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_scale_sets
  @virtual_machine_scale_sets
end

#virtual_machine_sizesObject (readonly)

Returns the value of attribute virtual_machine_sizes.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machine_sizes
  @virtual_machine_sizes
end

#virtual_machinesObject (readonly)

Returns the value of attribute virtual_machines.



453
454
455
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 453

def virtual_machines
  @virtual_machines
end

Instance Method Details

#add_telemetry(client) ⇒ Object



538
539
540
541
# File 'lib/profiles/latest/modules/compute_profile_module.rb', line 538

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