Class: OvirtSDK4::OpenStackSubnet
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::OpenStackSubnet
- 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. -
#cidr ⇒ String
Returns the value of the
cidr
attribute. -
#cidr=(value) ⇒ Object
Sets the value of the
cidr
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#dns_servers ⇒ Array<String>
Returns the value of the
dns_servers
attribute. -
#dns_servers=(list) ⇒ Object
Sets the value of the
dns_servers
attribute. -
#gateway ⇒ String
Returns the value of the
gateway
attribute. -
#gateway=(value) ⇒ Object
Sets the value of the
gateway
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ OpenStackSubnet
constructor
Creates a new instance of the OpenStackSubnet class.
-
#ip_version ⇒ String
Returns the value of the
ip_version
attribute. -
#ip_version=(value) ⇒ Object
Sets the value of the
ip_version
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#openstack_network ⇒ OpenStackNetwork
Returns the value of the
openstack_network
attribute. -
#openstack_network=(value) ⇒ Object
Sets the value of the
openstack_network
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ OpenStackSubnet
Creates a new instance of the OvirtSDK4::OpenStackSubnet class.
12148 12149 12150 12151 12152 12153 12154 12155 |
# File 'lib/ovirtsdk4/types.rb', line 12148 def initialize(opts = {}) super(opts) self.cidr = opts[:cidr] self.dns_servers = opts[:dns_servers] self.gateway = opts[:gateway] self.ip_version = opts[:ip_version] self.openstack_network = opts[:openstack_network] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
12160 12161 12162 12163 12164 12165 12166 12167 |
# File 'lib/ovirtsdk4/types.rb', line 12160 def ==(other) super && @cidr == other.cidr && @dns_servers == other.dns_servers && @gateway == other.gateway && @ip_version == other.ip_version && @openstack_network == other.openstack_network end |
#cidr ⇒ String
Returns the value of the cidr
attribute.
11958 11959 11960 |
# File 'lib/ovirtsdk4/types.rb', line 11958 def cidr @cidr end |
#cidr=(value) ⇒ Object
Sets the value of the cidr
attribute.
11967 11968 11969 |
# File 'lib/ovirtsdk4/types.rb', line 11967 def cidr=(value) @cidr = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
11976 11977 11978 |
# File 'lib/ovirtsdk4/types.rb', line 11976 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
11985 11986 11987 |
# File 'lib/ovirtsdk4/types.rb', line 11985 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
11994 11995 11996 |
# File 'lib/ovirtsdk4/types.rb', line 11994 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
12003 12004 12005 |
# File 'lib/ovirtsdk4/types.rb', line 12003 def description=(value) @description = value end |
#dns_servers ⇒ Array<String>
Returns the value of the dns_servers
attribute.
12012 12013 12014 |
# File 'lib/ovirtsdk4/types.rb', line 12012 def dns_servers @dns_servers end |
#dns_servers=(list) ⇒ Object
Sets the value of the dns_servers
attribute.
12021 12022 12023 |
# File 'lib/ovirtsdk4/types.rb', line 12021 def dns_servers=(list) @dns_servers = list end |
#gateway ⇒ String
Returns the value of the gateway
attribute.
12030 12031 12032 |
# File 'lib/ovirtsdk4/types.rb', line 12030 def gateway @gateway end |
#gateway=(value) ⇒ Object
Sets the value of the gateway
attribute.
12039 12040 12041 |
# File 'lib/ovirtsdk4/types.rb', line 12039 def gateway=(value) @gateway = value end |
#hash ⇒ Object
Generates a hash value for this object.
12172 12173 12174 12175 12176 12177 12178 12179 |
# File 'lib/ovirtsdk4/types.rb', line 12172 def hash super + @cidr.hash + @dns_servers.hash + @gateway.hash + @ip_version.hash + @openstack_network.hash end |
#id ⇒ String
Returns the value of the id
attribute.
12048 12049 12050 |
# File 'lib/ovirtsdk4/types.rb', line 12048 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
12057 12058 12059 |
# File 'lib/ovirtsdk4/types.rb', line 12057 def id=(value) @id = value end |
#ip_version ⇒ String
Returns the value of the ip_version
attribute.
12066 12067 12068 |
# File 'lib/ovirtsdk4/types.rb', line 12066 def ip_version @ip_version end |
#ip_version=(value) ⇒ Object
Sets the value of the ip_version
attribute.
12075 12076 12077 |
# File 'lib/ovirtsdk4/types.rb', line 12075 def ip_version=(value) @ip_version = value end |
#name ⇒ String
Returns the value of the name
attribute.
12084 12085 12086 |
# File 'lib/ovirtsdk4/types.rb', line 12084 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
12093 12094 12095 |
# File 'lib/ovirtsdk4/types.rb', line 12093 def name=(value) @name = value end |
#openstack_network ⇒ OpenStackNetwork
Returns the value of the openstack_network
attribute.
12102 12103 12104 |
# File 'lib/ovirtsdk4/types.rb', line 12102 def openstack_network @openstack_network end |
#openstack_network=(value) ⇒ Object
Sets the value of the openstack_network
attribute.
The value
parameter can be an instance of OvirtSDK4::OpenStackNetwork 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.
12115 12116 12117 12118 12119 12120 |
# File 'lib/ovirtsdk4/types.rb', line 12115 def openstack_network=(value) if value.is_a?(Hash) value = OpenStackNetwork.new(value) end @openstack_network = value end |