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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04ded6fcb137549c13dbcb6a6a9edd6ef8984425
4
- data.tar.gz: caa3fbe95aed896613b2e0fbf393fee2db4d49e7
3
+ metadata.gz: 589f007bd495e8b9975d2564d1d1cf3f26f9fd4c
4
+ data.tar.gz: e9d84790d722d659a17083321179fdd9de273727
5
5
  SHA512:
6
- metadata.gz: 6cd3141f9ecf5892a7537f5fc5d85a0495caf6ae135a1eca6bec1be900d638056e44dd40aef8c44bb858cbb916c8a7d63fa6a031e36c41ff2fea7dcbdab350d3
7
- data.tar.gz: 0dea6a1183c5e1bb238351c6f9bcd0de7f6a4cf149d8ad3c8d7debb213430ebc73b538f9ef0d42f2950007a1005468eff39247ed2fc11f5533b60e3a6559e49b
6
+ metadata.gz: bc90c7ce30f4c6bc1dfc0fc0b286c200da62bc1abd2d14da4f824a5b50a2f33598a41eec960d2d1ecf3cce4b17114e314a5e844a8471f5556fad94b4004bdeda
7
+ data.tar.gz: 6432ab91cd8f5010b93a04887cbb714bf5df522b702c16ca23fd300790c420af19b8cb1dbde465c52da59b32a157a9abb2c4783dfff005133b50d00bf1691b1e
@@ -0,0 +1,11 @@
1
+ # This is a sample of what your .env file should look like if you wanted to run integration tests.
2
+ # If you move this file to the .env and replace the environment variables with your own values, then the environment
3
+ # will be included when the rake test tasks are executed. Otherwise, you could just export the environment vars
4
+ # yourself.
5
+
6
+ AZURE_STORAGE_ACCOUNT="your storage account"
7
+ AZURE_STORAGE_ACCESS_KEY="your storage access key"
8
+ AZURE_SERVICEBUS_NAMESPACE="your sb namespace"
9
+ AZURE_SERVICEBUS_ACCESS_KEY="your sb access key"
10
+ AZURE_MANAGEMENT_CERTIFICATE="your management cert path"
11
+ AZURE_SUBSCRIPTION_ID="your subscription id"
data/.gitignore CHANGED
@@ -9,4 +9,7 @@ nbproject/*
9
9
  .project
10
10
 
11
11
 
12
- .DS_Store
12
+ .DS_Store
13
+ .ruby-version
14
+ .env
15
+ *.pem
@@ -4,8 +4,10 @@ language: ruby
4
4
  rvm:
5
5
  - 1.9.3
6
6
  - 2.0.0
7
+ - 2.1.5
8
+ - 2.2.0
7
9
 
8
10
  script:
9
- - rake test:unit
11
+ - bundle exec rake test:unit
10
12
  - if [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ; then rake test:integration ; fi
11
13
 
@@ -1,3 +1,19 @@
1
+ 2015.05.06 - version 0.7.0.pre
2
+ * Upgraded ASM versioning to 2014-06-01
3
+ * Added the ability to use personal vm images not just gallery images
4
+ * Namespaced all of the things so there is no leakage
5
+ * Added proper support for .pfx
6
+ * Added bin to transform .publishsettings files to .pfx files
7
+ * Added support for Azure.config.management_certificate as string
8
+ * Added ms-blob-content-disposition support, bump blob `x-ms-version` header to `2013-08-15`
9
+ * Fixed KeepAlive and timeout for blobs
10
+ * VM sizes are available -- we just warn if they are not in our list
11
+ * Support for nokogiri on windows
12
+ * Ability to delete a staging deployment of a cloud service
13
+ * Peek_lock fixed for service bus
14
+ * Support for creating shared access signatures
15
+
16
+
1
17
  2014.05.06 - version 0.6.4
2
18
  * Upgraded Service Management Versioning to 2014-04-01
3
19
  * Created separate API for add role
@@ -10,7 +26,7 @@
10
26
  * Added winrm_http_port and winrm_https_port to get_virtual_machine method to allow the users to configure custom ports for winrm-http and winrm-https
11
27
  * Checks if any ports are in use before adding a role in the existing cloud service
12
28
  * Auto generate public port for add role.
13
- * Fix issue https://github.com/WindowsAzure/azure-sdk-for-ruby/issues/130
29
+ * Fix issue https://github.com/Azure/azure-sdk-for-ruby/issues/130
14
30
 
15
31
  2014.03.15 - version 0.6.2
16
32
  * Restart Virtual Machine
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
+
1
2
  # Microsoft Azure SDK for Ruby
2
- [![Build Status](https://travis-ci.org/Azure/azure-sdk-for-ruby.png?branch=dev)](https://travis-ci.org/Azure/azure-sdk-for-ruby)
3
+ [![Build Status](https://travis-ci.org/Azure/azure-sdk-for-ruby.png?branch=dev)](https://travis-ci.org/Azure/azure-sdk-for-ruby) [![Code Climate](https://codeclimate.com/github/Azure/azure-sdk-for-ruby/badges/gpa.svg)](https://codeclimate.com/github/Azure/azure-sdk-for-ruby)
3
4
 
4
5
 
5
6
  This project provides a Ruby package that makes it easy to access and manage Microsoft Azure Services like Storage, Service Bus and Virtual Machines.
@@ -51,8 +52,8 @@ This project provides a Ruby package that makes it easy to access and manage Mic
51
52
 
52
53
  * Ruby 1.9.3
53
54
  * Ruby 2.0
54
-
55
- **Notice** that Ruby 2.0 x64 on Windows is not supported due to the [lack of nokogiri](https://github.com/sparklemotion/nokogiri/issues/864).
55
+ * Ruby 2.1
56
+ * Ruby 2.2
56
57
 
57
58
  # Getting Started
58
59
 
@@ -84,7 +85,7 @@ Running the command ``rdoc`` will generate the API documentation in the `./doc`
84
85
 
85
86
  ## Setup Connection
86
87
 
87
- You can use this SDK against the Microsoft Azure Services in the cloud, or against the local Storage Emulator if you are on Windows. Service Bus and Microsoft Azure Service Management emulation are not supported. Of course, to use the Microsoft Azure Services in the cloud, you need to first [create a Microsoft Azure account](http://www.windowsazure.com/en-us/pricing/free-trial/). After that, you can get the information you need to configure Storage and Service Bus from the [Microsoft Azure Portal](https://manage.windowsazure.com).
88
+ You can use this SDK against the Microsoft Azure Services in the cloud, or against the local Storage Emulator if you are on Windows. Service Bus and Microsoft Azure Service Management emulation are not supported. Of course, to use the Microsoft Azure Services in the cloud, you need to first [create a Microsoft Azure account](http://www.azure.com/en-us/pricing/free-trial/). After that, you can get the information you need to configure Storage and Service Bus from the [Microsoft Azure Portal](https://manage.azure.com).
88
89
 
89
90
  There are two ways you can set up the connections:
90
91
 
@@ -113,6 +114,8 @@ There are two ways you can set up the connections:
113
114
  config.sql_database_authentication_mode = <:management_certificate or :sql_server>
114
115
  # Configure SQL Server authentication API endpoint here
115
116
  config.sql_database_management_endpoint = "http://management.database.windows.net:8443"
117
+ # Configure a ca_cert.pem file if you are having issues with ssl peer verification
118
+ config.ca_file = "./ca_file.pem"
116
119
  end
117
120
  ```
118
121
  * Against local Emulator (Windows Only)
@@ -154,6 +157,11 @@ There are two ways you can set up the connections:
154
157
  AZURE_SQL_DATABASE_MANAGEMENT_ENDPOINT = <SQL Database Management Endpoint>
155
158
  AZURE_SQL_DATABASE_AUTHENTICATION_MODE = <:management_certificate or :sql_server>
156
159
  ```
160
+
161
+ * [SSL Certificate File](https://gist.github.com/fnichol/867550)
162
+ ```bash
163
+ SSL_CERT_FILE=<path to *.pem>
164
+ ```
157
165
  * Against local Emulator (Windows Only)
158
166
  * Storage
159
167
 
@@ -172,7 +180,7 @@ You can use the following commands to run:
172
180
  * a specific suite of tests: ``rake test:integration:blob``
173
181
  * one particular test file: ``ruby -I"lib:test" "<path of the test file>"``
174
182
  # Usage
175
- **For more examples, please see the [Microsoft Azure Ruby Developer Center](http://www.windowsazure.com/en-us/develop/ruby)**
183
+ **For more examples, please see the [Microsoft Azure Ruby Developer Center](http://www.azure.com/en-us/develop/ruby)**
176
184
  ## Storage
177
185
 
178
186
  ### Blobs
@@ -271,6 +279,29 @@ azure_queue_service.delete_queue("test-queue")
271
279
  ```
272
280
  ## Service Bus
273
281
 
282
+ ### Relay
283
+
284
+ ```ruby
285
+ # Require the azure rubygem
286
+ require "azure"
287
+
288
+ # Create an azure service bus object
289
+ azure_service_bus = Azure::ServiceBusService.new
290
+
291
+ # Create a relay endpoint with just the endpoint name
292
+ relay1 = azure_service_bus.create_relay("test-relay-1", { :relay_type => "Http" })
293
+
294
+ # Create a relay endpoint with a relay object
295
+ relay2 = Azure::ServiceBus::Relay.new("test-relay-2")
296
+ relay2.requires_client_authorization = false
297
+ relay2 = azure_service_bus.create_relay(relay2)
298
+
299
+ # Delete a relay endpoint
300
+ azure_service_bus.delete_relay("test-relay2")
301
+ ```
302
+
303
+ ### Queues
304
+
274
305
  ```ruby
275
306
  # Require the azure rubygem
276
307
  require "azure"
@@ -303,6 +334,7 @@ azure_service_bus.delete_queue_message(message)
303
334
  # Delete a queue
304
335
  azure_service_bus.delete_queue("test-queue-1")
305
336
  ```
337
+
306
338
  ### Topics
307
339
 
308
340
  ```ruby
@@ -420,13 +452,13 @@ options = {
420
452
  :deployment_name =>'vm_name',
421
453
  :tcp_endpoints => '80,3389:3390',
422
454
  :private_key_file => 'c:/private_key.key', #required for ssh or winrm(https) certificate.
423
- :certificate_file => 'c:/certificate.pem', #required for ssh or winrm(https) certificate.
424
455
  :ssh_port => 2222,
425
- :vm_size => 'Small', #valid choices are (ExtraSmall Small Medium Large ExtraLarge A5 A6 A7 Basic_A0 Basic_A1 Basic_A2 Basic_A3 Basic_A4)
456
+ :vm_size => 'Small', #valid choices are (Basic_A0,Basic_A1,Basic_A2,Basic_A3,Basic_A4,ExtraSmall,Small,Medium,Large,ExtraLarge,A5,A6,A7,A8,A9,Standard_D1,Standard_D2,Standard_D3,Standard_D4,Standard_D11,Standard_D12,Standard_D13,Standard_D14,Standard_DS1,Standard_DS2,Standard_DS3,Standard_DS4,Standard_DS11,Standard_DS12,Standard_DS13,Standard_DS14,Standard_G1,Standard_G2,Standard_G3,Standard_G4,Standard_G5)
426
457
  :affinity_group_name => 'affinity1',
427
458
  :virtual_network_name => 'xplattestvnet',
428
459
  :subnet_name => 'subnet1',
429
460
  :availability_set_name => 'availabiltyset1'
461
+ :reserved_ip_name => 'reservedipname'
430
462
  }
431
463
  virtual_machine_service.create_virtual_machine(params,options)
432
464
 
@@ -444,10 +476,9 @@ options = {
444
476
  :winrm_transport => ['https','http'], #Currently http is supported. To enable https, set the transport protocol to https, simply rdp to the VM once VM is in ready state, export the certificate ( CN name would be the deployment name) from the certstore of the VM and install to your local machine and communicate WinRM via https.
445
477
  :tcp_endpoints => '80,3389:3390',
446
478
  :private_key_file => 'c:/private_key.key', #required for ssh or winrm(https) certificate.
447
- :certificate_file => 'c:/certificate.pem', #required for ssh or winrm(https) certificate.
448
479
  :winrm_https_port => 5999,
449
480
  :winrm_http_port => 6999, #Used to open different powershell port
450
- :vm_size => 'Small', #valid choices are (ExtraSmall Small Medium Large ExtraLarge A5 A6 A7 Basic_A0 Basic_A1 Basic_A2 Basic_A3 Basic_A4)
481
+ :vm_size => 'Small', #valid choices are (Basic_A0,Basic_A1,Basic_A2,Basic_A3,Basic_A4,ExtraSmall,Small,Medium,Large,ExtraLarge,A5,A6,A7,A8,A9,Standard_D1,Standard_D2,Standard_D3,Standard_D4,Standard_D11,Standard_D12,Standard_D13,Standard_D14,Standard_DS1,Standard_DS2,Standard_DS3,Standard_DS4,Standard_DS11,Standard_DS12,Standard_DS13,Standard_DS14,Standard_G1,Standard_G2,Standard_G3,Standard_G4,Standard_G5)
451
482
  :availability_set_name => 'availabiltyset'
452
483
  }
453
484
  virtual_machine_service.add_role(params, options)
@@ -552,7 +583,7 @@ dns_servers = [{:name => 'dns-1', :ip_address=>'1.2.3.4'}, {:name => 'dns-2',
552
583
 
553
584
  options = {:subnet => subnets, :dns => dns_servers}
554
585
 
555
- vnet.set_network_configuration('virtual-network-name', 'affinity-group-name', address_space, options)
586
+ vnet.set_network_configuration('virtual-network-name', 'location_name', address_space, options)
556
587
 
557
588
  #API to configure virtual network from xml file that can be exported from management portal and customized to add or delete vnet
558
589
 
@@ -565,14 +596,21 @@ vnet.set_network_configuration(vnetxml)
565
596
 
566
597
  Currently the sdk supports *.pem or *.pfx (passwordless pfx) for service management operations. Following are the steps discussed on various cert operations.
567
598
 
568
- * To create pfx, simply download the publishsettings file for your subscription, copy the contents of Management Certificate from the publishsettings and save it in a file and name the file as your cert.pfx. This pfx will be a passwordless pfx which can be supplied as a cert parameter for Service Management Commands
569
- * Using the following openssl commands to extract the pem file and pass the pem file as management cert parameter.
570
- * To get only private key from pfx use Openssl.exe pkcs12 -in cert.pfx -nocerts -out cert.pem
571
- * To remove passphrase from the above private key use ``Openssl.exe rsa -in cert.pem -out certprivnopassword.pem``
572
- * To extract both public & private keys from pfx use ``Openssl.exe pkcs12 -in cert.pfx -out certprivpub.pem``
573
- * To extract only public key from pem use ``Openssl.exe x509 -inform pem -in certprivpub.pem -pubkey -out certpub.pem -outform pem``
574
- * Finally copy the public key & private key to a file *.pem and pass that pem file to management cert parameter.
575
- * To extract pem from custom certificate, export the pfx, follow the above steps to convert to pem and pass that pem file to management cert parameter.
599
+ ## Publish Settings files
600
+
601
+ * To create a pfx from the publishsettings, simply download the publishsettings file for your subscription
602
+ [https://manage.windowsazure.com/publishsettings](https://manage.windowsazure.com/publishsettings/index?client=powershell). Make sure you have this gem installed and
603
+ run `pfxer --in [path to your .publishsettings file]`. This will create a .pfx from your publish settings file which can
604
+ be supplied as a cert parameter for Service Management Commands.
605
+
606
+ ## Generate New Cert and Upload to Azure Portal
607
+
608
+ * Using the following openssl commands to create a cert and upload to Azure Management
609
+ * Generate public and private `openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.key -out mycert.pem`
610
+ * Generate public .cer for Azure upload `openssl x509 -inform pem -in mycert.pem -outform der -out mycert_mgmt.cer`
611
+ * Upload the `mycert_mgmt.cer` to Azure Management through [https://management.azure.com](https://management.azure.com)
612
+ * Combine the public and private into one `cat mycert.key mycert.pem > cert.pem`
613
+ * Use cert.pem as your cert parameter for Service Management Commands.
576
614
 
577
615
  # Need Help?
578
616
 
@@ -580,11 +618,11 @@ Be sure to check out the Microsoft Azure [Developer Forums on Stack Overflow and
580
618
 
581
619
  # Contribute Code or Provide Feedback
582
620
 
583
- If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://windowsazure.github.com/guidelines.html).
621
+ If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.com/guidelines.html).
584
622
  If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-ruby/issues) section of the project.
585
623
 
586
624
  # Learn More
587
625
 
588
- For documentation on how to host Ruby applications on Microsoft Azure, please see the [Microsoft Azure Ruby Developer Center](http://www.windowsazure.com/en-us/develop/ruby/).
626
+ For documentation on how to host Ruby applications on Microsoft Azure, please see the [Microsoft Azure Ruby Developer Center](http://www.azure.com/en-us/develop/ruby/).
589
627
  For documentation on Azure PowerShell CLI tool for Windows, please see our readme [here](http://github.com/azure/azure-sdk-tools).
590
628
  For documentation on the Azure cross platform CLI tool for Windows, Mac and Linux, please see our readme [here](http://github.com/azure/azure-sdk-tools-xplat).