Class: OvirtSDK4::Network

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Network) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Network class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :comment (String)

    The value of attribute comment.

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :display (Boolean)

    The value of attribute display.

  • :id (String)

    The value of attribute id.

  • :ip (Ip, Hash)

    The value of attribute ip.

  • :mtu (Integer)

    The value of attribute mtu.

  • :name (String)

    The value of attribute name.

  • :network_labels (Array<NetworkLabel>, Array<Hash>)

    The values of attribute network_labels.

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :profile_required (Boolean)

    The value of attribute profile_required.

  • :qos (Qos, Hash)

    The value of attribute qos.

  • :required (Boolean)

    The value of attribute required.

  • :status (NetworkStatus)

    The value of attribute status.

  • :stp (Boolean)

    The value of attribute stp.

  • :usages (Array<String>, Array<Hash>)

    The values of attribute usages.

  • :vlan (Vlan, Hash)

    The value of attribute vlan.

  • :vnic_profiles (Array<VnicProfile>, Array<Hash>)

    The values of attribute vnic_profiles.



7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
# File 'lib/ovirtsdk4/types.rb', line 7257

def initialize(opts = {})
  super(opts)
  self.cluster = opts[:cluster]
  self.comment = opts[:comment]
  self.data_center = opts[:data_center]
  self.description = opts[:description]
  self.display = opts[:display]
  self.id = opts[:id]
  self.ip = opts[:ip]
  self.mtu = opts[:mtu]
  self.name = opts[:name]
  self.network_labels = opts[:network_labels]
  self.permissions = opts[:permissions]
  self.profile_required = opts[:profile_required]
  self.qos = opts[:qos]
  self.required = opts[:required]
  self.status = opts[:status]
  self.stp = opts[:stp]
  self.usages = opts[:usages]
  self.vlan = opts[:vlan]
  self.vnic_profiles = opts[:vnic_profiles]
end

Instance Method Details

- (Cluster) cluster

Returns the value of the cluster attribute.

Returns:



6819
6820
6821
# File 'lib/ovirtsdk4/types.rb', line 6819

def cluster
  return @cluster
end

- (Object) cluster=(value)

Sets the value of the cluster attribute.

The value parameter can be an instance of Cluster 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.

Parameters:



6832
6833
6834
6835
6836
6837
# File 'lib/ovirtsdk4/types.rb', line 6832

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


6844
6845
6846
# File 'lib/ovirtsdk4/types.rb', line 6844

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


6853
6854
6855
# File 'lib/ovirtsdk4/types.rb', line 6853

def comment=(value)
  @comment = value
end

- (DataCenter) data_center

Returns the value of the data_center attribute.

Returns:



6862
6863
6864
# File 'lib/ovirtsdk4/types.rb', line 6862

def data_center
  return @data_center
end

- (Object) data_center=(value)

Sets the value of the data_center attribute.

The value parameter can be an instance of DataCenter 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.

Parameters:



6875
6876
6877
6878
6879
6880
# File 'lib/ovirtsdk4/types.rb', line 6875

def data_center=(value)
  if value.is_a?(Hash)
    value = DataCenter.new(value)
  end
  @data_center = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


6887
6888
6889
# File 'lib/ovirtsdk4/types.rb', line 6887

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


6896
6897
6898
# File 'lib/ovirtsdk4/types.rb', line 6896

def description=(value)
  @description = value
end

- (Boolean) display

Returns the value of the display attribute.

Returns:

  • (Boolean)


6905
6906
6907
# File 'lib/ovirtsdk4/types.rb', line 6905

def display
  return @display
end

- (Object) display=(value)

Sets the value of the display attribute.

Parameters:

  • value (Boolean)


6914
6915
6916
# File 'lib/ovirtsdk4/types.rb', line 6914

def display=(value)
  @display = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


6923
6924
6925
# File 'lib/ovirtsdk4/types.rb', line 6923

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


6932
6933
6934
# File 'lib/ovirtsdk4/types.rb', line 6932

def id=(value)
  @id = value
end

- (Ip) ip

Returns the value of the ip attribute.

Returns:



6941
6942
6943
# File 'lib/ovirtsdk4/types.rb', line 6941

def ip
  return @ip
end

- (Object) ip=(value)

Sets the value of the ip attribute.

The value parameter can be an instance of Ip 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.

Parameters:

  • value (Ip, Hash)


6954
6955
6956
6957
6958
6959
# File 'lib/ovirtsdk4/types.rb', line 6954

def ip=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ip = value
end

- (Integer) mtu

Returns the value of the mtu attribute.

Returns:

  • (Integer)


6966
6967
6968
# File 'lib/ovirtsdk4/types.rb', line 6966

def mtu
  return @mtu
end

- (Object) mtu=(value)

Sets the value of the mtu attribute.

Parameters:

  • value (Integer)


6975
6976
6977
# File 'lib/ovirtsdk4/types.rb', line 6975

