ocp 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b0507229bd7b92f7d2fc27c60ae35078d061b53
|
4
|
+
data.tar.gz: 454da00c47c7f07ba4f302f83cd1c4382e9fa7f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8178eada44f46e0f0704540375913e192bde15ac91e04494410a9a4f3c18949dfad7c24442bd39ea5e4c9680da203107ab0ab07479be1bade06abb92906102d4
|
7
|
+
data.tar.gz: 83c3efbe308753b3f6d9ff8b85dc3a32b1a5153affb3265e7929450fe36ea280106420d8462d5ea770da463902379e6e076725a6bfda186f63c795f69b9b87d7
|
@@ -38,32 +38,34 @@ class ResourceQuotaSpec
|
|
38
38
|
@secrets = nil
|
39
39
|
@configmaps = nil
|
40
40
|
@persistentvolumeclaims = nil
|
41
|
+
@name = nil
|
41
42
|
end
|
42
43
|
|
43
44
|
def get_hash
|
44
45
|
quota_hash = Hash.new
|
46
|
+
|
45
47
|
unless @pods.nil?
|
46
|
-
quota_hash[:pods] = @pods
|
48
|
+
quota_hash[:pods] = @pods.to_s
|
47
49
|
end
|
48
50
|
|
49
51
|
unless @replicationcontrollers.nil?
|
50
|
-
quota_hash[:replicationcontrollers] = @replicationcontrollers
|
52
|
+
quota_hash[:replicationcontrollers] = @replicationcontrollers.to_s
|
51
53
|
end
|
52
54
|
|
53
55
|
unless @services.nil?
|
54
|
-
quota_hash[:services] = @services
|
56
|
+
quota_hash[:services] = @services.to_s
|
55
57
|
end
|
56
58
|
|
57
59
|
unless @configmaps.nil?
|
58
|
-
quota_hash[:configmaps] = @configmaps
|
60
|
+
quota_hash[:configmaps] = @configmaps.to_s
|
59
61
|
end
|
60
62
|
|
61
63
|
unless @persistentvolumeclaims.nil?
|
62
|
-
quota_hash[:persistentvolumeclaims] = @persistentvolumeclaims
|
64
|
+
quota_hash[:persistentvolumeclaims] = @persistentvolumeclaims.to_s
|
63
65
|
end
|
64
66
|
|
65
67
|
unless @resourcequotas.nil?
|
66
|
-
quota_hash[:resourcequotas] = @resourcequotas
|
68
|
+
quota_hash[:resourcequotas] = @resourcequotas.to_s
|
67
69
|
end
|
68
70
|
|
69
71
|
hard_hash = {'hard' => quota_hash}
|
@@ -27,11 +27,13 @@ class ObjectMeta
|
|
27
27
|
attr_accessor :name
|
28
28
|
attr_accessor :namespace
|
29
29
|
attr_accessor :selflink
|
30
|
+
attr_accessor :resourceversion
|
30
31
|
|
31
32
|
def initialize
|
32
33
|
@name = nil
|
33
34
|
@namespace = nil
|
34
35
|
@selflink = nil
|
36
|
+
@resourceversion = nil
|
35
37
|
end
|
36
38
|
|
37
39
|
def get_hash
|
@@ -48,7 +50,9 @@ class ObjectMeta
|
|
48
50
|
metaHash[:selflink] = @selflink
|
49
51
|
end
|
50
52
|
|
51
|
-
|
53
|
+
unless @resourceversion.nil?
|
54
|
+
metaHash[:resourceVersion] = @resourceversion.to_s
|
55
|
+
end
|
52
56
|
|
53
57
|
return metaHash
|
54
58
|
end
|
@@ -36,6 +36,7 @@ class ProjectRequest < OcpApi
|
|
36
36
|
objectmeta = ObjectMeta.new
|
37
37
|
objectmeta.name = entityname
|
38
38
|
objectmeta.namespace = entityname
|
39
|
+
objectmeta.resourceversion = "1001"
|
39
40
|
body = {'displayName' => displayname,
|
40
41
|
'description' => description,
|
41
42
|
'metadata' => objectmeta.get_hash}
|
@@ -231,7 +231,7 @@ class OcpCommander
|
|
231
231
|
# Do something or c.when_called Ocp::Commands::Getoapi,
|
232
232
|
rq = ResourceQuota.new(options.name)
|
233
233
|
|
234
|
-
rq.setup_by_config_file(options.config)
|
234
|
+
rq.setup_by_config_file(options.config, options.pretty, options.debug)
|
235
235
|
resp = rq.list_resource_quotas
|
236
236
|
puts "#{resp}"
|
237
237
|
|
@@ -251,8 +251,8 @@ class OcpCommander
|
|
251
251
|
c.action do |args, options|
|
252
252
|
rq = ResourceQuota.new(options.name)
|
253
253
|
|
254
|
-
rq.setup_by_config_file(options.config)
|
255
|
-
resp = rq.create_resource_quota(options.pods,
|
254
|
+
rq.setup_by_config_file(options.config, options.pretty, options.debug)
|
255
|
+
resp = rq.create_resource_quota(options.name, options.pods,
|
256
256
|
options.replicationcontrollers, options.services,
|
257
257
|
options.configmaps, options.persistentvolumeclaims, options.resourcequotas)
|
258
258
|
puts "#{resp}"
|