Class: OvirtSDK4::Quota

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

- (Quota) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Quota 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_hard_limit_pct (Integer)

    The value of attribute cluster_hard_limit_pct.

  • :cluster_soft_limit_pct (Integer)

    The value of attribute cluster_soft_limit_pct.

  • :comment (String)

    The value of attribute comment.

  • :data_center (DataCenter, Hash)

    The value of attribute data_center.

  • :description (String)

    The value of attribute description.

  • :disks (Array<Disk>, Array<Hash>)

    The values of attribute disks.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

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

    The values of attribute permissions.

  • :quota_cluster_limits (Array<QuotaClusterLimit>, Array<Hash>)

    The values of attribute quota_cluster_limits.

  • :quota_storage_limits (Array<QuotaStorageLimit>, Array<Hash>)

    The values of attribute quota_storage_limits.

  • :storage_hard_limit_pct (Integer)

    The value of attribute storage_hard_limit_pct.

  • :storage_soft_limit_pct (Integer)

    The value of attribute storage_soft_limit_pct.

  • :users (Array<User>, Array<Hash>)

    The values of attribute users.

  • :vms (Array<Vm>, Array<Hash>)

    The values of attribute vms.



11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
# File 'lib/ovirtsdk4/types.rb', line 11996

def initialize(opts = {})
  super(opts)
  self.cluster_hard_limit_pct = opts[:cluster_hard_limit_pct]
  self.cluster_soft_limit_pct = opts[:cluster_soft_limit_pct]
  self.comment = opts[:comment]
  self.data_center = opts[:data_center]
  self.description = opts[:description]
  self.disks = opts[:disks]
  self.id = opts[:id]
  self.name = opts[:name]
  self.permissions = opts[:permissions]
  self.quota_cluster_limits = opts[:quota_cluster_limits]
  self.quota_storage_limits = opts[:quota_storage_limits]
  self.storage_hard_limit_pct = opts[:storage_hard_limit_pct]
  self.storage_soft_limit_pct = opts[:storage_soft_limit_pct]
  self.users = opts[:users]
  self.vms = opts[:vms]
end

Instance Method Details

- (Integer) cluster_hard_limit_pct

Returns the value of the cluster_hard_limit_pct attribute.

Returns:

  • (Integer)


11644
11645
11646
# File 'lib/ovirtsdk4/types.rb', line 11644

def cluster_hard_limit_pct
  return @cluster_hard_limit_pct
end

- (Object) cluster_hard_limit_pct=(value)

Sets the value of the cluster_hard_limit_pct attribute.

Parameters:

  • value (Integer)


11653
11654
11655
# File 'lib/ovirtsdk4/types.rb', line 11653

def cluster_hard_limit_pct=(value)
  @cluster_hard_limit_pct = value
end

- (Integer) cluster_soft_limit_pct

Returns the value of the cluster_soft_limit_pct attribute.

Returns:

  • (Integer)


11662
11663
11664
# File 'lib/ovirtsdk4/types.rb', line 11662

def cluster_soft_limit_pct
  return @cluster_soft_limit_pct
end

- (Object) cluster_soft_limit_pct=(value)

Sets the value of the cluster_soft_limit_pct attribute.

Parameters:

  • value (Integer)


11671
11672
11673
# File 'lib/ovirtsdk4/types.rb', line 11671

def cluster_soft_limit_pct=(value)
  @cluster_soft_limit_pct = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


11680
11681
11682
# File 'lib/ovirtsdk4/types.rb', line 11680

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


11689
11690
11691
# File 'lib/ovirtsdk4/types.rb', line 11689

def comment=(value)
  @comment = value
end

- (DataCenter) data_center

Returns the value of the data_center attribute.

Returns:



11698
11699
11700
# File 'lib/ovirtsdk4/types.rb', line 11698

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:



11711
11712
11713
11714
11715
11716
# File 'lib/ovirtsdk4/types.rb', line 11711

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)


