Class: OvirtSDK4::FencingPolicy

Inherits:
Struct
  • Object
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 = {}) ⇒ FencingPolicy

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

  • :enabled (Boolean)

    The value of attribute enabled.

  • :skip_if_connectivity_broken (SkipIfConnectivityBroken, Hash)

    The value of attribute skip_if_connectivity_broken.

  • :skip_if_gluster_bricks_up (Boolean)

    The value of attribute skip_if_gluster_bricks_up.

  • :skip_if_gluster_quorum_not_met (Boolean)

    The value of attribute skip_if_gluster_quorum_not_met.

  • :skip_if_sd_active (SkipIfSdActive, Hash)

    The value of attribute skip_if_sd_active.



4394
4395
4396
4397
4398
4399
4400
4401
# File 'lib/ovirtsdk4/types.rb', line 4394

def initialize(opts = {})
  super(opts)
  self.enabled = opts[:enabled]
  self.skip_if_connectivity_broken = opts[:skip_if_connectivity_broken]
  self.skip_if_gluster_bricks_up = opts[:skip_if_gluster_bricks_up]
  self.skip_if_gluster_quorum_not_met = opts[:skip_if_gluster_quorum_not_met]
  self.skip_if_sd_active = opts[:skip_if_sd_active]
end

Instance Method Details

#==(other) ⇒ Object

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



4406
4407
4408
4409
4410
4411
4412
4413
# File 'lib/ovirtsdk4/types.rb', line 4406

def ==(other)
  super &&
  @enabled == other.enabled &&
  @skip_if_connectivity_broken == other.skip_if_connectivity_broken &&
  @skip_if_gluster_bricks_up == other.skip_if_gluster_bricks_up &&
  @skip_if_gluster_quorum_not_met == other.skip_if_gluster_quorum_not_met &&
  @skip_if_sd_active == other.skip_if_sd_active
end

#enabledBoolean

Returns the value of the enabled attribute.

Returns:

  • (Boolean)


4277
4278
4279
# File 'lib/ovirtsdk4/types.rb', line 4277

def enabled
  @enabled
end

#enabled=(value) ⇒ Object

Sets the value of the enabled attribute.

Parameters:

  • value (Boolean)


4286
4287
4288
# File 'lib/ovirtsdk4/types.rb', line 4286

def enabled=(value)
  @enabled = value
end

#hashObject

Generates a hash value for this object.



4418
4419
4420
4421
4422
4423
4424
4425
# File 'lib/ovirtsdk4/types.rb', line 4418

def hash
  super +
  @enabled.hash +
  @skip_if_connectivity_broken.hash +
  @skip_if_gluster_bricks_up.hash +
  @skip_if_gluster_quorum_not_met.hash +
  @skip_if_sd_active.hash
end

#skip_if_connectivity_brokenSkipIfConnectivityBroken

Returns the value of the skip_if_connectivity_broken attribute.



4295
4296
4297
# File 'lib/ovirtsdk4/types.rb', line 4295

def skip_if_connectivity_broken
  @skip_if_connectivity_broken
end

#skip_if_connectivity_broken=(value) ⇒ Object

Sets the value of the skip_if_connectivity_broken attribute.

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



4308
4309
4310
4311
4312
4313
# File 'lib/ovirtsdk4/types.rb', line 4308

def skip_if_connectivity_broken=(value)
  if value.is_a?(Hash)
    value = SkipIfConnectivityBroken.new(value)
  end
  @skip_if_connectivity_broken = value
end

#skip_if_gluster_bricks_upBoolean

Returns the value of the skip_if_gluster_bricks_up attribute.

Returns:

  • (Boolean)


4320
4321
4322
# File 'lib/ovirtsdk4/types.rb', line 4320

def skip_if_gluster_bricks_up
  @skip_if_gluster_bricks_up
end

#skip_if_gluster_bricks_up=(value) ⇒ Object

Sets the value of the skip_if_gluster_bricks_up attribute.

Parameters:

  • value (Boolean)


4329
4330
4331
# File 'lib/ovirtsdk4/types.rb', line 4329

def skip_if_gluster_bricks_up=(value)
  @skip_if_gluster_bricks_up = value
end

#skip_if_gluster_quorum_not_metBoolean

Returns the value of the skip_if_gluster_quorum_not_met attribute.

Returns:

  • (Boolean)


4338
4339
4340
# File 'lib/ovirtsdk4/types.rb', line 4338

def skip_if_gluster_quorum_not_met
  @skip_if_gluster_quorum_not_met
end

#skip_if_gluster_quorum_not_met=(value) ⇒ Object

Sets the value of the skip_if_gluster_quorum_not_met attribute.

Parameters:

  • value (Boolean)


4347
4348
4349
# File 'lib/ovirtsdk4/types.rb', line 4347

def skip_if_gluster_quorum_not_met=(value)
  @skip_if_gluster_quorum_not_met = value
end

#skip_if_sd_activeSkipIfSdActive

Returns the value of the skip_if_sd_active attribute.

Returns:



4356
4357
4358
# File 'lib/ovirtsdk4/types.rb', line 4356

def skip_if_sd_active
  @skip_if_sd_active
end

#skip_if_sd_active=(value) ⇒ Object

Sets the value of the skip_if_sd_active attribute.

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



4369
4370
4371
4372
4373
4374
# File 'lib/ovirtsdk4/types.rb', line 4369

def skip_if_sd_active=(value)
  if value.is_a?(Hash)
    value = SkipIfSdActive.new(value)
  end
  @skip_if_sd_active = value
end