fog-azure 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +23 -0
  3. data/CONTRIBUTING.md +18 -0
  4. data/CONTRIBUTORS.md +4 -0
  5. data/Gemfile +25 -0
  6. data/LICENSE.md +19 -0
  7. data/README.md +31 -0
  8. data/Rakefile +29 -0
  9. data/fog-azure.gemspec +51 -0
  10. data/lib/fog/azure.rb +29 -0
  11. data/lib/fog/azure/compute.rb +85 -0
  12. data/lib/fog/azure/core.rb +29 -0
  13. data/lib/fog/azure/docs/getting_started.md +164 -0
  14. data/lib/fog/azure/models/compute/image.rb +35 -0
  15. data/lib/fog/azure/models/compute/images.rb +51 -0
  16. data/lib/fog/azure/models/compute/server.rb +189 -0
  17. data/lib/fog/azure/models/compute/servers.rb +67 -0
  18. data/lib/fog/azure/models/compute/storage_account.rb +71 -0
  19. data/lib/fog/azure/models/compute/storage_accounts.rb +52 -0
  20. data/lib/fog/azure/requests/compute/create_storage_account.rb +43 -0
  21. data/lib/fog/azure/requests/compute/create_virtual_machine.rb +37 -0
  22. data/lib/fog/azure/requests/compute/delete_storage_account.rb +38 -0
  23. data/lib/fog/azure/requests/compute/delete_virtual_machine.rb +38 -0
  24. data/lib/fog/azure/requests/compute/get_storage_account.rb +37 -0
  25. data/lib/fog/azure/requests/compute/list_images.rb +43 -0
  26. data/lib/fog/azure/requests/compute/list_storage_accounts.rb +43 -0
  27. data/lib/fog/azure/requests/compute/list_virtual_machines.rb +56 -0
  28. data/lib/fog/azure/requests/compute/reboot_server.rb +38 -0
  29. data/lib/fog/azure/requests/compute/shutdown_server.rb +38 -0
  30. data/lib/fog/azure/requests/compute/start_server.rb +38 -0
  31. data/lib/fog/azure/version.rb +26 -0
  32. data/lib/fog/bin/azure.rb +84 -0
  33. data/tests/azure_test_helper.rb +84 -0
  34. data/tests/helper.rb +36 -0
  35. data/tests/helpers/mock_helper.rb +36 -0
  36. data/tests/models/compute/image_tests.rb +50 -0
  37. data/tests/models/compute/server_tests.rb +84 -0
  38. data/tests/models/compute/storage_account_tests.rb +51 -0
  39. data/tests/requests/compute/images_tests.rb +40 -0
  40. data/tests/requests/compute/servers_tests.rb +41 -0
  41. data/tests/requests/compute/storage_accounts_tests.rb +41 -0
  42. metadata +173 -0
