cloudbridge 3.2.0__tar.gz → 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. cloudbridge-4.0.0/PKG-INFO +231 -0
  2. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/README.rst +24 -24
  3. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/__init__.py +2 -10
  4. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/base/helpers.py +3 -16
  5. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/base/middleware.py +4 -12
  6. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/base/provider.py +1 -9
  7. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/base/resources.py +1 -3
  8. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/azure/azure_client.py +118 -83
  9. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/azure/helpers.py +18 -0
  10. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/azure/provider.py +41 -30
  11. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/azure/resources.py +30 -30
  12. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/azure/services.py +111 -100
  13. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/gcp/helpers.py +5 -10
  14. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/gcp/provider.py +11 -2
  15. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/mock/provider.py +4 -12
  16. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/openstack/resources.py +78 -24
  17. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/openstack/services.py +15 -5
  18. cloudbridge-4.0.0/cloudbridge.egg-info/PKG-INFO +231 -0
  19. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge.egg-info/SOURCES.txt +2 -5
  20. cloudbridge-4.0.0/cloudbridge.egg-info/requires.txt +44 -0
  21. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge.egg-info/top_level.txt +0 -1
  22. cloudbridge-4.0.0/pyproject.toml +109 -0
  23. cloudbridge-4.0.0/setup.cfg +8 -0
  24. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_block_store_service.py +4 -6
  25. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_cloud_helpers.py +1 -3
  26. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_compute_service.py +13 -6
  27. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_region_service.py +1 -3
  28. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_vm_types_service.py +3 -5
  29. cloudbridge-3.2.0/PKG-INFO +0 -98
  30. cloudbridge-3.2.0/cloudbridge.egg-info/PKG-INFO +0 -98
  31. cloudbridge-3.2.0/cloudbridge.egg-info/requires.txt +0 -80
  32. cloudbridge-3.2.0/setup.cfg +0 -19
  33. cloudbridge-3.2.0/setup.py +0 -104
  34. cloudbridge-3.2.0/tests/__init__.py +0 -4
  35. cloudbridge-3.2.0/tests/helpers/__init__.py +0 -281
  36. cloudbridge-3.2.0/tests/helpers/standard_interface_tests.py +0 -355
  37. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/LICENSE +0 -0
  38. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/base/__init__.py +0 -0
  39. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/base/services.py +0 -0
  40. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/base/subservices.py +0 -0
  41. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/factory.py +0 -0
  42. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/interfaces/__init__.py +0 -0
  43. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/interfaces/exceptions.py +0 -0
  44. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/interfaces/provider.py +0 -0
  45. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/interfaces/resources.py +0 -0
  46. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/interfaces/services.py +0 -0
  47. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/interfaces/subservices.py +0 -0
  48. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/__init__.py +0 -0
  49. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/aws/__init__.py +0 -0
  50. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/aws/helpers.py +0 -0
  51. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/aws/provider.py +0 -0
  52. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/aws/resources.py +0 -0
  53. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/aws/services.py +0 -0
  54. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/aws/subservices.py +0 -0
  55. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/azure/__init__.py +0 -0
  56. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/azure/subservices.py +0 -0
  57. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/gcp/__init__.py +0 -0
  58. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/gcp/resources.py +0 -0
  59. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/gcp/services.py +0 -0
  60. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/gcp/subservices.py +0 -0
  61. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/mock/__init__.py +0 -0
  62. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/openstack/__init__.py +0 -0
  63. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/openstack/helpers.py +0 -0
  64. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/openstack/provider.py +0 -0
  65. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge/providers/openstack/subservices.py +0 -0
  66. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/cloudbridge.egg-info/dependency_links.txt +0 -0
  67. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_base_helpers.py +0 -0
  68. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_cloud_factory.py +0 -0
  69. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_dns_service.py +0 -0
  70. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_image_service.py +0 -0
  71. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_interface.py +0 -0
  72. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_middleware_system.py +0 -0
  73. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_network_service.py +0 -0
  74. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_object_life_cycle.py +0 -0
  75. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_object_store_service.py +0 -0
  76. {cloudbridge-3.2.0 → cloudbridge-4.0.0}/tests/test_security_service.py +0 -0
