cloudbridge 3.2.0__tar.gz → 4.1.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.1.0/PKG-INFO +232 -0
  2. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/README.rst +24 -24
  3. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/__init__.py +2 -10
  4. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/base/helpers.py +3 -16
  5. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/base/middleware.py +4 -12
  6. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/base/provider.py +1 -9
  7. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/base/resources.py +1 -3
  8. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/azure/azure_client.py +175 -84
  9. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/azure/helpers.py +18 -0
  10. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/azure/provider.py +44 -31
  11. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/azure/resources.py +146 -31
  12. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/azure/services.py +310 -108
  13. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/azure/subservices.py +7 -0
  14. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/gcp/helpers.py +5 -10
  15. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/gcp/provider.py +11 -2
  16. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/mock/provider.py +4 -12
  17. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/openstack/resources.py +78 -24
  18. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/openstack/services.py +15 -5
  19. cloudbridge-4.1.0/cloudbridge.egg-info/PKG-INFO +232 -0
  20. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge.egg-info/SOURCES.txt +2 -5
  21. cloudbridge-4.1.0/cloudbridge.egg-info/requires.txt +45 -0
  22. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge.egg-info/top_level.txt +0 -1
  23. cloudbridge-4.1.0/pyproject.toml +110 -0
  24. cloudbridge-4.1.0/setup.cfg +8 -0
  25. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_block_store_service.py +4 -6
  26. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_cloud_helpers.py +1 -3
  27. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_compute_service.py +13 -6
  28. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_region_service.py +1 -3
  29. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_vm_types_service.py +3 -5
  30. cloudbridge-3.2.0/PKG-INFO +0 -98
  31. cloudbridge-3.2.0/cloudbridge.egg-info/PKG-INFO +0 -98
  32. cloudbridge-3.2.0/cloudbridge.egg-info/requires.txt +0 -80
  33. cloudbridge-3.2.0/setup.cfg +0 -19
  34. cloudbridge-3.2.0/setup.py +0 -104
  35. cloudbridge-3.2.0/tests/__init__.py +0 -4
  36. cloudbridge-3.2.0/tests/helpers/__init__.py +0 -281
  37. cloudbridge-3.2.0/tests/helpers/standard_interface_tests.py +0 -355
  38. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/LICENSE +0 -0
  39. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/base/__init__.py +0 -0
  40. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/base/services.py +0 -0
  41. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/base/subservices.py +0 -0
  42. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/factory.py +0 -0
  43. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/interfaces/__init__.py +0 -0
  44. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/interfaces/exceptions.py +0 -0
  45. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/interfaces/provider.py +0 -0
  46. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/interfaces/resources.py +0 -0
  47. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/interfaces/services.py +0 -0
  48. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/interfaces/subservices.py +0 -0
  49. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/__init__.py +0 -0
  50. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/aws/__init__.py +0 -0
  51. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/aws/helpers.py +0 -0
  52. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/aws/provider.py +0 -0
  53. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/aws/resources.py +0 -0
  54. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/aws/services.py +0 -0
  55. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/aws/subservices.py +0 -0
  56. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/azure/__init__.py +0 -0
  57. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/gcp/__init__.py +0 -0
  58. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/gcp/resources.py +0 -0
  59. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/gcp/services.py +0 -0
  60. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/gcp/subservices.py +0 -0
  61. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/mock/__init__.py +0 -0
  62. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/openstack/__init__.py +0 -0
  63. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/openstack/helpers.py +0 -0
  64. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/openstack/provider.py +0 -0
  65. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge/providers/openstack/subservices.py +0 -0
  66. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/cloudbridge.egg-info/dependency_links.txt +0 -0
  67. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_base_helpers.py +0 -0
  68. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_cloud_factory.py +0 -0
  69. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_dns_service.py +0 -0
  70. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_image_service.py +0 -0
  71. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_interface.py +0 -0
  72. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_middleware_system.py +0 -0
  73. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_network_service.py +0 -0
  74. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_object_life_cycle.py +0 -0
  75. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_object_store_service.py +0 -0
  76. {cloudbridge-3.2.0 → cloudbridge-4.1.0}/tests/test_security_service.py +0 -0
