Sha256: 135593de4962e77c6051046043909d51dec5e2301550377525a2dd10f0d266eb

Contents?: true

Size: 823 Bytes

Versions: 10

Compression:

Stored size: 823 Bytes

Contents

require 'fog/openstack/models/model'

module Fog
  module Network
    class OpenStack
      class RbacPolicy < Fog::OpenStack::Model
        identity :id

        attribute :object_type
        attribute :object_id
        attribute :tenant_id
        attribute :target_tenant
        attribute :action

        def create
          requires :object_type, :object_id, :target_tenant, :action
          merge_attributes(service.create_rbac_policy(attributes).body['rbac_policy'])
          self
        end

        def update
          requires :id, :target_tenant
          merge_attributes(service.update_rbac_policy(id, attributes).body['rbac_policy'])
          self
        end

        def destroy
          requires :id
          service.delete_rbac_policy(id)
          true
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fog-openstack-0.1.15 lib/fog/network/openstack/models/rbac_policy.rb
fog-openstack-0.1.14 lib/fog/network/openstack/models/rbac_policy.rb
fog-openstack-0.1.13 lib/fog/network/openstack/models/rbac_policy.rb
fog-openstack-0.1.12 lib/fog/network/openstack/models/rbac_policy.rb
fog-openstack-0.1.11 lib/fog/network/openstack/models/rbac_policy.rb
fog-openstack-0.1.10 lib/fog/openstack/models/network/rbac_policy.rb
fog-openstack-0.1.9 lib/fog/openstack/models/network/rbac_policy.rb
fog-openstack-0.1.8 lib/fog/openstack/models/network/rbac_policy.rb
fog-openstack-0.1.7 lib/fog/openstack/models/network/rbac_policy.rb
fog-openstack-0.1.6 lib/fog/openstack/models/network/rbac_policy.rb