@@ -0,0 +1,231 @@
1
+ Metadata-Version: 2.4
2
+ Name: cloudbridge
3
+ Version: 4.0.0
4
+ Summary: A simple layer of abstraction over multiple cloud providers.
5
+ Author-email: Galaxy and GVL Projects <help@genome.edu.au>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, http://cloudbridge.cloudve.org/
8
+ Project-URL: Source, https://github.com/CloudVE/cloudbridge
9
+ Project-URL: Issues, https://github.com/CloudVE/cloudbridge/issues
10
+ Keywords: cloud,aws,azure,gcp,openstack,iaas
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: Implementation :: CPython
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.13
22
+ Description-Content-Type: text/x-rst
23
+ License-File: LICENSE
24
+ Requires-Dist: tenacity>=6.0
25
+ Requires-Dist: deprecation>=2.0.7
26
+ Requires-Dist: pyeventsystem<2
27
+ Provides-Extra: aws
28
+ Requires-Dist: boto3<2.0.0,>=1.9.86; extra == "aws"
29
+ Provides-Extra: azure
30
+ Requires-Dist: azure-identity<2.0.0,>=1.20.0; extra == "azure"
31
+ Requires-Dist: azure-common<2.0.0,>=1.1.28; extra == "azure"
32
+ Requires-Dist: azure-core<2.0.0,>=1.30.0; extra == "azure"
33
+ Requires-Dist: azure-mgmt-devtestlabs<10.0.0,>=9.0.0; extra == "azure"
34
+ Requires-Dist: azure-mgmt-resource<26.0.0,>=23.0.0; extra == "azure"
35
+ Requires-Dist: azure-mgmt-subscription<4.0.0,>=3.0.0; extra == "azure"
36
+ Requires-Dist: azure-mgmt-compute<39.0.0,>=34.0.0; extra == "azure"
37
+ Requires-Dist: azure-mgmt-network<31.0.0,>=28.0.0; extra == "azure"
38
+ Requires-Dist: azure-mgmt-storage<25.0.0,>=22.0.0; extra == "azure"
39
+ Requires-Dist: azure-storage-blob<13.0.0,>=12.20.0; extra == "azure"
40
+ Requires-Dist: azure-data-tables<13.0.0,>=12.4.0; extra == "azure"
41
+ Requires-Dist: paramiko<6.0.0; extra == "azure"
42
+ Provides-Extra: gcp
43
+ Requires-Dist: google-api-python-client<3.0.0,>=2.0; extra == "gcp"
44
+ Provides-Extra: openstack
45
+ Requires-Dist: openstacksdk<5.0.0,>=3.0.0; extra == "openstack"
46
+ Requires-Dist: python-novaclient<20.0,>=17.0.0; extra == "openstack"
47
+ Requires-Dist: python-swiftclient<5.0,>=4.0.0; extra == "openstack"
48
+ Requires-Dist: python-neutronclient<13.0,>=11.0.0; extra == "openstack"
49
+ Requires-Dist: python-keystoneclient<7.0,>=4.0.0; extra == "openstack"
50
+ Provides-Extra: full
51
+ Requires-Dist: cloudbridge[aws,azure,gcp,openstack]; extra == "full"
52
+ Provides-Extra: dev
53
+ Requires-Dist: cloudbridge[full]; extra == "dev"
54
+ Requires-Dist: tox>=4.0.0; extra == "dev"
55
+ Requires-Dist: pytest; extra == "dev"
56
+ Requires-Dist: moto[ec2,s3]>=5.0.0; extra == "dev"
57
+ Requires-Dist: packaging; extra == "dev"
58
+ Requires-Dist: sphinx>=1.3.1; extra == "dev"
59
+ Requires-Dist: pydevd; extra == "dev"
60
+ Requires-Dist: flake8>=3.3.0; extra == "dev"
61
+ Requires-Dist: flake8-import-order>=0.12; extra == "dev"
62
+ Dynamic: license-file
63
+
64
+ CloudBridge provides a consistent layer of abstraction over different
65
+ Infrastructure-as-a-Service cloud providers, reducing or eliminating the need
66
+ to write conditional code for each cloud.
67
+
68
+ Documentation
69
+ ~~~~~~~~~~~~~
70
+ Detailed documentation can be found at http://cloudbridge.cloudve.org.
71
+
72
+
73
+ Build Status Tests
74
+ ~~~~~~~~~~~~~~~~~~
75
+ .. image:: https://github.com/CloudVE/cloudbridge/actions/workflows/integration.yaml/badge.svg
76
+ :target: https://github.com/CloudVE/cloudbridge/actions/
77
+ :alt: Integration Tests
78
+
79
+ .. image:: https://codecov.io/gh/CloudVE/cloudbridge/graph/badge.svg?token=w0LAfAIVdd
80
+ :target: https://codecov.io/gh/CloudVE/cloudbridge
81
+ :alt: Code Coverage
82
+
83
+ .. image:: https://img.shields.io/pypi/v/cloudbridge.svg
84
+ :target: https://pypi.python.org/pypi/cloudbridge/
85
+ :alt: latest version available on PyPI
86
+
87
+ .. image:: https://readthedocs.org/projects/cloudbridge/badge/?version=latest
88
+ :target: http://cloudbridge.readthedocs.org/en/latest/?badge=latest
89
+ :alt: Documentation Status
90
+
91
+ .. image:: https://img.shields.io/pypi/dm/cloudbridge
92
+ :target: https://pypistats.org/packages/cloudbridge
93
+ :alt: Download stats
94
+
95
+ .. |aws-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_aws.json
96
+ :target: https://github.com/CloudVE/cloudbridge/actions/
97
+
98
+ .. |azure-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_azure.json
99
+ :target: https://github.com/CloudVE/cloudbridge/actions/
100
+
101
+ .. |gcp-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_gcp.json
102
+ :target: https://github.com/CloudVE/cloudbridge/actions/
103
+
104
+ .. |mock-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_mock.json
105
+ :target: https://github.com/CloudVE/cloudbridge/actions/
106
+
107
+ .. |os-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_openstack.json
108
+ :target: https://github.com/CloudVE/cloudbridge/actions/
109
+
110
+ +---------------------------+-----------------+
111
+ | **Provider/Environment** | **Python 3.13** |
112
+ +---------------------------+-----------------+
113
+ | **Amazon Web Services** | |aws-py313| |
114
+ +---------------------------+-----------------+
115
+ | **Google Cloud Platform** | |gcp-py313| |
116
+ +---------------------------+-----------------+
117
+ | **Microsoft Azure** | |azure-py313| |
118
+ +---------------------------+-----------------+
119
+ | **OpenStack** | |os-py313| |
120
+ +---------------------------+-----------------+
121
+ | **Mock Provider** | |mock-py313| |
122
+ +---------------------------+-----------------+
123
+
124
+ Installation
125
+ ~~~~~~~~~~~~
126
+ Install the latest release from PyPi:
127
+
128
+ .. code-block:: shell
129
+
130
+ pip install cloudbridge[full]
131
+
132
+ For other installation options, see the `installation page`_ in
133
+ the documentation.
134
+
135
+
136
+ Usage example
137
+ ~~~~~~~~~~~~~
138
+
139
+ To `get started`_ with CloudBridge, export your cloud access credentials
140
+ (e.g., AWS_ACCESS_KEY and AWS_SECRET_KEY for your AWS credentials) and start
141
+ exploring the API:
142
+
143
+ .. code-block:: python
144
+
145
+ from cloudbridge.factory import CloudProviderFactory, ProviderList
146
+
147
+ provider = CloudProviderFactory().create_provider(ProviderList.AWS, {})
148
+ print(provider.security.key_pairs.list())
149
+
150
+ The exact same command (as well as any other CloudBridge method) will run with
151
+ any of the supported providers: ``ProviderList.[AWS | AZURE | GCP | OPENSTACK]``!
152
+
153
+
154
+ Citation
155
+ ~~~~~~~~
156
+
157
+ N. Goonasekera, A. Lonie, J. Taylor, and E. Afgan,
158
+ "CloudBridge: a Simple Cross-Cloud Python Library,"
159
+ presented at the Proceedings of the XSEDE16 Conference on Diversity, Big Data, and Science at Scale, Miami, USA, 2016.
160
+ DOI: http://dx.doi.org/10.1145/2949550.2949648
161
+
162
+
163
+ Quick Reference
164
+ ~~~~~~~~~~~~~~~
165
+ The following object graph shows how to access various provider services, and the resource
166
+ that they return.
167
+
168
+ .. image:: http://cloudbridge.readthedocs.org/en/latest/_images/object_relationships_detailed.svg
169
+ :target: http://cloudbridge.readthedocs.org/en/latest/?badge=latest#quick-reference
170
+ :alt: CloudBridge Quick Reference
171
+
172
+
173
+ Design Goals
174
+ ~~~~~~~~~~~~
175
+
176
+ 1. Create a cloud abstraction layer which minimises or eliminates the need for
177
+ cloud specific special casing (i.e., Not require clients to write
178
+ ``if EC2 do x else if OPENSTACK do y``.)
179
+
180
+ 2. Have a suite of conformance tests which are comprehensive enough that goal
181
+ 1 can be achieved. This would also mean that clients need not manually test
182
+ against each provider to make sure their application is compatible.
183
+
184
+ 3. Opt for a minimum set of features that a cloud provider will support,
185
+ instead of a lowest common denominator approach. This means that reasonably
186
+ mature clouds like Amazon and OpenStack are used as the benchmark against
187
+ which functionality & features are determined. Therefore, there is a
188
+ definite expectation that the cloud infrastructure will support a compute
189
+ service with support for images and snapshots and various machine sizes.
190
+ The cloud infrastructure will very likely support block storage, although
191
+ this is currently optional. It may optionally support object storage.
192
+
193
+ 4. Make the CloudBridge layer as thin as possible without compromising goal 1.
194
+ By wrapping the cloud provider's native SDK and doing the minimal work
195
+ necessary to adapt the interface, we can achieve greater development speed
196
+ and reliability since the native provider SDK is most likely to have both
197
+ properties.
198
+
199
+
200
+ Contributing
201
+ ~~~~~~~~~~~~
202
+ Community contributions for any part of the project are welcome. If you have
203
+ a completely new idea or would like to bounce your idea before moving forward
204
+ with the implementation, feel free to create an issue to start a discussion.
205
+
206
+ Contributions should come in the form of a pull request. We strive for 100% test
207
+ coverage so code will only be accepted if it comes with appropriate tests and it
208
+ does not break existing functionality. Further, the code needs to be well
209
+ documented and all methods have docstrings. We are largely adhering to the
210
+ `PEP8 style guide`_ with 80 character lines, 4-space indentation (spaces
211
+ instead of tabs), explicit, one-per-line imports among others. Please keep the
212
+ style consistent with the rest of the project.
213
+
214
+ Conceptually, the library is laid out such that there is a factory used to
215
+ create a reference to a cloud provider. Each provider offers a set of services
216
+ and resources. Services typically perform actions while resources offer
217
+ information (and can act on itself, when appropriate). The structure of each
218
+ object is defined via an abstract interface (see
219
+ ``cloudbridge/providers/interfaces``) and any object should implement the
220
+ defined interface. If adding a completely new provider, take a look at the
221
+ `provider development page`_ in the documentation.
222
+
223
+
224
+ .. _`installation page`: http://cloudbridge.readthedocs.org/en/
225
+ latest/topics/install.html
226
+ .. _`get started`: http://cloudbridge.readthedocs.org/en/latest/
227
+ getting_started.html
228
+ .. _`PEP8 style guide`: https://www.python.org/dev/peps/pep-0008/
229
+ .. _`provider development page`: http://cloudbridge.readthedocs.org/
230
+ en/latest/
231
+ topics/provider_development.html
@@ -13,7 +13,7 @@ Build Status Tests
13
13
  :target: https://github.com/CloudVE/cloudbridge/actions/