@@ -0,0 +1,40 @@
1
+ # Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2
+ #
3
+ # The MIT License (MIT)
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+ Shindo.tests("Fog::Compute[:azure] | images request", ["azure", "compute"]) do
23
+
24
+ tests("#list_images") do
25
+ images = Fog::Compute[:azure].images
26
+
27
+ test "returns a Array" do
28
+ images.is_a? Array
29
+ end
30
+
31
+ test("should return valid image name") do
32
+ images.first.name.is_a? String
33
+ end
34
+
35
+ test("should return records") do
36
+ images.size >= 1
37
+ end
38
+ end
39
+
40
+ end
@@ -0,0 +1,41 @@
1
+ # Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2
+ #
3
+ # The MIT License (MIT)
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+ Shindo.tests("Fog::Compute[:azure] | servers request", ["azure", "compute"]) do
23
+
24
+ tests("#servers") do
25
+ servers = Fog::Compute[:azure].servers
26
+ servers = [fog_server] if servers.empty?
27
+
28
+ test "returns a Array" do
29
+ servers.is_a? Array
30
+ end
31
+
32
+ test("should return valid server name") do
33
+ servers.first.name.is_a? String
34
+ end
35
+
36
+ test("should return records") do
37
+ servers.size >= 1
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,41 @@
1
+ # Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2
+ #
3
+ # The MIT License (MIT)
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+ Shindo.tests("Fog::Compute[:azure] | storage accounts request", ["azure", "compute"]) do
23
+
24
+ tests("#storage_accounts") do
25
+ storage_accounts = Fog::Compute[:azure].storage_accounts
26
+ storage_accounts = [storage_account] if storage_accounts.empty?
27
+
28
+ test "returns a Array" do
29
+ storage_accounts.is_a? Array
30
+ end
31
+
32
+ test("should return valid storage account name") do
33
+ storage_accounts.first.name.is_a? String
34
+ end
35
+
36
+ test("should return records") do
37
+ storage_accounts.size >= 1
38
+ end
39
+ end
40
+
41
+ end
metadata ADDED
@@ -0,0 +1,173 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fog-azure
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jeff Mendoza
8
+ - Ranjan Kumar
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-02-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '10.0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '10.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: shindo
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '0.3'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0.3'
42
+ - !ruby/object:Gem::Dependency
43
+ name: azure
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '0.6'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '0.6'
56
+ - !ruby/object:Gem::Dependency
57
+ name: fog-core
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.27'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.27'
70
+ - !ruby/object:Gem::Dependency
71
+ name: fog-json
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '1.0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '1.0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: fog-xml
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.1'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.1'
98
+ description: |-
99
+ This library can be used as a module for `fog` or as standalone provider
100
+ to use the Azure cloud services in applications..
101
+ email:
102
+ - jlm@jlm.name
103
+ - ranjankumar188@gmail.com
104
+ executables: []
105
+ extensions: []
106
+ extra_rdoc_files: []
107
+ files:
108
+ - ".gitignore"
109
+ - CONTRIBUTING.md
110
+ - CONTRIBUTORS.md
111
+ - Gemfile
112
+ - LICENSE.md
113
+ - README.md
114
+ - Rakefile
115
+ - fog-azure.gemspec
116
+ - lib/fog/azure.rb
117
+ - lib/fog/azure/compute.rb
118
+ - lib/fog/azure/core.rb
119
+ - lib/fog/azure/docs/getting_started.md
120
+ - lib/fog/azure/models/compute/image.rb
121
+ - lib/fog/azure/models/compute/images.rb
122
+ - lib/fog/azure/models/compute/server.rb
123
+ - lib/fog/azure/models/compute/servers.rb
124
+ - lib/fog/azure/models/compute/storage_account.rb
125
+ - lib/fog/azure/models/compute/storage_accounts.rb
126
+ - lib/fog/azure/requests/compute/create_storage_account.rb
127
+ - lib/fog/azure/requests/compute/create_virtual_machine.rb
128
+ - lib/fog/azure/requests/compute/delete_storage_account.rb
129
+ - lib/fog/azure/requests/compute/delete_virtual_machine.rb
130
+ - lib/fog/azure/requests/compute/get_storage_account.rb
131
+ - lib/fog/azure/requests/compute/list_images.rb
132
+ - lib/fog/azure/requests/compute/list_storage_accounts.rb
133
+ - lib/fog/azure/requests/compute/list_virtual_machines.rb
134
+ - lib/fog/azure/requests/compute/reboot_server.rb
135
+ - lib/fog/azure/requests/compute/shutdown_server.rb
136
+ - lib/fog/azure/requests/compute/start_server.rb
137
+ - lib/fog/azure/version.rb
138
+ - lib/fog/bin/azure.rb
139
+ - tests/azure_test_helper.rb
140
+ - tests/helper.rb
141
+ - tests/helpers/mock_helper.rb
142
+ - tests/models/compute/image_tests.rb
143
+ - tests/models/compute/server_tests.rb
144
+ - tests/models/compute/storage_account_tests.rb
145
+ - tests/requests/compute/images_tests.rb
146
+ - tests/requests/compute/servers_tests.rb
147
+ - tests/requests/compute/storage_accounts_tests.rb
148
+ homepage: http://github.com/fog/fog-azure
149
+ licenses:
150
+ - MIT
151
+ metadata: {}
152
+ post_install_message:
153
+ rdoc_options: []
154
+ require_paths:
155
+ - lib
156
+ required_ruby_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ required_rubygems_version: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ requirements: []
167
+ rubyforge_project:
168
+ rubygems_version: 2.2.2
169
+ signing_key:
170
+ specification_version: 4
171
+ summary: Module for the 'fog' gem to support Azure cloud services.
172
+ test_files: []
173
+ has_rdoc: