Kaynağa Gözat

Update moto dependency for v1.0.0

With moto 1.0.0 release (https://github.com/spulec/moto/blob/master/CHANGELOG.md#100), we should move toward the boto3
support: https://github.com/01000101/cloudbridge/tree/boto3-upgrade
Enis Afgan 9 yıl önce
ebeveyn
işleme
11f1e56a00
2 değiştirilmiş dosya ile 4 ekleme ve 6 silme
  1. 3 5
      cloudbridge/cloud/providers/aws/provider.py
  2. 1 1
      setup.py

+ 3 - 5
cloudbridge/cloud/providers/aws/provider.py

@@ -1,6 +1,4 @@
-"""
-Provider implementation based on boto library for AWS-compatible clouds.
-"""
+"""Provider implementation based on boto library for AWS-compatible clouds."""
 
 import os
 
@@ -9,8 +7,8 @@ from boto.ec2.regioninfo import RegionInfo
 try:
     # These are installed only for the case of a dev instance
     from httpretty import HTTPretty
-    from moto.ec2 import mock_ec2
-    from moto.s3 import mock_s3
+    from moto import mock_ec2_deprecated as mock_ec2
+    from moto import mock_s3_deprecated as mock_s3
 except ImportError:
     # TODO: Once library logging is configured, change this
     print("[aws provider] moto library not available!")

+ 1 - 1
setup.py

@@ -25,7 +25,7 @@ openstack_reqs = ['requests<2.13.0',
                   'python-keystoneclient>=3.8.0,<=3.10.0']
 aws_reqs = ['boto>=2.38.0,<=2.46.1']
 full_reqs = base_reqs + aws_reqs + openstack_reqs
-dev_reqs = (['tox>=2.1.1', 'moto>=0.4.20', 'sphinx>=1.3.1', 'flake8>=3.3.0',
+dev_reqs = (['tox>=2.1.1', 'moto>=1.0.0', 'sphinx>=1.3.1', 'flake8>=3.3.0',
              'flake8-import-order>=0.12'] + full_reqs)
 
 setup(name='cloudbridge',