11723
11724
11725
# File 'lib/ovirtsdk4/types.rb', line 11723

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


11732
11733
11734
# File 'lib/ovirtsdk4/types.rb', line 11732

def description=(value)
  @description = value
end

- (Array<Disk>) disks

Returns the value of the disks attribute.

Returns:



11741
11742
11743
# File 'lib/ovirtsdk4/types.rb', line 11741

def disks
  return @disks
end

- (Object) disks=(list)

Sets the value of the disks attribute.

Parameters:

  • list (Array<Disk>)


11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
# File 'lib/ovirtsdk4/types.rb', line 11749

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


11766
11767
11768
# File 'lib/ovirtsdk4/types.rb', line 11766

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


11775
11776
11777
# File 'lib/ovirtsdk4/types.rb', line 11775

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


11784
11785
11786
# File 'lib/ovirtsdk4/types.rb', line 11784

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


11793
11794
11795
# File 'lib/ovirtsdk4/types.rb', line 11793

def name=(value)
  @name = value
end

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



11802
11803
11804
# File 'lib/ovirtsdk4/types.rb', line 11802

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
# File 'lib/ovirtsdk4/types.rb', line 11810

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

- (Array<QuotaClusterLimit>) quota_cluster_limits

Returns the value of the quota_cluster_limits attribute.

Returns:



11827
11828
11829
# File 'lib/ovirtsdk4/types.rb', line 11827

def quota_cluster_limits
  return @quota_cluster_limits
end

- (Object) quota_cluster_limits=(list)

Sets the value of the quota_cluster_limits attribute.

Parameters:



11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
# File 'lib/ovirtsdk4/types.rb', line 11835

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

- (Array<QuotaStorageLimit>) quota_storage_limits

Returns the value of the quota_storage_limits attribute.

Returns:



11852
11853
11854
# File 'lib/ovirtsdk4/types.rb', line 11852

def quota_storage_limits
  return @quota_storage_limits
end

- (Object) quota_storage_limits=(list)

Sets the value of the quota_storage_limits attribute.

Parameters:



11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
# File 'lib/ovirtsdk4/types.rb', line 11860

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

- (Integer) storage_hard_limit_pct

Returns the value of the storage_hard_limit_pct attribute.

Returns:

  • (Integer)


11877
11878
11879
# File 'lib/ovirtsdk4/types.rb', line 11877

def storage_hard_limit_pct
  return @storage_hard_limit_pct
end

- (Object) storage_hard_limit_pct=(value)

Sets the value of the storage_hard_limit_pct attribute.

Parameters:

  • value (Integer)


11886
11887
11888
# File 'lib/ovirtsdk4/types.rb', line 11886

def storage_hard_limit_pct=(value)
  @storage_hard_limit_pct = value
end

- (Integer) storage_soft_limit_pct

Returns the value of the storage_soft_limit_pct attribute.

Returns:

  • (Integer)


11895
11896
11897
# File 'lib/ovirtsdk4/types.rb', line 11895

def storage_soft_limit_pct
  return @storage_soft_limit_pct
end

- (Object) storage_soft_limit_pct=(value)

Sets the value of the storage_soft_limit_pct attribute.

Parameters:

  • value (Integer)


11904
11905
11906
# File 'lib/ovirtsdk4/types.rb', line 11904

def storage_soft_limit_pct=(value)
  @storage_soft_limit_pct = value
end

- (Array<User>) users

Returns the value of the users attribute.

Returns:



11913
11914
11915
# File 'lib/ovirtsdk4/types.rb', line 11913

def users
  return @users
end

- (Object) users=(list)

Sets the value of the users attribute.

Parameters:

  • list (Array<User>)


11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
# File 'lib/ovirtsdk4/types.rb', line 11921

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

- (Array<Vm>) vms

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


11938
11939
11940
# File 'lib/ovirtsdk4/types.rb', line 11938

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
# File 'lib/ovirtsdk4/types.rb', line 11946

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