14
14
  :alt: Integration Tests
15
15
 
16
- .. image:: https://codecov.io/gh/CloudVE/cloudbridge/branch/main/graph/badge.svg
16
+ .. image:: https://codecov.io/gh/CloudVE/cloudbridge/graph/badge.svg?token=w0LAfAIVdd
17
17
  :target: https://codecov.io/gh/CloudVE/cloudbridge
18
18
  :alt: Code Coverage
19
19
 
@@ -29,34 +29,34 @@ Build Status Tests
29
29
  :target: https://pypistats.org/packages/cloudbridge
30
30
  :alt: Download stats
31
31
 
32
- .. |aws-py38| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.8_aws.json
33
- :target: https://github.com/CloudVE/cloudbridge/actions/
32
+ .. |aws-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_aws.json
33
+ :target: https://github.com/CloudVE/cloudbridge/actions/
34
34
 
35
- .. |azure-py38| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.8_azure.json
36
- :target: https://github.com/CloudVE/cloudbridge/actions/
35
+ .. |azure-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_azure.json
36
+ :target: https://github.com/CloudVE/cloudbridge/actions/
37
37
 
38
- .. |gcp-py38| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.8_gcp.json
39
- :target: https://github.com/CloudVE/cloudbridge/actions/
38
+ .. |gcp-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_gcp.json
39
+ :target: https://github.com/CloudVE/cloudbridge/actions/
40
+
41
+ .. |mock-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_mock.json
42
+ :target: https://github.com/CloudVE/cloudbridge/actions/
40
43
 
