Class: OvirtSDK4::CloudInit
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
trueifselfandotherhave the same attributes and values. -
#authorized_keys ⇒ Array<AuthorizedKey>
Returns the value of the
authorized_keysattribute. -
#authorized_keys=(list) ⇒ Object
Sets the value of the
authorized_keysattribute. -
#files ⇒ Array<File>
Returns the value of the
filesattribute. -
#files=(list) ⇒ Object
Sets the value of the
filesattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#initialize(opts = {}) ⇒ CloudInit
constructor
Creates a new instance of the CloudInit class.
-
#network_configuration ⇒ NetworkConfiguration
Returns the value of the
network_configurationattribute. -
#network_configuration=(value) ⇒ Object
Sets the value of the
network_configurationattribute. -
#regenerate_ssh_keys ⇒ Boolean
Returns the value of the
regenerate_ssh_keysattribute. -
#regenerate_ssh_keys=(value) ⇒ Object
Sets the value of the
regenerate_ssh_keysattribute. -
#timezone ⇒ String
Returns the value of the
timezoneattribute. -
#timezone=(value) ⇒ Object
Sets the value of the
timezoneattribute. -
#users ⇒ Array<User>
Returns the value of the
usersattribute. -
#users=(list) ⇒ Object
Sets the value of the
usersattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ CloudInit
Creates a new instance of the OvirtSDK4::CloudInit class.
1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 |
# File 'lib/ovirtsdk4/types.rb', line 1999 def initialize(opts = {}) super(opts) self. = 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 |
Instance Method Details
#==(other) ⇒ Object
Returns true if self and other have the same attributes and values.
2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 |
# File 'lib/ovirtsdk4/types.rb', line 2013 def ==(other) super && @authorized_keys == other. && @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 ⇒ Array<AuthorizedKey>
Returns the value of the authorized_keys attribute.
1818 1819 1820 |
# File 'lib/ovirtsdk4/types.rb', line 1818 def @authorized_keys end |
#authorized_keys=(list) ⇒ Object
Sets the value of the authorized_keys attribute.
1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 |
# File 'lib/ovirtsdk4/types.rb', line 1827 def (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 ⇒ Array<File>
Returns the value of the files attribute.
1844 1845 1846 |
# File 'lib/ovirtsdk4/types.rb', line 1844 def files @files end |
#files=(list) ⇒ Object
Sets the value of the files attribute.
1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 |
# File 'lib/ovirtsdk4/types.rb', line 1853 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 ⇒ Object
Generates a hash value for this object.
2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 |
# File 'lib/ovirtsdk4/types.rb', line 2027 def hash super + @authorized_keys.hash + @files.hash + @host.hash + @network_configuration.hash + @regenerate_ssh_keys.hash + @timezone.hash + @users.hash end |
#host ⇒ Host
Returns the value of the host attribute.
1870 1871 1872 |
# File 'lib/ovirtsdk4/types.rb', line 1870 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host attribute.
The value parameter can be an instance of 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.
1883 1884 1885 1886 1887 1888 |
# File 'lib/ovirtsdk4/types.rb', line 1883 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#network_configuration ⇒ NetworkConfiguration
Returns the value of the network_configuration attribute.
1895 1896 1897 |
# File 'lib/ovirtsdk4/types.rb', line 1895 def network_configuration @network_configuration end |
#network_configuration=(value) ⇒ Object
Sets the value of the network_configuration attribute.
The value parameter can be an instance of 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.
1908 1909 1910 1911 1912 1913 |
# File 'lib/ovirtsdk4/types.rb', line 1908 def network_configuration=(value) if value.is_a?(Hash) value = NetworkConfiguration.new(value) end @network_configuration = value end |
#regenerate_ssh_keys ⇒ Boolean
Returns the value of the regenerate_ssh_keys attribute.
1920 1921 1922 |
# File 'lib/ovirtsdk4/types.rb', line 1920 def regenerate_ssh_keys @regenerate_ssh_keys end |
#regenerate_ssh_keys=(value) ⇒ Object
Sets the value of the regenerate_ssh_keys attribute.
1929 1930 1931 |
# File 'lib/ovirtsdk4/types.rb', line 1929 def regenerate_ssh_keys=(value) @regenerate_ssh_keys = value end |
#timezone ⇒ String
Returns the value of the timezone attribute.
1938 1939 1940 |
# File 'lib/ovirtsdk4/types.rb', line 1938 def timezone @timezone end |
#timezone=(value) ⇒ Object
Sets the value of the timezone attribute.
1947 1948 1949 |
# File 'lib/ovirtsdk4/types.rb', line 1947 def timezone=(value) @timezone = value end |
#users ⇒ Array<User>
Returns the value of the users attribute.
1956 1957 1958 |
# File 'lib/ovirtsdk4/types.rb', line 1956 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users attribute.
1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 |
# File 'lib/ovirtsdk4/types.rb', line 1965 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 |