ocp 0.0.18 → 0.0.19

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: 6c7d7f072f9742b4e234ed7399dce39ecef5ea54
4
- data.tar.gz: 32ab8a19007008cd27f0b2e8cc179d573576a69d
3
+ metadata.gz: 92d9f0aaf8e0afcf3fce56561ad32d42ca636bc3
4
+ data.tar.gz: 7d4955bb2ddaa432c518928be922fc2a6c2ecdd3
5
5
  SHA512:
6
- metadata.gz: 55d38b7791b115ae97df28fa77eadb527132921d34b289e31041224b40581c638ce498d4ad21d93e14a8b9027b499a0eb4ef8aaac938000161bb955e308395d7
7
- data.tar.gz: 83dfa68cde32b13313aa523fd19494f72b433f9bd95b9b5c0a70ad6a8346f1d7758e959b5d3183b3fd03fc0a9d344f9c2135f1f14b66dc1e416ace14ad4e6302
6
+ metadata.gz: 26c19f0be441dedaee4145bc3bd385c037bcf11353d2874be902dd4af197f1236ed73233c82765bd03adce24071abde511228d111cdcf4345740153d6065bc09
7
+ data.tar.gz: aa55fa43567af2078da0846c60b767c7abf98ff16649510f1fc62b57914757aa5b740780e54eeb5dbacac2821cc8d15603ae54aa8d0417dd68ef7751e17c4cef
@@ -21,7 +21,7 @@
21
21
  #####################################################################################
22
22
  load 'base/v1/api/Api.rb'
23
23
  load 'base/v1/api/ResourceQuotaSpec.rb'
24
- load 'base/v1/api/ObjectMeta.rb'
24
+ load 'base/v1/core/ObjectMeta.rb'
25
25
 
26
26
  require 'json'
27
27
 
File without changes
File without changes
@@ -20,7 +20,7 @@
20
20
  #
21
21
  #####################################################################################
22
22
 
23
- load 'base/v1/ocpapi/ObjectMeta.rb'
23
+ load 'base/v1/core/ObjectMeta.rb'
24
24
  require 'json'
25
25
 
26
26
  class Project < OcpApi
@@ -20,7 +20,7 @@
20
20
  #
21
21
  #####################################################################################
22
22
 
23
- load 'base/v1/ocpapi/ObjectMeta.rb'
23
+ load 'base/v1/core/ObjectMeta.rb'
24
24
  load 'exceptions/NoObjectNameException.rb'
25
25
 
26
26
  class ProjectRequest < OcpApi
@@ -20,7 +20,8 @@
20
20
  #
21
21
  #####################################################################################
22
22
 
23
- load 'base/v1/ocpapi/ObjectReference.rb'
23
+ load 'base/v1/core/ObjectReference.rb'
24
+ load 'base/v1/core/ObjectMeta.rb'
24
25
 
25
26
  class RoleBinding < OcpApi
26
27
 
@@ -182,7 +182,7 @@ class OcpCommander
182
182
  else
183
183
  roles = RoleBinding.new(options.name)
184
184
  end
185
- roles.setup_by_config_file(options.config)
185
+ roles.setup_by_config_file(options.config, options.pretty, options.debug)
186
186
 
187
187
 
188
188
  puts "#{roles}"
@@ -199,7 +199,7 @@ class OcpCommander
199
199
  # Do something or c.when_called Ocp::Commands::Getoapi,
200
200
  roles = RoleBinding.new(options.name)
201
201
 
202
- roles.setup_by_config_file(options.config)
202
+ roles.setup_by_config_file(options.config, options.pretty, options.debug)
203
203
  resp = roles.create_role_binding(options.user, options.role)
204
204
  puts "#{resp}"
205
205
 
@@ -216,7 +216,7 @@ class OcpCommander
216
216
 
217
217
  roles = RoleBinding.new(options.name)
218
218
 
219
- roles.setup_by_config_file(options.config)
219
+ roles.setup_by_config_file(options.config, options.pretty, options.debug)
220
220
  resp = roles.update_role_binding(options.user, options.role)
221
221
  puts "#{resp}"
222
222
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Evensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2016-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -33,12 +33,11 @@ extra_rdoc_files: []
33
33
  files:
34
34
  - lib/base/Base.rb
35
35
  - lib/base/v1/api/Api.rb
36
- - lib/base/v1/api/ObjectMeta.rb
37
36
  - lib/base/v1/api/ResourceQuota.rb
38
37
  - lib/base/v1/api/ResourceQuotaSpec.rb
38
+ - lib/base/v1/core/ObjectMeta.rb
39
+ - lib/base/v1/core/ObjectReference.rb
39
40
  - lib/base/v1/ocpapi/OAuthClientAuthorization.rb
40
- - lib/base/v1/ocpapi/ObjectMeta.rb
41
- - lib/base/v1/ocpapi/ObjectReference.rb
42
41
  - lib/base/v1/ocpapi/OcpApi.rb
43
42
  - lib/base/v1/ocpapi/Policy.rb
44
43
  - lib/base/v1/ocpapi/Project.rb
@@ -1,57 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #####################################################################################
3
- # Copyright 2016 Kenneth Evensen <kenneth.evensen@redhat.com>
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
-
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- #
17
- #####################################################################################
18
- #
19
- # Contact Info: <kenneth.evensen@redhat.com> and <lester@redhat.com>
20
- #
21
- #####################################################################################
22
-
23
- require 'json'
24
-
25
- class ObjectMeta
26
-
27
- attr_accessor :name
28
- attr_accessor :namespace
29
- attr_accessor :selflink
30
-
31
- def initialize
32
- @name = nil
33
- @namespace = nil
34
- @selflink = nil
35
- end
36
-
37
- def get_hash
38
- metaHash = Hash.new
39
- unless @name.nil?
40
- metaHash[:name] = @name
41
- end
42
-
43
- unless @namespace.nil?
44
- metaHash[:namespace] = @namespace
45
- end
46
-
47
- unless @selflink.nil?
48
- metaHash[:selflink] = @selflink
49
- end
50
-
51
- return metaHash
52
- end
53
-
54
- def get_json
55
- return JSON.generate(get_hash)
56
- end
57
- end