You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2019/06/28 16:59:11 UTC

[libcloud] branch trunk updated: Add test

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 744b6eb  Add test
     new 6a34d68  Merge pull request #1299 from micafer/ost_fix_float_ip
744b6eb is described below

commit 744b6ebce33ed77068c06af4b1fcfe00ffebdaa2
Author: micafer <mi...@upv.es>
AuthorDate: Fri Jun 28 12:23:40 2019 +0200

    Add test
---
 .../openstack_v1.1/_v2_0__floatingips.json         | 28 ++++++++++++++++++++++
 libcloud/test/compute/test_openstack.py            |  5 ++++
 2 files changed, 33 insertions(+)

diff --git a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips.json b/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips.json
index fa71752..05ca7d0 100644
--- a/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips.json
+++ b/libcloud/test/compute/fixtures/openstack_v1.1/_v2_0__floatingips.json
@@ -47,6 +47,34 @@
             },
             "tags": ["tag1,tag2"],
             "port_forwardings": []
+        },
+        {
+            "router_id": "d23abc8d-2991-4a55-ba98-2aaea84cc72f",
+            "description": "for test",
+            "dns_domain": "my-domain.org.",
+            "dns_name": "myfip",
+            "created_at": "2016-12-21T10:55:50Z",
+            "updated_at": "2016-12-21T10:55:53Z",
+            "revision_number": 1,
+            "project_id": "4969c491a3c74ee4af974e6d800c62de",
+            "tenant_id": "4969c491a3c74ee4af974e6d800c62de",
+            "floating_network_id": "376da547-b977-4cfe-9cba-275c80debf57",
+            "fixed_ip_address": "10.0.0.4",
+            "floating_ip_address": "10.3.1.2",
+            "port_id": "ce705c24-c1ef-408a-bda3-7bbd946164ab",
+            "id": "123c5336a-0629-4694-ba30-04b0bdfa88a4",
+            "status": "ACTIVE",
+            "port_details": {
+                "status": "ACTIVE",
+                "name": "",
+                "admin_state_up": true,
+                "network_id": "02dd8479-ef26-4398-a102-d19d0a7b3a1f",
+                "device_owner": "compute:None",
+                "mac_address": "fa:16:3e:b1:3b:30",
+                "device_id": "cb4fba64-19e2-40fd-8497-f29da1b21143"
+            },
+            "tags": ["tag3"],
+            "port_forwardings": []
         }
     ]
 }
\ No newline at end of file
diff --git a/libcloud/test/compute/test_openstack.py b/libcloud/test/compute/test_openstack.py
index e954171..61072e0 100644
--- a/libcloud/test/compute/test_openstack.py
+++ b/libcloud/test/compute/test_openstack.py
@@ -1421,6 +1421,11 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
         self.assertEqual(ret[1].ip_address, '10.3.1.1')
         self.assertEqual(
             ret[1].node_id, 'fcfc96da-19e2-40fd-8497-f29da1b21143')
+        self.assertEqual(ret[2].id, '123c5336a-0629-4694-ba30-04b0bdfa88a4')
+        self.assertEqual(ret[2].pool, pool)
+        self.assertEqual(ret[2].ip_address, '10.3.1.2')
+        self.assertEqual(
+            ret[2].node_id, 'cb4fba64-19e2-40fd-8497-f29da1b21143')
 
     def test_OpenStack_2_FloatingIpPool_get_floating_ip(self):
         pool = OpenStack_2_FloatingIpPool(1, 'foo', self.driver.connection)