41
- .. |mock-py38| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.8_mock.json
44
+ .. |os-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_openstack.json
42
45
  :target: https://github.com/CloudVE/cloudbridge/actions/
43
46
 
44
- .. |os-py38| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.8_openstack.json
45
- :target: https://github.com/CloudVE/cloudbridge/actions/
46
-
47
- +---------------------------+----------------+
48
- | **Provider/Environment** | **Python 3.8** |
49
- +---------------------------+----------------+
50
- | **Amazon Web Services** | |aws-py38| |
51
- +---------------------------+----------------+
52
- | **Google Cloud Platform** | |gcp-py38| |
53
- +---------------------------+----------------+
54
- | **Microsoft Azure** | |azure-py38| |
55
- +---------------------------+----------------+
56
- | **OpenStack** | |os-py38| |
57
- +---------------------------+----------------+
58
- | **Mock Provider** | |mock-py38| |
59
- +---------------------------+----------------+
47
+ +---------------------------+-----------------+
48
+ | **Provider/Environment** | **Python 3.13** |
49
+ +---------------------------+-----------------+
50
+ | **Amazon Web Services** | |aws-py313| |
51
+ +---------------------------+-----------------+
52
+ | **Google Cloud Platform** | |gcp-py313| |
53
+ +---------------------------+-----------------+
54
+ | **Microsoft Azure** | |azure-py313| |
55
+ +---------------------------+-----------------+
56
+ | **OpenStack** | |os-py313| |
57
+ +---------------------------+-----------------+
58
+ | **Mock Provider** | |mock-py313| |
59
+ +---------------------------+-----------------+
60
60
 
