1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/openstack/models/identity/role.rb

26 lines
518 B
Ruby
Raw Normal View History

2012-02-22 09:40:32 -05:00
require 'fog/core/model'
module Fog
module Identity
class OpenStack
class Role < Fog::Model
identity :id
attribute :name
2012-02-24 06:38:05 -05:00
attribute :description
def save
requires :name
data = connection.create_role(name)
merge_attributes(data.body['role'])
true
end
def destroy
connection.delete_role(id)
true
end
2012-02-22 09:40:32 -05:00
end # class Role
end # class OpenStack
end # module Identity
end # module Fog