azure 0.6.4 → 0.7.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/.env_sample +11 -0
  3. data/.gitignore +4 -1
  4. data/.travis.yml +3 -1
  5. data/ChangeLog.txt +17 -1
  6. data/LICENSE.txt +202 -0
  7. data/README.md +58 -20
  8. data/Rakefile +27 -35
  9. data/azure.gemspec +17 -13
  10. data/bin/pfxer +35 -0
  11. data/lib/azure.rb +8 -0
  12. data/lib/azure/base_management/base_management_service.rb +24 -26
  13. data/lib/azure/base_management/management_http_request.rb +17 -14
  14. data/lib/azure/base_management/serialization.rb +1 -0
  15. data/lib/azure/blob/auth/shared_access_signature.rb +141 -0
  16. data/lib/azure/blob/blob_service.rb +221 -217
  17. data/lib/azure/cloud_service_management/cloud_service_management_service.rb +27 -30
  18. data/lib/azure/cloud_service_management/serialization.rb +1 -0
  19. data/lib/azure/core.rb +17 -15
  20. data/lib/azure/core/configuration.rb +7 -0
  21. data/lib/azure/core/http/http_error.rb +1 -1
  22. data/lib/azure/core/http/http_request.rb +4 -1
  23. data/lib/azure/core/utility.rb +16 -1
  24. data/lib/azure/queue/queue_service.rb +13 -13
  25. data/lib/azure/service/cors.rb +11 -0
  26. data/lib/azure/service/cors_rule.rb +15 -0
  27. data/lib/azure/service/serialization.rb +69 -10
  28. data/lib/azure/service/storage_service.rb +10 -6
  29. data/lib/azure/service/storage_service_properties.rb +8 -3
  30. data/lib/azure/service_bus/brokered_message.rb +1 -1
  31. data/lib/azure/service_bus/relay.rb +88 -0
  32. data/lib/azure/service_bus/serialization.rb +1 -0
  33. data/lib/azure/service_bus/service_bus_service.rb +70 -4
  34. data/lib/azure/sql_database_management/serialization.rb +1 -0
  35. data/lib/azure/sql_database_management/sql_database_management_service.rb +22 -22
  36. data/lib/azure/storage_management/serialization.rb +34 -14
  37. data/lib/azure/storage_management/storage_account.rb +9 -1
  38. data/lib/azure/storage_management/storage_management_service.rb +74 -32
  39. data/lib/azure/table/batch.rb +6 -6
  40. data/lib/azure/table/table_service.rb +13 -13
  41. data/lib/azure/version.rb +3 -3
  42. data/lib/azure/virtual_machine_image_management/serialization.rb +19 -0
  43. data/lib/azure/virtual_machine_image_management/virtual_machine_image.rb +1 -1
  44. data/lib/azure/virtual_machine_image_management/virtual_machine_image_management_service.rb +30 -7
  45. data/lib/azure/virtual_machine_management/serialization.rb +32 -12
  46. data/lib/azure/virtual_machine_management/virtual_machine.rb +1 -0
  47. data/lib/azure/virtual_machine_management/virtual_machine_management_service.rb +92 -81
  48. data/lib/azure/virtual_network_management/serialization.rb +12 -5
  49. data/lib/azure/virtual_network_management/virtual_network.rb +1 -0
  50. data/lib/azure/virtual_network_management/virtual_network_management_service.rb +11 -11
  51. data/test/fixtures/get_storage_account_properties.xml +6 -4
  52. data/test/fixtures/{list_images.xml → list_os_images.xml} +1 -1
  53. data/test/fixtures/list_storage_accounts.xml +2 -0
  54. data/test/fixtures/list_vm_images.xml +21 -0
  55. data/test/fixtures/metrics.xml +2 -2
  56. data/test/fixtures/sb_default_create_relay_response.xml +15 -0
  57. data/test/fixtures/storage_service_keys.xml +8 -0
  58. data/test/fixtures/storage_service_properties.xml +35 -3
  59. data/test/fixtures/updated_storage_accounts.xml +2 -0
  60. data/test/fixtures/virtual_machine.xml +3 -1
  61. data/test/integration/affinity_group/Affinity_test.rb +1 -1
  62. data/test/integration/affinity_group/Create_Affinity_test.rb +8 -7
  63. data/test/integration/affinity_group/Delete_Affinity_test.rb +3 -3
  64. data/test/integration/affinity_group/List_Affinity_test.rb +1 -1
  65. data/test/integration/affinity_group/Update_Affinity_test.rb +9 -8
  66. data/test/integration/cloud_service/Cloud_Create_test.rb +3 -2
  67. data/test/integration/cloud_service/Cloud_Delete_test.rb +5 -4
  68. data/test/integration/database/create_sql_server_firewall_test.rb +1 -1
  69. data/test/integration/database/create_sql_server_test.rb +1 -1
  70. data/test/integration/database/delete_sql_server_firewall_test.rb +1 -1
  71. data/test/integration/database/delete_sql_server_test.rb +1 -1
  72. data/test/integration/database/list_sql_server_firewall_test.rb +1 -1
  73. data/test/integration/database/list_sql_servers_test.rb +1 -1
  74. data/test/integration/database/reset_password_sql_server_test.rb +1 -1
  75. data/test/integration/service_bus/queues_test.rb +22 -22
  76. data/test/integration/service_bus/relay_test.rb +132 -0
  77. data/test/integration/storage_management/storage_management_test.rb +58 -33
  78. data/test/integration/test_helper.rb +11 -15
  79. data/test/integration/vm/VM_Create_test.rb +17 -18
  80. data/test/integration/vm/VM_Delete_test.rb +2 -4
  81. data/test/integration/vm/VM_Operations_test.rb +1 -2
  82. data/test/integration/vnet/Virtual_Network_Create_test.rb +9 -15
  83. data/test/integration/vnet/Virtual_Network_list_test.rb +4 -9
  84. data/test/support/name_generator.rb +8 -0
  85. data/test/support/virtual_network_helper.rb +2 -2
  86. data/test/test_helper.rb +13 -24
  87. data/test/unit/affinity_group/affinity_group_test.rb +10 -13
  88. data/test/unit/affinity_group/serialization_test.rb +7 -8
  89. data/test/unit/base_management/location_test.rb +1 -2
  90. data/test/unit/blob/auth/shared_access_signature_test.rb +71 -0
  91. data/test/unit/blob/blob_service_test.rb +393 -371
  92. data/test/unit/cloud_service_management/cloud_service_management_service_test.rb +16 -16
  93. data/test/unit/core/auth/shared_key_lite_test.rb +4 -4
  94. data/test/unit/core/auth/shared_key_test.rb +2 -2
  95. data/test/unit/core/http/http_error_test.rb +10 -5
  96. data/test/unit/core/http/http_request_test.rb +72 -25
  97. data/test/unit/database/serialization_test.rb +7 -7
  98. data/test/unit/database/sql_database_server_service_test.rb +43 -47
  99. data/test/unit/service/serialization_test.rb +40 -9
  100. data/test/unit/service/storage_service_test.rb +13 -11
  101. data/test/unit/storage_management/serialization_test.rb +26 -14
  102. data/test/unit/storage_management/storage_management_service_test.rb +48 -62
  103. data/test/unit/virtual_machine_image_management/serialization_test.rb +20 -5
  104. data/test/unit/virtual_machine_image_management/virtual_machine_image_management_service_test.rb +78 -29
  105. data/test/unit/virtual_machine_management/serialization_test.rb +112 -43
  106. data/test/unit/virtual_machine_management/virtual_machine_management_service_test.rb +123 -100
  107. data/test/unit/vnet/serialization_test.rb +7 -7
  108. data/test/unit/vnet/virtual_network_management_service_test.rb +1 -1
  109. metadata +70 -16
  110. data/test/fixtures/certificate.pem +0 -21