61
61
  Installation
62
62
  ~~~~~~~~~~~~
@@ -2,7 +2,7 @@
2
2
  import logging
3
3
 
4
4
  # Current version of the library
5
- __version__ = '3.2.0'
5
+ __version__ = '4.0.0'
6
6
 
7
7
 
8
8
  def get_version():
@@ -25,14 +25,6 @@ def init_logging():
25
25
  set_stream_logger(__name__, level=logging.DEBUG)
26
26
 
27
27
 
28
- class NullHandler(logging.Handler):
29
- """A null handler for the logger."""
30
-
31
- def emit(self, record):
32
- """Don't emit a log."""
33
- pass
34
-
35
-
36
28
  TRACE = 5 # Lower than debug which is 10
37
29
 
38
30
 
@@ -58,7 +50,7 @@ default_format_string = "%(asctime)s [%(levelname)s] %(name)s: %(message)s"
58
50
  logging.setLoggerClass(CBLogger)
59
51
  logging.addLevelName(TRACE, "TRACE")
60
52
  log = logging.getLogger('cloudbridge')
61
- log.addHandler(NullHandler())
53
+ log.addHandler(logging.NullHandler())
62
54
 
63
55
  # Convenience functions to set logging to a particular file or stream
64
56
  # To enable either of these by default within CloudBridge, add the following
@@ -3,7 +3,6 @@ import functools
3
3
  import logging
4
4
  import os
5
5
  import re
6
- import sys
7
6
  from contextlib import contextmanager
8
7
 
9
8
  from cryptography.hazmat.backends import default_backend
@@ -12,8 +11,6 @@ from cryptography.hazmat.primitives.asymmetric import rsa
12
11
 
13
12
  from deprecation import deprecated
14
13
 
15
- import six
16
-
17
14
  import cloudbridge
18
15
 
19
16
  from ..interfaces.exceptions import InvalidParamException
@@ -50,7 +47,7 @@ def filter_by(prop_name, kwargs, objs):
50
47
  """
51
48
  prop_val = kwargs.pop(prop_name, None)
52
49
  if prop_val:
53
- if isinstance(prop_val, six.string_types):
50
+ if isinstance(prop_val, str):
54
51
  regex = fnmatch.translate(prop_val)
55
52
  results = [o for o in objs
56
53
  if getattr(o, prop_name)
@@ -101,12 +98,11 @@ def cleanup_action(cleanup_func):
101
98
  try:
102
99
  yield
103
100
  except Exception:
104
- ex_class, ex_val, ex_traceback = sys.exc_info()
105
101
  try:
106
102
  cleanup_func()
107
103
  except Exception:
108
104
  log.exception("Error during exception cleanup: ")
109
- six.reraise(ex_class, ex_val, ex_traceback)
105
+ raise
110
106
  try:
111
107
  cleanup_func()
112
108
  except Exception:
@@ -117,11 +113,6 @@ def get_env(varname, default_value=None):
117
113
  """
