ocp 0.0.16 → 0.0.17
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 +4 -4
- data/lib/base/Base.rb +2 -2
- data/lib/base/v1/ocpapi/RoleBinding.rb +1 -1
- data/lib/client/OcpClient.rb +3 -0
- data/lib/commander/OcpCommander.rb +23 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea86e5351cf24e1f9b223cc420f4b20e42cc268a
|
4
|
+
data.tar.gz: aa5efac06c58092aedd49a339b4ddd15b641b62d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f821202450fdfa8eb69c8d9a3788e7905d6b40716b39266f2647f18fc5556a6f78f3714d8591c1d559076ac2554f3a7a4431ca5574c664480277db97f2f34d4a
|
7
|
+
data.tar.gz: e1576b184ae89972c5cf67cb9d0269b11c886c1698239022b1939c59350b92ab8caddbe37a50cdd3d49ea7b4b2ccaebd1a6add8c6eea4b99bb331774a2d9a5e6
|
data/lib/base/Base.rb
CHANGED
data/lib/client/OcpClient.rb
CHANGED
@@ -220,6 +220,29 @@ class OcpCommander
|
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
223
|
+
command :update_role_binding do |c|
|
224
|
+
c.syntax = 'ocp update_role_binding [options]'
|
225
|
+
c.description = 'Update a Project Roles Binding'
|
226
|
+
c.option '--name PROJECTNAME', String, 'The name of the project'
|
227
|
+
c.option '--user USERNAME', String, 'The name of the user'
|
228
|
+
c.option '--role ROLE', String, 'The role to add to the user'
|
229
|
+
c.action do |args, options|
|
230
|
+
# Do something or c.when_called Ocp::Commands::Getoapi,
|
231
|
+
ocpconfig = OcpConfig.new
|
232
|
+
ocpconfig.set_config_with_options(options)
|
233
|
+
if ocpconfig.debug
|
234
|
+
puts "Config: #{ocpconfig.inspect}"
|
235
|
+
end
|
236
|
+
|
237
|
+
roles = RoleBinding.new(options.name)
|
238
|
+
|
239
|
+
roles.setup(ocpconfig)
|
240
|
+
resp = roles.update_role_binding(options.user, options.role)
|
241
|
+
puts "#{resp}"
|
242
|
+
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
223
246
|
run!
|
224
247
|
end
|
225
248
|
|