@@ -0,0 +1,232 @@
1
+ Metadata-Version: 2.4
2
+ Name: cloudbridge
3
+ Version: 4.1.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-dns<10.0.0,>=9.0.0; extra == "azure"
38
+ Requires-Dist: azure-mgmt-network<31.0.0,>=28.0.0; extra == "azure"
39
+ Requires-Dist: azure-mgmt-storage<25.0.0,>=22.0.0; extra == "azure"
40
+ Requires-Dist: azure-storage-blob<13.0.0,>=12.20.0; extra == "azure"
41
+ Requires-Dist: azure-data-tables<13.0.0,>=12.4.0; extra == "azure"
42
+ Requires-Dist: paramiko<6.0.0; extra == "azure"
43
+ Provides-Extra: gcp
44
+ Requires-Dist: google-api-python-client<3.0.0,>=2.0; extra == "gcp"
45
+ Provides-Extra: openstack
46
+ Requires-Dist: openstacksdk<5.0.0,>=3.0.0; extra == "openstack"
47
+ Requires-Dist: python-novaclient<20.0,>=17.0.0; extra == "openstack"
48
+ Requires-Dist: python-swiftclient<5.0,>=4.0.0; extra == "openstack"
49
+ Requires-Dist: python-neutronclient<13.0,>=11.0.0; extra == "openstack"
50
+ Requires-Dist: python-keystoneclient<7.0,>=4.0.0; extra == "openstack"
51
+ Provides-Extra: full
52
+ Requires-Dist: cloudbridge[aws,azure,gcp,openstack]; extra == "full"
53
+ Provides-Extra: dev
54
+ Requires-Dist: cloudbridge[full]; extra == "dev"
55
+ Requires-Dist: tox>=4.0.0; extra == "dev"
56
+ Requires-Dist: pytest; extra == "dev"
57
+ Requires-Dist: moto[ec2,s3]>=5.0.0; extra == "dev"
58
+ Requires-Dist: packaging; extra == "dev"
59
+ Requires-Dist: sphinx>=1.3.1; extra == "dev"
60
+ Requires-Dist: pydevd; extra == "dev"
61
+ Requires-Dist: flake8>=3.3.0; extra == "dev"
62
+ Requires-Dist: flake8-import-order>=0.12; extra == "dev"
63
+ Dynamic: license-file
64
+
65
+ CloudBridge provides a consistent layer of abstraction over different
66
+ Infrastructure-as-a-Service cloud providers, reducing or eliminating the need
67
+ to write conditional code for each cloud.
68
+
69
+ Documentation
70
+ ~~~~~~~~~~~~~
71
+ Detailed documentation can be found at http://cloudbridge.cloudve.org.
72
+
73
+
74
+ Build Status Tests
75
+ ~~~~~~~~~~~~~~~~~~
76
+ .. image:: https://github.com/CloudVE/cloudbridge/actions/workflows/integration.yaml/badge.svg
77
+ :target: https://github.com/CloudVE/cloudbridge/actions/
78
+ :alt: Integration Tests
79
+
80
+ .. image:: https://codecov.io/gh/CloudVE/cloudbridge/graph/badge.svg?token=w0LAfAIVdd
81
+ :target: https://codecov.io/gh/CloudVE/cloudbridge
82
+ :alt: Code Coverage
83
+
84
+ .. image:: https://img.shields.io/pypi/v/cloudbridge.svg
85
+ :target: https://pypi.python.org/pypi/cloudbridge/
86
+ :alt: latest version available on PyPI
87
+
88
+ .. image:: https://readthedocs.org/projects/cloudbridge/badge/?version=latest
89
+ :target: http://cloudbridge.readthedocs.org/en/latest/?badge=latest
90
+ :alt: Documentation Status
91
+
92
+ .. image:: https://img.shields.io/pypi/dm/cloudbridge
93
+ :target: https://pypistats.org/packages/cloudbridge
94
+ :alt: Download stats
95
+
96
+ .. |aws-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_aws.json
97
+ :target: https://github.com/CloudVE/cloudbridge/actions/
98
+
99
+ .. |azure-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_azure.json
100
+ :target: https://github.com/CloudVE/cloudbridge/actions/
101
+
102
+ .. |gcp-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_gcp.json
103
+ :target: https://github.com/CloudVE/cloudbridge/actions/
104
+
105
+ .. |mock-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_mock.json
106
+ :target: https://github.com/CloudVE/cloudbridge/actions/
107
+
108
+ .. |os-py313| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nuwang/d354f151eb8c9752da13e6dec012fb07/raw/cloudbridge_py3.13_openstack.json
109
+ :target: https://github.com/CloudVE/cloudbridge/actions/
110
+
111
+ +---------------------------+-----------------+
112
+ | **Provider/Environment** | **Python 3.13** |
113
+ +---------------------------+-----------------+
114
+ | **Amazon Web Services** | |aws-py313| |
115
+ +---------------------------+-----------------+
116
+ | **Google Cloud Platform** | |gcp-py313| |
117
+ +---------------------------+-----------------+
118
+ | **Microsoft Azure** | |azure-py313| |
119
+ +---------------------------+-----------------+
120
+ | **OpenStack** | |os-py313| |
121
+ +---------------------------+-----------------+
122
+ | **Mock Provider** | |mock-py313| |
123
+ +---------------------------+-----------------+
124
+
125
+ Installation
126
+ ~~~~~~~~~~~~
127
+ Install the latest release from PyPi:
128
+
129
+ .. code-block:: shell
130
+
131
+ pip install cloudbridge[full]
132
+
133
+ For other installation options, see the `installation page`_ in
134
+ the documentation.
135
+
136
+
137
+ Usage example
138
+ ~~~~~~~~~~~~~
139
+
140
+ To `get started`_ with CloudBridge, export your cloud access credentials
141
+ (e.g., AWS_ACCESS_KEY and AWS_SECRET_KEY for your AWS credentials) and start
142
+ exploring the API:
143
+
144
+ .. code-block:: python
145
+
146
+ from cloudbridge.factory import CloudProviderFactory, ProviderList
147
+
148
+ provider = CloudProviderFactory().create_provider(ProviderList.AWS, {})
149
+ print(provider.security.key_pairs.list())
150
+
151
+ The exact same command (as well as any other CloudBridge method) will run with
152
+ any of the supported providers: ``ProviderList.[AWS | AZURE | GCP | OPENSTACK]``!
153
+
154
+
155
+ Citation
156
+ ~~~~~~~~
157
+
158
+ N. Goonasekera, A. Lonie, J. Taylor, and E. Afgan,
159
+ "CloudBridge: a Simple Cross-Cloud Python Library,"
160
+ presented at the Proceedings of the XSEDE16 Conference on Diversity, Big Data, and Science at Scale, Miami, USA, 2016.
161
+ DOI: http://dx.doi.org/10.1145/2949550.2949648
162
+
163
+
164
+ Quick Reference
165
+ ~~~~~~~~~~~~~~~
166
+ The following object graph shows how to access various provider services, and the resource
167
+ that they return.
168
+
169
+ .. image:: http://cloudbridge.readthedocs.org/en/latest/_images/object_relationships_detailed.svg
170
+ :target: http://cloudbridge.readthedocs.org/en/latest/?badge=latest#quick-reference
171
+ :alt: CloudBridge Quick Reference
172
+
173
+
174
+ Design Goals
175
+ ~~~~~~~~~~~~
176
+
177
+ 1. Create a cloud abstraction layer which minimises or eliminates the need for
178
+ cloud specific special casing (i.e., Not require clients to write
179
+ ``if EC2 do x else if OPENSTACK do y``.)
180
+
181
+ 2. Have a suite of conformance tests which are comprehensive enough that goal
182
+ 1 can be achieved. This would also mean that clients need not manually test
183
+ against each provider to make sure their application is compatible.
184
+
185
+ 3. Opt for a minimum set of features that a cloud provider will support,
186
+ instead of a lowest common denominator approach. This means that reasonably
187
+ mature clouds like Amazon and OpenStack are used as the benchmark against
188
+ which functionality & features are determined. Therefore, there is a
189
+ definite expectation that the cloud infrastructure will support a compute
190
+ service with support for images and snapshots and various machine sizes.
191
+ The cloud infrastructure will very likely support block storage, although
192
+ this is currently optional. It may optionally support object storage.
193
+
194
+ 4. Make the CloudBridge layer as thin as possible without compromising goal 1.
195
+ By wrapping the cloud provider's native SDK and doing the minimal work
196
+ necessary to adapt the interface, we can achieve greater development speed
197
+ and reliability since the native provider SDK is most likely to have both
198
+ properties.
199
+
200
+
201
+ Contributing
202
+ ~~~~~~~~~~~~
203
+ Community contributions for any part of the project are welcome. If you have
204
+ a completely new idea or would like to bounce your idea before moving forward
205
+ with the implementation, feel free to create an issue to start a discussion.
206
+
207
+ Contributions should come in the form of a pull request. We strive for 100% test
208
+ coverage so code will only be accepted if it comes with appropriate tests and it
209
+ does not break existing functionality. Further, the code needs to be well
210
+ documented and all methods have docstrings. We are largely adhering to the
211
+ `PEP8 style guide`_ with 80 character lines, 4-space indentation (spaces
212
+ instead of tabs), explicit, one-per-line imports among others. Please keep the
213
+ style consistent with the rest of the project.
214
+
215
+ Conceptually, the library is laid out such that there is a factory used to
216
+ create a reference to a cloud provider. Each provider offers a set of services
217
+ and resources. Services typically perform actions while resources offer
218
+ information (and can act on itself, when appropriate). The structure of each
219
+ object is defined via an abstract interface (see
220
+ ``cloudbridge/providers/interfaces``) and any object should implement the
221
+ defined interface. If adding a completely new provider, take a look at the
222
+ `provider development page`_ in the documentation.
223
+
224
+
225
+ .. _`installation page`: http://cloudbridge.readthedocs.org/en/
226
+ latest/topics/install.html
227
+ .. _`get started`: http://cloudbridge.readthedocs.org/en/latest/
228
+ getting_started.html
229
+ .. _`PEP8 style guide`: https://www.python.org/dev/peps/pep-0008/
230
+ .. _`provider development page`: http://cloudbridge.readthedocs.org/
231
+ en/latest/
232
+ 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.1.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)