Class: ResourceQuotaSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/base/v1/api/ResourceQuotaSpec.rb

Overview

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contact Info: [email protected] and [email protected]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResourceQuotaSpec

Returns a new instance of ResourceQuotaSpec.



33
34
35
36
37
38
39
40
41
42
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 33

def initialize
  @pods = nil
  @replicationcontrollers = nil
  @resourcequotas = nil
  @services = nil
  @secrets = nil
  @configmaps = nil
  @persistentvolumeclaims = nil
  @name = nil
end

Instance Attribute Details

#configmapsObject

Returns the value of attribute configmaps.



30
31
32
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 30

def configmaps
  @configmaps
end

#persistentvolumeclaimsObject

Returns the value of attribute persistentvolumeclaims.



31
32
33
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 31

def persistentvolumeclaims
  @persistentvolumeclaims
end

#podsObject

Returns the value of attribute pods.



25
26
27
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 25

def pods
  @pods
end

#replicationcontrollersObject

Returns the value of attribute replicationcontrollers.



26
27
28
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 26

def replicationcontrollers
  @replicationcontrollers
end

#resourcequotasObject

Returns the value of attribute resourcequotas.



27
28
29
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 27

def resourcequotas
  @resourcequotas
end

#secretsObject

Returns the value of attribute secrets.



29
30
31
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 29

def secrets
  @secrets
end

#servicesObject

Returns the value of attribute services.



28
29
30
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 28

def services
  @services
end

Instance Method Details

#get_hashObject



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/base/v1/api/ResourceQuotaSpec.rb', line 44

def get_hash
  quota_hash = Hash.new

  unless @pods.nil?
    quota_hash[:pods] = @pods.to_s
  end

  unless @replicationcontrollers.nil?
    quota_hash[:replicationcontrollers] = @replicationcontrollers.to_s
  end

  unless @services.nil?
    quota_hash[:services] = @services.to_s
  end

  unless @configmaps.nil?
    quota_hash[:configmaps] = @configmaps.to_s
  end

  unless @persistentvolumeclaims.nil?
    quota_hash[:persistentvolumeclaims] = @persistentvolumeclaims.to_s
  end

  unless @resourcequotas.nil?
    quota_hash[:resourcequotas] = @resourcequotas.to_s
  end

  unless @secrets.nil?
    quota_hash[:secrets] = @secrets.to_s
  end

  hard_hash = {'hard' => quota_hash}
  return hard_hash

end