Class: OvirtSDK4::OpenStackNetworkProvider

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

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ OpenStackNetworkProvider

Creates a new instance of the OvirtSDK4::OpenStackNetworkProvider 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):

  • :agent_configuration (AgentConfiguration, Hash)

    The value of attribute agent_configuration.

  • :authentication_url (String)

    The value of attribute authentication_url.

  • :auto_sync (Boolean)

    The value of attribute auto_sync.

  • :certificates (Array<Certificate>, Array<Hash>)

    The values of attribute certificates.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :external_plugin_type (String)

    The value of attribute external_plugin_type.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :networks (Array<OpenStackNetwork>, Array<Hash>)

    The values of attribute networks.

  • :password (String)

    The value of attribute password.

  • :plugin_type (NetworkPluginType)

    The value of attribute plugin_type.

  • :properties (Array<Property>, Array<Hash>)

    The values of attribute properties.

  • :read_only (Boolean)

    The value of attribute read_only.

  • :requires_authentication (Boolean)

    The value of attribute requires_authentication.

  • :subnets (Array<OpenStackSubnet>, Array<Hash>)

    The values of attribute subnets.

  • :tenant_name (String)

    The value of attribute tenant_name.

  • :type (OpenStackNetworkProviderType)

    The value of attribute type.

  • :unmanaged (Boolean)

    The value of attribute unmanaged.

  • :url (String)

    The value of attribute url.

  • :username (String)

    The value of attribute username.



52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
# File 'lib/ovirtsdk4/types.rb', line 52871

def initialize(opts = {})
  super(opts)
  self.agent_configuration = opts[:agent_configuration]
  self.auto_sync = opts[:auto_sync]
  self.certificates = opts[:certificates]
  self.external_plugin_type = opts[:external_plugin_type]
  self.networks = opts[:networks]
  self.plugin_type = opts[:plugin_type]
  self.read_only = opts[:read_only]
  self.subnets = opts[:subnets]
  self.type = opts[:type]
  self.unmanaged = opts[:unmanaged]
end

Instance Method Details

#==(other) ⇒ Object

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



52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
# File 'lib/ovirtsdk4/types.rb', line 52888

def ==(other)
  super &&
  @agent_configuration == other.agent_configuration &&
  @auto_sync == other.auto_sync &&
  @certificates == other.certificates &&
  @external_plugin_type == other.external_plugin_type &&
  @networks == other.networks &&
  @plugin_type == other.plugin_type &&
  @read_only == other.read_only &&
  @subnets == other.subnets &&
  @type == other.type &&
  @unmanaged == other.unmanaged
end

#agent_configurationAgentConfiguration

Returns the value of the agent_configuration attribute.

Returns:



52409
52410
52411
# File 'lib/ovirtsdk4/types.rb', line 52409

def agent_configuration
  @agent_configuration
end

#agent_configuration=(value) ⇒ Object

Sets the value of the agent_configuration attribute.

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



52422
52423
52424
52425
52426
52427
# File 'lib/ovirtsdk4/types.rb', line 52422

def agent_configuration=(value)
  if value.is_a?(Hash)
    value = AgentConfiguration.new(value)
  end
  @agent_configuration = value
end

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)


52434
52435
52436
# File 'lib/ovirtsdk4/types.rb', line 52434

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


52443
52444
52445
# File 'lib/ovirtsdk4/types.rb', line 52443

def authentication_url=(value)
  @authentication_url = value
end

#auto_syncBoolean

Returns the value of the auto_sync attribute.

Returns:

  • (Boolean)


52452
52453
52454
# File 'lib/ovirtsdk4/types.rb', line 52452

def auto_sync
  @auto_sync
end

#auto_sync=(value) ⇒ Object

Sets the value of the auto_sync attribute.

Parameters:

  • value (Boolean)


52461
52462
52463
# File 'lib/ovirtsdk4/types.rb', line 52461

def auto_sync=(value)
  @auto_sync = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



52470
52471
52472
# File 'lib/ovirtsdk4/types.rb', line 52470

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
# File 'lib/ovirtsdk4/types.rb', line 52479

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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


52496
52497
52498
# File 'lib/ovirtsdk4/types.rb', line 52496

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


52505
52506
52507
# File 'lib/ovirtsdk4/types.rb', line 52505

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


52514
52515
52516
# File 'lib/ovirtsdk4/types.rb', line 52514

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


52523
52524
52525
# File 'lib/ovirtsdk4/types.rb', line 52523

def description=(value)
  @description = value
end

#external_plugin_typeString

Returns the value of the external_plugin_type attribute.

Returns:

  • (String)


52532
52533
52534
# File 'lib/ovirtsdk4/types.rb', line 52532

def external_plugin_type
  @external_plugin_type
end

#external_plugin_type=(value) ⇒ Object

Sets the value of the external_plugin_type attribute.

Parameters:

  • value (String)


52541
52542
52543
# File 'lib/ovirtsdk4/types.rb', line 52541

def external_plugin_type=(value)
  @external_plugin_type = value
end

#hashObject

