fog-azure-rm 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +27 -0
  3. data/CONTRIBUTORS.md +4 -0
  4. data/LICENSE.md +20 -0
  5. data/README.md +82 -0
  6. data/lib/fog/azurerm.rb +40 -0
  7. data/lib/fog/azurerm/compute.rb +61 -0
  8. data/lib/fog/azurerm/config.rb +1 -0
  9. data/lib/fog/azurerm/core.rb +12 -0
  10. data/lib/fog/azurerm/credentials.rb +37 -0
  11. data/lib/fog/azurerm/dns.rb +48 -0
  12. data/lib/fog/azurerm/models/compute/availability_set.rb +31 -0
  13. data/lib/fog/azurerm/models/compute/availability_sets.rb +36 -0
  14. data/lib/fog/azurerm/models/compute/server.rb +94 -0
  15. data/lib/fog/azurerm/models/compute/servers.rb +32 -0
  16. data/lib/fog/azurerm/models/dns/record_set.rb +28 -0
  17. data/lib/fog/azurerm/models/dns/record_sets.rb +44 -0
  18. data/lib/fog/azurerm/models/dns/zone.rb +21 -0
  19. data/lib/fog/azurerm/models/dns/zones.rb +30 -0
  20. data/lib/fog/azurerm/models/network/network_interface.rb +34 -0
  21. data/lib/fog/azurerm/models/network/network_interfaces.rb +35 -0
  22. data/lib/fog/azurerm/models/network/public_ip.rb +34 -0
  23. data/lib/fog/azurerm/models/network/public_ips.rb +46 -0
  24. data/lib/fog/azurerm/models/network/subnet.rb +34 -0
  25. data/lib/fog/azurerm/models/network/subnets.rb +37 -0
  26. data/lib/fog/azurerm/models/network/virtual_network.rb +30 -0
  27. data/lib/fog/azurerm/models/network/virtual_networks.rb +42 -0
  28. data/lib/fog/azurerm/models/resources/resource_group.rb +21 -0
  29. data/lib/fog/azurerm/models/resources/resource_groups.rb +28 -0
  30. data/lib/fog/azurerm/models/storage/storage_account.rb +37 -0
  31. data/lib/fog/azurerm/models/storage/storage_accounts.rb +45 -0
  32. data/lib/fog/azurerm/network.rb +67 -0
  33. data/lib/fog/azurerm/requests/compute/create_availability_set.rb +45 -0
  34. data/lib/fog/azurerm/requests/compute/create_virtual_machine.rb +100 -0
  35. data/lib/fog/azurerm/requests/compute/deallocate_virtual_machine.rb +26 -0
  36. data/lib/fog/azurerm/requests/compute/delete_availability_set.rb +26 -0
  37. data/lib/fog/azurerm/requests/compute/delete_virtual_machine.rb +26 -0
  38. data/lib/fog/azurerm/requests/compute/generalize_virtual_machine.rb +26 -0
  39. data/lib/fog/azurerm/requests/compute/get_virtual_machine.rb +24 -0
  40. data/lib/fog/azurerm/requests/compute/list_availability_sets.rb +24 -0
  41. data/lib/fog/azurerm/requests/compute/list_available_sizes_for_virtual_machine.rb +24 -0
  42. data/lib/fog/azurerm/requests/compute/list_virtual_machines.rb +64 -0
  43. data/lib/fog/azurerm/requests/compute/power_off_virtual_machine.rb +26 -0
  44. data/lib/fog/azurerm/requests/compute/redeploy_virtual_machine.rb +26 -0
  45. data/lib/fog/azurerm/requests/compute/restart_virtual_machine.rb +26 -0
  46. data/lib/fog/azurerm/requests/compute/start_virtual_machine.rb +26 -0
  47. data/lib/fog/azurerm/requests/dns/check_for_zone.rb +39 -0
  48. data/lib/fog/azurerm/requests/dns/create_record_set.rb +61 -0
  49. data/lib/fog/azurerm/requests/dns/create_zone.rb +47 -0
  50. data/lib/fog/azurerm/requests/dns/delete_record_set.rb +38 -0
  51. data/lib/fog/azurerm/requests/dns/delete_zone.rb +38 -0
  52. data/lib/fog/azurerm/requests/dns/get_records_from_record_set.rb +57 -0
  53. data/lib/fog/azurerm/requests/dns/list_record_sets.rb +44 -0
  54. data/lib/fog/azurerm/requests/dns/list_zones.rb +52 -0
  55. data/lib/fog/azurerm/requests/network/check_for_public_ip.rb +27 -0
  56. data/lib/fog/azurerm/requests/network/check_for_virtual_network.rb +27 -0
  57. data/lib/fog/azurerm/requests/network/create_network_interface.rb +52 -0
  58. data/lib/fog/azurerm/requests/network/create_public_ip.rb +28 -0
  59. data/lib/fog/azurerm/requests/network/create_subnet.rb +30 -0
  60. data/lib/fog/azurerm/requests/network/create_virtual_network.rb +80 -0
  61. data/lib/fog/azurerm/requests/network/delete_network_interface.rb +27 -0
  62. data/lib/fog/azurerm/requests/network/delete_public_ip.rb +27 -0
  63. data/lib/fog/azurerm/requests/network/delete_subnet.rb +27 -0
  64. data/lib/fog/azurerm/requests/network/delete_virtual_network.rb +27 -0
  65. data/lib/fog/azurerm/requests/network/list_network_interfaces.rb +32 -0
  66. data/lib/fog/azurerm/requests/network/list_public_ips.rb +32 -0
  67. data/lib/fog/azurerm/requests/network/list_subnets.rb +30 -0
  68. data/lib/fog/azurerm/requests/network/list_virtual_networks.rb +29 -0
  69. data/lib/fog/azurerm/requests/resources/create_resource_group.rb +27 -0
  70. data/lib/fog/azurerm/requests/resources/delete_resource_group.rb +25 -0
  71. data/lib/fog/azurerm/requests/resources/list_resource_groups.rb +28 -0
  72. data/lib/fog/azurerm/requests/storage/check_storage_account_name_availability.rb +33 -0
  73. data/lib/fog/azurerm/requests/storage/create_storage_account.rb +33 -0
  74. data/lib/fog/azurerm/requests/storage/delete_storage_account.rb +27 -0
  75. data/lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb +25 -0
  76. data/lib/fog/azurerm/requests/storage/list_storage_accounts.rb +28 -0
  77. data/lib/fog/azurerm/resources.rb +48 -0
  78. data/lib/fog/azurerm/storage.rb +51 -0
  79. data/lib/fog/azurerm/version.rb +5 -0
  80. metadata +278 -0
