libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [libcloud] 03/05: Outscale: improve ex_create_api_access_rule.
Date Fri, 26 Feb 2021 22:34:54 GMT
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

commit 39f1a551a41c1266623d0e3f33b21082c2121110
Author: Fran├žois NOUAILLE DEGORCE <francois.nouaille-degorce@outscale.com>
AuthorDate: Thu Feb 25 08:06:36 2021 +0100

    Outscale: improve ex_create_api_access_rule.
---
 libcloud/compute/drivers/outscale.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libcloud/compute/drivers/outscale.py b/libcloud/compute/drivers/outscale.py
index 6cfddc7..5a59803 100644
--- a/libcloud/compute/drivers/outscale.py
+++ b/libcloud/compute/drivers/outscale.py
@@ -7870,6 +7870,11 @@ class OutscaleNodeDriver(NodeDriver):
         :return: a dict containing the API access rule created.
         :rtype: ``dict``
         """
+
+        if not ca_ids and not ip_ranges:
+            raise ValueError(
+                "Either ca_ids or ip_ranges argument must be provided.")
+
         action = "CreateApiAccessRule"
         data = {"DryRun": dry_run}
         if description is not None:


Mime
View raw message