class Azure::ServiceFabric::Profiles::Latest::Mgmt::ServiceFabricManagementClass

ServiceFabricManagementClass

Attributes

application[R]
application_type[R]
base_url[R]
cluster_versions[R]
clusters[R]
configurable[R]
model_classes[R]
operations[R]
options[R]
service[R]
version[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/profiles/latest/modules/servicefabric_profile_module.rb, line 87
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::ServiceFabric::Mgmt::V2017_07_01_preview::ServiceFabricManagementClient.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)
  @application_type = @client_0.application_type
  @version = @client_0.version
  @application = @client_0.application
  @service = @client_0.service

  @client_1 = Azure::ServiceFabric::Mgmt::V2018_02_01::ServiceFabricManagementClient.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)
  @clusters = @client_1.clusters
  @cluster_versions = @client_1.cluster_versions
  @operations = @client_1.operations

  @model_classes = ModelClasses.new
end

Public Instance Methods

add_telemetry(client) click to toggle source
# File lib/profiles/latest/modules/servicefabric_profile_module.rb, line 122
def add_telemetry(client)
  profile_information = 'Profiles/Latest/ServiceFabric/Mgmt'
  client.add_user_agent_information(profile_information)
end
method_missing(method, *args) click to toggle source
Calls superclass method
# File lib/profiles/latest/modules/servicefabric_profile_module.rb, line 127
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