class OvirtSDK4::CloudInit

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {CloudInit} class.

@param opts [Hash] 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.

@option opts [Array<AuthorizedKey>, Array<Hash>] :authorized_keys The values of attribute `authorized_keys`.

@option opts [Array<File>, Array<Hash>] :files The values of attribute `files`.

@option opts [Host, Hash] :host The value of attribute `host`.

@option opts [NetworkConfiguration, Hash] :network_configuration The value of attribute `network_configuration`.

@option opts [Boolean] :regenerate_ssh_keys The value of attribute `regenerate_ssh_keys`.

@option opts [String] :timezone The value of attribute `timezone`.

@option opts [Array<User>, Array<Hash>] :users The values of attribute `users`.

Calls superclass method OvirtSDK4::Struct.new
# File lib/ovirtsdk4/types.rb, line 1811
def initialize(opts = {})
  super(opts)
  self.authorized_keys = opts[:authorized_keys]
  self.files = opts[:files]
  self.host = opts[:host]
  self.network_configuration = opts[:network_configuration]
  self.regenerate_ssh_keys = opts[:regenerate_ssh_keys]
  self.timezone = opts[:timezone]
  self.users = opts[:users]
end

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Struct#==
# File lib/ovirtsdk4/types.rb, line 1825
def ==(other)
  super &&
  @authorized_keys == other.authorized_keys &&
  @files == other.files &&
  @host == other.host &&
  @network_configuration == other.network_configuration &&
  @regenerate_ssh_keys == other.regenerate_ssh_keys &&
  @timezone == other.timezone &&
  @users == other.users
end
authorized_keys() click to toggle source

Returns the value of the `authorized_keys` attribute.

@return [Array<AuthorizedKey>]

# File lib/ovirtsdk4/types.rb, line 1630
def authorized_keys
  @authorized_keys
end
authorized_keys=(list) click to toggle source

Sets the value of the `authorized_keys` attribute.

@param list [Array<AuthorizedKey>]

# File lib/ovirtsdk4/types.rb, line 1639
def authorized_keys=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = AuthorizedKey.new(value)
      end
    end
  end
  @authorized_keys = list
end
files() click to toggle source

Returns the value of the `files` attribute.

@return [Array<File>]

# File lib/ovirtsdk4/types.rb, line 1656
def files
  @files
end
files=(list) click to toggle source

Sets the value of the `files` attribute.

@param list [Array<File>]

# File lib/ovirtsdk4/types.rb, line 1665
def files=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = File.new(value)
      end
    end
  end
  @files = list
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Struct#hash
# File lib/ovirtsdk4/types.rb, line 1839
def hash
  super +
  @authorized_keys.hash +
  @files.hash +
  @host.hash +
  @network_configuration.hash +
  @regenerate_ssh_keys.hash +
  @timezone.hash +
  @users.hash
end
host() click to toggle source

Returns the value of the `host` attribute.

@return [Host]

# File lib/ovirtsdk4/types.rb, line 1682
def host
  @host
end
host=(value) click to toggle source

Sets the value of the `host` attribute.

@param value [Host, Hash]

The `value` parameter can be an instance of {OvirtSDK4::Host} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 1695
def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end
network_configuration() click to toggle source

Returns the value of the `network_configuration` attribute.

@return [NetworkConfiguration]

# File lib/ovirtsdk4/types.rb, line 1707
def network_configuration
  @network_configuration
end
network_configuration=(value) click to toggle source

Sets the value of the `network_configuration` attribute.

@param value [NetworkConfiguration, Hash]

The `value` parameter can be an instance of {OvirtSDK4::NetworkConfiguration} or a hash. If it is a hash then a new instance will be created passing the hash as the `opts` parameter to the constructor.

# File lib/ovirtsdk4/types.rb, line 1720
def network_configuration=(value)
  if value.is_a?(Hash)
    value = NetworkConfiguration.new(value)
  end
  @network_configuration = value
end
regenerate_ssh_keys() click to toggle source

Returns the value of the `regenerate_ssh_keys` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 1732
def regenerate_ssh_keys
  @regenerate_ssh_keys
end
regenerate_ssh_keys=(value) click to toggle source

Sets the value of the `regenerate_ssh_keys` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 1741
def regenerate_ssh_keys=(value)
  @regenerate_ssh_keys = value
end
timezone() click to toggle source

Returns the value of the `timezone` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 1750
def timezone
  @timezone
end
timezone=(value) click to toggle source

Sets the value of the `timezone` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 1759
def timezone=(value)
  @timezone = value
end
users() click to toggle source

Returns the value of the `users` attribute.

@return [Array<User>]

# File lib/ovirtsdk4/types.rb, line 1768
def users
  @users
end
users=(list) click to toggle source

Sets the value of the `users` attribute.

@param list [Array<User>]

# File lib/ovirtsdk4/types.rb, line 1777
def users=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = User.new(value)
      end
    end
  end
  @users = list
end