gitlab-fog-azure-rm 1.9.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile +3 -0
  4. data/gitlab-fog-azure-rm.gemspec +1 -3
  5. data/lib/fog/azurerm/version.rb +1 -1
  6. data/vendor/azure-storage-ruby/.env_sample +8 -0
  7. data/vendor/azure-storage-ruby/.gitignore +35 -0
  8. data/vendor/azure-storage-ruby/.rubocop.yml +132 -0
  9. data/vendor/azure-storage-ruby/.travis.yml +23 -0
  10. data/vendor/azure-storage-ruby/BreakingChanges.md +34 -0
  11. data/vendor/azure-storage-ruby/CONTRIBUTING.md +74 -0
  12. data/vendor/azure-storage-ruby/ChangeLog.md +198 -0
  13. data/vendor/azure-storage-ruby/Gemfile +41 -0
  14. data/vendor/azure-storage-ruby/README.md +48 -0
  15. data/vendor/azure-storage-ruby/Rakefile +216 -0
  16. data/vendor/azure-storage-ruby/SECURITY.md +41 -0
  17. data/vendor/azure-storage-ruby/blob/BreakingChanges.md +10 -0
  18. data/vendor/azure-storage-ruby/blob/ChangeLog.md +33 -0
  19. data/vendor/azure-storage-ruby/blob/Gemfile +30 -0
  20. data/vendor/azure-storage-ruby/blob/LICENSE.txt +21 -0
  21. data/vendor/azure-storage-ruby/blob/README.md +188 -0
  22. data/vendor/azure-storage-ruby/blob/azure-storage-blob.gemspec +52 -0
  23. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/append.rb +244 -0
  24. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/autoload.rb +47 -0
  25. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/blob.rb +932 -0
  26. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/blob_service.rb +720 -0
  27. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/block.rb +530 -0
  28. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/container.rb +634 -0
  29. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/default.rb +171 -0
  30. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/page.rb +566 -0
  31. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/serialization.rb +351 -0
  32. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob/version.rb +49 -0
  33. data/vendor/azure-storage-ruby/blob/lib/azure/storage/blob.rb +26 -0
  34. data/vendor/azure-storage-ruby/common/BreakingChanges.md +8 -0
  35. data/vendor/azure-storage-ruby/common/ChangeLog.md +41 -0
  36. data/vendor/azure-storage-ruby/common/Gemfile +30 -0
  37. data/vendor/azure-storage-ruby/common/LICENSE.txt +21 -0
  38. data/vendor/azure-storage-ruby/common/README.md +146 -0
  39. data/vendor/azure-storage-ruby/common/azure-storage-common.gemspec +57 -0
  40. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/authorizer.rb +36 -0
  41. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/shared_key.rb +125 -0
  42. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/shared_key_lite.rb +48 -0
  43. data/vendor/azure-storage-ruby/common/lib/azure/core/auth/signer.rb +51 -0
  44. data/vendor/azure-storage-ruby/common/lib/azure/core/default.rb +23 -0
  45. data/vendor/azure-storage-ruby/common/lib/azure/core/error.rb +21 -0
  46. data/vendor/azure-storage-ruby/common/lib/azure/core/filtered_service.rb +45 -0
  47. data/vendor/azure-storage-ruby/common/lib/azure/core/http/debug_filter.rb +36 -0
  48. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_error.rb +135 -0
  49. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_filter.rb +53 -0
  50. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_request.rb +195 -0
  51. data/vendor/azure-storage-ruby/common/lib/azure/core/http/http_response.rb +102 -0
  52. data/vendor/azure-storage-ruby/common/lib/azure/core/http/retry_policy.rb +84 -0
  53. data/vendor/azure-storage-ruby/common/lib/azure/core/http/signer_filter.rb +33 -0
  54. data/vendor/azure-storage-ruby/common/lib/azure/core/service.rb +46 -0
  55. data/vendor/azure-storage-ruby/common/lib/azure/core/signed_service.rb +45 -0
  56. data/vendor/azure-storage-ruby/common/lib/azure/core/utility.rb +244 -0
  57. data/vendor/azure-storage-ruby/common/lib/azure/core/version.rb +33 -0
  58. data/vendor/azure-storage-ruby/common/lib/azure/core.rb +48 -0
  59. data/vendor/azure-storage-ruby/common/lib/azure/http_response_helper.rb +38 -0
  60. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/autoload.rb +62 -0
  61. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/client.rb +162 -0
  62. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/client_options.rb +363 -0
  63. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/client_options_error.rb +41 -0
  64. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/configurable.rb +212 -0
  65. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/anonymous_signer.rb +43 -0
  66. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_access_signature.rb +30 -0
  67. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_access_signature_generator.rb +399 -0
  68. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_access_signature_signer.rb +57 -0
  69. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/shared_key.rb +60 -0
  70. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/auth/token_signer.rb +43 -0
  71. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/autoload.rb +53 -0
  72. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/error.rb +43 -0
  73. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/filter/exponential_retry_filter.rb +64 -0
  74. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/filter/linear_retry_filter.rb +55 -0
  75. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/filter/retry_filter.rb +300 -0
  76. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/http_client.rb +82 -0
  77. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/sr.rb +85 -0
  78. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/token_credential.rb +64 -0
  79. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core/utility.rb +261 -0
  80. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/core.rb +35 -0
  81. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/default.rb +868 -0
  82. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/access_policy.rb +37 -0
  83. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/cors.rb +38 -0
  84. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/cors_rule.rb +48 -0
  85. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/enumeration_results.rb +32 -0
  86. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/geo_replication.rb +40 -0
  87. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/logging.rb +47 -0
  88. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/metrics.rb +45 -0
  89. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/retention_policy.rb +37 -0
  90. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/serialization.rb +335 -0
  91. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/signed_identifier.rb +40 -0
  92. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/storage_service.rb +322 -0
  93. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/storage_service_properties.rb +48 -0
  94. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/storage_service_stats.rb +39 -0
  95. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/service/user_delegation_key.rb +50 -0
  96. data/vendor/azure-storage-ruby/common/lib/azure/storage/common/version.rb +49 -0
  97. data/vendor/azure-storage-ruby/common/lib/azure/storage/common.rb +26 -0
  98. metadata +95 -31
@@ -0,0 +1,171 @@
1
+ # frozen_string_literal: true
2
+
3
+ #-------------------------------------------------------------------------
4
+ # # Copyright (c) Microsoft and contributors. All rights reserved.
5
+ #
6
+ # The MIT License(MIT)
7
+
8
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ # of this software and associated documentation files(the "Software"), to deal
10
+ # in the Software without restriction, including without limitation the rights
11
+ # to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12
+ # copies of the Software, and to permit persons to whom the Software is
13
+ # furnished to do so, subject to the following conditions :
14
+
15
+ # The above copyright notice and this permission notice shall be included in
16
+ # all copies or substantial portions of the Software.
17
+
18
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ # THE SOFTWARE.
25
+ #--------------------------------------------------------------------------
26
+
27
+ require "rbconfig"
28
+
29
+ module Azure::Storage::Blob
30
+ module Default
31
+ # Default REST service (STG) version number
32
+ STG_VERSION = "2018-11-09"
33
+
34
+ # The number of default concurrent requests for parallel operation.
35
+ DEFAULT_PARALLEL_OPERATION_THREAD_COUNT = 1
36
+
37
+ # Constant representing a kilobyte (Non-SI version).
38
+ KB = 1024
39
+ # Constant representing a megabyte (Non-SI version).
40
+ MB = 1024 * 1024
41
+ # Constant representing a gigabyte (Non-SI version).
42
+ GB = 1024 * 1024 * 1024
43
+
44
+ # Specifies HTTP.
45
+ HTTP = "http"
46
+ # Specifies HTTPS.
47
+ HTTPS = "https"
48
+ # Default HTTP port.
49
+ DEFAULT_HTTP_PORT = 80
50
+ # Default HTTPS port.
51
+ DEFAULT_HTTPS_PORT = 443
52
+
53
+ # Marker for atom metadata.
54
+ XML_METADATA_MARKER = "$"
55
+ # Marker for atom value.
56
+ XML_VALUE_MARKER = "_"
57
+
58
+ # Default value for Content-Type if request has body.
59
+ CONTENT_TYPE_VALUE = "application/octet-stream"
60
+
61
+ # Default User Agent header string
62
+ USER_AGENT = "Azure-Storage/#{Azure::Storage::Blob::Version.to_uas}-#{Azure::Storage::Common::Version.to_uas} (Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}; #{Azure::Storage::Common::Default.os})".freeze
63
+ end
64
+
65
+ # Defines constants for use with blob operations.
66
+ module BlobConstants
67
+ # XML element for the latest.
68
+ LATEST_ELEMENT = "Latest"
69
+
70
+ # XML element for uncommitted blocks.
71
+ UNCOMMITTED_ELEMENT = "Uncommitted"
72
+
73
+ # XML element for a block list.
74
+ BLOCK_LIST_ELEMENT = "BlockList"
75
+
76
+ # XML element for committed blocks.
77
+ COMMITTED_ELEMENT = "Committed"
78
+
79
+ # The default write page size, in bytes, used by blob streams.
80
+ DEFAULT_WRITE_PAGE_SIZE_IN_BYTES = 4 * 1024 * 1024
81
+
82
+ # The minimum write page size, in bytes, used by blob streams.
83
+ MIN_WRITE_PAGE_SIZE_IN_BYTES = 2 * 1024 * 1024
84
+
85
+ # The default maximum size, in bytes, of a blob before it must be separated into blocks.
86
+ DEFAULT_SINGLE_BLOB_PUT_THRESHOLD_IN_BYTES = 128 * 1024 * 1024
87
+
88
+ # The default write block size, in bytes, used by blob streams.
89
+ DEFAULT_WRITE_BLOCK_SIZE_IN_BYTES = 4 * 1024 * 1024
90
+
91
+ # The maximum size of a single block.
92
+ MAX_BLOCK_SIZE = 100 * 1024 * 1024
93
+
94
+ # The maximum count of blocks for a block blob
95
+ MAX_BLOCK_COUNT = 50000
96
+
97
+ # The maximum size of block blob
98
+ MAX_BLOCK_BLOB_SIZE = 50000 * 100 * 1024 * 1024
99
+
100
+ # The maximum size of block blob
101
+ MAX_APPEND_BLOB_SIZE = 1024 * 1024 * 1024 * 1024
102
+
103
+ # The maximum size, in bytes, of a blob before it must be separated into blocks.
104
+ MAX_SINGLE_UPLOAD_BLOB_SIZE_IN_BYTES = 256 * 1024 * 1024
105
+
106
+ # The maximum range get size when requesting for a contentMD5
107
+ MAX_RANGE_GET_SIZE_WITH_MD5 = 4 * 1024 * 1024
108
+
109
+ # The maximum page range size for a page update operation.
110
+ MAX_UPDATE_PAGE_SIZE = 4 * 1024 * 1024
111
+
112
+ # The maximum buffer size for writing a stream buffer.
113
+ MAX_QUEUED_WRITE_DISK_BUFFER_SIZE = 64 * 1024 * 1024
114
+
115
+ # Max size for single get page range. The max value should be 150MB
116
+ # http://blogs.msdn.com/b/windowsazurestorage/archive/2012/03/26/getting-the-page-ranges-of-a-large-page-blob-in-segments.aspx
117
+ MAX_SINGLE_GET_PAGE_RANGE_SIZE = 37 * 4 * 1024 * 1024
118
+
119
+ # The size of a page, in bytes, in a page blob.
120
+ PAGE_SIZE = 512
121
+
122
+ # The maximum validity of user delegation SAS (7 days from the current time).
123
+ MAX_USER_DELEGATION_KEY_SECONDS = 60 * 60 * 24 * 7
124
+
125
+ # Resource types.
126
+ module ResourceTypes
127
+ CONTAINER = "c"
128
+ BLOB = "b"
129
+ end
130
+
131
+ # List blob types.
132
+ module ListBlobTypes
133
+ Blob = "b"
134
+ Directory = "d"
135
+ end
136
+
137
+ # Put page write options
138
+ module PageWriteOptions
139
+ UPDATE = "update"
140
+ CLEAR = "clear"
141
+ end
142
+
143
+ # Blob types
144
+ module BlobTypes
145
+ BLOCK = "BlockBlob"
146
+ PAGE = "PageBlob"
147
+ APPEND = "AppendBlob"
148
+ end
149
+
150
+ # Blob lease constants
151
+ module LeaseOperation
152
+ ACQUIRE = "acquire"
153
+ RENEW = "renew"
154
+ CHANGE = "change"
155
+ RELEASE = "release"
156
+ BREAK = "break"
157
+ end
158
+ end
159
+
160
+ module BlobErrorCodeStrings
161
+ INVALID_BLOCK_ID = "InvalidBlockId"
162
+ BLOB_NOT_FOUND = "BlobNotFound"
163
+ BLOB_ALREADY_EXISTS = "BlobAlreadyExists"
164
+ CONTAINER_ALREADY_EXISTS = "ContainerAlreadyExists"
165
+ CONTAINER_NOT_FOUND = "ContainerNotFound"
166
+ INVALID_BLOB_OR_BLOCK = "InvalidBlobOrBlock"
167
+ INVALID_BLOCK_LIST = "InvalidBlockList"
168
+ MAX_BLOB_SIZE_CONDITION_NOT_MET = "MaxBlobSizeConditionNotMet"
169
+ APPEND_POSITION_CONDITION_NOT_MET = "AppendPositionConditionNotMet"
170
+ end
171
+ end