libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] Kami commented on a change in pull request #1549: Make libcloud compliant with the latest Outscale API.
Date Tue, 23 Feb 2021 17:36:40 GMT

Kami commented on a change in pull request #1549:
URL: https://github.com/apache/libcloud/pull/1549#discussion_r581245057



##########
File path: libcloud/compute/drivers/outscale.py
##########
@@ -7709,6 +7709,318 @@ def ex_list_vpn_connections(
             return response.json()["VpnConnections"]
         return response.json()
 
+    def ex_create_certificate_authority(
+        self,
+        ca_perm: str = None,
+        description: str = None,
+        dry_run: bool = False
+    ):
+        """
+        Creates a Client Certificate Authority (CA).
+
+        :param      ca_perm: The CA in PEM format. (required)
+        :type       ca_perm: ``str``
+
+        :param      description: The description of the CA.
+        :type       description: ``bool``
+
+        :param      dry_run: If true, checks whether you have the required
+        permissions to perform the action.
+        :type       dry_run: ``bool``
+        """
+        action = "CreateCa"
+        data = {"DryRun": dry_run}
+        if ca_perm is not None:
+            data.update({"CaPerm": ca_perm})
+        if description is not None:
+            data.update({"Description": description})
+        response = self._call_api(action, json.dumps(data))
+        if response.status_code == 200:
+            return response.json()["Ca"]
+        return response.json()
+
+    def ex_delete_certificate_authority(
+        self,
+        ca_id: str = None,
+        dry_run: bool = False
+    ):
+        """
+        Deletes a specified Client Certificate Authority (CA).
+
+        :param      ca_id: The ID of the CA you want to delete. (required)
+        :type       ca_id: ``str``
+
+        :param      dry_run: If true, checks whether you have the required
+        permissions to perform the action.
+        :type       dry_run: ``bool``
+        """
+        action = "DeleteCa"
+        data = {"DryRun": dry_run}
+        if ca_id is not None:
+            data.update({"CaId": ca_id})
+        response = self._call_api(action, json.dumps(data))
+        if response.status_code == 200:
+            return True
+        return response.json()
+
+    def ex_read_certificate_authorities(
+        self,
+        ca_fingerprints: List[str] = None,
+        ca_ids: List[str] = None,
+        descriptions: List[str] = None,
+        dry_run: bool = False
+    ):
+        """
+        Returns information about one or more of your Client Certificate
+        Authorities (CAs).
+
+        :param      ca_fingerprints: The fingerprints of the CAs.
+        :type       ca_fingerprints: ``list`` of ``str``
+
+        :param      ca_ids: The IDs of the CAs.
+        :type       ca_ids: ``list`` of ``str``
+
+        :param      descriptions: The descriptions of the CAs.
+        :type       descriptions: ``list`` of ``str``
+
+        :param      dry_run: If true, checks whether you have the required
+        permissions to perform the action.
+        :type       dry_run: ``bool``
+        """
+        action = "ReadCas"
+        data = {"DryRun": dry_run, "Filters": {}}
+        if ca_fingerprints is not None:

Review comment:
       Thanks for clarifying - I thought at least one filter must be provided.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message