@@ -0,0 +1,51 @@
1
+ require 'fog/azurerm/core'
2
+ # rubocop:disable LineLength
3
+ module Fog
4
+ module Storage
5
+ # This class registers models, requests and collections
6
+ class AzureRM < Fog::Service
7
+ requires :tenant_id
8
+ requires :client_id
9
+ requires :client_secret
10
+ requires :subscription_id
11
+
12
+ request_path 'fog/azurerm/requests/storage'
13
+ request :create_storage_account
14
+ request :list_storage_accounts
15
+ request :delete_storage_account
16
+ request :list_storage_account_for_rg
17
+ request :check_storage_account_name_availability
18
+
19
+ model_path 'fog/azurerm/models/storage'
20
+ model :storage_account
21
+ collection :storage_accounts
22
+ # This class provides the mock implementation for unit tests.
23
+ class Mock
24
+ def initialize(options = {})
25
+ begin
26
+ require 'azure_mgmt_storage'
27
+ rescue LoadError => e
28
+ retry if require('rubygems')
29
+ raise e.message
30
+ end
31
+ puts "Tenand Id: #{options[:tenant_id]}"
32
+ end
33
+ end
34
+ # This class provides the actual implemention for service calls.
35
+ class Real
36
+ def initialize(options)
37
+ begin
38
+ require 'azure_mgmt_storage'
39
+ rescue LoadError => e
40
+ retry if require('rubygems')
41
+ raise e.message
42
+ end
43
+
44
+ credentials = Fog::Credentials::AzureRM.get_credentials(options[:tenant_id], options[:client_id], options[:client_secret])
45
+ @storage_mgmt_client = ::Azure::ARM::Storage::StorageManagementClient.new(credentials)
46
+ @storage_mgmt_client.subscription_id = options[:subscription_id]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,5 @@
1
+ module Fog
2
+ module AzureRM
3
+ VERSION = '0.0.0'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,278 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fog-azure-rm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Shaffan Chaudhry
8
+ - Samawia Moin
9
+ - Adnan Khalil
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2016-05-02 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - "~>"
20
+ - !ruby/object:Gem::Version
21
+ version: '10.0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "~>"
27
+ - !ruby/object:Gem::Version
28
+ version: '10.0'
29
+ - !ruby/object:Gem::Dependency
30
+ name: shindo
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - "~>"
34
+ - !ruby/object:Gem::Version
35
+ version: '0.3'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.3'
43
+ - !ruby/object:Gem::Dependency
44
+ name: minitest
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: 5.8.4
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: 5.8.4
57
+ - !ruby/object:Gem::Dependency
58
+ name: fog-core
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '1.27'
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '1.27'
71
+ - !ruby/object:Gem::Dependency
72
+ name: fog-json
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '1.0'
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: '1.0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: fog-xml
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '0.1'
92
+ type: :runtime
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: '0.1'
99
+ - !ruby/object:Gem::Dependency
100
+ name: rest-client
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: 1.6.9
106
+ type: :runtime
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: 1.6.9
113
+ - !ruby/object:Gem::Dependency
114
+ name: azure_mgmt_compute
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: 0.2.1
120
+ type: :runtime
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - "~>"
125
+ - !ruby/object:Gem::Version
126
+ version: 0.2.1
127
+ - !ruby/object:Gem::Dependency
128
+ name: azure_mgmt_resources
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: 0.2.1
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: 0.2.1
141
+ - !ruby/object:Gem::Dependency
142
+ name: azure_mgmt_storage
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - "~>"
146
+ - !ruby/object:Gem::Version
147
+ version: 0.2.1
148
+ type: :runtime
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: 0.2.1
155
+ - !ruby/object:Gem::Dependency
156
+ name: azure_mgmt_network
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - "~>"
160
+ - !ruby/object:Gem::Version
161
+ version: 0.2.1
162
+ type: :runtime
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - "~>"
167
+ - !ruby/object:Gem::Version
168
+ version: 0.2.1
169
+ description: |-
170
+ This library can be used as a module for `fog` or as standalone provider
171
+ to use the Azure Resource Manager cloud services in applications..
172
+ email:
173
+ executables: []
174
+ extensions: []
175
+ extra_rdoc_files: []
176
+ files:
177
+ - CONTRIBUTING.md
178
+ - CONTRIBUTORS.md
179
+ - LICENSE.md
180
+ - README.md
181
+ - lib/fog/azurerm.rb
182
+ - lib/fog/azurerm/compute.rb
183
+ - lib/fog/azurerm/config.rb
184
+ - lib/fog/azurerm/core.rb
185
+ - lib/fog/azurerm/credentials.rb
186
+ - lib/fog/azurerm/dns.rb
187
+ - lib/fog/azurerm/models/compute/availability_set.rb
188
+ - lib/fog/azurerm/models/compute/availability_sets.rb
189
+ - lib/fog/azurerm/models/compute/server.rb
190
+ - lib/fog/azurerm/models/compute/servers.rb
191
+ - lib/fog/azurerm/models/dns/record_set.rb
192
+ - lib/fog/azurerm/models/dns/record_sets.rb
193
+ - lib/fog/azurerm/models/dns/zone.rb
194
+ - lib/fog/azurerm/models/dns/zones.rb
195
+ - lib/fog/azurerm/models/network/network_interface.rb
196
+ - lib/fog/azurerm/models/network/network_interfaces.rb
197
+ - lib/fog/azurerm/models/network/public_ip.rb
198
+ - lib/fog/azurerm/models/network/public_ips.rb
199
+ - lib/fog/azurerm/models/network/subnet.rb
200
+ - lib/fog/azurerm/models/network/subnets.rb
201
+ - lib/fog/azurerm/models/network/virtual_network.rb
202
+ - lib/fog/azurerm/models/network/virtual_networks.rb
203
+ - lib/fog/azurerm/models/resources/resource_group.rb
204
+ - lib/fog/azurerm/models/resources/resource_groups.rb
205
+ - lib/fog/azurerm/models/storage/storage_account.rb
206
+ - lib/fog/azurerm/models/storage/storage_accounts.rb
207
+ - lib/fog/azurerm/network.rb
208
+ - lib/fog/azurerm/requests/compute/create_availability_set.rb
209
+ - lib/fog/azurerm/requests/compute/create_virtual_machine.rb
210
+ - lib/fog/azurerm/requests/compute/deallocate_virtual_machine.rb
211
+ - lib/fog/azurerm/requests/compute/delete_availability_set.rb
212
+ - lib/fog/azurerm/requests/compute/delete_virtual_machine.rb
213
+ - lib/fog/azurerm/requests/compute/generalize_virtual_machine.rb
214
+ - lib/fog/azurerm/requests/compute/get_virtual_machine.rb
215
+ - lib/fog/azurerm/requests/compute/list_availability_sets.rb
216
+ - lib/fog/azurerm/requests/compute/list_available_sizes_for_virtual_machine.rb
217
+ - lib/fog/azurerm/requests/compute/list_virtual_machines.rb
218
+ - lib/fog/azurerm/requests/compute/power_off_virtual_machine.rb
219
+ - lib/fog/azurerm/requests/compute/redeploy_virtual_machine.rb
220
+ - lib/fog/azurerm/requests/compute/restart_virtual_machine.rb
221
+ - lib/fog/azurerm/requests/compute/start_virtual_machine.rb
222
+ - lib/fog/azurerm/requests/dns/check_for_zone.rb
223
+ - lib/fog/azurerm/requests/dns/create_record_set.rb
224
+ - lib/fog/azurerm/requests/dns/create_zone.rb
225
+ - lib/fog/azurerm/requests/dns/delete_record_set.rb
226
+ - lib/fog/azurerm/requests/dns/delete_zone.rb
227
+ - lib/fog/azurerm/requests/dns/get_records_from_record_set.rb
228
+ - lib/fog/azurerm/requests/dns/list_record_sets.rb
229
+ - lib/fog/azurerm/requests/dns/list_zones.rb
230
+ - lib/fog/azurerm/requests/network/check_for_public_ip.rb
231
+ - lib/fog/azurerm/requests/network/check_for_virtual_network.rb
232
+ - lib/fog/azurerm/requests/network/create_network_interface.rb
233
+ - lib/fog/azurerm/requests/network/create_public_ip.rb
234
+ - lib/fog/azurerm/requests/network/create_subnet.rb
235
+ - lib/fog/azurerm/requests/network/create_virtual_network.rb
236
+ - lib/fog/azurerm/requests/network/delete_network_interface.rb
237
+ - lib/fog/azurerm/requests/network/delete_public_ip.rb
238
+ - lib/fog/azurerm/requests/network/delete_subnet.rb
239
+ - lib/fog/azurerm/requests/network/delete_virtual_network.rb
240
+ - lib/fog/azurerm/requests/network/list_network_interfaces.rb
241
+ - lib/fog/azurerm/requests/network/list_public_ips.rb
242
+ - lib/fog/azurerm/requests/network/list_subnets.rb
243
+ - lib/fog/azurerm/requests/network/list_virtual_networks.rb
244
+ - lib/fog/azurerm/requests/resources/create_resource_group.rb
245
+ - lib/fog/azurerm/requests/resources/delete_resource_group.rb
246
+ - lib/fog/azurerm/requests/resources/list_resource_groups.rb
247
+ - lib/fog/azurerm/requests/storage/check_storage_account_name_availability.rb
248
+ - lib/fog/azurerm/requests/storage/create_storage_account.rb
249
+ - lib/fog/azurerm/requests/storage/delete_storage_account.rb
250
+ - lib/fog/azurerm/requests/storage/list_storage_account_for_rg.rb
251
+ - lib/fog/azurerm/requests/storage/list_storage_accounts.rb
252
+ - lib/fog/azurerm/resources.rb
253
+ - lib/fog/azurerm/storage.rb
254
+ - lib/fog/azurerm/version.rb
255
+ homepage:
256
+ licenses: []
257
+ metadata: {}
258
+ post_install_message:
259
+ rdoc_options: []
260
+ require_paths:
261
+ - lib
262
+ required_ruby_version: !ruby/object:Gem::Requirement
263
+ requirements:
264
+ - - ">="
265
+ - !ruby/object:Gem::Version
266
+ version: '0'
267
+ required_rubygems_version: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ version: '0'
272
+ requirements: []
273
+ rubyforge_project:
274
+ rubygems_version: 2.2.5
275
+ signing_key:
276
+ specification_version: 4
277
+ summary: Module for the 'fog' gem to support Azure Resource Manager cloud services.
278
+ test_files: []