@@ -23,8 +23,8 @@ describe Azure::VirtualNetworkManagement::Serialization do
23
23
  let(:virtual_networks_string) { Fixtures ['list_virtual_networks'] }
24
24
 
25
25
  let(:vnet_name) { 'test-vnet-name' }
26
- let(:affinity_group) { 'test-affinity-group' }
27
- let(:address_space) { ['172.16.0.0/12', '10.0.0.1/12'] }
26
+ let(:address_space) { %w(172.16.0.0/12 10.0.0.1/12) }
27
+ let(:geo_location) { 'West US' }
28
28
 
29
29
  input_options = {
30
30
  subnet: [
@@ -93,14 +93,14 @@ describe Azure::VirtualNetworkManagement::Serialization do
93
93
 
94
94
  describe '#virtual_network_to_xml' do
95
95
  before do
96
- ManagementHttpRequest.any_instance.expects(
96
+ Azure::BaseManagement::ManagementHttpRequest.any_instance.expects(
97
97
  :call
98
98
  ).returns(virtual_networks_xml)
99
99
  end
100
100
 
101
101
  let(:result_string) do
102
102
  subject.virtual_network_to_xml(vnet_name,
103
- affinity_group,
103
+ geo_location,
104
104
  address_space,
105
105
  input_options)
106
106
  end
@@ -110,12 +110,12 @@ describe Azure::VirtualNetworkManagement::Serialization do
110
110
  end
111
111
 
112
112
  it 'accepts parameters without providing subnet/dns' do
113
- subject.virtual_network_to_xml(vnet_name, affinity_group, address_space)
113
+ subject.virtual_network_to_xml(vnet_name, geo_location, address_space)
114
114
  end
115
115
 
116
116
  it 'accepts parameters including subnet/dns' do
117
117
  subject.virtual_network_to_xml(vnet_name,
118
- affinity_group,
118
+ geo_location,
119
119
  address_space,
120
120
  input_options)
121
121
  end
@@ -127,7 +127,7 @@ describe Azure::VirtualNetworkManagement::Serialization do
127
127
 
128
128
  it 'sets the name and affinity group for the new VirtualNetwork' do
129
129
  virtual_network.attr('name').must_equal vnet_name
130
- virtual_network.attr('AffinityGroup').must_equal affinity_group
130
+ virtual_network.attr('Location').must_equal geo_location
131
131
  end
132
132
 
133
133
  it 'adds new dns servers on the top of existing dns servers' do
@@ -56,7 +56,7 @@ describe Azure::VirtualNetworkManagementService do
56
56
 
57
57
  describe '#list_virtual_networks' do
58
58
  before do
59
- ManagementHttpRequest.stubs(:new).with(
59
+ Azure::BaseManagement::ManagementHttpRequest.stubs(:new).with(
60
60
  getmethod,
61
61
  list_networks_path,
62
62
  nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.7.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-07 00:00:00.000000000 Z
12
+ date: 2015-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '1.5'
20
+ version: '1.6'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '1.5'
27
+ version: '1.6'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: mime-types
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +81,20 @@ dependencies:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '2.6'
84
+ - !ruby/object:Gem::Dependency
85
+ name: thor
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.19'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.19'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: rake
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -101,14 +115,28 @@ dependencies:
101
115
  requirements:
102
116
  - - "~>"
103
117
  - !ruby/object:Gem::Version
104
- version: '3.0'
118
+ version: '5'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '5'
126
+ - !ruby/object:Gem::Dependency
127
+ name: minitest-reporters
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '1'
105
133
  type: :development
106
134
  prerelease: false
107
135
  version_requirements: !ruby/object:Gem::Requirement
108
136
  requirements:
109
137
  - - "~>"
110
138
  - !ruby/object:Gem::Version
111
- version: '3.0'
139
+ version: '1'
112
140
  - !ruby/object:Gem::Dependency
113
141
  name: mocha
114
142
  requirement: !ruby/object:Gem::Requirement
@@ -124,32 +152,50 @@ dependencies:
124
152
  - !ruby/object:Gem::Version
125
153
  version: '1.0'
126
154
  - !ruby/object:Gem::Dependency
127
- name: turn
155
+ name: timecop
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '0.7'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '0.7'
168
+ - !ruby/object:Gem::Dependency
169
+ name: dotenv
128
170
  requirement: !ruby/object:Gem::Requirement
129
171
  requirements:
130
172
  - - "~>"
131
173
  - !ruby/object:Gem::Version
132
- version: '0.9'
174
+ version: '2.0'
133
175
  type: :development
134
176
  prerelease: false
135
177
  version_requirements: !ruby/object:Gem::Requirement
136
178
  requirements:
137
179
  - - "~>"
138
180
  - !ruby/object:Gem::Version
139
- version: '0.9'
181
+ version: '2.0'
140
182
  description: Windows Azure Client Library for Ruby
141
183
  email: azureruby@microsoft.com
142
- executables: []
184
+ executables:
185
+ - pfxer
143
186
  extensions: []
144
187
  extra_rdoc_files: []
145
188
  files:
189
+ - ".env_sample"
146
190
  - ".gitignore"
147
191
  - ".travis.yml"
148
192
  - ChangeLog.txt
149
193
  - Gemfile
194
+ - LICENSE.txt
150
195
  - README.md
151
196
  - Rakefile
152
197
  - azure.gemspec
198
+ - bin/pfxer
153
199
  - lib/azure.rb
154
200
  - lib/azure/base_management/affinity_group.rb
155
201
  - lib/azure/base_management/base_management_service.rb
@@ -157,6 +203,7 @@ files:
157
203
  - lib/azure/base_management/management_http_request.rb
158
204
  - lib/azure/base_management/serialization.rb
159
205
  - lib/azure/base_management/sql_management_http_request.rb
206
+ - lib/azure/blob/auth/shared_access_signature.rb
160
207
  - lib/azure/blob/blob.rb
161
208
  - lib/azure/blob/blob_service.rb
162
209
  - lib/azure/blob/block.rb
@@ -188,6 +235,8 @@ files:
188
235
  - lib/azure/queue/queue_service.rb
189
236
  - lib/azure/queue/serialization.rb
190
237
  - lib/azure/service/access_policy.rb
238
+ - lib/azure/service/cors.rb
239
+ - lib/azure/service/cors_rule.rb
191
240
  - lib/azure/service/enumeration_results.rb
192
241
  - lib/azure/service/logging.rb
193
242
  - lib/azure/service/metrics.rb
@@ -207,6 +256,7 @@ files:
207
256
  - lib/azure/service_bus/filter.rb
208
257
  - lib/azure/service_bus/interval.rb
209
258
  - lib/azure/service_bus/queue.rb
259
+ - lib/azure/service_bus/relay.rb
210
260
  - lib/azure/service_bus/resource.rb
211
261
  - lib/azure/service_bus/rule.rb
212
262
  - lib/azure/service_bus/rule_aspect.rb
@@ -248,7 +298,6 @@ files:
248
298
  - test/fixtures/affinity_group.xml
249
299
  - test/fixtures/all_containers.xml
250
300
  - test/fixtures/all_tables.xml
251
- - test/fixtures/certificate.pem
252
301
  - test/fixtures/container_acl.xml
253
302
  - test/fixtures/create_sql_database_server.xml
254
303
  - test/fixtures/create_storage_desc_error.xml
@@ -276,14 +325,15 @@ files:
276
325
  - test/fixtures/list_cloud_services.xml
277
326
  - test/fixtures/list_containers.xml
278
327
  - test/fixtures/list_firewall_management_endpoint.xml
279
- - test/fixtures/list_images.xml
280
328
  - test/fixtures/list_locations.xml
329
+ - test/fixtures/list_os_images.xml
281
330
  - test/fixtures/list_page_ranges.xml
282
331
  - test/fixtures/list_sql_database.xml
283
332
  - test/fixtures/list_sql_server_firewall.xml
284
333
  - test/fixtures/list_storage_account_single.xml
285
334
  - test/fixtures/list_storage_accounts.xml
286
335
  - test/fixtures/list_virtual_networks.xml
336
+ - test/fixtures/list_vm_images.xml
287
337
  - test/fixtures/logging.xml
288
338
  - test/fixtures/management_certificate.pem
289
339
  - test/fixtures/messages.xml
@@ -296,9 +346,11 @@ files:
296
346
  - test/fixtures/queues.xml
297
347
  - test/fixtures/retention_policy.xml
298
348
  - test/fixtures/sb_default_create_queue_response.xml
349
+ - test/fixtures/sb_default_create_relay_response.xml
299
350
  - test/fixtures/sb_default_create_topic_response.xml
300
351
  - test/fixtures/sb_get_access_token_response.txt
301
352
  - test/fixtures/sb_queues_runtime_peek_message_response_headers.txt
353
+ - test/fixtures/storage_service_keys.xml
302
354
  - test/fixtures/storage_service_properties.xml
303
355
  - test/fixtures/update_storage_account.xml
304
356
  - test/fixtures/update_storage_error.xml
@@ -359,6 +411,7 @@ files:
359
411
  - test/integration/service_bus/informative_errors_test.rb
360
412
  - test/integration/service_bus/queues_scenario_test.rb
361
413
  - test/integration/service_bus/queues_test.rb
414
+ - test/integration/service_bus/relay_test.rb
362
415
  - test/integration/service_bus/rules_test.rb
363
416
  - test/integration/service_bus/sb_queue_gb18030_test.rb
364
417
  - test/integration/service_bus/scenario_test.rb
@@ -405,6 +458,7 @@ files:
405
458
  - test/unit/affinity_group/affinity_group_test.rb
406
459
  - test/unit/affinity_group/serialization_test.rb
407
460
  - test/unit/base_management/location_test.rb
461
+ - test/unit/blob/auth/shared_access_signature_test.rb
408
462
  - test/unit/blob/blob_service_test.rb
409
463
  - test/unit/cloud_service_management/cloud_service_management_service_test.rb
410
464
  - test/unit/cloud_service_management/serialization_test.rb
@@ -428,7 +482,7 @@ files:
428
482
  - test/unit/virtual_machine_management/virtual_machine_management_service_test.rb
429
483
  - test/unit/vnet/serialization_test.rb
430
484
  - test/unit/vnet/virtual_network_management_service_test.rb
431
- homepage: http://github.com/WindowsAzure/azure-sdk-for-ruby
485
+ homepage: http://github.com/azure/azure-sdk-for-ruby
432
486
  licenses:
433
487
  - Apache License, Version 2.0
434
488
  metadata: {}
@@ -443,12 +497,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
443
497
  version: 1.9.3
444
498
  required_rubygems_version: !ruby/object:Gem::Requirement
445
499
  requirements:
446
- - - ">="
500
+ - - ">"
447
501
  - !ruby/object:Gem::Version
448
- version: '0'
502
+ version: 1.3.1
449
503
  requirements: []
450
504
  rubyforge_project:
451
- rubygems_version: 2.2.2
505
+ rubygems_version: 2.4.6
452
506
  signing_key:
453
507
  specification_version: 4
454
508
  summary: Official ruby client library to consume Windows Azure services.
@@ -1,21 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDXTCCAkWgAwIBAgIJANykirZF/EsgMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
3
- BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
4
- aWRnaXRzIFB0eSBMdGQwHhcNMTMwNTIwMDkxNzI4WhcNMTQwNTIwMDkxNzI4WjBF
5
- MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50
6
- ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
7
- CgKCAQEAvbyc1P9OVJmlvFLHLhoIAn0lZtJ5BhA5Y4xjVxTdSrbvfPuhifN0fZFx
8
- W5r/emW2IS9+eMkjTB6HuEMHU818At16TXTSIUiD6zjUs5a4zGbuOnfZXhmSgjqZ
9
- FfjpoOpq8BJwNymPyW8bjSzj/FFOxeQ1prIA8listYqm0cKMXYrxHzEm9mfNsiQO
10
- ZdR6AGPgBmBtgi2SgBRo5peidSHOWt1Hq09L4b8CvQhCunSMQaQbjaS4PEEiyAAy
11
- pNQwtlkbHxfae4pQ4mcNqaXisOIT/OFbF3ipBJZj0GsrdTw5aKBCa4+v4MrlHpIY
12
- 0IGEst9VusNaHsgZ9fDo2AuHJxYYPwIDAQABo1AwTjAdBgNVHQ4EFgQUMe+pjlnP
13
- u45jWWGwDBHj/glY5+QwHwYDVR0jBBgwFoAUMe+pjlnPu45jWWGwDBHj/glY5+Qw
14
- DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAMIHvO+LuVq/e5Fesr6Q7
15
- p6PSyth4pfVLfx3tKosvfEzGmdVB7yryx4oVPVUygkmZyHwXqkgU0+k5QH2L0SjF
16
- fYS/T9RAke3zAHQ31O97aMj7ourjvOXwa87K4g8d/4y75zBewxtga51MZbZEguNy
17
- Edi/eyM7OuU1LFmoNyc0fakq0tBn68J3bDaNvCskptBASXvIGhlUNq1RT3agbGml
18
- f8x9SuJofXtqDACgLDQMUGrCWqklMhZohuApMg07Q4bIz/BhXhKETab55gGFX+Ow
19
- lroGwF29OCyUvpxWmXmcYxmFNlkVOuol6wJWKoeaGc1JphmyvbmS8qaeqgqxFTkP
20
- kw==
21
- -----END CERTIFICATE-----