Generates a hash value for this object.



52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
# File 'lib/ovirtsdk4/types.rb', line 52905

def hash
  super +
  @agent_configuration.hash +
  @auto_sync.hash +
  @certificates.hash +
  @external_plugin_type.hash +
  @networks.hash +
  @plugin_type.hash +
  @read_only.hash +
  @subnets.hash +
  @type.hash +
  @unmanaged.hash
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


52550
52551
52552
# File 'lib/ovirtsdk4/types.rb', line 52550

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


52559
52560
52561
# File 'lib/ovirtsdk4/types.rb', line 52559

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


52568
52569
52570
# File 'lib/ovirtsdk4/types.rb', line 52568

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


52577
52578
52579
# File 'lib/ovirtsdk4/types.rb', line 52577

def name=(value)
  @name = value
end

#networksArray<OpenStackNetwork>

Returns the value of the networks attribute.

Returns:



52586
52587
52588
# File 'lib/ovirtsdk4/types.rb', line 52586

def networks
  @networks
end

#networks=(list) ⇒ Object

Sets the value of the networks attribute.

Parameters:



52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
# File 'lib/ovirtsdk4/types.rb', line 52595

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

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


52612
52613
52614
# File 'lib/ovirtsdk4/types.rb', line 52612

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


52621
52622
52623
# File 'lib/ovirtsdk4/types.rb', line 52621

def password=(value)
  @password = value
end

#plugin_typeNetworkPluginType

Returns the value of the plugin_type attribute.

Returns:



52630
52631
52632
# File 'lib/ovirtsdk4/types.rb', line 52630

def plugin_type
  @plugin_type
end

#plugin_type=(value) ⇒ Object

Sets the value of the plugin_type attribute.

Parameters:



52639
52640
52641
# File 'lib/ovirtsdk4/types.rb', line 52639

def plugin_type=(value)
  @plugin_type = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



52648
52649
52650
# File 'lib/ovirtsdk4/types.rb', line 52648

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



52657
52658
52659
52660
52661
52662
52663
52664
52665
52666
52667
# File 'lib/ovirtsdk4/types.rb', line 52657

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

#read_onlyBoolean

Returns the value of the read_only attribute.

Returns:

  • (Boolean)


52674
52675
52676
# File 'lib/ovirtsdk4/types.rb', line 52674

def read_only
  @read_only
end

#read_only=(value) ⇒ Object

Sets the value of the read_only attribute.

Parameters:

  • value (Boolean)


52683
52684
52685
# File 'lib/ovirtsdk4/types.rb', line 52683

def read_only=(value)
  @read_only = value
end

#requires_authenticationBoolean

Returns the value of the requires_authentication attribute.

Returns:

  • (Boolean)


52692
52693
52694
# File 'lib/ovirtsdk4/types.rb', line 52692

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


52701
52702
52703
# File 'lib/ovirtsdk4/types.rb', line 52701

def requires_authentication=(value)
  @requires_authentication = value
end

#subnetsArray<OpenStackSubnet>

Returns the value of the subnets attribute.

Returns:



52710
52711
52712
# File 'lib/ovirtsdk4/types.rb', line 52710

def subnets
  @subnets
end

#subnets=(list) ⇒ Object

Sets the value of the subnets attribute.

Parameters:



52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
# File 'lib/ovirtsdk4/types.rb', line 52719

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

#tenant_nameString

Returns the value of the tenant_name attribute.

Returns:

  • (String)


52736
52737
52738
# File 'lib/ovirtsdk4/types.rb', line 52736

def tenant_name
  @tenant_name
end

#tenant_name=(value) ⇒ Object

Sets the value of the tenant_name attribute.

Parameters:

  • value (String)


52745
52746
52747
# File 'lib/ovirtsdk4/types.rb', line 52745

def tenant_name=(value)
  @tenant_name = value
end

#typeOpenStackNetworkProviderType

Returns the value of the type attribute.



52754
52755
52756
# File 'lib/ovirtsdk4/types.rb', line 52754

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



52763
52764
52765
# File 'lib/ovirtsdk4/types.rb', line 52763

def type=(value)
  @type = value
end

#unmanagedBoolean

Returns the value of the unmanaged attribute.

Returns:

  • (Boolean)


52772
52773
52774
# File 'lib/ovirtsdk4/types.rb', line 52772

def unmanaged
  @unmanaged
end

#unmanaged=(value) ⇒ Object

Sets the value of the unmanaged attribute.

Parameters:

  • value (Boolean)


52781
52782
52783
# File 'lib/ovirtsdk4/types.rb', line 52781

def unmanaged=(value)
  @unmanaged = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


52790
52791
52792
# File 'lib/ovirtsdk4/types.rb', line 52790

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


52799
52800
52801
# File 'lib/ovirtsdk4/types.rb', line 52799

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


52808
52809
52810
# File 'lib/ovirtsdk4/types.rb', line 52808

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


52817
52818
52819
# File 'lib/ovirtsdk4/types.rb', line 52817

def username=(value)
  @username = value
end