class OvirtSDK4::OpenStackSubnet

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {OpenStackSubnet} 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 [String] :cidr The value of attribute `cidr`.

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

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

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

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

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

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

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

@option opts [OpenStackNetwork, Hash] :openstack_network The value of attribute `openstack_network`.

Calls superclass method OvirtSDK4::Identified.new
# File lib/ovirtsdk4/types.rb, line 11578
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

Public Instance Methods

==(other) click to toggle source

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

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 11590
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() click to toggle source

Returns the value of the `cidr` attribute.

@return [String]

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

Sets the value of the `cidr` attribute.

@param value [String]

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

Returns the value of the `comment` attribute.

@return [String]

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

Sets the value of the `comment` attribute.

@param value [String]

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

Returns the value of the `description` attribute.

@return [String]

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

Sets the value of the `description` attribute.

@param value [String]

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

Returns the value of the `dns_servers` attribute.

@return [Array<String>]

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

Sets the value of the `dns_servers` attribute.

@param list [Array<String>]

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

Returns the value of the `gateway` attribute.

@return [String]

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

Sets the value of the `gateway` attribute.

@param value [String]

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

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 11602
def hash
  super +
  @cidr.hash +
  @dns_servers.hash +
  @gateway.hash +
  @ip_version.hash +
  @openstack_network.hash
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

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

Sets the value of the `id` attribute.

@param value [String]

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

Returns the value of the `ip_version` attribute.

@return [String]

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

Sets the value of the `ip_version` attribute.

@param value [String]

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

Returns the value of the `name` attribute.

@return [String]

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

Sets the value of the `name` attribute.

@param value [String]

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

Returns the value of the `openstack_network` attribute.

@return [OpenStackNetwork]

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

Sets the value of the `openstack_network` attribute.

@param value [OpenStackNetwork, Hash]

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.

# File lib/ovirtsdk4/types.rb, line 11545
def openstack_network=(value)
  if value.is_a?(Hash)
    value = OpenStackNetwork.new(value)
  end
  @openstack_network = value
end