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,43 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def create_storage_account(name, options)
27
+ @stg_svc.create_storage_account(name, options)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def create_storage_account(name, options)
33
+ storage = ::Azure::StorageManagement::StorageAccount.new
34
+ storage.name = name
35
+ storage.status = "Created"
36
+ storage.label = name
37
+ storage.location = options[:location]
38
+ storage
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,37 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def create_virtual_machine(params, options)
27
+ @vm_svc.create_virtual_machine(params, options)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def create_virtual_machine(params, options)
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,38 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def delete_storage_account(name)
27
+ @stg_svc.delete_storage_account(name)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def delete_storage_account(name)
33
+ nil
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def delete_virtual_machine(vm_name, cloud_service_name)
27
+ @vm_svc.delete_virtual_machine(vm_name, cloud_service_name)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def delete_virtual_machine
33
+ nil
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,37 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def get_storage_account(name)
27
+ @stg_svc.get_storage_account_properties(name)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def get_storage_account(name)
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,43 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def list_images
27
+ @image_svc.list_virtual_machine_images
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def list_images
33
+ image = ::Azure::VirtualMachineImageManagement::VirtualMachineImage.new
34
+ image.name = "Ubuntu-13_04-amd64-server-20130601-en-us-30GB"
35
+ image.os_type = "Linux"
36
+ image.category = "Public"
37
+ image.locations = "East Asia;Southeast Asia;North Europe"
38
+ [image]
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,43 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def list_storage_accounts
27
+ @stg_svc.list_storage_accounts
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def list_storage_accounts
33
+ storage = ::Azure::StorageManagement::StorageAccount.new
34
+ storage.name = "fogteststorageaccount"
35
+ storage.status = "Created"
36
+ storage.label = "Storage-Name"
37
+ storage.location = "West US"
38
+ [storage]
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,56 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def list_virtual_machines
27
+ @vm_svc.list_virtual_machines
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def list_virtual_machines
33
+ vm = ::Azure::VirtualMachineManagement::VirtualMachine.new
34
+ vm.cloud_service_name = "cool-vm"
35
+ vm.status = "ReadyRole"
36
+ vm.ipaddress = "123.45.67.89"
37
+ vm.vm_name = "cool-vm"
38
+ vm.udp_endpoints = []
39
+ vm.hostname = "cool-vm"
40
+ vm.deployment_name = "cool-vm"
41
+ vm.deployment_status = "Running"
42
+ vm.tcp_endpoints = [
43
+ {"Name"=>"http", "Vip"=>"123.45.67.89", "PublicPort"=>"80", "LocalPort"=>"80"},
44
+ {"Name"=>"SSH", "Vip"=>"123.45.67.89", "PublicPort"=>"22", "LocalPort"=>"22"}
45
+ ]
46
+ vm.role_size = "Medium"
47
+ vm.os_type = "Linux"
48
+ vm.disk_name = "cool-vm-cool-vm-0-20130207005053"
49
+ vm.virtual_network_name = ""
50
+ vm.image = "ImageName"
51
+ [vm]
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,38 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def reboot_server(vm_name, cloud_service_name)
27
+ @vm_svc.restart_virtual_machine(vm_name, cloud_service_name)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def reboot_server(vm_name, cloud_service_name)
33
+ nil
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def shutdown_server(vm_name, cloud_service_name)
27
+ @vm_svc.shutdown_virtual_machine(vm_name, cloud_service_name)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def shutdown_server(vm_name, cloud_service_name)
33
+ nil
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
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
+ module Fog
23
+ module Compute
24
+ class Azure
25
+ class Real
26
+ def start_server(vm_name, cloud_service_name)
27
+ @vm_svc.start_virtual_machine(vm_name, cloud_service_name)
28
+ end
29
+ end
30
+
31
+ class Mock
32
+ def start_server(vm_name, cloud_service_name)
33
+ nil
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end