118
114
  Return the value of the environment variable or default_value.
119
115
 
120
- This is a helper method that wraps ``os.environ.get`` to ensure type
121
- compatibility across py2 and py3. For py2, any value obtained from an
122
- environment variable, ensure ``unicode`` type and ``str`` for py3. The
123
- casting is done only for string variables.
124
-
125
116
  :type varname: ``str``
126
117
  :param varname: Name of the environment variable for which to check.
127
118
 
@@ -131,11 +122,7 @@ def get_env(varname, default_value=None):
131
122
  :return: Value of the supplied environment if found; value of
132
123
  ``default_value`` otherwise.
133
124
  """
134
- value = os.environ.get(varname, default_value)
135
- if isinstance(value, six.string_types) and not isinstance(
136
- value, six.text_type):
137
- return six.u(value)
138
- return value
125
+ return os.environ.get(varname, default_value)
139
126
 
140
127
 
141
128
  # Alias deprecation decorator, following:
@@ -1,12 +1,9 @@
1
1
  import logging
2
- import sys
3
2
 
4
3
  from pyeventsystem.middleware import dispatch as pyevent_dispatch
5
4
  from pyeventsystem.middleware import intercept
6
5
  from pyeventsystem.middleware import observe
7
6
 
8
- import six
9
-
10
7
  from ..interfaces.exceptions import CloudBridgeBaseException
11
8
 
12
9
  log = logging.getLogger(__name__)
@@ -46,12 +43,7 @@ class ExceptionWrappingMiddleware(object):
46
43
  except Exception as e:
47
44
  if isinstance(e, CloudBridgeBaseException):
48
45
  raise
49
- else:
50
- ex_type, ex_value, traceback = sys.exc_info()
51
- cb_ex = CloudBridgeBaseException(
52
- "CloudBridgeBaseException: {0} from exception type: {1}"
53
- .format(ex_value, ex_type))
54
- if sys.version_info >= (3, 0):
55
- six.raise_from(cb_ex, e)
56
- else:
57
- six.reraise(CloudBridgeBaseException, cb_ex, traceback)
46
+ cb_ex = CloudBridgeBaseException(
47
+ "CloudBridgeBaseException: {0} from exception type: {1}"
48
+ .format(e, type(e)))
49
+ raise cb_ex from e
@@ -3,16 +3,11 @@ import ast
3
3
  import functools
4
4
  import logging
5
5
  import os
6
+ from configparser import ConfigParser
6
7
  from os.path import expanduser
7
- try:
8
- from configparser import ConfigParser
9
- except ImportError: # Python 2
10
- from ConfigParser import SafeConfigParser as ConfigParser
11
8
 
12
9
  from pyeventsystem.middleware import SimpleMiddlewareManager
13
10
 
14
- import six
15
-
16
11
  from ..base.middleware import ExceptionWrappingMiddleware
17
12
  from ..interfaces import CloudProvider
18
13
  from ..interfaces.exceptions import ProviderConnectionException
@@ -206,7 +201,4 @@ class BaseCloudProvider(CloudProvider):
206
201
  elif (self._config_parser.has_option(self.PROVIDER_ID, key) and
207
202
  self._config_parser.get(self.PROVIDER_ID, key)):
208
203
  value = self._config_parser.get(self.PROVIDER_ID, key)
209
- if isinstance(value, six.string_types) and not isinstance(
210
- value, six.text_type):
211
- return six.u(value)
212
204
  return value
@@ -10,8 +10,6 @@ import shutil
10
10
  import time
11
11
  import uuid
12
12
 
13
- import six
14
-
15
13
  from cloudbridge.interfaces.exceptions import \
16
14
  InvalidConfigurationException
17
15
  from cloudbridge.interfaces.exceptions import InvalidLabelException
@@ -378,7 +376,7 @@ class BaseLaunchConfig(LaunchConfig):
378
376
  raise InvalidConfigurationException(
379
377
  "Source must be a Snapshot, Volume, MachineImage, or None.")
380
378
  if size:
381
- if not isinstance(size, six.integer_types) or not size > 0:
379
+ if not isinstance(size, int) or not size > 0:
382
380
  log.exception("InvalidConfigurationException raised: "
383
381
  "size argument must be an integer greater than "
384
382
  "0. Got type %s and value %s.", type(size), size)