summaryrefslogtreecommitdiff
path: root/tempest_lib/services/network/floating_ips_client.py
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>2015-12-17 00:32:41 +0000
committerKen'ichi Ohmichi <ken-oomichi@wx.jp.nec.com>2015-12-17 00:38:20 +0000
commit815c89a44d662e55b7533d180c31baceef1161aa (patch)
tree2415a99584ff52ef6d1442653aacafad59814427 /tempest_lib/services/network/floating_ips_client.py
parenta2b073d51e4710bb50374e5927be6149d6f64988 (diff)
downloadtempest-lib-815c89a44d662e55b7533d180c31baceef1161aa.tar.gz
Migrated 6 network clients from tempest
This migrates the above files from tempest. This includes tempest commits: * base.py : Icf9f6fa4ea52a1fe72253391abf4880b1f8ed497 * floating_ips_client.py : Iaeabf6cb827e4153d72353dab6d1d66f0f246eb6 * metering_label_rules_client.py: Iddecde5f6f5c1ac88a18d71aab1fc26370b26ba8 * metering_labels_client.py : I3364fc9320640b875f5232c2ae5a4ae98121d821 * networks_client.py : Iff82c07bae2b1c82e5ff914ca90fcf5fc7de8daa * ports_client.py : I1248cc6132f4a2e40ad13f6177c7ecda834db57d * subnets_client.py : I52c9d099b97540440fa98343c736b894d130a07e to see the commit history for these files refer to the above Change-Ids in the tempest repository. Partially implements blueprint migrate-service-clients-to-tempest-lib Change-Id: Ic840c3697f727612dfe754948e9a5890e7f2505d
Diffstat (limited to 'tempest_lib/services/network/floating_ips_client.py')
-rw-r--r--tempest_lib/services/network/floating_ips_client.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/tempest_lib/services/network/floating_ips_client.py b/tempest_lib/services/network/floating_ips_client.py
new file mode 100644
index 0000000..2ab9d7c
--- /dev/null
+++ b/tempest_lib/services/network/floating_ips_client.py
@@ -0,0 +1,38 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from tempest_lib.services.network import base
+
+
+class FloatingIPsClient(base.BaseNetworkClient):
+
+ def create_floatingip(self, **kwargs):
+ uri = '/floatingips'
+ post_data = {'floatingip': kwargs}
+ return self.create_resource(uri, post_data)
+
+ def update_floatingip(self, floatingip_id, **kwargs):
+ uri = '/floatingips/%s' % floatingip_id
+ post_data = {'floatingip': kwargs}
+ return self.update_resource(uri, post_data)
+
+ def show_floatingip(self, floatingip_id, **fields):
+ uri = '/floatingips/%s' % floatingip_id
+ return self.show_resource(uri, **fields)
+
+ def delete_floatingip(self, floatingip_id):
+ uri = '/floatingips/%s' % floatingip_id
+ return self.delete_resource(uri)
+
+ def list_floatingips(self, **filters):
+ uri = '/floatingips'
+ return self.list_resources(uri, **filters)