Class: OvirtSDK4::CloudInit
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#authorized_keys ⇒ Array<AuthorizedKey>
Returns the value of the
authorized_keys
attribute. -
#authorized_keys=(list) ⇒ Object
Sets the value of the
authorized_keys
attribute. -
#files ⇒ Array<File>
Returns the value of the
files
attribute. -
#files=(list) ⇒ Object
Sets the value of the
files
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#initialize(opts = {}) ⇒ CloudInit
constructor
Creates a new instance of the CloudInit class.
-
#network_configuration ⇒ NetworkConfiguration
Returns the value of the
network_configuration
attribute. -
#network_configuration=(value) ⇒ Object
Sets the value of the
network_configuration
attribute. -
#regenerate_ssh_keys ⇒ Boolean
Returns the value of the
regenerate_ssh_keys
attribute. -
#regenerate_ssh_keys=(value) ⇒ Object
Sets the value of the
regenerate_ssh_keys
attribute. -
#timezone ⇒ String
Returns the value of the
timezone
attribute. -
#timezone=(value) ⇒ Object
Sets the value of the
timezone
attribute. -
#users ⇒ Array<User>
Returns the value of the
users
attribute. -
#users=(list) ⇒ Object
Sets the value of the
users
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ CloudInit
Creates a new instance of the OvirtSDK4::CloudInit class.
1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 |
# File 'lib/ovirtsdk4/types.rb', line 1916 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.
1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 |
# File 'lib/ovirtsdk4/types.rb', line 1930 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.
1735 1736 1737 |
# File 'lib/ovirtsdk4/types.rb', line 1735 def @authorized_keys end |
#authorized_keys=(list) ⇒ Object
Sets the value of the authorized_keys
attribute.
1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 |
# File 'lib/ovirtsdk4/types.rb', line 1744 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.
1761 1762 1763 |
# File 'lib/ovirtsdk4/types.rb', line 1761 def files @files end |
#files=(list) ⇒ Object
Sets the value of the files
attribute.
1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'lib/ovirtsdk4/types.rb', line 1770 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.
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 |
# File 'lib/ovirtsdk4/types.rb', line 1944 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.
1787 1788 1789 |
# File 'lib/ovirtsdk4/types.rb', line 1787 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.
1800 1801 1802 1803 1804 1805 |
# File 'lib/ovirtsdk4/types.rb', line 1800 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.
1812 1813 1814 |
# File 'lib/ovirtsdk4/types.rb', line 1812 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.
1825 1826 1827 1828 1829 1830 |
# File 'lib/ovirtsdk4/types.rb', line 1825 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.
1837 1838 1839 |
# File 'lib/ovirtsdk4/types.rb', line 1837 def regenerate_ssh_keys @regenerate_ssh_keys end |
#regenerate_ssh_keys=(value) ⇒ Object
Sets the value of the regenerate_ssh_keys
attribute.
1846 1847 1848 |
# File 'lib/ovirtsdk4/types.rb', line 1846 def regenerate_ssh_keys=(value) @regenerate_ssh_keys = value end |
#timezone ⇒ String
Returns the value of the timezone
attribute.
1855 1856 1857 |
# File 'lib/ovirtsdk4/types.rb', line 1855 def timezone @timezone end |
#timezone=(value) ⇒ Object
Sets the value of the timezone
attribute.
1864 1865 1866 |
# File 'lib/ovirtsdk4/types.rb', line 1864 def timezone=(value) @timezone = value end |
#users ⇒ Array<User>
Returns the value of the users
attribute.
1873 1874 1875 |
# File 'lib/ovirtsdk4/types.rb', line 1873 def users @users end |
#users=(list) ⇒ Object
Sets the value of the users
attribute.
1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 |
# File 'lib/ovirtsdk4/types.rb', line 1882 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 |