def mtu=(value)
  @mtu = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


6984
6985
6986
# File 'lib/ovirtsdk4/types.rb', line 6984

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


6993
6994
6995
# File 'lib/ovirtsdk4/types.rb', line 6993

def name=(value)
  @name = value
end

- (Array<NetworkLabel>) network_labels

Returns the value of the network_labels attribute.

Returns:



7002
7003
7004
# File 'lib/ovirtsdk4/types.rb', line 7002

def network_labels
  return @network_labels
end

- (Object) network_labels=(list)

Sets the value of the network_labels attribute.

Parameters:



7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
# File 'lib/ovirtsdk4/types.rb', line 7010

def network_labels=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = NetworkLabel.new(value)
      end
    end
  end
  @network_labels = list
end

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



7027
7028
7029
# File 'lib/ovirtsdk4/types.rb', line 7027

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
# File 'lib/ovirtsdk4/types.rb', line 7035

def permissions=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Permission.new(value)
      end
    end
  end
  @permissions = list
end

- (Boolean) profile_required

Returns the value of the profile_required attribute.

Returns:

  • (Boolean)


7052
7053
7054
# File 'lib/ovirtsdk4/types.rb', line 7052

def profile_required
  return @profile_required
end

- (Object) profile_required=(value)

Sets the value of the profile_required attribute.

Parameters:

  • value (Boolean)


7061
7062
7063
# File 'lib/ovirtsdk4/types.rb', line 7061

def profile_required=(value)
  @profile_required = value
end

- (Qos) qos

Returns the value of the qos attribute.

Returns:



7070
7071
7072
# File 'lib/ovirtsdk4/types.rb', line 7070

def qos
  return @qos
end

- (Object) qos=(value)

Sets the value of the qos attribute.

The value parameter can be an instance of Qos 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.

Parameters:

  • value (Qos, Hash)


7083
7084
7085
7086
7087
7088
# File 'lib/ovirtsdk4/types.rb', line 7083

def qos=(value)
  if value.is_a?(Hash)
    value = Qos.new(value)
  end
  @qos = value
end

- (Boolean) required

Returns the value of the required attribute.

Returns:

  • (Boolean)


7095
7096
7097
# File 'lib/ovirtsdk4/types.rb', line 7095

def required
  return @required
end

- (Object) required=(value)

Sets the value of the required attribute.

Parameters:

  • value (Boolean)


7104
7105
7106
# File 'lib/ovirtsdk4/types.rb', line 7104

def required=(value)
  @required = value
end

- (NetworkStatus) status

Returns the value of the status attribute.

Returns:



7113
7114
7115
# File 'lib/ovirtsdk4/types.rb', line 7113

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



7122
7123
7124
# File 'lib/ovirtsdk4/types.rb', line 7122

def status=(value)
  @status = value
end

- (Boolean) stp

Returns the value of the stp attribute.

Returns:

  • (Boolean)


7131
7132
7133
# File 'lib/ovirtsdk4/types.rb', line 7131

def stp
  return @stp
end

- (Object) stp=(value)

Sets the value of the stp attribute.

Parameters:

  • value (Boolean)


7140
7141
7142
# File 'lib/ovirtsdk4/types.rb', line 7140

def stp=(value)
  @stp = value
end

- (Array<String>) usages

Returns the value of the usages attribute.

Returns:

  • (Array<String>)


7149
7150
7151
# File 'lib/ovirtsdk4/types.rb', line 7149

def usages
  return @usages
end

- (Object) usages=(list)

Sets the value of the usages attribute.

Parameters:

  • list (Array<String>)


7157
7158
7159
# File 'lib/ovirtsdk4/types.rb', line 7157

def usages=(list)
  @usages = list
end

- (Vlan) vlan

Returns the value of the vlan attribute.

Returns:



7166
7167
7168
# File 'lib/ovirtsdk4/types.rb', line 7166

def vlan
  return @vlan
end

- (Object) vlan=(value)

Sets the value of the vlan attribute.

The value parameter can be an instance of Vlan 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.

Parameters:

  • value (Vlan, Hash)


7179
7180
7181
7182
7183
7184
# File 'lib/ovirtsdk4/types.rb', line 7179

def vlan=(value)
  if value.is_a?(Hash)
    value = Vlan.new(value)
  end
  @vlan = value
end

- (Array<VnicProfile>) vnic_profiles

Returns the value of the vnic_profiles attribute.

Returns:



7191
7192
7193
# File 'lib/ovirtsdk4/types.rb', line 7191

def vnic_profiles
  return @vnic_profiles
end

- (Object) vnic_profiles=(list)

Sets the value of the vnic_profiles attribute.

Parameters:



7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
# File 'lib/ovirtsdk4/types.rb', line 7199

def vnic_profiles=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = VnicProfile.new(value)
      end
    end
  end
  @vnic_profiles = list
end