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 1460
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

authorized_keys() click to toggle source

Returns the value of the `authorized_keys` attribute.

@return [Array<AuthorizedKey>]

# File lib/ovirtsdk4/types.rb, line 1282
def authorized_keys
  return @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 1290
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 1307
def files
  return @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 1315
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
host() click to toggle source

Returns the value of the `host` attribute.

@return [Host]

# File lib/ovirtsdk4/types.rb, line 1332
def host
  return @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 1345
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 1357
def network_configuration
  return @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 1370
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 1382
def regenerate_ssh_keys
  return @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 1391
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 1400
def timezone
  return @timezone
end
timezone=(value) click to toggle source

Sets the value of the `timezone` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 1409
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 1418
def users
  return @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 1426
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