Class: OvirtSDK4::PowerManagement

Inherits:
Struct
  • Object
show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (PowerManagement) initialize(opts = {})

Creates a new instance of the OvirtSDK4::PowerManagement class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :address (String)

    The value of attribute address.

  • :agents (Array<Agent>, Array<Hash>)

    The values of attribute agents.

  • :automatic_pm_enabled (Boolean)

    The value of attribute automatic_pm_enabled.

  • :enabled (Boolean)

    The value of attribute enabled.

  • :kdump_detection (Boolean)

    The value of attribute kdump_detection.

  • :options (Array<Option>, Array<Hash>)

    The values of attribute options.

  • :password (String)

    The value of attribute password.

  • :pm_proxies (Array<PmProxy>, Array<Hash>)

    The values of attribute pm_proxies.

  • :status (PowerManagementStatus)

    The value of attribute status.

  • :type (String)

    The value of attribute type.

  • :username (String)

    The value of attribute username.



10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
# File 'lib/ovirtsdk4/types.rb', line 10712

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.agents = opts[:agents]
  self.automatic_pm_enabled = opts[:automatic_pm_enabled]
  self.enabled = opts[:enabled]
  self.kdump_detection = opts[:kdump_detection]
  self.options = opts[:options]
  self.password = opts[:password]
  self.pm_proxies = opts[:pm_proxies]
  self.status = opts[:status]
  self.type = opts[:type]
  self.username = opts[:username]
end

Instance Method Details

- (String) address

Returns the value of the address attribute.

Returns:

  • (String)


10468
10469
10470
# File 'lib/ovirtsdk4/types.rb', line 10468

def address
  return @address
end

- (Object) address=(value)

Sets the value of the address attribute.

Parameters:

  • value (String)


10477
10478
10479
# File 'lib/ovirtsdk4/types.rb', line 10477

def address=(value)
  @address = value
end

- (Array<Agent>) agents

Returns the value of the agents attribute.

Returns:



10486
10487
10488
# File 'lib/ovirtsdk4/types.rb', line 10486

def agents
  return @agents
end

- (Object) agents=(list)

Sets the value of the agents attribute.

Parameters:



10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
# File 'lib/ovirtsdk4/types.rb', line 10494

def agents=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Agent.new(value)
      end
    end
  end
  @agents = list
end

- (Boolean) automatic_pm_enabled

Returns the value of the automatic_pm_enabled attribute.

Returns:

  • (Boolean)


10511
10512
10513
# File 'lib/ovirtsdk4/types.rb', line 10511

def automatic_pm_enabled
  return @automatic_pm_enabled
end

- (Object) automatic_pm_enabled=(value)

Sets the value of the automatic_pm_enabled attribute.

Parameters:

  • value (Boolean)


10520
10521
10522
# File 'lib/ovirtsdk4/types.rb', line 10520

def automatic_pm_enabled=(value)
  @automatic_pm_enabled = value
end

- (Boolean) enabled

Returns the value of the enabled attribute.

Returns:

  • (Boolean)


10529
10530
10531
# File 'lib/ovirtsdk4/types.rb', line 10529

def enabled
  return @enabled
end

- (Object) enabled=(value)

Sets the value of the enabled attribute.

Parameters:

  • value (Boolean)


10538
10539
10540
# File 'lib/ovirtsdk4/types.rb', line 10538

def enabled=(value)
  @enabled = value
end

- (Boolean) kdump_detection

Returns the value of the kdump_detection attribute.

Returns:

  • (Boolean)


10547
10548
10549
# File 'lib/ovirtsdk4/types.rb', line 10547

def kdump_detection
  return @kdump_detection
end

- (Object) kdump_detection=(value)

Sets the value of the kdump_detection attribute.

Parameters:

  • value (Boolean)


10556
10557
10558
# File 'lib/ovirtsdk4/types.rb', line 10556

def kdump_detection=(value)
  @kdump_detection = value
end

- (Array<Option>) options

Returns the value of the options attribute.

Returns:



10565
10566
10567
# File 'lib/ovirtsdk4/types.rb', line 10565

def options
  return @options
end

- (Object) options=(list)

Sets the value of the options attribute.

Parameters:



10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
# File 'lib/ovirtsdk4/types.rb', line 10573

def options=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Option.new(value)
      end
    end
  end
  @options = list
end

- (String) password

Returns the value of the password attribute.

Returns:

  • (String)


10590
10591
10592
# File 'lib/ovirtsdk4/types.rb', line 10590

def password
  return @password
end

- (Object) password=(value)

Sets the value of the password attribute.

Parameters:

  • value (String)


10599
10600
10601
# File 'lib/ovirtsdk4/types.rb', line 10599

def password=(value)
  @password = value
end

- (Array<PmProxy>) pm_proxies

Returns the value of the pm_proxies attribute.

Returns:



10608
10609
10610
# File 'lib/ovirtsdk4/types.rb', line 10608

def pm_proxies
  return @pm_proxies
end

- (Object) pm_proxies=(list)

Sets the value of the pm_proxies attribute.

Parameters:



10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
# File 'lib/ovirtsdk4/types.rb', line 10616

def pm_proxies=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = PmProxy.new(value)
      end
    end
  end
  @pm_proxies = list
end

- (PowerManagementStatus) status

Returns the value of the status attribute.



10633
10634
10635
# File 'lib/ovirtsdk4/types.rb', line 10633

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



10642
10643
10644
# File 'lib/ovirtsdk4/types.rb', line 10642

def status=(value)
  @status = value
end

- (String) type

Returns the value of the type attribute.

Returns:

  • (String)


10651
10652
10653
# File 'lib/ovirtsdk4/types.rb', line 10651

def type
  return @type
end

- (Object) type=(value)

Sets the value of the type attribute.

Parameters:

  • value (String)


10660
10661
10662
# File 'lib/ovirtsdk4/types.rb', line 10660

def type=(value)
  @type = value
end

- (String) username

Returns the value of the username attribute.

Returns:

  • (String)


10669
10670
10671
# File 'lib/ovirtsdk4/types.rb', line 10669

def username
  return @username
end

- (Object) username=(value)

Sets the value of the username attribute.

Parameters:

  • value (String)


10678
10679
10680
# File 'lib/ovirtsdk4/types.rb', line 10678

def username=(value)
  @username = value
end