]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/aviator/lib/puppet/feature/aviator/openstack/compute/requests/v2/public/allocate_floating_ip.rb
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / aviator / lib / puppet / feature / aviator / openstack / compute / requests / v2 / public / allocate_floating_ip.rb
diff --git a/3rdparty/modules/aviator/lib/puppet/feature/aviator/openstack/compute/requests/v2/public/allocate_floating_ip.rb b/3rdparty/modules/aviator/lib/puppet/feature/aviator/openstack/compute/requests/v2/public/allocate_floating_ip.rb
new file mode 100644 (file)
index 0000000..92b9c5c
--- /dev/null
@@ -0,0 +1,35 @@
+module Aviator
+
+  define_request :allocate_floating_ip, :inherit => [:openstack, :common, :v2, :public, :base] do
+
+    meta :service, :compute
+
+    link 'documentation',
+         'http://docs.openstack.org/api/openstack-compute/2/content/POST_os-floating-ips-v2_AllocateFloatingIP__v2__tenant_id__os-floating-ips_ext-os-floating-ips.html'
+
+    param :pool, :required => false
+
+    def body
+      {
+        :pool => params[:pool]
+      }
+    end
+
+
+    def headers
+      super
+    end
+
+
+    def http_method
+      :post
+    end
+
+
+    def url
+      "#{ base_url }/os-floating-ips"
+    end
+
+  end
+
+end