Class: RoleBinding
- Inherits:
-
OcpApi
show all
- Defined in:
- lib/base/v1/ocpapi/RoleBinding.rb
Instance Attribute Summary
Attributes inherited from Base
#response
Instance Method Summary
collapse
Methods inherited from V1
#api_version
Methods inherited from Base
#create, #delete, #list, #setup, #setup_by_config_file, #update
Constructor Details
#initialize(namespace = nil) ⇒ RoleBinding
Returns a new instance of RoleBinding.
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/base/v1/ocpapi/RoleBinding.rb', line 28
def initialize(namespace=nil)
unless namespace.nil?
super("rolebindings",namespace)
@users = Array.new
@subjects = Array.new
@namespace = namespace
else
super("rolebindings")
end
end
|
Instance Method Details
#create_role_binding(user, role) ⇒ Object
39
40
41
42
|
# File 'lib/base/v1/ocpapi/RoleBinding.rb', line 39
def create_role_binding(user, role)
data = create(create_body(user, role))
return data
end
|
#to_s ⇒ Object
50
51
52
53
54
|
# File 'lib/base/v1/ocpapi/RoleBinding.rb', line 50
def to_s
data = nil
data = list
return data
end
|
#update_role_binding(user, role) ⇒ Object
44
45
46
47
|
# File 'lib/base/v1/ocpapi/RoleBinding.rb', line 44
def update_role_binding(user, role)
data = update(create_body(user, role), role)
return data
end
|