You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2019/09/08 16:42:18 UTC

[GitHub] [libcloud] Kami commented on a change in pull request #1347: Add support for Vultr Object Storage

Kami commented on a change in pull request #1347: Add support for Vultr Object Storage
URL: https://github.com/apache/libcloud/pull/1347#discussion_r322018613
 
 

 ##########
 File path: libcloud/storage/drivers/vultr.py
 ##########
 @@ -0,0 +1,96 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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 libcloud.utils.py3 import httplib
+
+from libcloud.common.types import LibcloudError
+
+from libcloud.storage.providers import Provider
+from libcloud.storage.types import ContainerDoesNotExistError
+from libcloud.storage.types import ObjectDoesNotExistError
+from libcloud.storage.drivers.s3 import BaseS3StorageDriver, BaseS3Connection
+
+__all__ = [
+    'VultrObjectStorageDriver'
+]
+
+VULTR_OBJECT_STORAGE_US_HOST = 'ewr1.vultrobjects.com'
+
+
+class BaseVultrObjectConnection(BaseS3Connection):
+    host = VULTR_OBJECT_STORAGE_US_HOST
+
+
+class BaseVultrObjectStorageDriver(BaseS3StorageDriver):
+    type = Provider.VULTR
+    name = 'Vultr Object Storage'
+    website = 'https://www.vultr.com/products/object-storage/'
+    supports_s3_multipart_upload = False
+
+
+class VultrObjectStorageDriver(BaseVultrObjectStorageDriver):
+    connectionCls = BaseVultrObjectConnection
+
+    def get_container_cdn_url(self, container):
 
 Review comment:
   Can you please also add test cases for those three methods which are different than the ones on the base driver?

----------------------------------------------------------------
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


With regards,
Apache Git Services