]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/aviator/lib/puppet/feature/aviator/openstack/identity/requests/v2/admin/create_tenant.rb
add aimonb/aviator to 3rdparty
[dsa-puppet.git] / 3rdparty / modules / aviator / lib / puppet / feature / aviator / openstack / identity / requests / v2 / admin / create_tenant.rb
1 module Aviator
2
3   define_request :create_tenant, :inherit => [:openstack, :common, :v2, :admin, :base] do
4
5     meta :service, :identity
6
7     link 'documentation',
8          'http://docs.openstack.org/api/openstack-identity-service/2.0/content/'
9
10
11     param :name,        :required => true
12     param :description, :required => true
13     param :enabled,     :required => true
14
15
16     def body
17       {
18         :tenant => {
19           :name        => params[:name],
20           :description => params[:description],
21           :enabled     => params[:enabled]
22         }
23       }
24     end
25
26
27     def headers
28       super
29     end
30
31
32     def http_method
33       :post
34     end
35
36
37     def url
38       "#{ base_url }/tenants"
39     end
40
41   end
42
43 end